diff options
288 files changed, 40445 insertions, 22435 deletions
@@ -1,64 +1,112 @@ -Olivier Andrieu <oliv__a@users.sourceforge.net> -Jonas B <sanoix@gmail.com> -Waldo Bastian <bastian@kde.org> -Daniel P. Berrange <dan@berrange.com> -Philip Blundell <pb@nexus.co.uk> -Ross Burton <ross@burtonini.com> -Carlos Garcia Campos <carlosgc@gnome.org> +Alexander Larsson <alexl@redhat.com> +Anders Carlsson <andersca@codefactory.se> +Artem Bityutskiy <Artem.Bityutskiy@nokia.com> +Aurelien Jarno <aurel32@debian.org> +Benjamin Reed <ranger@befunk.com> +Benjamin Reed <rangerrick@befunk.com> +Benjamin Reed <ranger@Sin.local> Brian Cameron <brian.cameron@sun.com> -Anders Carlsson <andersca@gnome.org> +Christian Dywan <christian.dywan@lanedo.com> +Christian Ehrlicher <Ch.Ehrlicher@gmx.de> +Christian Persch (GNOME) <chpe@gnome.org> +Colin Walters <walters@lightbox.localdomain> +Colin Walters <walters@space-ghost.verbum.private> +Colin Walters <walters@verbum.org> +Colin Watson <cjwatson@ubuntu.com> +Cyril Brulebois <kibi@debian.org> +Daniel P. Berrange <dan@berrange.com> +Daniel Reed <djr@redhat.com> +David Zeuthen <davidz@redhat.com> +Dennis Kaarsemaker <dennis@kaarsemaker.net> +Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com> +Eamon Walsh <ewalsh@tycho.nsa.gov> +Federico Mena Quintero <federico@novell.com> +Frank Osterfeld <frank@kdab.net> Frederic Crozat <fcrozat@mandriva.com> -Christian Ehrlicher <ch.ehrlicher@gmx.de> +Fridrich Å trba <fridrich.strba@bluewin.ch> +Grzegorz DÄ…browski <gdx@poczta.fm> Harald Fernengel <harry@kdevelop.org> -Owen Fraser-Green <owen@discobabe.net> -Peter O'Gorman <pogma@thewrittenword.com> +Harri Porten <porten@kde.org> +Hasso Tepper <hasso@estpak.ee> +Havoc Pennington <hp@localhost.localdomain> +Havoc Pennington <hp@pobox.com> +Havoc Pennington <hp@redhat.com> +Hendrik Buschmeier <hbuschme@TechFak.Uni-Bielefeld.DE> +James Carter <jwcart2@tycho.nsa.gov> +James Westby <jw+debian@jameswestby.net> +James Willcox <jwillcox@gnome.org> Jens Granseuer <jensgr@gmx.net> -Ralf Habacker <ralf.habacker@freenet.de> -Mikael Hallendal <micke@codefactory.se> +Jérémie Dimino <jeremie@dimino.org> +Joe Marcus Clarke <marcus@freedesktop.org> +Joe Shaw <joeshaw@novell.com> +Johan Gyllenspetz <johangy@axis.com> +Johannes Carlsson <johannes.carlsson.x@sonyericsson.com> +John (J5) Palmieri <johnp@redhat.com> +Jon Gosting <yukarionsen@gmail.com> +Jon Trowbridge <trow@ximian.com> Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> -Magnus Henoch <henoch+bfdo@dtek.chalmers.se> +Kjartan Maraas <kmaraas@gnome.org> Kristian Høgsberg <krh@redhat.com> -Iain Holmes <iain@openedhand.com> +Kristian Rietveld <kris@gtk.org> +Kurt Miller <kurt@intricatesoftware.com> +Lawrence R. Steeger <lsteeger@gmail.com> +Lennart Poettering <lennart@poettering.net> +Lennart Poettering <mzqohf@0pointer.de> +Lionel Landwerlin <lionel.landwerlin@openwide.fr> +Luiz Augusto Von Dentz <luiz.dentz-von@nokia.com> +Marc Brockschmidt <he@debian.org> +Marc Mutz <marc@kdab.net> +Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> +Mark McLoughlin <mark@skynet.ie> +Matthias Clasen <mclasen@redhat.com> +Matt McCutchen <matt@mattmccutchen.net> +Michael Meeks <michael.meeks@novell.com> +Michael Meeks <michael@ximian.com> +Mikael Hallendal <micke@codefactory.se> +Mikael Hallendal <micke@imendio.com> +Miloslav Trmac <mitr@volny.cz> +Murray Cumming <murrayc@murrayc.com> +Nguyá»…n Thái Ngá»c Duy <pclouds@gmail.com> +Ole André Vadla RavnÃ¥s <ole.andre.ravnas@tandberg.com> +Olivier Andrieu <oliv__a@users.sourceforge.net> +Oswald Buddenhagen <ossi@kde.org> +Owen Fraser-Green <owen@discobabe.net> +Patrick von Reth <patrick.vonreth@gmail.com> +Paul Bolle <pebolle@tiscali.nl> +Peter Breitenlohner <peb@mppmu.mpg.de> +Peter Kümmel <syntheticpp@gmx.net> +Peter McCurdy <pmccurdy@skeptopotamus> +Philip Blundell <philb@gnu.org> +Plácido Revilla <unknown@unknown.domain> +Ralf Habacker <ralf.habacker@freenet.de> +Ralf Habacker <Ralf.Habacker@freenet.de> +Ralf Habacker <ralf@s15291359.onlinehome-server.info> +Ray Strode <rstrode@redhat.com> Richard Hughes <richard@hughsie.com> Richard Hult <rhult@codefactory.se> -Peter Kuemmel <syntheticpp@gmx.net> -Alex Larsson <alexl@redhat.com> -Bernard Leak <bernard@brenda-arkle.demon.co.uk> -Tor Lillqvist <tml@iki.fi> -Ryan Lortie <desrt@desrt.ca> -Andrea Luzzardi <scox@sig11.org> -Marcelo Ricardo Leitner <marcelo.leitner@terra.com.br> -Thiago Macieira <thiago@kde.org> -Kjartan Maraas <kmaraas@gnome.org> -Mark McLoughlin <mark@skynet.ie> +Richard Hult <richard@imendio.com> Robert McQueen <robot101@debian.org> -Michael Meeks <michael@ximian.com> -Dave Meikle <dmk@davemeikle.co.uk> -Rodrigo Moya <rodrigo@novell.com> +Romain Pokrzywka <romain@kdab.com> +Ross Burton <ross@openedhand.com> +Ryan Lortie <desrt@desrt.ca> +Sascha Silbe <sascha-web-bugs.freedesktop.org@silbe.org> +Scott James Remnant <scott@netsplit.com> +Scott James Remnant <scott@ubuntu.com> +Sebastian Sauer <sebsauer@kdab.net> Seth Nickell <seth@gnome.org> -Benjamin Otte <in7y118@public.uni-hamburg.de> -John (J5) Palmieri <johnp@redhat.com> -Tom Parker <palfrey@tevp.net> -Havoc Pennington <hp@redhat.com> -Frederic Peters <fpeters@0d.be> -Andras Porjesz <andras.porjesz@siemens.com> -Harri Porten <porten@kde.org> -Marco Pracucci <development@pracucci.com> -Timothy Redaelli <drizzt@gufi.org> -Benjamin Reed <ranger@befunk.com> -Daniel Reed <n@ml.org> -Matthew Rickard <mjricka@epoch.ncsc.mil> -Kristian Rietveld <kris@gtk.org> -Zack Rusin <zack@kde.org> -Olli Salli <olli.salli@collabora.co.uk> -Joe Shaw <joe@assbarn.com> -Kay Sievers <kay.sievers@vrfy.org> +Simon McVittie <simon.mcvittie@collabora.co.uk> Sjoerd Simons <sjoerd@luon.net> -Ray Strode <rstrode@redhat.com> -Alp Toker <alp@atoker.com> -Jon Trowbridge <trow@ximian.com> -Miloslav Trmac <mitr@volny.cz> -Julio M. Merino Vidal <jmmv@NetBSD.org> -Colin Walters <walters@verbum.org> -James Willcox <jwillcox@gnome.org> -David Zeuthen <david@fubar.dk> +Thiago Macieira <thiago@kde.org> +Tim Dijkstra <tim@famdijkstra.org> +Tobias Mueller <fdo-bugs@cryptobitch.de> +Tomas Hoger <thoger@redhat.com> +Tomas Pelka <tpelka@redhat.com> +Tom Hughes <tom.hughes@palm.com> +Tor Lillqvist <tml@iki.fi> +unknown <Administrator@.(none)> +unknown <Habacker@.(none)> +Waldo Bastian <bastian@kde.org> +William Lachance <wrlach@gmail.com> +Will Thompson <will.thompson@collabora.co.uk> +Xan Lopez <xan@gnome.org> +Zack Rusin <zack@kde.org> @@ -173,7 +173,8 @@ To make a release of D-Bus, do the following: - tag the tree with "git tag -s -m 'Released X.Y.Z' dbus-X.Y.Z" where X.Y.Z is the version of the release. If you can't sign - then simply created an unannotated tag: "git tag dbus-X.Y.Z". + then simply created an unsigned annotated tag: + "git tag -a -m 'Released X.Y.Z' dbus-X.Y.Z". - bump the version number up in configure.in, and commit it. Make sure you do this *after* tagging the previous @@ -187,9 +188,9 @@ To make a release of D-Bus, do the following: - push your changes and the tag to the central repository with git push origin master dbus-X.Y dbus-X.Y.Z - - scp your tarball to freedesktop.org server and copy it - to /srv/dbus.freedesktop.org/www/releases/dbus. This should - be possible if you're in group "dbus" + - scp your tarball to freedesktop.org server and copy it to + dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/releases/dbus/dbus-X.Y.Z.tar.gz. + This should be possible if you're in group "dbus" - update the wiki page http://www.freedesktop.org/Software/dbus by adding the new release under the Download heading. Then, cut the @@ -4,8 +4,10 @@ Quick start =========== -DBus uses GNU AutoTools for its build system, thus the basic install -procedure can be summarized as: +DBus could be build with GNU AutoTools or with cmake for its build system, +thus the basic install procedure can be summarized as: + +with autotools: ./configure --prefix=/usr make @@ -13,13 +15,29 @@ procedure can be summarized as: The configure script will automatically determine whether to try and build bindings for GLib, Qt, Qt3, Python and Mono based on what tools -are installed on the host system. The default build behaviour can be +are installed on the host system. The default build behaviour can be overridden using the --enable-XXX/--disable-XXX arguments to configure. A typical scenario in which it is desirable to override automatic -detection, is during packaging of binary builds, where a predictable -dependancy chain is required. For more details on GNU AutoTools +detection, is during packaging of binary builds, where a predictable +dependancy chain is required. For more details on GNU AutoTools installation, consult the generic instructions later in this document +with cmake: + mkdir dbus-build-dir + cd dbus-build-dir + cmake -G <makefile-generator-name> [-D<option>] <dbus-src-root>/cmake + make + make install + +cmake will automatically determine whether to build some features +based on what tools and/or libraries are installed on the host system. +The default build behaviour can be overridden using the +-DENABLE_<XXX> arguments to cmake. +A typical scenario in which it is desirable to override automatic +detection, is during packaging of binary builds, where a predictable +dependancy chain is required. For more details on cmake installation, +consult http://www.cmake.org/cmake/help/help.html. + External software dependancies ============================== @@ -40,10 +58,10 @@ Core library Optional: - - libselinux (for SELinux integration) - - dnotify (for automatic service file reload) - - doxygen (for API documentation) - - xmlto (for Spec & other XML documentation) + - libselinux (for SELinux integration) + - dnotify (for automatic service file reload) + - doxygen (for API documentation) + - xmlto or meinproc4 (for Spec & other XML documentation) ==================================================================== diff --git a/Makefile.am b/Makefile.am index ac31a7fc..8ce8d5b0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS=dbus bus doc tools test DIST_SUBDIRS=dbus bus doc tools test pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dbus-1.pc +pkgconfig_DATA = dbus-1.pc DISTCLEANFILES = \ dbus-1.pc @@ -14,7 +14,9 @@ EXTRA_DIST = \ ChangeLog.pre-1-0 \ NEWS.pre-1-0 \ ChangeLog.pre-1-2 \ - NEWS.pre-1-2 + NEWS.pre-1-2 \ + README.win \ + cmake all-local: Doxyfile @@ -57,3 +59,11 @@ check-coverage: echo "Need to reconfigure with --enable-gcov" endif + +update-authors: + git shortlog -s -e | cut -c 8- | sort > AUTHORS + +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + +ACLOCAL_AMFLAGS = -I m4 diff --git a/Makefile.in b/Makefile.in index a7aba5f5..0e5ccf2e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,8 +59,10 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Doxyfile.in \ AUTHORS COPYING ChangeLog INSTALL NEWS compile config.guess \ config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -171,10 +173,13 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -206,6 +211,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -219,6 +226,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -232,6 +240,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -241,6 +250,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -256,6 +267,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -268,6 +280,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -297,6 +310,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -352,6 +366,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -359,7 +374,7 @@ top_srcdir = @top_srcdir@ SUBDIRS = dbus bus doc tools test DIST_SUBDIRS = dbus bus doc tools test pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dbus-1.pc +pkgconfig_DATA = dbus-1.pc DISTCLEANFILES = \ dbus-1.pc @@ -370,9 +385,15 @@ EXTRA_DIST = \ ChangeLog.pre-1-0 \ NEWS.pre-1-0 \ ChangeLog.pre-1-2 \ - NEWS.pre-1-2 + NEWS.pre-1-2 \ + README.win \ + cmake @DBUS_GCOV_ENABLED_TRUE@GCOV_DIRS = dbus bus +DISTCHECK_CONFIGURE_FLAGS = \ + --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) + +ACLOCAL_AMFLAGS = -I m4 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -966,6 +987,9 @@ all-local: Doxyfile @DBUS_GCOV_ENABLED_FALSE@check-coverage: @DBUS_GCOV_ENABLED_FALSE@ echo "Need to reconfigure with --enable-gcov" +update-authors: + git shortlog -s -e | cut -c 8- | sort > AUTHORS + # 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: @@ -0,0 +1,31 @@ +D-Bus 1.4.1 (20 December 2010) +== + + • Fix for CVE-2010-4352: sending messages with excessively-nested variants can + crash the bus. The existing restriction to 64-levels of nesting previously + only applied to the static type signature; now it also applies to dynamic + nesting using variants. Thanks to Rémi Denis-Courmont for discoving this + issue. + • OS X portability fixes, including launchd support. + • Windows autolaunch improvements. + • Various bug fixes. + +D-Bus 1.4.0 (6 Sep 2010) +== + - systemd hookup + +D-Bus 1.3.1 (23 June 2010) +== + - New standardized PropertiesChanged signal in the properties interface + - Various portability fixes, in particular to Windows platforms + - Support forking bus services, for compatibility + +D-Bus 1.3.0 (29 July 2009) +== + - ability for dbus-send to send to any bus (--address) + - file descriptor passing on Unix socket transports + - use of GCC atomic intrinsics for better processor support + (requires -march=i486 or above for x86 compilation) + - thread-safe FD_CLOEXEC setting on recent Linux kernels (2.6.24-27 and up) + and glibc (2.9 for pipe2 and 2.10 for accept4) + - feature negotiation in the bus daemon @@ -60,24 +60,34 @@ Development snapshots make no ABI stability guarantees for new ABI introduced since the last stable release. Development snapshots are likely to have more bugs than stable releases, obviously. +Configuration +=== + +dbus could be build by using autotools or cmake. + +When using autotools the configure step is initiated by running ./configure +with our without additional configuration flags. + +When using cmake the configure step is initiated by running the cmake +program with our without additional configuration flags. + Configuration flags === -These are the dbus-specific configuration flags that can be given to -the ./configure program. - - --enable-tests enable unit test code - --enable-verbose-mode support verbose debug mode - --enable-asserts include assertion checks - --enable-checks include sanity checks on public API - --enable-xml-docs build XML documentation (requires xmlto) - --enable-doxygen-docs build DOXYGEN documentation (requires Doxygen) - --enable-gcov compile with coverage profiling instrumentation (gcc only) - --enable-abstract-sockets - use abstract socket namespace (linux only) - --enable-selinux build with SELinux support - --enable-dnotify build with dnotify support (linux only) - --enable-kqueue build with kqueue support (*BSD only) +When using autools the dbus-specific configuration flags that can be given to +the ./configure program are these + + --enable-tests enable unit test code + --enable-verbose-mode support verbose debug mode + --enable-asserts include assertion checks + --enable-checks include sanity checks on public API + --enable-xml-docs build XML documentation (requires xmlto) + --enable-doxygen-docs build DOXYGEN documentation (requires Doxygen) + --enable-gcov compile with coverage profiling instrumentation (gcc only) + --enable-abstract-sockets use abstract socket namespace (linux only) + --enable-selinux build with SELinux support + --enable-dnotify build with dnotify support (linux only) + --enable-kqueue build with kqueue support (*BSD only) --with-xml=libxml/expat XML library to use --with-init-scripts=redhat Style of init scripts to install --with-session-socket-dir=dirname Where to put sockets for the per-login-session message bus @@ -90,7 +100,29 @@ the ./configure program. --with-tags[=TAGS] include additional configurations [automatic] --with-x use the X Window System - +When using the cmake build system the dbus-specific configuration flags that can be given +to the cmake program are these (use -D<key>=<value> on command line) + + CMAKE_BUILD_TYPE set dbus build mode - one of Debug|Release|RelWithDebInfo|MinSizeRel + DBUS_BUILD_TESTS enable unit test code default=ON + DBUS_BUILD_X11 Build X11-dependent code default=ON + HAVE_CONSOLE_OWNER_FILE enable console owner file (solaris only) ) default=ON + DBUS_DISABLE_ASSERTS Disable assertion checking default=OFF + DBUS_DISABLE_CHECKS Disable public API sanity checking default=OFF + DBUS_ENABLE_ABSTRACT_SOCKETS enable support for abstract sockets (linux only) default=ON + DBUS_ENABLE_ANSI enable -ansi -pedantic gcc flags default=OFF + DBUS_ENABLE_DNOTIFY build with dnotify support (linux only) default=ON + DBUS_ENABLE_VERBOSE_MODE support verbose debug mode default=ON + DBUS_ENABLE_DOXYGEN_DOCS build DOXYGEN documentation (requires Doxygen) default=ON + DBUS_GCOV_ENABLED compile with coverage profiling instrumentation (gcc only) default=OFF + DBUS_INSTALL_SYSTEM_LIBS install required system libraries default (windows only) =OFF + DBUS_USE_EXPAT Use expat (== ON) or libxml2 (==OFF) default=ON [1] + DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS Use nonce tcp default address default=OFF + DBUS_USE_OUTPUT_DEBUG_STRING enable win32 debug port for message output default=OFF + + [1] requires installed development package of the related dependency + + API/ABI Policy === diff --git a/README.win b/README.win new file mode 100644 index 00000000..a871f96a --- /dev/null +++ b/README.win @@ -0,0 +1,107 @@ +----------------------------------------- +Windows port of the freedesktop.org D-Bus +----------------------------------------- + +Features and completeness +------------------------- +The windows port of dbus provides the dbus-1 library and mostly +applications which are already available on unix. These applications +are: dbus-daemon, dbus-launch, dbus-monitor and dbus-send. +DBus comes with a test suite which is used on unix to guarantate +production quality and this test suite runs mostly. There are some +test not running yet and there is help needed to get them running. + + +Building +-------- +DBus could be build on windows using automake or cmake. See the +file README for more informations. +Special cmake build instructions could be found in cmake/readme-cmake.txt + + +windbus and dbus4win Ports +-------------------------- +The Windows ports from the windbus and dbus4win projects has been merged +into the freedesktop git master branch, as applicable. The spec has been +updated with windows specific stuff. + + +Tests +----- + - dbus library check + bin\dbus-test.exe <build-root>\test\data + + - bus daemon check + bin\bus-test.exe <build-root>\test\data + + - check available names + bin\test_names.exe + + - check if dbus-daemon is accessable + bin\dbus-send.exe --session --type=method_call --print-reply --dest=org.freedesktop.DBus / org.freedesktop.DBus.ListNames method return sender=org.freedesktop.DBus -> dest=:1.4 array [ string "org.freedesktop.DBus"string ":1.4"] + + - start session dbus-daemon + either by running + bin\dbus-launch + or + start bin\dbus-daemon --session + + Before running these commands you may execute + set DBUS_VERBOSE=1 + for getting debug infos + + + - call function registerd in dbus + bin\dbus-send.exe --dest=org.freedesktop.DBus --print-reply --type=method_call / org.freedesktop.DBus.StartServiceByName string:org.freedesktop.DBus.TestSuiteEchoService uint32:455 method return sender=org.freedesktop.DBus -> dest=:1.8 uint32 2 + + note: When building with the Visual C++ IDE the *.exe files are in + the bin/Debug and bin/Release folder, not in the bin folder. + + +FAQ +--- + +- How far is WinDBus from being usable for production ? + + dbus comes with a test suite which is used on unix to guarantate + production quality and this test suite runs mostly. There are some + test not running and we need help to get them running. + In the pratice I and some other people are using dbus for at least more + than four years in conjunction with kde on windows without any problems. + +- On UNIX D-Bus uses UNIX sockets to communicate (correct me if I'm wrong). + What is used on Windows ? + + tcp sockets, there are some efforts to get named pipe running, but some + design problems of the win32 api, we are not able to solve without + bigger changes to the dbus code base let us stop this effort. + +- Do you have any clue if dbus-win32 can run in a Windows CE environment? + + dbus has been ported to wince, see README.wince for more informations + +- Do you know if the C++ binding made by OpenWengo will be easily portable to Windows? + + The OpenWengo dbus-c++ binding has been ported to windows see in WinDBus svn + (http://sf.net/projects/windbus) + The related test applicationa are running well. + + +TODO +---- + +Oktober 2010: + +- the code wrapped with DBUS_WIN_FIXME should be inspected if it required for windows + +- create a dbus setup installer + +- implement system bus and system bus service starter + see http://windbus.svn.sourceforge.net/viewvc/windbus/trunk/bus/bus-service-win.c + for a starting point + +- implement a real login session bus + The scope parameter of the autolaunch meta protocol could be extended to support user + specific session busses (like already done with the amarok bundled dbus which use a + shared memory area named "DBusDaemonAddressInfo:<username>". + Also the dbus installer should start a session bus on user login. diff --git a/acinclude.m4 b/acinclude.m4 index 5dac6478..b2889253 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,58 +1,158 @@ - -dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN([PKG_CHECK_MODULES], [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES @@ -13,7961 +13,12 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. 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'.])]) -# 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. -# Written by Gordon Matzigkeit, 1996 -# -# 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 56 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_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_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -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 - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# 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"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# <var>='`$ECHO "X$<var>" | $Xsed -e "$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)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# 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 - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - 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_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -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 - -cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to <bug-libtool@gnu.org>." - -lt_cl_version="\ -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. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# 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_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_XSI_SHELLFNS - - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -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)]) -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], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $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 - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - 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 - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _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)='' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _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}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -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 -])# _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 - - -# _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. -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! - : -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 - -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_PROG_ECHO_BACKSLASH - - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _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]) - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi -_LT_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_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - 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' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - 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' - # 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="/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 - ;; - - *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - ;; - esac - dynamic_linker='Win32 ld.exe' - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # 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 - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break - ;; - *) - test "$with_gnu_ld" != yes && break - ;; - esac - fi - done - IFS="$lt_save_ifs" -else - lt_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$lt_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -_LT_PATH_LD_GNU -AC_SUBST([LD]) - -_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) -])# LT_PATH_LD - -# Old names: -AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) -AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_LD], []) -dnl AC_DEFUN([AC_PROG_LD], []) - - -# _LT_PATH_LD_GNU -#- -------------- -m4_defun([_LT_PATH_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac]) -with_gnu_ld=$lt_cv_prog_gnu_ld -])# _LT_PATH_LD_GNU - - -# _LT_CMD_RELOAD -# -------------- -# find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -m4_defun([_LT_CMD_RELOAD], -[AC_CACHE_CHECK([for $LD option to reload object files], - lt_cv_ld_reload_flag, - [lt_cv_ld_reload_flag='-r']) -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_DECL([], [reload_cmds], [2])dnl -])# _LT_CMD_RELOAD - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -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' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=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 -]) -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 - -_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"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -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"], :) - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_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 "$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 "$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) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_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' - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -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'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_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 - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -const struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -_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], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_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_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_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 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - 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 - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC - _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\ 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)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | 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). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - 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 - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | 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']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # 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 - _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\ 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' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _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]) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -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' - 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 - 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' - 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' - ;; - *) - _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)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _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 - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _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 -*** 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. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - 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 - _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' - - 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' - # 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag= - 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' - 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' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - 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) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - 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(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf*) - # 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' - 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' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _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' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_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' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _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' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - 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' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _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" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _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' - _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' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_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 - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _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 - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - 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 - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # 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(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - 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' - 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 - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - 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' - 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 - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_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 -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _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' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - 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' - # 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" - 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' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _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(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' - 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' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - 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(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_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' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _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_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' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _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' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _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' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_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)]) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_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], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - 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], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_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([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_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_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -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_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -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_DECL_EGREP])dnl - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_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 -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_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(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_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_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_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(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX - _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" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX - _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' - _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' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - 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 - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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' - ;; - *) - 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' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _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 -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_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' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_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' - 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' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *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`"' - _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`~ - $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' - _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' - ;; - *) # Version 6 will 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' - ;; - esac - - _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' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "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' - ;; - xl*) - # 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' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _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(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' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_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 - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - 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(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_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~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "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' - ;; - *) - 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}-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' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _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)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_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_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -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 -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - 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(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - 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(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - else - prev= - fi - - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - ;; - - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _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) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_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 -_LT_TAGVAR(inherit_rpath, $1)=no -_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(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_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_GCC=$GCC - CC=${F77-"f77"} - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -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) - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_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 -_LT_TAGVAR(inherit_rpath, $1)=no -_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(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_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_GCC=$GCC - CC=${FC-"f95"} - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_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_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ 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 - -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" -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_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_GCC=$GCC -GCC= -CC=${RC-"windres"} -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC="$lt_save_CC" -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_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 -} - -# 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"` -} - -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. - -# 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 -]) - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008 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 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# 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], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 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 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 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. - -# Generated from ltversion.in. - -# serial 3017 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007 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 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -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])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -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])]) - # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -9029,4 +1080,9 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) m4_include([acinclude.m4]) diff --git a/bus/Makefile.am b/bus/Makefile.am index ad49e6dd..efa8ab5b 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -3,18 +3,24 @@ configdir=$(sysconfdir)/dbus-1 INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \ -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ - -DDAEMON_NAME=\"dbus-daemon\" -DDBUS_COMPILATION + -DDBUS_COMPILATION EFENCE= CONFIG_IN_FILES= \ session.conf.in \ - system.conf.in + system.conf.in \ + org.freedesktop.dbus-session.plist.in config_DATA= \ session.conf \ system.conf +if DBUS_ENABLE_LAUNCHD +agentdir=$(LAUNCHD_AGENT_DIR) +agent_DATA=org.freedesktop.dbus-session.plist +endif + if DBUS_USE_LIBXML XML_SOURCES=config-loader-libxml.c endif @@ -74,11 +80,12 @@ BUS_SOURCES= \ dbus_daemon_SOURCES= \ $(BUS_SOURCES) \ - main.c + main.c +dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD dbus_daemon_LDADD= \ + $(top_builddir)/dbus/libdbus-internal.la \ $(EFENCE) \ - $(top_builddir)/dbus/libdbus-convenience.la \ $(DBUS_BUS_LIBS) dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ @PIE_LDFLAGS@ @@ -102,8 +109,9 @@ dbus_daemon_launch_helper_SOURCES= \ activation-helper-bin.c \ $(LAUNCH_HELPER_SOURCES) +dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD dbus_daemon_launch_helper_LDADD= \ - $(top_builddir)/dbus/libdbus-convenience.la \ + $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ @@ -115,11 +123,11 @@ dbus_daemon_launch_helper_test_SOURCES= \ $(LAUNCH_HELPER_SOURCES) dbus_daemon_launch_helper_test_LDADD= \ - $(top_builddir)/dbus/libdbus-convenience.la \ + $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ -dbus_daemon_launch_helper_test_CPPFLAGS= \ +dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \ -DACTIVATION_LAUNCHER_TEST ## we build yet another binary so we can do the OOM tests @@ -129,27 +137,39 @@ bus_test_launch_helper_SOURCES= \ $(LAUNCH_HELPER_SOURCES) bus_test_launch_helper_LDADD= \ - $(top_builddir)/dbus/libdbus-convenience.la \ + $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ -bus_test_launch_helper_CPPFLAGS= \ +bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM +extra_tests= +extra_noinst_programs= +extra_inst_programs= +if DBUS_UNIX +extra_tests+=bus-test-launch-helper +extra_noinst_programs+=dbus-daemon-launch-helper dbus-daemon-launch-helper-test dbus-daemon +endif +if DBUS_WIN +extra_inst_programs+=dbus-daemon +endif + ## note that TESTS has special meaning (stuff to use in make check) -## so if adding tests not to be run in make check, don't add them to +## so if adding tests not to be run in make check, don't add them to ## TESTS if DBUS_BUILD_TESTS TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1 -TESTS=bus-test bus-test-system bus-test-launch-helper +TESTS=bus-test bus-test-system $(extra_tests) else TESTS= endif -## we use noinst_PROGRAMS not check_PROGRAMS so that we build +## we use noinst_PROGRAMS not check_PROGRAMS so that we build ## even when not doing "make check" -noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper +noinst_PROGRAMS=$(TESTS) $(extra_noinst_programs) +bin_PROGRAMS=$(extra_inst_programs) bus_test_system_SOURCES= \ $(XML_SOURCES) \ @@ -161,14 +181,16 @@ bus_test_system_SOURCES= \ utils.h \ test-system.c -bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS) +bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD +bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@ bus_test_SOURCES= \ $(BUS_SOURCES) \ test-main.c -bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS) +bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD +bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ ## mop up the gcov files @@ -176,32 +198,47 @@ clean-local: /bin/rm *.bb *.bbg *.da *.gcov || true uninstall-hook: - rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon - rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper + rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) + rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT) install-data-hook: - if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \ - $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \ - chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ - fi - $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR) $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services +if DBUS_UNIX + if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \ + $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \ + chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ + fi + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon$(EXEEXT) $(DESTDIR)$(DBUS_DAEMONDIR) $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1 - $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir) + if test -f dbus-daemon-launch-helper$(EXEEXT) ; then \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon-launch-helper$(EXEEXT) $(DESTDIR)$(libexecdir); \ if test `id -u` -eq 0; then \ - chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ - chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ + chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ + chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ else \ echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \ echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \ + fi \ fi +endif +if HAVE_SYSTEMD +# Install dbus.socket as default implementation of a D-Bus stack + $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants + $(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket +# Unconditionally enable D-Bus on systemd installations + $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants + $(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket + $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants + $(LN_S) ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service +endif #### Init scripts fun SCRIPT_IN_FILES=messagebus.in \ + messagebus-config.in \ rc.messagebus.in ## Red Hat start @@ -226,9 +263,25 @@ initd_SCRIPTS= \ endif ## Slackware end -MAN_IN_FILES=dbus-daemon.1.in -man_MANS = dbus-daemon.1 +## Cygwin start +if DBUS_INIT_SCRIPTS_CYGWIN + +bin_SCRIPTS= \ + messagebus-config + +endif +## Cygwin end + +if HAVE_SYSTEMD +SCRIPT_IN_FILES += \ + dbus.service.in \ + dbus.socket.in + +systemdsystemunit_DATA = \ + dbus.service \ + dbus.socket +endif -#### Extra dist +#### Extra dist -EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) +EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) diff --git a/bus/Makefile.in b/bus/Makefile.in index 13a599af..7ea6fe64 100644 --- a/bus/Makefile.in +++ b/bus/Makefile.in @@ -36,31 +36,53 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@DBUS_UNIX_TRUE@am__append_1 = bus-test-launch-helper +@DBUS_UNIX_TRUE@am__append_2 = dbus-daemon-launch-helper dbus-daemon-launch-helper-test dbus-daemon +@DBUS_WIN_TRUE@am__append_3 = dbus-daemon @DBUS_BUILD_TESTS_TRUE@TESTS = bus-test$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ bus-test-system$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ bus-test-launch-helper$(EXEEXT) -noinst_PROGRAMS = $(am__EXEEXT_1) dbus-daemon$(EXEEXT) \ - dbus-daemon-launch-helper-test$(EXEEXT) \ - dbus-daemon-launch-helper$(EXEEXT) +@DBUS_BUILD_TESTS_TRUE@ $(am__EXEEXT_4) +noinst_PROGRAMS = $(am__EXEEXT_5) $(am__EXEEXT_7) +bin_PROGRAMS = $(am__EXEEXT_2) +@HAVE_SYSTEMD_TRUE@am__append_4 = \ +@HAVE_SYSTEMD_TRUE@ dbus.service.in \ +@HAVE_SYSTEMD_TRUE@ dbus.socket.in + subdir = bus DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/dbus-daemon.1.in $(srcdir)/messagebus.in \ + $(srcdir)/dbus.service.in $(srcdir)/dbus.socket.in \ + $(srcdir)/messagebus-config.in $(srcdir)/messagebus.in \ + $(srcdir)/org.freedesktop.dbus-session.plist.in \ $(srcdir)/rc.messagebus.in $(srcdir)/session.conf.in \ $(srcdir)/system.conf.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = system.conf session.conf messagebus rc.messagebus \ - dbus-daemon.1 +CONFIG_CLEAN_FILES = system.conf session.conf messagebus \ + messagebus-config org.freedesktop.dbus-session.plist \ + rc.messagebus dbus.service dbus.socket CONFIG_CLEAN_VPATH_FILES = -@DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = bus-test$(EXEEXT) \ +@DBUS_WIN_TRUE@am__EXEEXT_1 = dbus-daemon$(EXEEXT) +am__EXEEXT_2 = $(am__EXEEXT_1) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(initddir)" "$(DESTDIR)$(agentdir)" \ + "$(DESTDIR)$(configdir)" "$(DESTDIR)$(systemdsystemunitdir)" +@DBUS_UNIX_TRUE@am__EXEEXT_3 = bus-test-launch-helper$(EXEEXT) +am__EXEEXT_4 = $(am__EXEEXT_3) +@DBUS_BUILD_TESTS_TRUE@am__EXEEXT_5 = bus-test$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ bus-test-system$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ bus-test-launch-helper$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) +@DBUS_BUILD_TESTS_TRUE@ $(am__EXEEXT_4) +@DBUS_UNIX_TRUE@am__EXEEXT_6 = dbus-daemon-launch-helper$(EXEEXT) \ +@DBUS_UNIX_TRUE@ dbus-daemon-launch-helper-test$(EXEEXT) \ +@DBUS_UNIX_TRUE@ dbus-daemon$(EXEEXT) +am__EXEEXT_7 = $(am__EXEEXT_6) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__bus_test_SOURCES_DIST = activation.c activation.h \ activation-exit-codes.h bus.c bus.h config-parser.c \ config-parser.h config-parser-common.c config-parser-common.h \ @@ -71,24 +93,27 @@ am__bus_test_SOURCES_DIST = activation.c activation.h \ selinux.c services.c services.h signals.c signals.h test.c \ test.h utils.c utils.h config-loader-expat.c \ config-loader-libxml.c test-main.c -@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-default.$(OBJEXT) -@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_TRUE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-dnotify.$(OBJEXT) -@DBUS_BUS_ENABLE_INOTIFY_TRUE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = dir-watch-inotify.$(OBJEXT) -@DBUS_BUS_ENABLE_KQUEUE_TRUE@am__objects_1 = \ -@DBUS_BUS_ENABLE_KQUEUE_TRUE@ dir-watch-kqueue.$(OBJEXT) -@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_2 = config-loader-libxml.$(OBJEXT) -@DBUS_USE_EXPAT_TRUE@am__objects_2 = config-loader-expat.$(OBJEXT) -am__objects_3 = activation.$(OBJEXT) bus.$(OBJEXT) \ - config-parser.$(OBJEXT) config-parser-common.$(OBJEXT) \ - connection.$(OBJEXT) desktop-file.$(OBJEXT) $(am__objects_1) \ - dispatch.$(OBJEXT) driver.$(OBJEXT) expirelist.$(OBJEXT) \ - policy.$(OBJEXT) selinux.$(OBJEXT) services.$(OBJEXT) \ - signals.$(OBJEXT) test.$(OBJEXT) utils.$(OBJEXT) \ +@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = bus_test-dir-watch-default.$(OBJEXT) +@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_TRUE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = bus_test-dir-watch-dnotify.$(OBJEXT) +@DBUS_BUS_ENABLE_INOTIFY_TRUE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_1 = bus_test-dir-watch-inotify.$(OBJEXT) +@DBUS_BUS_ENABLE_KQUEUE_TRUE@am__objects_1 = bus_test-dir-watch-kqueue.$(OBJEXT) +@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_2 = bus_test-config-loader-libxml.$(OBJEXT) +@DBUS_USE_EXPAT_TRUE@am__objects_2 = \ +@DBUS_USE_EXPAT_TRUE@ bus_test-config-loader-expat.$(OBJEXT) +am__objects_3 = bus_test-activation.$(OBJEXT) bus_test-bus.$(OBJEXT) \ + bus_test-config-parser.$(OBJEXT) \ + bus_test-config-parser-common.$(OBJEXT) \ + bus_test-connection.$(OBJEXT) bus_test-desktop-file.$(OBJEXT) \ + $(am__objects_1) bus_test-dispatch.$(OBJEXT) \ + bus_test-driver.$(OBJEXT) bus_test-expirelist.$(OBJEXT) \ + bus_test-policy.$(OBJEXT) bus_test-selinux.$(OBJEXT) \ + bus_test-services.$(OBJEXT) bus_test-signals.$(OBJEXT) \ + bus_test-test.$(OBJEXT) bus_test-utils.$(OBJEXT) \ $(am__objects_2) -am_bus_test_OBJECTS = $(am__objects_3) test-main.$(OBJEXT) +am_bus_test_OBJECTS = $(am__objects_3) bus_test-test-main.$(OBJEXT) bus_test_OBJECTS = $(am_bus_test_OBJECTS) am__DEPENDENCIES_1 = -bus_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +bus_test_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -115,8 +140,7 @@ am_bus_test_launch_helper_OBJECTS = \ $(am__objects_5) bus_test_launch_helper_OBJECTS = $(am_bus_test_launch_helper_OBJECTS) bus_test_launch_helper_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-convenience.la \ - $(am__DEPENDENCIES_1) + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_1) bus_test_launch_helper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(bus_test_launch_helper_LDFLAGS) \ @@ -125,13 +149,16 @@ am__bus_test_system_SOURCES_DIST = config-loader-expat.c \ config-loader-libxml.c config-parser-common.c \ config-parser-common.h config-parser-trivial.c \ config-parser-trivial.h utils.c utils.h test-system.c -am_bus_test_system_OBJECTS = $(am__objects_2) \ - config-parser-common.$(OBJEXT) config-parser-trivial.$(OBJEXT) \ - utils.$(OBJEXT) test-system.$(OBJEXT) +@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_6 = bus_test_system-config-loader-libxml.$(OBJEXT) +@DBUS_USE_EXPAT_TRUE@am__objects_6 = bus_test_system-config-loader-expat.$(OBJEXT) +am_bus_test_system_OBJECTS = $(am__objects_6) \ + bus_test_system-config-parser-common.$(OBJEXT) \ + bus_test_system-config-parser-trivial.$(OBJEXT) \ + bus_test_system-utils.$(OBJEXT) \ + bus_test_system-test-system.$(OBJEXT) bus_test_system_OBJECTS = $(am_bus_test_system_OBJECTS) bus_test_system_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-convenience.la \ - $(am__DEPENDENCIES_1) + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_1) bus_test_system_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(bus_test_system_LDFLAGS) $(LDFLAGS) \ @@ -146,11 +173,26 @@ am__dbus_daemon_SOURCES_DIST = activation.c activation.h \ selinux.c services.c services.h signals.c signals.h test.c \ test.h utils.c utils.h config-loader-expat.c \ config-loader-libxml.c main.c -am_dbus_daemon_OBJECTS = $(am__objects_3) main.$(OBJEXT) +@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_7 = dbus_daemon-dir-watch-default.$(OBJEXT) +@DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_TRUE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_7 = dbus_daemon-dir-watch-dnotify.$(OBJEXT) +@DBUS_BUS_ENABLE_INOTIFY_TRUE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@am__objects_7 = dbus_daemon-dir-watch-inotify.$(OBJEXT) +@DBUS_BUS_ENABLE_KQUEUE_TRUE@am__objects_7 = dbus_daemon-dir-watch-kqueue.$(OBJEXT) +@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_8 = dbus_daemon-config-loader-libxml.$(OBJEXT) +@DBUS_USE_EXPAT_TRUE@am__objects_8 = dbus_daemon-config-loader-expat.$(OBJEXT) +am__objects_9 = dbus_daemon-activation.$(OBJEXT) \ + dbus_daemon-bus.$(OBJEXT) dbus_daemon-config-parser.$(OBJEXT) \ + dbus_daemon-config-parser-common.$(OBJEXT) \ + dbus_daemon-connection.$(OBJEXT) \ + dbus_daemon-desktop-file.$(OBJEXT) $(am__objects_7) \ + dbus_daemon-dispatch.$(OBJEXT) dbus_daemon-driver.$(OBJEXT) \ + dbus_daemon-expirelist.$(OBJEXT) dbus_daemon-policy.$(OBJEXT) \ + dbus_daemon-selinux.$(OBJEXT) dbus_daemon-services.$(OBJEXT) \ + dbus_daemon-signals.$(OBJEXT) dbus_daemon-test.$(OBJEXT) \ + dbus_daemon-utils.$(OBJEXT) $(am__objects_8) +am_dbus_daemon_OBJECTS = $(am__objects_9) dbus_daemon-main.$(OBJEXT) dbus_daemon_OBJECTS = $(am_dbus_daemon_OBJECTS) -dbus_daemon_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/dbus/libdbus-convenience.la \ - $(am__DEPENDENCIES_1) +dbus_daemon_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) dbus_daemon_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dbus_daemon_LDFLAGS) $(LDFLAGS) -o $@ @@ -160,16 +202,21 @@ am__dbus_daemon_launch_helper_SOURCES_DIST = activation-helper-bin.c \ config-parser-trivial.c config-parser-trivial.h desktop-file.c \ desktop-file.h utils.c utils.h activation-exit-codes.h \ activation-helper.h activation-helper.c -am__objects_6 = $(am__objects_2) config-parser-common.$(OBJEXT) \ - config-parser-trivial.$(OBJEXT) desktop-file.$(OBJEXT) \ - utils.$(OBJEXT) activation-helper.$(OBJEXT) +@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_10 = dbus_daemon_launch_helper-config-loader-libxml.$(OBJEXT) +@DBUS_USE_EXPAT_TRUE@am__objects_10 = dbus_daemon_launch_helper-config-loader-expat.$(OBJEXT) +am__objects_11 = $(am__objects_10) \ + dbus_daemon_launch_helper-config-parser-common.$(OBJEXT) \ + dbus_daemon_launch_helper-config-parser-trivial.$(OBJEXT) \ + dbus_daemon_launch_helper-desktop-file.$(OBJEXT) \ + dbus_daemon_launch_helper-utils.$(OBJEXT) \ + dbus_daemon_launch_helper-activation-helper.$(OBJEXT) am_dbus_daemon_launch_helper_OBJECTS = \ - activation-helper-bin.$(OBJEXT) $(am__objects_6) + dbus_daemon_launch_helper-activation-helper-bin.$(OBJEXT) \ + $(am__objects_11) dbus_daemon_launch_helper_OBJECTS = \ $(am_dbus_daemon_launch_helper_OBJECTS) dbus_daemon_launch_helper_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-convenience.la \ - $(am__DEPENDENCIES_1) + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_1) dbus_daemon_launch_helper_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(dbus_daemon_launch_helper_LDFLAGS) \ @@ -181,21 +228,20 @@ am__dbus_daemon_launch_helper_test_SOURCES_DIST = \ config-parser-trivial.h desktop-file.c desktop-file.h utils.c \ utils.h activation-exit-codes.h activation-helper.h \ activation-helper.c -@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_7 = dbus_daemon_launch_helper_test-config-loader-libxml.$(OBJEXT) -@DBUS_USE_EXPAT_TRUE@am__objects_7 = dbus_daemon_launch_helper_test-config-loader-expat.$(OBJEXT) -am__objects_8 = $(am__objects_7) \ +@DBUS_USE_EXPAT_FALSE@@DBUS_USE_LIBXML_TRUE@am__objects_12 = dbus_daemon_launch_helper_test-config-loader-libxml.$(OBJEXT) +@DBUS_USE_EXPAT_TRUE@am__objects_12 = dbus_daemon_launch_helper_test-config-loader-expat.$(OBJEXT) +am__objects_13 = $(am__objects_12) \ dbus_daemon_launch_helper_test-config-parser-common.$(OBJEXT) \ dbus_daemon_launch_helper_test-config-parser-trivial.$(OBJEXT) \ dbus_daemon_launch_helper_test-desktop-file.$(OBJEXT) \ dbus_daemon_launch_helper_test-utils.$(OBJEXT) \ dbus_daemon_launch_helper_test-activation-helper.$(OBJEXT) am_dbus_daemon_launch_helper_test_OBJECTS = dbus_daemon_launch_helper_test-activation-helper-bin.$(OBJEXT) \ - $(am__objects_8) + $(am__objects_13) dbus_daemon_launch_helper_test_OBJECTS = \ $(am_dbus_daemon_launch_helper_test_OBJECTS) dbus_daemon_launch_helper_test_DEPENDENCIES = \ - $(top_builddir)/dbus/libdbus-convenience.la \ - $(am__DEPENDENCIES_1) + $(top_builddir)/dbus/libdbus-internal.la $(am__DEPENDENCIES_1) dbus_daemon_launch_helper_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) \ @@ -221,9 +267,7 @@ 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__installdirs = "$(DESTDIR)$(initddir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(configdir)" -SCRIPTS = $(initd_SCRIPTS) +SCRIPTS = $(bin_SCRIPTS) $(initd_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -260,10 +304,7 @@ DIST_SOURCES = $(am__bus_test_SOURCES_DIST) \ $(am__dbus_daemon_SOURCES_DIST) \ $(am__dbus_daemon_launch_helper_SOURCES_DIST) \ $(am__dbus_daemon_launch_helper_test_SOURCES_DIST) -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man_MANS) -DATA = $(config_DATA) +DATA = $(agent_DATA) $(config_DATA) $(systemdsystemunit_DATA) ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -273,10 +314,13 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -308,6 +352,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -321,6 +367,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -334,6 +381,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -343,6 +391,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -358,6 +408,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -370,6 +421,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -399,6 +451,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -454,6 +507,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -461,17 +515,20 @@ top_srcdir = @top_srcdir@ configdir = $(sysconfdir)/dbus-1 INCLUDES = -I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \ -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \ - -DDAEMON_NAME=\"dbus-daemon\" -DDBUS_COMPILATION + -DDBUS_COMPILATION EFENCE = CONFIG_IN_FILES = \ session.conf.in \ - system.conf.in + system.conf.in \ + org.freedesktop.dbus-session.plist.in config_DATA = \ session.conf \ system.conf +@DBUS_ENABLE_LAUNCHD_TRUE@agentdir = $(LAUNCHD_AGENT_DIR) +@DBUS_ENABLE_LAUNCHD_TRUE@agent_DATA = org.freedesktop.dbus-session.plist @DBUS_USE_EXPAT_TRUE@XML_SOURCES = config-loader-expat.c @DBUS_USE_LIBXML_TRUE@XML_SOURCES = config-loader-libxml.c @DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE@@DBUS_BUS_ENABLE_INOTIFY_FALSE@@DBUS_BUS_ENABLE_KQUEUE_FALSE@DIR_WATCH_SOURCE = dir-watch-default.c @@ -516,11 +573,12 @@ BUS_SOURCES = \ dbus_daemon_SOURCES = \ $(BUS_SOURCES) \ - main.c + main.c +dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD dbus_daemon_LDADD = \ + $(top_builddir)/dbus/libdbus-internal.la \ $(EFENCE) \ - $(top_builddir)/dbus/libdbus-convenience.la \ $(DBUS_BUS_LIBS) dbus_daemon_LDFLAGS = @R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ @PIE_LDFLAGS@ @@ -542,8 +600,9 @@ dbus_daemon_launch_helper_SOURCES = \ activation-helper-bin.c \ $(LAUNCH_HELPER_SOURCES) +dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD dbus_daemon_launch_helper_LDADD = \ - $(top_builddir)/dbus/libdbus-convenience.la \ + $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) dbus_daemon_launch_helper_LDFLAGS = @R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ @@ -552,11 +611,11 @@ dbus_daemon_launch_helper_test_SOURCES = \ $(LAUNCH_HELPER_SOURCES) dbus_daemon_launch_helper_test_LDADD = \ - $(top_builddir)/dbus/libdbus-convenience.la \ + $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) dbus_daemon_launch_helper_test_LDFLAGS = @R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ -dbus_daemon_launch_helper_test_CPPFLAGS = \ +dbus_daemon_launch_helper_test_CPPFLAGS = -DDBUS_STATIC_BUILD \ -DACTIVATION_LAUNCHER_TEST bus_test_launch_helper_SOURCES = \ @@ -564,14 +623,17 @@ bus_test_launch_helper_SOURCES = \ $(LAUNCH_HELPER_SOURCES) bus_test_launch_helper_LDADD = \ - $(top_builddir)/dbus/libdbus-convenience.la \ + $(top_builddir)/dbus/libdbus-internal.la \ $(DBUS_LAUNCHER_LIBS) bus_test_launch_helper_LDFLAGS = @R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ -bus_test_launch_helper_CPPFLAGS = \ +bus_test_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD \ -DACTIVATION_LAUNCHER_TEST \ -DACTIVATION_LAUNCHER_DO_OOM +extra_tests = $(am__append_1) +extra_noinst_programs = $(am__append_2) +extra_inst_programs = $(am__append_3) @DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1 bus_test_system_SOURCES = \ $(XML_SOURCES) \ @@ -583,19 +645,20 @@ bus_test_system_SOURCES = \ utils.h \ test-system.c -bus_test_system_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS) +bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD +bus_test_system_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) bus_test_system_LDFLAGS = @R_DYNAMIC_LDFLAG@ bus_test_SOURCES = \ $(BUS_SOURCES) \ test-main.c -bus_test_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS) +bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD +bus_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS) bus_test_LDFLAGS = @R_DYNAMIC_LDFLAG@ #### Init scripts fun -SCRIPT_IN_FILES = messagebus.in \ - rc.messagebus.in - +SCRIPT_IN_FILES = messagebus.in messagebus-config.in rc.messagebus.in \ + $(am__append_4) @DBUS_INIT_SCRIPTS_RED_HAT_TRUE@initddir = $(sysconfdir)/rc.d/init.d @DBUS_INIT_SCRIPTS_SLACKWARE_TRUE@initddir = $(sysconfdir)/rc.d/ @DBUS_INIT_SCRIPTS_RED_HAT_TRUE@initd_SCRIPTS = \ @@ -604,11 +667,16 @@ SCRIPT_IN_FILES = messagebus.in \ @DBUS_INIT_SCRIPTS_SLACKWARE_TRUE@initd_SCRIPTS = \ @DBUS_INIT_SCRIPTS_SLACKWARE_TRUE@ rc.messagebus -MAN_IN_FILES = dbus-daemon.1.in -man_MANS = dbus-daemon.1 +@DBUS_INIT_SCRIPTS_CYGWIN_TRUE@bin_SCRIPTS = \ +@DBUS_INIT_SCRIPTS_CYGWIN_TRUE@ messagebus-config -#### Extra dist -EXTRA_DIST = $(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) +@HAVE_SYSTEMD_TRUE@systemdsystemunit_DATA = \ +@HAVE_SYSTEMD_TRUE@ dbus.service \ +@HAVE_SYSTEMD_TRUE@ dbus.socket + + +#### Extra dist +EXTRA_DIST = $(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) all: all-am .SUFFIXES: @@ -649,10 +717,59 @@ session.conf: $(top_builddir)/config.status $(srcdir)/session.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ messagebus: $(top_builddir)/config.status $(srcdir)/messagebus.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +messagebus-config: $(top_builddir)/config.status $(srcdir)/messagebus-config.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +org.freedesktop.dbus-session.plist: $(top_builddir)/config.status $(srcdir)/org.freedesktop.dbus-session.plist.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ rc.messagebus: $(top_builddir)/config.status $(srcdir)/rc.messagebus.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -dbus-daemon.1: $(top_builddir)/config.status $(srcdir)/dbus-daemon.1.in +dbus.service: $(top_builddir)/config.status $(srcdir)/dbus.service.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +dbus.socket: $(top_builddir)/config.status $(srcdir)/dbus.socket.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p || test -f $$p1; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_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 clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -680,6 +797,40 @@ dbus-daemon-launch-helper$(EXEEXT): $(dbus_daemon_launch_helper_OBJECTS) $(dbus_ dbus-daemon-launch-helper-test$(EXEEXT): $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_DEPENDENCIES) @rm -f dbus-daemon-launch-helper-test$(EXEEXT) $(AM_V_CCLD)$(dbus_daemon_launch_helper_test_LINK) $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_LDADD) $(LIBS) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + 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; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(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 install-initdSCRIPTS: $(initd_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(initddir)" || $(MKDIR_P) "$(DESTDIR)$(initddir)" @@ -721,10 +872,28 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation-helper-bin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation-helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/activation.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-activation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-bus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-config-loader-expat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-config-loader-libxml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-config-parser-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-config-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-connection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-desktop-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-dir-watch-default.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-dir-watch-dnotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-dir-watch-inotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-dir-watch-kqueue.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-dispatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-driver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-expirelist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-policy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-selinux.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-services.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-signals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-test-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-activation-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-loader-expat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-config-loader-libxml.Po@am__quote@ @@ -733,12 +902,42 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-desktop-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_launch_helper-utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-loader-expat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-loader-libxml.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser-common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser-trivial.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-parser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_system-config-loader-expat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_system-config-loader-libxml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_system-config-parser-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_system-config-parser-trivial.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_system-test-system.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bus_test_system-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-activation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-bus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-config-loader-expat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-config-loader-libxml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-config-parser-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-config-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-connection.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-desktop-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-dir-watch-default.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-dir-watch-dnotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-dir-watch-inotify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-dir-watch-kqueue.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-dispatch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-driver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-expirelist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-policy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-selinux.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-services.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-signals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon-utils.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-config-loader-expat.Po@am__quote@ @@ -747,23 +946,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-config-parser-trivial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-desktop-file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus_daemon_launch_helper_test-utils.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/desktop-file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-default.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-dnotify.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-inotify.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir-watch-kqueue.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expirelist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/policy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/services.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-system.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -789,6 +971,358 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +bus_test-activation.o: activation.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-activation.o -MD -MP -MF $(DEPDIR)/bus_test-activation.Tpo -c -o bus_test-activation.o `test -f 'activation.c' || echo '$(srcdir)/'`activation.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-activation.Tpo $(DEPDIR)/bus_test-activation.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation.c' object='bus_test-activation.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-activation.o `test -f 'activation.c' || echo '$(srcdir)/'`activation.c + +bus_test-activation.obj: activation.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-activation.obj -MD -MP -MF $(DEPDIR)/bus_test-activation.Tpo -c -o bus_test-activation.obj `if test -f 'activation.c'; then $(CYGPATH_W) 'activation.c'; else $(CYGPATH_W) '$(srcdir)/activation.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-activation.Tpo $(DEPDIR)/bus_test-activation.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation.c' object='bus_test-activation.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-activation.obj `if test -f 'activation.c'; then $(CYGPATH_W) 'activation.c'; else $(CYGPATH_W) '$(srcdir)/activation.c'; fi` + +bus_test-bus.o: bus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-bus.o -MD -MP -MF $(DEPDIR)/bus_test-bus.Tpo -c -o bus_test-bus.o `test -f 'bus.c' || echo '$(srcdir)/'`bus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-bus.Tpo $(DEPDIR)/bus_test-bus.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus.c' object='bus_test-bus.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-bus.o `test -f 'bus.c' || echo '$(srcdir)/'`bus.c + +bus_test-bus.obj: bus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-bus.obj -MD -MP -MF $(DEPDIR)/bus_test-bus.Tpo -c -o bus_test-bus.obj `if test -f 'bus.c'; then $(CYGPATH_W) 'bus.c'; else $(CYGPATH_W) '$(srcdir)/bus.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-bus.Tpo $(DEPDIR)/bus_test-bus.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus.c' object='bus_test-bus.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-bus.obj `if test -f 'bus.c'; then $(CYGPATH_W) 'bus.c'; else $(CYGPATH_W) '$(srcdir)/bus.c'; fi` + +bus_test-config-parser.o: config-parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-parser.o -MD -MP -MF $(DEPDIR)/bus_test-config-parser.Tpo -c -o bus_test-config-parser.o `test -f 'config-parser.c' || echo '$(srcdir)/'`config-parser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-parser.Tpo $(DEPDIR)/bus_test-config-parser.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser.c' object='bus_test-config-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-parser.o `test -f 'config-parser.c' || echo '$(srcdir)/'`config-parser.c + +bus_test-config-parser.obj: config-parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-parser.obj -MD -MP -MF $(DEPDIR)/bus_test-config-parser.Tpo -c -o bus_test-config-parser.obj `if test -f 'config-parser.c'; then $(CYGPATH_W) 'config-parser.c'; else $(CYGPATH_W) '$(srcdir)/config-parser.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-parser.Tpo $(DEPDIR)/bus_test-config-parser.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser.c' object='bus_test-config-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-parser.obj `if test -f 'config-parser.c'; then $(CYGPATH_W) 'config-parser.c'; else $(CYGPATH_W) '$(srcdir)/config-parser.c'; fi` + +bus_test-config-parser-common.o: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-parser-common.o -MD -MP -MF $(DEPDIR)/bus_test-config-parser-common.Tpo -c -o bus_test-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-parser-common.Tpo $(DEPDIR)/bus_test-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='bus_test-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c + +bus_test-config-parser-common.obj: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-parser-common.obj -MD -MP -MF $(DEPDIR)/bus_test-config-parser-common.Tpo -c -o bus_test-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-parser-common.Tpo $(DEPDIR)/bus_test-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='bus_test-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` + +bus_test-connection.o: connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-connection.o -MD -MP -MF $(DEPDIR)/bus_test-connection.Tpo -c -o bus_test-connection.o `test -f 'connection.c' || echo '$(srcdir)/'`connection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-connection.Tpo $(DEPDIR)/bus_test-connection.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='connection.c' object='bus_test-connection.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-connection.o `test -f 'connection.c' || echo '$(srcdir)/'`connection.c + +bus_test-connection.obj: connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-connection.obj -MD -MP -MF $(DEPDIR)/bus_test-connection.Tpo -c -o bus_test-connection.obj `if test -f 'connection.c'; then $(CYGPATH_W) 'connection.c'; else $(CYGPATH_W) '$(srcdir)/connection.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-connection.Tpo $(DEPDIR)/bus_test-connection.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='connection.c' object='bus_test-connection.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-connection.obj `if test -f 'connection.c'; then $(CYGPATH_W) 'connection.c'; else $(CYGPATH_W) '$(srcdir)/connection.c'; fi` + +bus_test-desktop-file.o: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-desktop-file.o -MD -MP -MF $(DEPDIR)/bus_test-desktop-file.Tpo -c -o bus_test-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-desktop-file.Tpo $(DEPDIR)/bus_test-desktop-file.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktop-file.c' object='bus_test-desktop-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c + +bus_test-desktop-file.obj: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-desktop-file.obj -MD -MP -MF $(DEPDIR)/bus_test-desktop-file.Tpo -c -o bus_test-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-desktop-file.Tpo $(DEPDIR)/bus_test-desktop-file.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktop-file.c' object='bus_test-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` + +bus_test-dir-watch-default.o: dir-watch-default.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-default.o -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-default.Tpo -c -o bus_test-dir-watch-default.o `test -f 'dir-watch-default.c' || echo '$(srcdir)/'`dir-watch-default.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-default.Tpo $(DEPDIR)/bus_test-dir-watch-default.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-default.c' object='bus_test-dir-watch-default.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-default.o `test -f 'dir-watch-default.c' || echo '$(srcdir)/'`dir-watch-default.c + +bus_test-dir-watch-default.obj: dir-watch-default.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-default.obj -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-default.Tpo -c -o bus_test-dir-watch-default.obj `if test -f 'dir-watch-default.c'; then $(CYGPATH_W) 'dir-watch-default.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-default.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-default.Tpo $(DEPDIR)/bus_test-dir-watch-default.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-default.c' object='bus_test-dir-watch-default.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-default.obj `if test -f 'dir-watch-default.c'; then $(CYGPATH_W) 'dir-watch-default.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-default.c'; fi` + +bus_test-dir-watch-dnotify.o: dir-watch-dnotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-dnotify.o -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-dnotify.Tpo -c -o bus_test-dir-watch-dnotify.o `test -f 'dir-watch-dnotify.c' || echo '$(srcdir)/'`dir-watch-dnotify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-dnotify.Tpo $(DEPDIR)/bus_test-dir-watch-dnotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-dnotify.c' object='bus_test-dir-watch-dnotify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-dnotify.o `test -f 'dir-watch-dnotify.c' || echo '$(srcdir)/'`dir-watch-dnotify.c + +bus_test-dir-watch-dnotify.obj: dir-watch-dnotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-dnotify.obj -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-dnotify.Tpo -c -o bus_test-dir-watch-dnotify.obj `if test -f 'dir-watch-dnotify.c'; then $(CYGPATH_W) 'dir-watch-dnotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-dnotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-dnotify.Tpo $(DEPDIR)/bus_test-dir-watch-dnotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-dnotify.c' object='bus_test-dir-watch-dnotify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-dnotify.obj `if test -f 'dir-watch-dnotify.c'; then $(CYGPATH_W) 'dir-watch-dnotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-dnotify.c'; fi` + +bus_test-dir-watch-inotify.o: dir-watch-inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-inotify.o -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-inotify.Tpo -c -o bus_test-dir-watch-inotify.o `test -f 'dir-watch-inotify.c' || echo '$(srcdir)/'`dir-watch-inotify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-inotify.Tpo $(DEPDIR)/bus_test-dir-watch-inotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-inotify.c' object='bus_test-dir-watch-inotify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-inotify.o `test -f 'dir-watch-inotify.c' || echo '$(srcdir)/'`dir-watch-inotify.c + +bus_test-dir-watch-inotify.obj: dir-watch-inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-inotify.obj -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-inotify.Tpo -c -o bus_test-dir-watch-inotify.obj `if test -f 'dir-watch-inotify.c'; then $(CYGPATH_W) 'dir-watch-inotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-inotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-inotify.Tpo $(DEPDIR)/bus_test-dir-watch-inotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-inotify.c' object='bus_test-dir-watch-inotify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-inotify.obj `if test -f 'dir-watch-inotify.c'; then $(CYGPATH_W) 'dir-watch-inotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-inotify.c'; fi` + +bus_test-dir-watch-kqueue.o: dir-watch-kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-kqueue.o -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-kqueue.Tpo -c -o bus_test-dir-watch-kqueue.o `test -f 'dir-watch-kqueue.c' || echo '$(srcdir)/'`dir-watch-kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-kqueue.Tpo $(DEPDIR)/bus_test-dir-watch-kqueue.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-kqueue.c' object='bus_test-dir-watch-kqueue.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-kqueue.o `test -f 'dir-watch-kqueue.c' || echo '$(srcdir)/'`dir-watch-kqueue.c + +bus_test-dir-watch-kqueue.obj: dir-watch-kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dir-watch-kqueue.obj -MD -MP -MF $(DEPDIR)/bus_test-dir-watch-kqueue.Tpo -c -o bus_test-dir-watch-kqueue.obj `if test -f 'dir-watch-kqueue.c'; then $(CYGPATH_W) 'dir-watch-kqueue.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-kqueue.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dir-watch-kqueue.Tpo $(DEPDIR)/bus_test-dir-watch-kqueue.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-kqueue.c' object='bus_test-dir-watch-kqueue.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dir-watch-kqueue.obj `if test -f 'dir-watch-kqueue.c'; then $(CYGPATH_W) 'dir-watch-kqueue.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-kqueue.c'; fi` + +bus_test-dispatch.o: dispatch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dispatch.o -MD -MP -MF $(DEPDIR)/bus_test-dispatch.Tpo -c -o bus_test-dispatch.o `test -f 'dispatch.c' || echo '$(srcdir)/'`dispatch.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dispatch.Tpo $(DEPDIR)/bus_test-dispatch.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dispatch.c' object='bus_test-dispatch.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dispatch.o `test -f 'dispatch.c' || echo '$(srcdir)/'`dispatch.c + +bus_test-dispatch.obj: dispatch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-dispatch.obj -MD -MP -MF $(DEPDIR)/bus_test-dispatch.Tpo -c -o bus_test-dispatch.obj `if test -f 'dispatch.c'; then $(CYGPATH_W) 'dispatch.c'; else $(CYGPATH_W) '$(srcdir)/dispatch.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-dispatch.Tpo $(DEPDIR)/bus_test-dispatch.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dispatch.c' object='bus_test-dispatch.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-dispatch.obj `if test -f 'dispatch.c'; then $(CYGPATH_W) 'dispatch.c'; else $(CYGPATH_W) '$(srcdir)/dispatch.c'; fi` + +bus_test-driver.o: driver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-driver.o -MD -MP -MF $(DEPDIR)/bus_test-driver.Tpo -c -o bus_test-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-driver.Tpo $(DEPDIR)/bus_test-driver.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='bus_test-driver.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c + +bus_test-driver.obj: driver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-driver.obj -MD -MP -MF $(DEPDIR)/bus_test-driver.Tpo -c -o bus_test-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-driver.Tpo $(DEPDIR)/bus_test-driver.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='bus_test-driver.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` + +bus_test-expirelist.o: expirelist.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-expirelist.o -MD -MP -MF $(DEPDIR)/bus_test-expirelist.Tpo -c -o bus_test-expirelist.o `test -f 'expirelist.c' || echo '$(srcdir)/'`expirelist.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-expirelist.Tpo $(DEPDIR)/bus_test-expirelist.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expirelist.c' object='bus_test-expirelist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-expirelist.o `test -f 'expirelist.c' || echo '$(srcdir)/'`expirelist.c + +bus_test-expirelist.obj: expirelist.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-expirelist.obj -MD -MP -MF $(DEPDIR)/bus_test-expirelist.Tpo -c -o bus_test-expirelist.obj `if test -f 'expirelist.c'; then $(CYGPATH_W) 'expirelist.c'; else $(CYGPATH_W) '$(srcdir)/expirelist.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-expirelist.Tpo $(DEPDIR)/bus_test-expirelist.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expirelist.c' object='bus_test-expirelist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-expirelist.obj `if test -f 'expirelist.c'; then $(CYGPATH_W) 'expirelist.c'; else $(CYGPATH_W) '$(srcdir)/expirelist.c'; fi` + +bus_test-policy.o: policy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-policy.o -MD -MP -MF $(DEPDIR)/bus_test-policy.Tpo -c -o bus_test-policy.o `test -f 'policy.c' || echo '$(srcdir)/'`policy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-policy.Tpo $(DEPDIR)/bus_test-policy.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='policy.c' object='bus_test-policy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-policy.o `test -f 'policy.c' || echo '$(srcdir)/'`policy.c + +bus_test-policy.obj: policy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-policy.obj -MD -MP -MF $(DEPDIR)/bus_test-policy.Tpo -c -o bus_test-policy.obj `if test -f 'policy.c'; then $(CYGPATH_W) 'policy.c'; else $(CYGPATH_W) '$(srcdir)/policy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-policy.Tpo $(DEPDIR)/bus_test-policy.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='policy.c' object='bus_test-policy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-policy.obj `if test -f 'policy.c'; then $(CYGPATH_W) 'policy.c'; else $(CYGPATH_W) '$(srcdir)/policy.c'; fi` + +bus_test-selinux.o: selinux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-selinux.o -MD -MP -MF $(DEPDIR)/bus_test-selinux.Tpo -c -o bus_test-selinux.o `test -f 'selinux.c' || echo '$(srcdir)/'`selinux.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-selinux.Tpo $(DEPDIR)/bus_test-selinux.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='selinux.c' object='bus_test-selinux.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-selinux.o `test -f 'selinux.c' || echo '$(srcdir)/'`selinux.c + +bus_test-selinux.obj: selinux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-selinux.obj -MD -MP -MF $(DEPDIR)/bus_test-selinux.Tpo -c -o bus_test-selinux.obj `if test -f 'selinux.c'; then $(CYGPATH_W) 'selinux.c'; else $(CYGPATH_W) '$(srcdir)/selinux.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-selinux.Tpo $(DEPDIR)/bus_test-selinux.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='selinux.c' object='bus_test-selinux.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-selinux.obj `if test -f 'selinux.c'; then $(CYGPATH_W) 'selinux.c'; else $(CYGPATH_W) '$(srcdir)/selinux.c'; fi` + +bus_test-services.o: services.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-services.o -MD -MP -MF $(DEPDIR)/bus_test-services.Tpo -c -o bus_test-services.o `test -f 'services.c' || echo '$(srcdir)/'`services.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-services.Tpo $(DEPDIR)/bus_test-services.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='services.c' object='bus_test-services.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-services.o `test -f 'services.c' || echo '$(srcdir)/'`services.c + +bus_test-services.obj: services.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-services.obj -MD -MP -MF $(DEPDIR)/bus_test-services.Tpo -c -o bus_test-services.obj `if test -f 'services.c'; then $(CYGPATH_W) 'services.c'; else $(CYGPATH_W) '$(srcdir)/services.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-services.Tpo $(DEPDIR)/bus_test-services.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='services.c' object='bus_test-services.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-services.obj `if test -f 'services.c'; then $(CYGPATH_W) 'services.c'; else $(CYGPATH_W) '$(srcdir)/services.c'; fi` + +bus_test-signals.o: signals.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-signals.o -MD -MP -MF $(DEPDIR)/bus_test-signals.Tpo -c -o bus_test-signals.o `test -f 'signals.c' || echo '$(srcdir)/'`signals.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-signals.Tpo $(DEPDIR)/bus_test-signals.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signals.c' object='bus_test-signals.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-signals.o `test -f 'signals.c' || echo '$(srcdir)/'`signals.c + +bus_test-signals.obj: signals.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-signals.obj -MD -MP -MF $(DEPDIR)/bus_test-signals.Tpo -c -o bus_test-signals.obj `if test -f 'signals.c'; then $(CYGPATH_W) 'signals.c'; else $(CYGPATH_W) '$(srcdir)/signals.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-signals.Tpo $(DEPDIR)/bus_test-signals.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signals.c' object='bus_test-signals.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-signals.obj `if test -f 'signals.c'; then $(CYGPATH_W) 'signals.c'; else $(CYGPATH_W) '$(srcdir)/signals.c'; fi` + +bus_test-test.o: test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-test.o -MD -MP -MF $(DEPDIR)/bus_test-test.Tpo -c -o bus_test-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-test.Tpo $(DEPDIR)/bus_test-test.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='bus_test-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c + +bus_test-test.obj: test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-test.obj -MD -MP -MF $(DEPDIR)/bus_test-test.Tpo -c -o bus_test-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-test.Tpo $(DEPDIR)/bus_test-test.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='bus_test-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` + +bus_test-utils.o: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-utils.o -MD -MP -MF $(DEPDIR)/bus_test-utils.Tpo -c -o bus_test-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-utils.Tpo $(DEPDIR)/bus_test-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='bus_test-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + +bus_test-utils.obj: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-utils.obj -MD -MP -MF $(DEPDIR)/bus_test-utils.Tpo -c -o bus_test-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-utils.Tpo $(DEPDIR)/bus_test-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='bus_test-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` + +bus_test-config-loader-expat.o: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-loader-expat.o -MD -MP -MF $(DEPDIR)/bus_test-config-loader-expat.Tpo -c -o bus_test-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-loader-expat.Tpo $(DEPDIR)/bus_test-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='bus_test-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c + +bus_test-config-loader-expat.obj: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/bus_test-config-loader-expat.Tpo -c -o bus_test-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-loader-expat.Tpo $(DEPDIR)/bus_test-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='bus_test-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` + +bus_test-config-loader-libxml.o: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-loader-libxml.o -MD -MP -MF $(DEPDIR)/bus_test-config-loader-libxml.Tpo -c -o bus_test-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-loader-libxml.Tpo $(DEPDIR)/bus_test-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='bus_test-config-loader-libxml.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c + +bus_test-config-loader-libxml.obj: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-config-loader-libxml.obj -MD -MP -MF $(DEPDIR)/bus_test-config-loader-libxml.Tpo -c -o bus_test-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-config-loader-libxml.Tpo $(DEPDIR)/bus_test-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='bus_test-config-loader-libxml.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` + +bus_test-test-main.o: test-main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-test-main.o -MD -MP -MF $(DEPDIR)/bus_test-test-main.Tpo -c -o bus_test-test-main.o `test -f 'test-main.c' || echo '$(srcdir)/'`test-main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-test-main.Tpo $(DEPDIR)/bus_test-test-main.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-main.c' object='bus_test-test-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-test-main.o `test -f 'test-main.c' || echo '$(srcdir)/'`test-main.c + +bus_test-test-main.obj: test-main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test-test-main.obj -MD -MP -MF $(DEPDIR)/bus_test-test-main.Tpo -c -o bus_test-test-main.obj `if test -f 'test-main.c'; then $(CYGPATH_W) 'test-main.c'; else $(CYGPATH_W) '$(srcdir)/test-main.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test-test-main.Tpo $(DEPDIR)/bus_test-test-main.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-main.c' object='bus_test-test-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test-test-main.obj `if test -f 'test-main.c'; then $(CYGPATH_W) 'test-main.c'; else $(CYGPATH_W) '$(srcdir)/test-main.c'; fi` + bus_test_launch_helper-test-launch-helper.o: test-launch-helper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_launch_helper-test-launch-helper.o -MD -MP -MF $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo -c -o bus_test_launch_helper-test-launch-helper.o `test -f 'test-launch-helper.c' || echo '$(srcdir)/'`test-launch-helper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Tpo $(DEPDIR)/bus_test_launch_helper-test-launch-helper.Po @@ -917,6 +1451,582 @@ bus_test_launch_helper-activation-helper.obj: activation-helper.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` +bus_test_system-config-loader-expat.o: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-loader-expat.o -MD -MP -MF $(DEPDIR)/bus_test_system-config-loader-expat.Tpo -c -o bus_test_system-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-loader-expat.Tpo $(DEPDIR)/bus_test_system-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='bus_test_system-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c + +bus_test_system-config-loader-expat.obj: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/bus_test_system-config-loader-expat.Tpo -c -o bus_test_system-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-loader-expat.Tpo $(DEPDIR)/bus_test_system-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='bus_test_system-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` + +bus_test_system-config-loader-libxml.o: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-loader-libxml.o -MD -MP -MF $(DEPDIR)/bus_test_system-config-loader-libxml.Tpo -c -o bus_test_system-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-loader-libxml.Tpo $(DEPDIR)/bus_test_system-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='bus_test_system-config-loader-libxml.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c + +bus_test_system-config-loader-libxml.obj: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-loader-libxml.obj -MD -MP -MF $(DEPDIR)/bus_test_system-config-loader-libxml.Tpo -c -o bus_test_system-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-loader-libxml.Tpo $(DEPDIR)/bus_test_system-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='bus_test_system-config-loader-libxml.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` + +bus_test_system-config-parser-common.o: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-parser-common.o -MD -MP -MF $(DEPDIR)/bus_test_system-config-parser-common.Tpo -c -o bus_test_system-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-parser-common.Tpo $(DEPDIR)/bus_test_system-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='bus_test_system-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c + +bus_test_system-config-parser-common.obj: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-parser-common.obj -MD -MP -MF $(DEPDIR)/bus_test_system-config-parser-common.Tpo -c -o bus_test_system-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-parser-common.Tpo $(DEPDIR)/bus_test_system-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='bus_test_system-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` + +bus_test_system-config-parser-trivial.o: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-parser-trivial.o -MD -MP -MF $(DEPDIR)/bus_test_system-config-parser-trivial.Tpo -c -o bus_test_system-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-parser-trivial.Tpo $(DEPDIR)/bus_test_system-config-parser-trivial.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-trivial.c' object='bus_test_system-config-parser-trivial.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c + +bus_test_system-config-parser-trivial.obj: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-config-parser-trivial.obj -MD -MP -MF $(DEPDIR)/bus_test_system-config-parser-trivial.Tpo -c -o bus_test_system-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-config-parser-trivial.Tpo $(DEPDIR)/bus_test_system-config-parser-trivial.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-trivial.c' object='bus_test_system-config-parser-trivial.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` + +bus_test_system-utils.o: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-utils.o -MD -MP -MF $(DEPDIR)/bus_test_system-utils.Tpo -c -o bus_test_system-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-utils.Tpo $(DEPDIR)/bus_test_system-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='bus_test_system-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + +bus_test_system-utils.obj: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-utils.obj -MD -MP -MF $(DEPDIR)/bus_test_system-utils.Tpo -c -o bus_test_system-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-utils.Tpo $(DEPDIR)/bus_test_system-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='bus_test_system-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` + +bus_test_system-test-system.o: test-system.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-test-system.o -MD -MP -MF $(DEPDIR)/bus_test_system-test-system.Tpo -c -o bus_test_system-test-system.o `test -f 'test-system.c' || echo '$(srcdir)/'`test-system.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-test-system.Tpo $(DEPDIR)/bus_test_system-test-system.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-system.c' object='bus_test_system-test-system.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-test-system.o `test -f 'test-system.c' || echo '$(srcdir)/'`test-system.c + +bus_test_system-test-system.obj: test-system.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bus_test_system-test-system.obj -MD -MP -MF $(DEPDIR)/bus_test_system-test-system.Tpo -c -o bus_test_system-test-system.obj `if test -f 'test-system.c'; then $(CYGPATH_W) 'test-system.c'; else $(CYGPATH_W) '$(srcdir)/test-system.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bus_test_system-test-system.Tpo $(DEPDIR)/bus_test_system-test-system.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-system.c' object='bus_test_system-test-system.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bus_test_system_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bus_test_system-test-system.obj `if test -f 'test-system.c'; then $(CYGPATH_W) 'test-system.c'; else $(CYGPATH_W) '$(srcdir)/test-system.c'; fi` + +dbus_daemon-activation.o: activation.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-activation.o -MD -MP -MF $(DEPDIR)/dbus_daemon-activation.Tpo -c -o dbus_daemon-activation.o `test -f 'activation.c' || echo '$(srcdir)/'`activation.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-activation.Tpo $(DEPDIR)/dbus_daemon-activation.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation.c' object='dbus_daemon-activation.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-activation.o `test -f 'activation.c' || echo '$(srcdir)/'`activation.c + +dbus_daemon-activation.obj: activation.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-activation.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-activation.Tpo -c -o dbus_daemon-activation.obj `if test -f 'activation.c'; then $(CYGPATH_W) 'activation.c'; else $(CYGPATH_W) '$(srcdir)/activation.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-activation.Tpo $(DEPDIR)/dbus_daemon-activation.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation.c' object='dbus_daemon-activation.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-activation.obj `if test -f 'activation.c'; then $(CYGPATH_W) 'activation.c'; else $(CYGPATH_W) '$(srcdir)/activation.c'; fi` + +dbus_daemon-bus.o: bus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-bus.o -MD -MP -MF $(DEPDIR)/dbus_daemon-bus.Tpo -c -o dbus_daemon-bus.o `test -f 'bus.c' || echo '$(srcdir)/'`bus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-bus.Tpo $(DEPDIR)/dbus_daemon-bus.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus.c' object='dbus_daemon-bus.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-bus.o `test -f 'bus.c' || echo '$(srcdir)/'`bus.c + +dbus_daemon-bus.obj: bus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-bus.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-bus.Tpo -c -o dbus_daemon-bus.obj `if test -f 'bus.c'; then $(CYGPATH_W) 'bus.c'; else $(CYGPATH_W) '$(srcdir)/bus.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-bus.Tpo $(DEPDIR)/dbus_daemon-bus.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bus.c' object='dbus_daemon-bus.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-bus.obj `if test -f 'bus.c'; then $(CYGPATH_W) 'bus.c'; else $(CYGPATH_W) '$(srcdir)/bus.c'; fi` + +dbus_daemon-config-parser.o: config-parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-parser.o -MD -MP -MF $(DEPDIR)/dbus_daemon-config-parser.Tpo -c -o dbus_daemon-config-parser.o `test -f 'config-parser.c' || echo '$(srcdir)/'`config-parser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-parser.Tpo $(DEPDIR)/dbus_daemon-config-parser.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser.c' object='dbus_daemon-config-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-parser.o `test -f 'config-parser.c' || echo '$(srcdir)/'`config-parser.c + +dbus_daemon-config-parser.obj: config-parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-parser.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-config-parser.Tpo -c -o dbus_daemon-config-parser.obj `if test -f 'config-parser.c'; then $(CYGPATH_W) 'config-parser.c'; else $(CYGPATH_W) '$(srcdir)/config-parser.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-parser.Tpo $(DEPDIR)/dbus_daemon-config-parser.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser.c' object='dbus_daemon-config-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-parser.obj `if test -f 'config-parser.c'; then $(CYGPATH_W) 'config-parser.c'; else $(CYGPATH_W) '$(srcdir)/config-parser.c'; fi` + +dbus_daemon-config-parser-common.o: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-parser-common.o -MD -MP -MF $(DEPDIR)/dbus_daemon-config-parser-common.Tpo -c -o dbus_daemon-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-parser-common.Tpo $(DEPDIR)/dbus_daemon-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='dbus_daemon-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c + +dbus_daemon-config-parser-common.obj: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-parser-common.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-config-parser-common.Tpo -c -o dbus_daemon-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-parser-common.Tpo $(DEPDIR)/dbus_daemon-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='dbus_daemon-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` + +dbus_daemon-connection.o: connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-connection.o -MD -MP -MF $(DEPDIR)/dbus_daemon-connection.Tpo -c -o dbus_daemon-connection.o `test -f 'connection.c' || echo '$(srcdir)/'`connection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-connection.Tpo $(DEPDIR)/dbus_daemon-connection.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='connection.c' object='dbus_daemon-connection.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-connection.o `test -f 'connection.c' || echo '$(srcdir)/'`connection.c + +dbus_daemon-connection.obj: connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-connection.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-connection.Tpo -c -o dbus_daemon-connection.obj `if test -f 'connection.c'; then $(CYGPATH_W) 'connection.c'; else $(CYGPATH_W) '$(srcdir)/connection.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-connection.Tpo $(DEPDIR)/dbus_daemon-connection.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='connection.c' object='dbus_daemon-connection.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-connection.obj `if test -f 'connection.c'; then $(CYGPATH_W) 'connection.c'; else $(CYGPATH_W) '$(srcdir)/connection.c'; fi` + +dbus_daemon-desktop-file.o: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-desktop-file.o -MD -MP -MF $(DEPDIR)/dbus_daemon-desktop-file.Tpo -c -o dbus_daemon-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-desktop-file.Tpo $(DEPDIR)/dbus_daemon-desktop-file.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktop-file.c' object='dbus_daemon-desktop-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c + +dbus_daemon-desktop-file.obj: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-desktop-file.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-desktop-file.Tpo -c -o dbus_daemon-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-desktop-file.Tpo $(DEPDIR)/dbus_daemon-desktop-file.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktop-file.c' object='dbus_daemon-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` + +dbus_daemon-dir-watch-default.o: dir-watch-default.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-default.o -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-default.Tpo -c -o dbus_daemon-dir-watch-default.o `test -f 'dir-watch-default.c' || echo '$(srcdir)/'`dir-watch-default.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-default.Tpo $(DEPDIR)/dbus_daemon-dir-watch-default.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-default.c' object='dbus_daemon-dir-watch-default.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-default.o `test -f 'dir-watch-default.c' || echo '$(srcdir)/'`dir-watch-default.c + +dbus_daemon-dir-watch-default.obj: dir-watch-default.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-default.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-default.Tpo -c -o dbus_daemon-dir-watch-default.obj `if test -f 'dir-watch-default.c'; then $(CYGPATH_W) 'dir-watch-default.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-default.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-default.Tpo $(DEPDIR)/dbus_daemon-dir-watch-default.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-default.c' object='dbus_daemon-dir-watch-default.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-default.obj `if test -f 'dir-watch-default.c'; then $(CYGPATH_W) 'dir-watch-default.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-default.c'; fi` + +dbus_daemon-dir-watch-dnotify.o: dir-watch-dnotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-dnotify.o -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-dnotify.Tpo -c -o dbus_daemon-dir-watch-dnotify.o `test -f 'dir-watch-dnotify.c' || echo '$(srcdir)/'`dir-watch-dnotify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-dnotify.Tpo $(DEPDIR)/dbus_daemon-dir-watch-dnotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-dnotify.c' object='dbus_daemon-dir-watch-dnotify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-dnotify.o `test -f 'dir-watch-dnotify.c' || echo '$(srcdir)/'`dir-watch-dnotify.c + +dbus_daemon-dir-watch-dnotify.obj: dir-watch-dnotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-dnotify.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-dnotify.Tpo -c -o dbus_daemon-dir-watch-dnotify.obj `if test -f 'dir-watch-dnotify.c'; then $(CYGPATH_W) 'dir-watch-dnotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-dnotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-dnotify.Tpo $(DEPDIR)/dbus_daemon-dir-watch-dnotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-dnotify.c' object='dbus_daemon-dir-watch-dnotify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-dnotify.obj `if test -f 'dir-watch-dnotify.c'; then $(CYGPATH_W) 'dir-watch-dnotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-dnotify.c'; fi` + +dbus_daemon-dir-watch-inotify.o: dir-watch-inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-inotify.o -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-inotify.Tpo -c -o dbus_daemon-dir-watch-inotify.o `test -f 'dir-watch-inotify.c' || echo '$(srcdir)/'`dir-watch-inotify.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-inotify.Tpo $(DEPDIR)/dbus_daemon-dir-watch-inotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-inotify.c' object='dbus_daemon-dir-watch-inotify.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-inotify.o `test -f 'dir-watch-inotify.c' || echo '$(srcdir)/'`dir-watch-inotify.c + +dbus_daemon-dir-watch-inotify.obj: dir-watch-inotify.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-inotify.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-inotify.Tpo -c -o dbus_daemon-dir-watch-inotify.obj `if test -f 'dir-watch-inotify.c'; then $(CYGPATH_W) 'dir-watch-inotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-inotify.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-inotify.Tpo $(DEPDIR)/dbus_daemon-dir-watch-inotify.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-inotify.c' object='dbus_daemon-dir-watch-inotify.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-inotify.obj `if test -f 'dir-watch-inotify.c'; then $(CYGPATH_W) 'dir-watch-inotify.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-inotify.c'; fi` + +dbus_daemon-dir-watch-kqueue.o: dir-watch-kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-kqueue.o -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-kqueue.Tpo -c -o dbus_daemon-dir-watch-kqueue.o `test -f 'dir-watch-kqueue.c' || echo '$(srcdir)/'`dir-watch-kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-kqueue.Tpo $(DEPDIR)/dbus_daemon-dir-watch-kqueue.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-kqueue.c' object='dbus_daemon-dir-watch-kqueue.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-kqueue.o `test -f 'dir-watch-kqueue.c' || echo '$(srcdir)/'`dir-watch-kqueue.c + +dbus_daemon-dir-watch-kqueue.obj: dir-watch-kqueue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dir-watch-kqueue.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-dir-watch-kqueue.Tpo -c -o dbus_daemon-dir-watch-kqueue.obj `if test -f 'dir-watch-kqueue.c'; then $(CYGPATH_W) 'dir-watch-kqueue.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-kqueue.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dir-watch-kqueue.Tpo $(DEPDIR)/dbus_daemon-dir-watch-kqueue.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dir-watch-kqueue.c' object='dbus_daemon-dir-watch-kqueue.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dir-watch-kqueue.obj `if test -f 'dir-watch-kqueue.c'; then $(CYGPATH_W) 'dir-watch-kqueue.c'; else $(CYGPATH_W) '$(srcdir)/dir-watch-kqueue.c'; fi` + +dbus_daemon-dispatch.o: dispatch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dispatch.o -MD -MP -MF $(DEPDIR)/dbus_daemon-dispatch.Tpo -c -o dbus_daemon-dispatch.o `test -f 'dispatch.c' || echo '$(srcdir)/'`dispatch.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dispatch.Tpo $(DEPDIR)/dbus_daemon-dispatch.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dispatch.c' object='dbus_daemon-dispatch.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dispatch.o `test -f 'dispatch.c' || echo '$(srcdir)/'`dispatch.c + +dbus_daemon-dispatch.obj: dispatch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-dispatch.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-dispatch.Tpo -c -o dbus_daemon-dispatch.obj `if test -f 'dispatch.c'; then $(CYGPATH_W) 'dispatch.c'; else $(CYGPATH_W) '$(srcdir)/dispatch.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-dispatch.Tpo $(DEPDIR)/dbus_daemon-dispatch.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dispatch.c' object='dbus_daemon-dispatch.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-dispatch.obj `if test -f 'dispatch.c'; then $(CYGPATH_W) 'dispatch.c'; else $(CYGPATH_W) '$(srcdir)/dispatch.c'; fi` + +dbus_daemon-driver.o: driver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-driver.o -MD -MP -MF $(DEPDIR)/dbus_daemon-driver.Tpo -c -o dbus_daemon-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-driver.Tpo $(DEPDIR)/dbus_daemon-driver.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='dbus_daemon-driver.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-driver.o `test -f 'driver.c' || echo '$(srcdir)/'`driver.c + +dbus_daemon-driver.obj: driver.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-driver.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-driver.Tpo -c -o dbus_daemon-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-driver.Tpo $(DEPDIR)/dbus_daemon-driver.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='driver.c' object='dbus_daemon-driver.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-driver.obj `if test -f 'driver.c'; then $(CYGPATH_W) 'driver.c'; else $(CYGPATH_W) '$(srcdir)/driver.c'; fi` + +dbus_daemon-expirelist.o: expirelist.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-expirelist.o -MD -MP -MF $(DEPDIR)/dbus_daemon-expirelist.Tpo -c -o dbus_daemon-expirelist.o `test -f 'expirelist.c' || echo '$(srcdir)/'`expirelist.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-expirelist.Tpo $(DEPDIR)/dbus_daemon-expirelist.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expirelist.c' object='dbus_daemon-expirelist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-expirelist.o `test -f 'expirelist.c' || echo '$(srcdir)/'`expirelist.c + +dbus_daemon-expirelist.obj: expirelist.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-expirelist.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-expirelist.Tpo -c -o dbus_daemon-expirelist.obj `if test -f 'expirelist.c'; then $(CYGPATH_W) 'expirelist.c'; else $(CYGPATH_W) '$(srcdir)/expirelist.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-expirelist.Tpo $(DEPDIR)/dbus_daemon-expirelist.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expirelist.c' object='dbus_daemon-expirelist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-expirelist.obj `if test -f 'expirelist.c'; then $(CYGPATH_W) 'expirelist.c'; else $(CYGPATH_W) '$(srcdir)/expirelist.c'; fi` + +dbus_daemon-policy.o: policy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-policy.o -MD -MP -MF $(DEPDIR)/dbus_daemon-policy.Tpo -c -o dbus_daemon-policy.o `test -f 'policy.c' || echo '$(srcdir)/'`policy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-policy.Tpo $(DEPDIR)/dbus_daemon-policy.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='policy.c' object='dbus_daemon-policy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-policy.o `test -f 'policy.c' || echo '$(srcdir)/'`policy.c + +dbus_daemon-policy.obj: policy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-policy.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-policy.Tpo -c -o dbus_daemon-policy.obj `if test -f 'policy.c'; then $(CYGPATH_W) 'policy.c'; else $(CYGPATH_W) '$(srcdir)/policy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-policy.Tpo $(DEPDIR)/dbus_daemon-policy.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='policy.c' object='dbus_daemon-policy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-policy.obj `if test -f 'policy.c'; then $(CYGPATH_W) 'policy.c'; else $(CYGPATH_W) '$(srcdir)/policy.c'; fi` + +dbus_daemon-selinux.o: selinux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-selinux.o -MD -MP -MF $(DEPDIR)/dbus_daemon-selinux.Tpo -c -o dbus_daemon-selinux.o `test -f 'selinux.c' || echo '$(srcdir)/'`selinux.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-selinux.Tpo $(DEPDIR)/dbus_daemon-selinux.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='selinux.c' object='dbus_daemon-selinux.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-selinux.o `test -f 'selinux.c' || echo '$(srcdir)/'`selinux.c + +dbus_daemon-selinux.obj: selinux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-selinux.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-selinux.Tpo -c -o dbus_daemon-selinux.obj `if test -f 'selinux.c'; then $(CYGPATH_W) 'selinux.c'; else $(CYGPATH_W) '$(srcdir)/selinux.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-selinux.Tpo $(DEPDIR)/dbus_daemon-selinux.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='selinux.c' object='dbus_daemon-selinux.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-selinux.obj `if test -f 'selinux.c'; then $(CYGPATH_W) 'selinux.c'; else $(CYGPATH_W) '$(srcdir)/selinux.c'; fi` + +dbus_daemon-services.o: services.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-services.o -MD -MP -MF $(DEPDIR)/dbus_daemon-services.Tpo -c -o dbus_daemon-services.o `test -f 'services.c' || echo '$(srcdir)/'`services.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-services.Tpo $(DEPDIR)/dbus_daemon-services.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='services.c' object='dbus_daemon-services.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-services.o `test -f 'services.c' || echo '$(srcdir)/'`services.c + +dbus_daemon-services.obj: services.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-services.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-services.Tpo -c -o dbus_daemon-services.obj `if test -f 'services.c'; then $(CYGPATH_W) 'services.c'; else $(CYGPATH_W) '$(srcdir)/services.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-services.Tpo $(DEPDIR)/dbus_daemon-services.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='services.c' object='dbus_daemon-services.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-services.obj `if test -f 'services.c'; then $(CYGPATH_W) 'services.c'; else $(CYGPATH_W) '$(srcdir)/services.c'; fi` + +dbus_daemon-signals.o: signals.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-signals.o -MD -MP -MF $(DEPDIR)/dbus_daemon-signals.Tpo -c -o dbus_daemon-signals.o `test -f 'signals.c' || echo '$(srcdir)/'`signals.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-signals.Tpo $(DEPDIR)/dbus_daemon-signals.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signals.c' object='dbus_daemon-signals.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-signals.o `test -f 'signals.c' || echo '$(srcdir)/'`signals.c + +dbus_daemon-signals.obj: signals.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-signals.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-signals.Tpo -c -o dbus_daemon-signals.obj `if test -f 'signals.c'; then $(CYGPATH_W) 'signals.c'; else $(CYGPATH_W) '$(srcdir)/signals.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-signals.Tpo $(DEPDIR)/dbus_daemon-signals.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signals.c' object='dbus_daemon-signals.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-signals.obj `if test -f 'signals.c'; then $(CYGPATH_W) 'signals.c'; else $(CYGPATH_W) '$(srcdir)/signals.c'; fi` + +dbus_daemon-test.o: test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-test.o -MD -MP -MF $(DEPDIR)/dbus_daemon-test.Tpo -c -o dbus_daemon-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-test.Tpo $(DEPDIR)/dbus_daemon-test.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='dbus_daemon-test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c + +dbus_daemon-test.obj: test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-test.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-test.Tpo -c -o dbus_daemon-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-test.Tpo $(DEPDIR)/dbus_daemon-test.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='dbus_daemon-test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` + +dbus_daemon-utils.o: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-utils.o -MD -MP -MF $(DEPDIR)/dbus_daemon-utils.Tpo -c -o dbus_daemon-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-utils.Tpo $(DEPDIR)/dbus_daemon-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='dbus_daemon-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + +dbus_daemon-utils.obj: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-utils.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-utils.Tpo -c -o dbus_daemon-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-utils.Tpo $(DEPDIR)/dbus_daemon-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='dbus_daemon-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` + +dbus_daemon-config-loader-expat.o: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-loader-expat.o -MD -MP -MF $(DEPDIR)/dbus_daemon-config-loader-expat.Tpo -c -o dbus_daemon-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-loader-expat.Tpo $(DEPDIR)/dbus_daemon-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='dbus_daemon-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c + +dbus_daemon-config-loader-expat.obj: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-config-loader-expat.Tpo -c -o dbus_daemon-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-loader-expat.Tpo $(DEPDIR)/dbus_daemon-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='dbus_daemon-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` + +dbus_daemon-config-loader-libxml.o: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-loader-libxml.o -MD -MP -MF $(DEPDIR)/dbus_daemon-config-loader-libxml.Tpo -c -o dbus_daemon-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-loader-libxml.Tpo $(DEPDIR)/dbus_daemon-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='dbus_daemon-config-loader-libxml.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c + +dbus_daemon-config-loader-libxml.obj: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-config-loader-libxml.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-config-loader-libxml.Tpo -c -o dbus_daemon-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-config-loader-libxml.Tpo $(DEPDIR)/dbus_daemon-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='dbus_daemon-config-loader-libxml.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` + +dbus_daemon-main.o: main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-main.o -MD -MP -MF $(DEPDIR)/dbus_daemon-main.Tpo -c -o dbus_daemon-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-main.Tpo $(DEPDIR)/dbus_daemon-main.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='dbus_daemon-main.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c + +dbus_daemon-main.obj: main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon-main.obj -MD -MP -MF $(DEPDIR)/dbus_daemon-main.Tpo -c -o dbus_daemon-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon-main.Tpo $(DEPDIR)/dbus_daemon-main.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='dbus_daemon-main.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` + +dbus_daemon_launch_helper-activation-helper-bin.o: activation-helper-bin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-activation-helper-bin.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Tpo -c -o dbus_daemon_launch_helper-activation-helper-bin.o `test -f 'activation-helper-bin.c' || echo '$(srcdir)/'`activation-helper-bin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Tpo $(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation-helper-bin.c' object='dbus_daemon_launch_helper-activation-helper-bin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-activation-helper-bin.o `test -f 'activation-helper-bin.c' || echo '$(srcdir)/'`activation-helper-bin.c + +dbus_daemon_launch_helper-activation-helper-bin.obj: activation-helper-bin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-activation-helper-bin.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Tpo -c -o dbus_daemon_launch_helper-activation-helper-bin.obj `if test -f 'activation-helper-bin.c'; then $(CYGPATH_W) 'activation-helper-bin.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper-bin.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Tpo $(DEPDIR)/dbus_daemon_launch_helper-activation-helper-bin.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation-helper-bin.c' object='dbus_daemon_launch_helper-activation-helper-bin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-activation-helper-bin.obj `if test -f 'activation-helper-bin.c'; then $(CYGPATH_W) 'activation-helper-bin.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper-bin.c'; fi` + +dbus_daemon_launch_helper-config-loader-expat.o: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-loader-expat.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Tpo -c -o dbus_daemon_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='dbus_daemon_launch_helper-config-loader-expat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-loader-expat.o `test -f 'config-loader-expat.c' || echo '$(srcdir)/'`config-loader-expat.c + +dbus_daemon_launch_helper-config-loader-expat.obj: config-loader-expat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-loader-expat.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Tpo -c -o dbus_daemon_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-loader-expat.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-expat.c' object='dbus_daemon_launch_helper-config-loader-expat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-loader-expat.obj `if test -f 'config-loader-expat.c'; then $(CYGPATH_W) 'config-loader-expat.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-expat.c'; fi` + +dbus_daemon_launch_helper-config-loader-libxml.o: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-loader-libxml.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Tpo -c -o dbus_daemon_launch_helper-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='dbus_daemon_launch_helper-config-loader-libxml.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-loader-libxml.o `test -f 'config-loader-libxml.c' || echo '$(srcdir)/'`config-loader-libxml.c + +dbus_daemon_launch_helper-config-loader-libxml.obj: config-loader-libxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-loader-libxml.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Tpo -c -o dbus_daemon_launch_helper-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-loader-libxml.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-loader-libxml.c' object='dbus_daemon_launch_helper-config-loader-libxml.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-loader-libxml.obj `if test -f 'config-loader-libxml.c'; then $(CYGPATH_W) 'config-loader-libxml.c'; else $(CYGPATH_W) '$(srcdir)/config-loader-libxml.c'; fi` + +dbus_daemon_launch_helper-config-parser-common.o: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-parser-common.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Tpo -c -o dbus_daemon_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='dbus_daemon_launch_helper-config-parser-common.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-parser-common.o `test -f 'config-parser-common.c' || echo '$(srcdir)/'`config-parser-common.c + +dbus_daemon_launch_helper-config-parser-common.obj: config-parser-common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-parser-common.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Tpo -c -o dbus_daemon_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-parser-common.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-common.c' object='dbus_daemon_launch_helper-config-parser-common.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-parser-common.obj `if test -f 'config-parser-common.c'; then $(CYGPATH_W) 'config-parser-common.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-common.c'; fi` + +dbus_daemon_launch_helper-config-parser-trivial.o: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-parser-trivial.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Tpo -c -o dbus_daemon_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-trivial.c' object='dbus_daemon_launch_helper-config-parser-trivial.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-parser-trivial.o `test -f 'config-parser-trivial.c' || echo '$(srcdir)/'`config-parser-trivial.c + +dbus_daemon_launch_helper-config-parser-trivial.obj: config-parser-trivial.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-config-parser-trivial.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Tpo -c -o dbus_daemon_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Tpo $(DEPDIR)/dbus_daemon_launch_helper-config-parser-trivial.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config-parser-trivial.c' object='dbus_daemon_launch_helper-config-parser-trivial.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-config-parser-trivial.obj `if test -f 'config-parser-trivial.c'; then $(CYGPATH_W) 'config-parser-trivial.c'; else $(CYGPATH_W) '$(srcdir)/config-parser-trivial.c'; fi` + +dbus_daemon_launch_helper-desktop-file.o: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-desktop-file.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Tpo -c -o dbus_daemon_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Tpo $(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktop-file.c' object='dbus_daemon_launch_helper-desktop-file.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-desktop-file.o `test -f 'desktop-file.c' || echo '$(srcdir)/'`desktop-file.c + +dbus_daemon_launch_helper-desktop-file.obj: desktop-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-desktop-file.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Tpo -c -o dbus_daemon_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Tpo $(DEPDIR)/dbus_daemon_launch_helper-desktop-file.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='desktop-file.c' object='dbus_daemon_launch_helper-desktop-file.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-desktop-file.obj `if test -f 'desktop-file.c'; then $(CYGPATH_W) 'desktop-file.c'; else $(CYGPATH_W) '$(srcdir)/desktop-file.c'; fi` + +dbus_daemon_launch_helper-utils.o: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-utils.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-utils.Tpo -c -o dbus_daemon_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-utils.Tpo $(DEPDIR)/dbus_daemon_launch_helper-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='dbus_daemon_launch_helper-utils.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c + +dbus_daemon_launch_helper-utils.obj: utils.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-utils.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-utils.Tpo -c -o dbus_daemon_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-utils.Tpo $(DEPDIR)/dbus_daemon_launch_helper-utils.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utils.c' object='dbus_daemon_launch_helper-utils.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` + +dbus_daemon_launch_helper-activation-helper.o: activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-activation-helper.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Tpo -c -o dbus_daemon_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Tpo $(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation-helper.c' object='dbus_daemon_launch_helper-activation-helper.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-activation-helper.o `test -f 'activation-helper.c' || echo '$(srcdir)/'`activation-helper.c + +dbus_daemon_launch_helper-activation-helper.obj: activation-helper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper-activation-helper.obj -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Tpo -c -o dbus_daemon_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Tpo $(DEPDIR)/dbus_daemon_launch_helper-activation-helper.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='activation-helper.c' object='dbus_daemon_launch_helper-activation-helper.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dbus_daemon_launch_helper-activation-helper.obj `if test -f 'activation-helper.c'; then $(CYGPATH_W) 'activation-helper.c'; else $(CYGPATH_W) '$(srcdir)/activation-helper.c'; fi` + dbus_daemon_launch_helper_test-activation-helper-bin.o: activation-helper-bin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(dbus_daemon_launch_helper_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dbus_daemon_launch_helper_test-activation-helper-bin.o -MD -MP -MF $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Tpo -c -o dbus_daemon_launch_helper_test-activation-helper-bin.o `test -f 'activation-helper-bin.c' || echo '$(srcdir)/'`activation-helper-bin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Tpo $(DEPDIR)/dbus_daemon_launch_helper_test-activation-helper-bin.Po @@ -1050,44 +2160,26 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-man1: $(man_MANS) +install-agentDATA: $(agent_DATA) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + test -z "$(agentdir)" || $(MKDIR_P) "$(DESTDIR)$(agentdir)" + @list='$(agent_DATA)'; test -n "$(agentdir)" || list=; \ + 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 \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(agentdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(agentdir)" || exit $$?; \ + done -uninstall-man1: +uninstall-agentDATA: @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + @list='$(agent_DATA)'; test -n "$(agentdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(agentdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(agentdir)" && rm -f $$files install-configDATA: $(config_DATA) @$(NORMAL_INSTALL) test -z "$(configdir)" || $(MKDIR_P) "$(DESTDIR)$(configdir)" @@ -1108,6 +2200,26 @@ uninstall-configDATA: test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(configdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(configdir)" && rm -f $$files +install-systemdsystemunitDATA: $(systemdsystemunit_DATA) + @$(NORMAL_INSTALL) + test -z "$(systemdsystemunitdir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)" + @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ + 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)$(systemdsystemunitdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \ + done + +uninstall-systemdsystemunitDATA: + @$(NORMAL_UNINSTALL) + @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(systemdsystemunitdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(systemdsystemunitdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -1254,19 +2366,6 @@ check-TESTS: $(TESTS) else :; fi distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1299,9 +2398,9 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) +all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(initddir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(configdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initddir)" "$(DESTDIR)$(agentdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(systemdsystemunitdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1331,8 +2430,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ - mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \ + clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1352,14 +2451,15 @@ info: info-am info-am: -install-data-am: install-configDATA install-initdSCRIPTS install-man +install-data-am: install-agentDATA install-configDATA \ + install-initdSCRIPTS install-systemdsystemunitDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: -install-exec-am: +install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am @@ -1369,7 +2469,7 @@ install-info: install-info-am install-info-am: -install-man: install-man1 +install-man: install-pdf: install-pdf-am @@ -1399,59 +2499,70 @@ ps: ps-am ps-am: -uninstall-am: uninstall-configDATA uninstall-initdSCRIPTS \ - uninstall-man +uninstall-am: uninstall-agentDATA uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-configDATA \ + uninstall-initdSCRIPTS uninstall-systemdsystemunitDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - .MAKE: check-am install-am install-data-am install-strip uninstall-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-configDATA \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-initdSCRIPTS install-man install-man1 install-pdf \ + clean-binPROGRAMS clean-generic clean-libtool clean-local \ + clean-noinstPROGRAMS ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-agentDATA \ + install-am install-binPROGRAMS install-binSCRIPTS \ + install-configDATA install-data install-data-am \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-initdSCRIPTS install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-configDATA \ - uninstall-hook uninstall-initdSCRIPTS uninstall-man \ - uninstall-man1 + install-systemdsystemunitDATA 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-agentDATA uninstall-am uninstall-binPROGRAMS \ + uninstall-binSCRIPTS uninstall-configDATA uninstall-hook \ + uninstall-initdSCRIPTS uninstall-systemdsystemunitDATA clean-local: /bin/rm *.bb *.bbg *.da *.gcov || true uninstall-hook: - rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon - rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper + rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) + rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT) install-data-hook: - if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \ - $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \ - chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ - fi - $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR) $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services - $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1 - $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir) - if test `id -u` -eq 0; then \ - chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ - chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ - else \ - echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \ - echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \ - fi +@DBUS_UNIX_TRUE@ if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \ +@DBUS_UNIX_TRUE@ $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \ +@DBUS_UNIX_TRUE@ chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ +@DBUS_UNIX_TRUE@ fi +@DBUS_UNIX_TRUE@ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon$(EXEEXT) $(DESTDIR)$(DBUS_DAEMONDIR) +@DBUS_UNIX_TRUE@ $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1 +@DBUS_UNIX_TRUE@ if test -f dbus-daemon-launch-helper$(EXEEXT) ; then \ +@DBUS_UNIX_TRUE@ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) dbus-daemon-launch-helper$(EXEEXT) $(DESTDIR)$(libexecdir); \ +@DBUS_UNIX_TRUE@ if test `id -u` -eq 0; then \ +@DBUS_UNIX_TRUE@ chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ +@DBUS_UNIX_TRUE@ chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \ +@DBUS_UNIX_TRUE@ else \ +@DBUS_UNIX_TRUE@ echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \ +@DBUS_UNIX_TRUE@ echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \ +@DBUS_UNIX_TRUE@ fi \ +@DBUS_UNIX_TRUE@ fi +# Install dbus.socket as default implementation of a D-Bus stack +@HAVE_SYSTEMD_TRUE@ $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants +@HAVE_SYSTEMD_TRUE@ $(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket +# Unconditionally enable D-Bus on systemd installations +@HAVE_SYSTEMD_TRUE@ $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants +@HAVE_SYSTEMD_TRUE@ $(LN_S) ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket +@HAVE_SYSTEMD_TRUE@ $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants +@HAVE_SYSTEMD_TRUE@ $(LN_S) ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service # 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/bus/activation.c b/bus/activation.c index 2fcd85d2..ee5efa8e 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -6,7 +6,7 @@ * Copyright (C) 2004 Imendio HB * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,12 +16,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "activation.h" #include "activation-exit-codes.h" #include "desktop-file.h" @@ -68,6 +70,7 @@ typedef struct char *name; char *exec; char *user; + char *systemd_service; unsigned long mtime; BusServiceDirectory *s_dir; char *filename; @@ -89,6 +92,7 @@ typedef struct BusActivation *activation; char *service_name; char *exec; + char *systemd_service; DBusList *entries; int n_entries; DBusBabysitter *babysitter; @@ -101,7 +105,7 @@ static BusServiceDirectory * bus_service_directory_ref (BusServiceDirectory *dir) { _dbus_assert (dir->refcount); - + dir->refcount++; return dir; @@ -111,8 +115,8 @@ bus_service_directory_ref (BusServiceDirectory *dir) static void bus_service_directory_unref (BusServiceDirectory *dir) { - if (dir == NULL) - return; + if (dir == NULL) + return; _dbus_assert (dir->refcount > 0); dir->refcount--; @@ -132,10 +136,10 @@ bus_pending_activation_entry_free (BusPendingActivationEntry *entry) { if (entry->activation_message) dbus_message_unref (entry->activation_message); - + if (entry->connection) dbus_connection_unref (entry->connection); - + dbus_free (entry); } @@ -149,7 +153,7 @@ handle_timeout_callback (DBusTimeout *timeout, _dbus_wait_for_memory (); } -static BusPendingActivation * +static BusPendingActivation * bus_pending_activation_ref (BusPendingActivation *pending_activation) { _dbus_assert (pending_activation->refcount > 0); @@ -162,7 +166,7 @@ static void bus_pending_activation_unref (BusPendingActivation *pending_activation) { DBusList *link; - + if (pending_activation == NULL) /* hash table requires this */ return; @@ -171,7 +175,7 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation) if (pending_activation->refcount > 0) return; - + if (pending_activation->timeout_added) { _dbus_loop_remove_timeout (bus_context_get_loop (pending_activation->activation->context), @@ -182,7 +186,7 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation) if (pending_activation->timeout) _dbus_timeout_unref (pending_activation->timeout); - + if (pending_activation->babysitter) { if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter, @@ -190,12 +194,13 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation) pending_activation->babysitter, NULL)) _dbus_assert_not_reached ("setting watch functions to NULL failed"); - + _dbus_babysitter_unref (pending_activation->babysitter); } - + dbus_free (pending_activation->service_name); dbus_free (pending_activation->exec); + dbus_free (pending_activation->systemd_service); link = _dbus_list_get_first_link (&pending_activation->entries); @@ -213,7 +218,7 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation) pending_activation->n_entries; _dbus_assert (pending_activation->activation->n_pending_activations >= 0); - + dbus_free (pending_activation); } @@ -231,17 +236,18 @@ bus_activation_entry_unref (BusActivationEntry *entry) { if (entry == NULL) /* hash table requires this */ return; - + _dbus_assert (entry->refcount > 0); entry->refcount--; - - if (entry->refcount > 0) + + if (entry->refcount > 0) return; - + dbus_free (entry->name); dbus_free (entry->exec); dbus_free (entry->user); dbus_free (entry->filename); + dbus_free (entry->systemd_service); dbus_free (entry); } @@ -253,19 +259,21 @@ update_desktop_file_entry (BusActivation *activation, BusDesktopFile *desktop_file, DBusError *error) { - char *name, *exec, *user; + char *name, *exec, *user, *exec_tmp, *systemd_service; BusActivationEntry *entry; DBusStat stat_buf; DBusString file_path; DBusError tmp_error; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + name = NULL; exec = NULL; user = NULL; + exec_tmp = NULL; entry = NULL; - + systemd_service = NULL; + dbus_error_init (&tmp_error); if (!_dbus_string_init (&file_path)) @@ -273,21 +281,21 @@ update_desktop_file_entry (BusActivation *activation, BUS_SET_OOM (error); return FALSE; } - + if (!_dbus_string_append (&file_path, s_dir->dir_c) || !_dbus_concat_dir_and_file (&file_path, filename)) { BUS_SET_OOM (error); goto failed; } - - if (!_dbus_stat (&file_path, &stat_buf, NULL)) + + if (!_dbus_stat (&file_path, &stat_buf, NULL)) { dbus_set_error (error, DBUS_ERROR_FAILED, "Can't stat the service file\n"); goto failed; } - + if (!bus_desktop_file_get_string (desktop_file, DBUS_SERVICE_SECTION, DBUS_SERVICE_NAME, @@ -298,7 +306,7 @@ update_desktop_file_entry (BusActivation *activation, if (!bus_desktop_file_get_string (desktop_file, DBUS_SERVICE_SECTION, DBUS_SERVICE_EXEC, - &exec, + &exec_tmp, error)) goto failed; @@ -325,10 +333,37 @@ update_desktop_file_entry (BusActivation *activation, } _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); - entry = _dbus_hash_table_lookup_string (s_dir->entries, + /* systemd service is never required */ + if (!bus_desktop_file_get_string (desktop_file, + DBUS_SERVICE_SECTION, + DBUS_SERVICE_SYSTEMD_SERVICE, + &systemd_service, &tmp_error)) + { + _DBUS_ASSERT_ERROR_IS_SET (&tmp_error); + /* if we got OOM, then exit */ + if (dbus_error_has_name (&tmp_error, DBUS_ERROR_NO_MEMORY)) + { + dbus_move_error (&tmp_error, error); + goto failed; + } + else + { + /* if we have error because we didn't find anything then continue */ + dbus_error_free (&tmp_error); + dbus_free (systemd_service); + systemd_service = NULL; + } + } + + _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error); + + entry = _dbus_hash_table_lookup_string (s_dir->entries, _dbus_string_get_const_data (filename)); + + exec = strdup (_dbus_replace_install_prefix (exec_tmp)); + if (entry == NULL) /* New file */ - { + { /* FIXME we need a better-defined algorithm for which service file to * pick than "whichever one is first in the directory listing" */ @@ -338,19 +373,20 @@ update_desktop_file_entry (BusActivation *activation, "Service %s already exists in activation entry list\n", name); goto failed; } - + entry = dbus_new0 (BusActivationEntry, 1); if (entry == NULL) { BUS_SET_OOM (error); goto failed; } - + entry->name = name; entry->exec = exec; entry->user = user; + entry->systemd_service = systemd_service; entry->refcount = 1; - + entry->s_dir = s_dir; entry->filename = _dbus_strdup (_dbus_string_get_const_data (filename)); if (!entry->filename) @@ -364,7 +400,7 @@ update_desktop_file_entry (BusActivation *activation, BUS_SET_OOM (error); goto failed; } - + if (!_dbus_hash_table_insert_string (s_dir->entries, entry->filename, bus_activation_entry_ref (entry))) { /* Revert the insertion in the entries table */ @@ -386,10 +422,12 @@ update_desktop_file_entry (BusActivation *activation, name, _dbus_string_get_const_data (&file_path)); goto failed; } - + dbus_free (entry->name); dbus_free (entry->exec); dbus_free (entry->user); + dbus_free (entry->systemd_service); + entry->systemd_service = systemd_service; entry->name = name; entry->exec = exec; entry->user = user; @@ -399,15 +437,15 @@ update_desktop_file_entry (BusActivation *activation, BUS_SET_OOM (error); /* Also remove path to entries hash since we want this in sync with * the entries hash table */ - _dbus_hash_table_remove_string (entry->s_dir->entries, + _dbus_hash_table_remove_string (entry->s_dir->entries, entry->filename); bus_activation_entry_unref (entry); return FALSE; } } - + entry->mtime = stat_buf.mtime; - + _dbus_string_free (&file_path); bus_activation_entry_unref (entry); @@ -415,13 +453,14 @@ update_desktop_file_entry (BusActivation *activation, failed: dbus_free (name); - dbus_free (exec); + dbus_free (exec_tmp); dbus_free (user); + dbus_free (systemd_service); _dbus_string_free (&file_path); if (entry) bus_activation_entry_unref (entry); - + return FALSE; } @@ -439,15 +478,15 @@ check_service_file (BusActivation *activation, retval = TRUE; tmp_entry = entry; - + _dbus_string_init_const (&filename, entry->filename); - + if (!_dbus_string_init (&file_path)) { BUS_SET_OOM (error); return FALSE; } - + if (!_dbus_string_append (&file_path, entry->s_dir->dir_c) || !_dbus_concat_dir_and_file (&file_path, &filename)) { @@ -455,7 +494,7 @@ check_service_file (BusActivation *activation, retval = FALSE; goto out; } - + if (!_dbus_stat (&file_path, &stat_buf, NULL)) { _dbus_verbose ("****** Can't stat file \"%s\", removing from cache\n", @@ -468,20 +507,20 @@ check_service_file (BusActivation *activation, retval = TRUE; goto out; } - else + else { - if (stat_buf.mtime > entry->mtime) + if (stat_buf.mtime > entry->mtime) { BusDesktopFile *desktop_file; DBusError tmp_error; - + dbus_error_init (&tmp_error); - + desktop_file = bus_desktop_file_load (&file_path, &tmp_error); if (desktop_file == NULL) { _dbus_verbose ("Could not load %s: %s\n", - _dbus_string_get_const_data (&file_path), + _dbus_string_get_const_data (&file_path), tmp_error.message); if (dbus_error_has_name (&tmp_error, DBUS_ERROR_NO_MEMORY)) { @@ -493,10 +532,10 @@ check_service_file (BusActivation *activation, retval = TRUE; goto out; } - - /* @todo We can return OOM or a DBUS_ERROR_FAILED error + + /* @todo We can return OOM or a DBUS_ERROR_FAILED error * Handle these both better - */ + */ if (!update_desktop_file_entry (activation, entry->s_dir, &filename, desktop_file, &tmp_error)) { bus_desktop_file_free (desktop_file); @@ -510,12 +549,12 @@ check_service_file (BusActivation *activation, retval = TRUE; goto out; } - + bus_desktop_file_free (desktop_file); retval = TRUE; } } - + out: _dbus_string_free (&file_path); @@ -540,14 +579,14 @@ update_directory (BusActivation *activation, dbus_bool_t retval; BusActivationEntry *entry; DBusString full_path; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + iter = NULL; desktop_file = NULL; - + _dbus_string_init_const (&dir, s_dir->dir_c); - + if (!_dbus_string_init (&filename)) { BUS_SET_OOM (error); @@ -564,24 +603,24 @@ update_directory (BusActivation *activation, retval = FALSE; /* from this point it's safe to "goto out" */ - + iter = _dbus_directory_open (&dir, error); if (iter == NULL) { _dbus_verbose ("Failed to open directory %s: %s\n", - s_dir->dir_c, + s_dir->dir_c, error ? error->message : "unknown"); goto out; } - + /* Now read the files */ dbus_error_init (&tmp_error); while (_dbus_directory_get_next_file (iter, &filename, &tmp_error)) { _dbus_assert (!dbus_error_is_set (&tmp_error)); - + _dbus_string_set_length (&full_path, 0); - + if (!_dbus_string_ends_with_c_str (&filename, ".service")) { _dbus_verbose ("Skipping non-.service file %s\n", @@ -590,21 +629,21 @@ update_directory (BusActivation *activation, } entry = _dbus_hash_table_lookup_string (s_dir->entries, _dbus_string_get_const_data (&filename)); - if (entry) /* Already has this service file in the cache */ + if (entry) /* Already has this service file in the cache */ { if (!check_service_file (activation, entry, NULL, error)) goto out; continue; } - + if (!_dbus_string_append (&full_path, s_dir->dir_c) || !_dbus_concat_dir_and_file (&full_path, &filename)) { BUS_SET_OOM (error); goto out; } - + /* New file */ desktop_file = bus_desktop_file_load (&full_path, &tmp_error); if (desktop_file == NULL) @@ -618,19 +657,19 @@ update_directory (BusActivation *activation, dbus_move_error (&tmp_error, error); goto out; } - + dbus_error_free (&tmp_error); continue; } - /* @todo We can return OOM or a DBUS_ERROR_FAILED error + /* @todo We can return OOM or a DBUS_ERROR_FAILED error * Handle these both better - */ + */ if (!update_desktop_file_entry (activation, s_dir, &filename, desktop_file, &tmp_error)) { bus_desktop_file_free (desktop_file); desktop_file = NULL; - + _dbus_verbose ("Could not add %s to activation entry list: %s\n", _dbus_string_get_const_data (&full_path), tmp_error.message); @@ -656,7 +695,7 @@ update_directory (BusActivation *activation, dbus_move_error (&tmp_error, error); goto out; } - + retval = TRUE; out: @@ -664,12 +703,12 @@ update_directory (BusActivation *activation, _DBUS_ASSERT_ERROR_IS_SET (error); else _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + if (iter != NULL) _dbus_directory_close (iter); _dbus_string_free (&filename); _dbus_string_free (&full_path); - + return retval; } @@ -872,7 +911,7 @@ bus_activation_new (BusContext *context, (DBusFreeFunction) dbus_free, (DBusFreeFunction) dbus_free); - if (activation->environment == NULL) + if (activation->environment == NULL) { BUS_SET_OOM (error); goto failed; @@ -885,9 +924,9 @@ bus_activation_new (BusContext *context, } return activation; - + failed: - bus_activation_unref (activation); + bus_activation_unref (activation); return NULL; } @@ -895,7 +934,7 @@ BusActivation * bus_activation_ref (BusActivation *activation) { _dbus_assert (activation->refcount > 0); - + activation->refcount += 1; return activation; @@ -910,13 +949,13 @@ bus_activation_unref (BusActivation *activation) if (activation->refcount > 0) return; - + dbus_free (activation->server_address); if (activation->entries) _dbus_hash_table_unref (activation->entries); if (activation->pending_activations) _dbus_hash_table_unref (activation->pending_activations); - if (activation->directories) + if (activation->directories) _dbus_hash_table_unref (activation->directories); if (activation->environment) _dbus_hash_table_unref (activation->environment); @@ -929,13 +968,13 @@ add_bus_environment (BusActivation *activation, DBusError *error) { const char *type; - + if (!bus_activation_set_environment_variable (activation, "DBUS_STARTER_ADDRESS", activation->server_address, error)) return FALSE; - + type = bus_context_get_type (activation->context); if (type != NULL) { @@ -982,13 +1021,13 @@ restore_pending (void *data) _dbus_verbose ("Restoring pending activation for service %s, has timeout = %d\n", d->pending_activation->service_name, d->pending_activation->timeout_added); - + _dbus_hash_table_insert_string_preallocated (d->pending_activation->activation->pending_activations, d->hash_entry, d->pending_activation->service_name, d->pending_activation); bus_pending_activation_ref (d->pending_activation); - + d->hash_entry = NULL; } @@ -1002,7 +1041,7 @@ free_pending_restore_data (void *data) d->hash_entry); bus_pending_activation_unref (d->pending_activation); - + dbus_free (d); } @@ -1015,12 +1054,12 @@ add_restore_pending_to_transaction (BusTransaction *transaction, d = dbus_new (RestorePendingData, 1); if (d == NULL) return FALSE; - + d->pending_activation = pending_activation; d->hash_entry = _dbus_hash_table_preallocate_entry (d->pending_activation->activation->pending_activations); - + bus_pending_activation_ref (d->pending_activation); - + if (d->hash_entry == NULL || !bus_transaction_add_cancel_hook (transaction, restore_pending, d, free_pending_restore_data)) @@ -1030,7 +1069,7 @@ add_restore_pending_to_transaction (BusTransaction *transaction, } _dbus_verbose ("Saved pending activation to be restored if the transaction fails\n"); - + return TRUE; } @@ -1045,7 +1084,7 @@ bus_activation_service_created (BusActivation *activation, DBusList *link; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + /* Check if it's a pending activation */ pending_activation = _dbus_hash_table_lookup_string (activation->pending_activations, service_name); @@ -1057,14 +1096,14 @@ bus_activation_service_created (BusActivation *activation, { BusPendingActivationEntry *entry = link->data; DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link); - + if (dbus_connection_get_is_connected (entry->connection)) { /* Only send activation replies to regular activation requests. */ if (!entry->auto_activation) { dbus_uint32_t result; - + message = dbus_message_new_method_return (entry->activation_message); if (!message) { @@ -1073,7 +1112,7 @@ bus_activation_service_created (BusActivation *activation, } result = DBUS_START_REPLY_SUCCESS; - + if (!dbus_message_append_args (message, DBUS_TYPE_UINT32, &result, DBUS_TYPE_INVALID)) @@ -1082,18 +1121,18 @@ bus_activation_service_created (BusActivation *activation, BUS_SET_OOM (error); goto error; } - + if (!bus_transaction_send_from_driver (transaction, entry->connection, message)) { dbus_message_unref (message); BUS_SET_OOM (error); goto error; } - + dbus_message_unref (message); } } - + link = next; } @@ -1113,7 +1152,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation DBusList *link; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + /* Check if it's a pending activation */ pending_activation = _dbus_hash_table_lookup_string (activation->pending_activations, bus_service_get_name (service)); @@ -1130,7 +1169,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation if (entry->auto_activation && dbus_connection_get_is_connected (entry->connection)) { DBusConnection *addressed_recipient; - + addressed_recipient = bus_service_get_primary_owners_connection (service); /* Resume dispatching where we left off in bus_dispatch() */ @@ -1150,7 +1189,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation BUS_SET_OOM (error); goto error; } - + _dbus_hash_table_remove_string (activation->pending_activations, bus_service_get_name (service)); return TRUE; @@ -1172,19 +1211,19 @@ try_send_activation_failure (BusPendingActivation *pending_activation, BusActivation *activation; DBusList *link; BusTransaction *transaction; - + activation = pending_activation->activation; transaction = bus_transaction_new (activation->context); if (transaction == NULL) return FALSE; - + link = _dbus_list_get_first_link (&pending_activation->entries); while (link != NULL) { BusPendingActivationEntry *entry = link->data; DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link); - + if (dbus_connection_get_is_connected (entry->connection)) { if (!bus_transaction_send_error_reply (transaction, @@ -1193,12 +1232,12 @@ try_send_activation_failure (BusPendingActivation *pending_activation, entry->activation_message)) goto error; } - + link = next; } bus_transaction_execute_and_free (transaction); - + return TRUE; error: @@ -1385,7 +1424,7 @@ remove_babysitter_watch (DBusWatch *watch, void *data) { BusPendingActivation *pending_activation = data; - + _dbus_loop_remove_watch (bus_context_get_loop (pending_activation->activation->context), watch, babysitter_watch_callback, pending_activation); } @@ -1395,12 +1434,12 @@ pending_activation_timed_out (void *data) { BusPendingActivation *pending_activation = data; DBusError error; - + /* Kill the spawned process, since it sucks * (not sure this is what we want to do, but * may as well try it for now) */ - if (pending_activation->babysitter) + if (pending_activation->babysitter) _dbus_babysitter_kill_child (pending_activation->babysitter); dbus_error_init (&error); @@ -1426,7 +1465,7 @@ cancel_pending (void *data) if (pending_activation->babysitter) _dbus_babysitter_kill_child (pending_activation->babysitter); - + _dbus_hash_table_remove_string (pending_activation->activation->pending_activations, pending_activation->service_name); } @@ -1435,31 +1474,31 @@ static void free_pending_cancel_data (void *data) { BusPendingActivation *pending_activation = data; - + bus_pending_activation_unref (pending_activation); } static dbus_bool_t add_cancel_pending_to_transaction (BusTransaction *transaction, BusPendingActivation *pending_activation) -{ +{ if (!bus_transaction_add_cancel_hook (transaction, cancel_pending, pending_activation, free_pending_cancel_data)) return FALSE; - bus_pending_activation_ref (pending_activation); - + bus_pending_activation_ref (pending_activation); + _dbus_verbose ("Saved pending activation to be canceled if the transaction fails\n"); - + return TRUE; } -static dbus_bool_t +static dbus_bool_t update_service_cache (BusActivation *activation, DBusError *error) { DBusHashIter iter; - + _dbus_hash_iter_init (activation->directories, &iter); while (_dbus_hash_iter_next (&iter)) { @@ -1481,37 +1520,37 @@ update_service_cache (BusActivation *activation, DBusError *error) continue; } } - + return TRUE; } static BusActivationEntry * -activation_find_entry (BusActivation *activation, +activation_find_entry (BusActivation *activation, const char *service_name, DBusError *error) { BusActivationEntry *entry; - + entry = _dbus_hash_table_lookup_string (activation->entries, service_name); if (!entry) - { - if (!update_service_cache (activation, error)) + { + if (!update_service_cache (activation, error)) return NULL; entry = _dbus_hash_table_lookup_string (activation->entries, service_name); } - else + else { BusActivationEntry *updated_entry; - if (!check_service_file (activation, entry, &updated_entry, error)) + if (!check_service_file (activation, entry, &updated_entry, error)) return NULL; entry = updated_entry; } - if (!entry) + if (!entry) { dbus_set_error (error, DBUS_ERROR_SERVICE_UNKNOWN, "The name %s was not provided by any .service files", @@ -1633,7 +1672,7 @@ bus_activation_activate_service (BusActivation *activation, DBusHashIter iter; dbus_bool_t activated; DBusString command; - + activated = TRUE; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -1648,7 +1687,7 @@ bus_activation_activate_service (BusActivation *activation, } entry = activation_find_entry (activation, service_name, error); - if (!entry) + if (!entry) return FALSE; /* Bypass the registry lookup if we're auto-activating, bus_dispatch would not @@ -1661,9 +1700,9 @@ bus_activation_activate_service (BusActivation *activation, if (bus_registry_lookup (bus_context_get_registry (activation->context), &service_str) != NULL) { dbus_uint32_t result; - + _dbus_verbose ("Service \"%s\" is already active\n", service_name); - + message = dbus_message_new_method_return (activation_message); if (!message) @@ -1674,7 +1713,7 @@ bus_activation_activate_service (BusActivation *activation, } result = DBUS_START_REPLY_ALREADY_RUNNING; - + if (!dbus_message_append_args (message, DBUS_TYPE_UINT32, &result, DBUS_TYPE_INVALID)) @@ -1696,7 +1735,7 @@ bus_activation_activate_service (BusActivation *activation, return retval; } } - + pending_activation_entry = dbus_new0 (BusPendingActivationEntry, 1); if (!pending_activation_entry) { @@ -1711,7 +1750,7 @@ bus_activation_activate_service (BusActivation *activation, dbus_message_ref (activation_message); pending_activation_entry->connection = connection; dbus_connection_ref (connection); - + /* Check if the service is being activated */ pending_activation = _dbus_hash_table_lookup_string (activation->pending_activations, service_name); if (pending_activation) @@ -1719,7 +1758,7 @@ bus_activation_activate_service (BusActivation *activation, if (!_dbus_list_append (&pending_activation->entries, pending_activation_entry)) { _dbus_verbose ("Failed to append a new entry to pending activation\n"); - + BUS_SET_OOM (error); bus_pending_activation_entry_free (pending_activation_entry); return FALSE; @@ -1734,23 +1773,23 @@ bus_activation_activate_service (BusActivation *activation, if (!pending_activation) { _dbus_verbose ("Failed to create pending activation\n"); - + BUS_SET_OOM (error); - bus_pending_activation_entry_free (pending_activation_entry); + bus_pending_activation_entry_free (pending_activation_entry); return FALSE; } pending_activation->activation = activation; pending_activation->refcount = 1; - + pending_activation->service_name = _dbus_strdup (service_name); if (!pending_activation->service_name) { _dbus_verbose ("Failed to copy service name for pending activation\n"); - + BUS_SET_OOM (error); bus_pending_activation_unref (pending_activation); - bus_pending_activation_entry_free (pending_activation_entry); + bus_pending_activation_entry_free (pending_activation_entry); return FALSE; } @@ -1764,6 +1803,19 @@ bus_activation_activate_service (BusActivation *activation, return FALSE; } + if (entry->systemd_service) + { + pending_activation->systemd_service = _dbus_strdup (entry->systemd_service); + if (!pending_activation->systemd_service) + { + _dbus_verbose ("Failed to copy systemd service for pending activation\n"); + BUS_SET_OOM (error); + bus_pending_activation_unref (pending_activation); + bus_pending_activation_entry_free (pending_activation_entry); + return FALSE; + } + } + pending_activation->timeout = _dbus_timeout_new (bus_context_get_activation_timeout (activation->context), pending_activation_timed_out, @@ -1772,7 +1824,7 @@ bus_activation_activate_service (BusActivation *activation, if (!pending_activation->timeout) { _dbus_verbose ("Failed to create timeout for pending activation\n"); - + BUS_SET_OOM (error); bus_pending_activation_unref (pending_activation); bus_pending_activation_entry_free (pending_activation_entry); @@ -1786,53 +1838,53 @@ bus_activation_activate_service (BusActivation *activation, NULL)) { _dbus_verbose ("Failed to add timeout for pending activation\n"); - + BUS_SET_OOM (error); bus_pending_activation_unref (pending_activation); - bus_pending_activation_entry_free (pending_activation_entry); + bus_pending_activation_entry_free (pending_activation_entry); return FALSE; } pending_activation->timeout_added = TRUE; - + if (!_dbus_list_append (&pending_activation->entries, pending_activation_entry)) { _dbus_verbose ("Failed to add entry to just-created pending activation\n"); - + BUS_SET_OOM (error); bus_pending_activation_unref (pending_activation); - bus_pending_activation_entry_free (pending_activation_entry); + bus_pending_activation_entry_free (pending_activation_entry); return FALSE; } pending_activation->n_entries += 1; pending_activation->activation->n_pending_activations += 1; - + activated = FALSE; _dbus_hash_iter_init (activation->pending_activations, &iter); while (_dbus_hash_iter_next (&iter)) { BusPendingActivation *p = _dbus_hash_iter_get_value (&iter); - - if (strcmp (p->exec, entry->exec) == 0) + + if (strcmp (p->exec, entry->exec) == 0) { activated = TRUE; break; } } - + if (!_dbus_hash_table_insert_string (activation->pending_activations, pending_activation->service_name, pending_activation)) { _dbus_verbose ("Failed to put pending activation in hash table\n"); - + BUS_SET_OOM (error); bus_pending_activation_unref (pending_activation); return FALSE; } } - + if (!add_cancel_pending_to_transaction (transaction, pending_activation)) { _dbus_verbose ("Failed to add pending activation cancel hook to transaction\n"); @@ -1842,10 +1894,99 @@ bus_activation_activate_service (BusActivation *activation, return FALSE; } - + if (activated) return TRUE; + if (bus_context_get_systemd_activation (activation->context)) + { + if (strcmp (service_name, "org.freedesktop.systemd1") == 0) + /* systemd itself is missing apparently. That can happen + only during early startup. Let's just wait until systemd + connects to us and do nothing. */ + return TRUE; + + if (entry->systemd_service) + { + BusTransaction *activation_transaction; + DBusString service_string; + BusService *service; + BusRegistry *registry; + + /* OK, we have a systemd service configured for this entry, + hence let's enqueue an activation request message. This + is implemented as a directed signal, not a method call, + for three reasons: 1) we don't expect a response on + success, where we just expect a name appearing on the + bus; 2) at this time the systemd service might not yet + have connected, so we wouldn't know the message serial at + this point to set up a pending call; 3) it is ugly if the + bus suddenly becomes the caller of a remote method. */ + + message = dbus_message_new_signal (DBUS_PATH_DBUS, + "org.freedesktop.systemd1.Activator", + "ActivationRequest"); + if (!message) + { + _dbus_verbose ("No memory to create activation message\n"); + BUS_SET_OOM (error); + return FALSE; + } + + if (!dbus_message_set_sender (message, DBUS_SERVICE_DBUS) || + !dbus_message_set_destination (message, "org.freedesktop.systemd1") || + !dbus_message_append_args (message, + DBUS_TYPE_STRING, &entry->systemd_service, + DBUS_TYPE_INVALID)) + { + _dbus_verbose ("No memory to set args of activation message\n"); + dbus_message_unref (message); + BUS_SET_OOM (error); + return FALSE; + } + + /* Create our transaction */ + activation_transaction = bus_transaction_new (activation->context); + if (activation_transaction == NULL) + { + _dbus_verbose ("No memory to create activation transaction\n"); + dbus_message_unref (message); + BUS_SET_OOM (error); + return FALSE; + } + + /* Check whether systemd is already connected */ + registry = bus_connection_get_registry (connection); + _dbus_string_init_const (&service_string, "org.freedesktop.systemd1"); + service = bus_registry_lookup (registry, &service_string); + + if (service != NULL) + /* Wonderful, systemd is connected, let's just send the msg */ + retval = bus_dispatch_matches (activation_transaction, NULL, bus_service_get_primary_owners_connection (service), + message, error); + else + /* systemd is not around, let's "activate" it. */ + retval = bus_activation_activate_service (activation, connection, activation_transaction, TRUE, + message, "org.freedesktop.systemd1", error); + + dbus_message_unref (message); + + if (!retval) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + _dbus_verbose ("failed to send activation message: %s\n", error->name); + bus_transaction_cancel_and_free (activation_transaction); + return FALSE; + } + + bus_transaction_execute_and_free (activation_transaction); + return TRUE; + } + + /* OK, we have no configured systemd service, hence let's + proceed with traditional activation. */ + } + /* use command as system and session different */ if (!_dbus_string_init (&command)) { @@ -1901,7 +2042,7 @@ bus_activation_activate_service (BusActivation *activation, { _dbus_verbose ("Failed to parse command line: %s\n", entry->exec); _DBUS_ASSERT_ERROR_IS_SET (error); - + _dbus_hash_table_remove_string (activation->pending_activations, pending_activation->service_name); @@ -1929,7 +2070,7 @@ bus_activation_activate_service (BusActivation *activation, _dbus_verbose ("Spawning %s ...\n", argv[0]); if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv, envp, - NULL, activation, + NULL, activation, error)) { _dbus_verbose ("Failed to spawn child\n"); @@ -1944,7 +2085,7 @@ bus_activation_activate_service (BusActivation *activation, envp = NULL; _dbus_assert (pending_activation->babysitter != NULL); - + if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter, add_babysitter_watch, remove_babysitter_watch, @@ -1956,7 +2097,7 @@ bus_activation_activate_service (BusActivation *activation, _dbus_verbose ("Failed to set babysitter watch functions\n"); return FALSE; } - + return TRUE; } @@ -2003,7 +2144,47 @@ bus_activation_list_services (BusActivation *activation, return FALSE; } - + +dbus_bool_t +dbus_activation_systemd_failure (BusActivation *activation, + DBusMessage *message) +{ + DBusError error; + const char *code, *str, *unit = NULL; + + dbus_error_init(&error); + + /* This is called whenever the systemd activator sent us a + response. We'll invalidate all pending activations that match the + unit name. */ + + if (dbus_message_get_args (message, &error, + DBUS_TYPE_STRING, &unit, + DBUS_TYPE_STRING, &code, + DBUS_TYPE_STRING, &str, + DBUS_TYPE_INVALID)) + dbus_set_error(&error, code, str); + + if (unit) + { + DBusHashIter iter; + + _dbus_hash_iter_init (activation->pending_activations, + &iter); + + while (_dbus_hash_iter_next (&iter)) + { + BusPendingActivation *p = _dbus_hash_iter_get_value (&iter); + + if (p->systemd_service && strcmp (p->systemd_service, unit) == 0) + pending_activation_failed(p, &error); + } + } + + dbus_error_free(&error); + + return TRUE; +} #ifdef DBUS_BUILD_TESTS @@ -2019,8 +2200,8 @@ bus_activation_list_services (BusActivation *activation, static dbus_bool_t test_create_service_file (DBusString *dir, - const char *filename, - const char *name, + const char *filename, + const char *name, const char *exec) { DBusString file_name, full_path; @@ -2039,7 +2220,7 @@ test_create_service_file (DBusString *dir, ret_val = FALSE; goto out; } - + file = fopen (_dbus_string_get_const_data (&full_path), "w"); if (!file) { @@ -2060,9 +2241,9 @@ test_remove_service_file (DBusString *dir, const char *filename) { DBusString file_name, full_path; dbus_bool_t ret_val; - + ret_val = TRUE; - + _dbus_string_init_const (&file_name, filename); if (!_dbus_string_init (&full_path)) @@ -2092,9 +2273,9 @@ test_remove_directory (DBusString *dir) DBusDirIter *iter; DBusString filename, full_path; dbus_bool_t ret_val; - + ret_val = TRUE; - + if (!_dbus_string_init (&filename)) return FALSE; @@ -2103,15 +2284,15 @@ test_remove_directory (DBusString *dir) _dbus_string_free (&filename); return FALSE; } - + iter = _dbus_directory_open (dir, NULL); if (iter == NULL) { ret_val = FALSE; goto out; } - - while (_dbus_directory_get_next_file (iter, &filename, NULL)) + + while (_dbus_directory_get_next_file (iter, &filename, NULL)) { if (!test_remove_service_file (dir, _dbus_string_get_const_data (&filename))) { @@ -2138,13 +2319,13 @@ static dbus_bool_t init_service_reload_test (DBusString *dir) { DBusStat stat_buf; - + if (!_dbus_stat (dir, &stat_buf, NULL)) { if (!_dbus_create_directory (dir, NULL)) return FALSE; } - else + else { if (!test_remove_directory (dir)) return FALSE; @@ -2169,7 +2350,7 @@ cleanup_service_reload_test (DBusString *dir) return TRUE; } -typedef struct +typedef struct { BusActivation *activation; const char *service_name; @@ -2183,16 +2364,16 @@ check_func (void *data) BusActivationEntry *entry; DBusError error; dbus_bool_t ret_val; - + ret_val = TRUE; d = data; - + dbus_error_init (&error); - + entry = activation_find_entry (d->activation, d->service_name, &error); if (entry == NULL) { - if (dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY)) + if (dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY)) { ret_val = TRUE; } @@ -2201,10 +2382,10 @@ check_func (void *data) if (d->expecting_find) ret_val = FALSE; } - + dbus_error_free (&error); } - else + else { if (!d->expecting_find) ret_val = FALSE; @@ -2223,7 +2404,7 @@ do_test (const char *description, dbus_bool_t oom_test, CheckData *data) else err = !check_func (data); - if (err) + if (err) _dbus_assert_not_reached ("Test failed"); return TRUE; @@ -2236,19 +2417,19 @@ do_service_reload_test (DBusString *dir, dbus_bool_t oom_test) DBusString address; DBusList *directories; CheckData d; - + directories = NULL; _dbus_string_init_const (&address, ""); - + if (!_dbus_list_append (&directories, _dbus_string_get_data (dir))) - return FALSE; + return FALSE; activation = bus_activation_new (NULL, &address, &directories, NULL); if (!activation) return FALSE; d.activation = activation; - + /* Check for existing service file */ d.expecting_find = TRUE; d.service_name = SERVICE_NAME_1; @@ -2269,10 +2450,10 @@ do_service_reload_test (DBusString *dir, dbus_bool_t oom_test) d.expecting_find = TRUE; d.service_name = SERVICE_NAME_2; - + if (!do_test ("Added service file", oom_test, &d)) return FALSE; - + /* Check for removed service file */ if (!test_remove_service_file (dir, SERVICE_FILE_2)) return FALSE; @@ -2282,9 +2463,9 @@ do_service_reload_test (DBusString *dir, dbus_bool_t oom_test) if (!do_test ("Removed service file", oom_test, &d)) return FALSE; - + /* Check for updated service file */ - + _dbus_sleep_milliseconds (1000); /* Sleep a second to make sure the mtime is updated */ if (!test_create_service_file (dir, SERVICE_FILE_1, SERVICE_NAME_3, "exec-3")) @@ -2300,7 +2481,7 @@ do_service_reload_test (DBusString *dir, dbus_bool_t oom_test) d.service_name = SERVICE_NAME_1; if (!do_test ("Updated service file, part 2", oom_test, &d)) - return FALSE; + return FALSE; bus_activation_unref (activation); _dbus_list_clear (&directories); @@ -2315,36 +2496,36 @@ bus_activation_service_reload_test (const DBusString *test_data_dir) if (!_dbus_string_init (&directory)) return FALSE; - + if (!_dbus_string_append (&directory, _dbus_get_tmpdir())) return FALSE; - + if (!_dbus_string_append (&directory, "/dbus-reload-test-") || !_dbus_generate_random_ascii (&directory, 6)) { return FALSE; } - + /* Do normal tests */ if (!init_service_reload_test (&directory)) _dbus_assert_not_reached ("could not initiate service reload test"); - + if (!do_service_reload_test (&directory, FALSE)) ; /* Do nothing? */ - + /* Do OOM tests */ if (!init_service_reload_test (&directory)) _dbus_assert_not_reached ("could not initiate service reload test"); - + if (!do_service_reload_test (&directory, TRUE)) ; /* Do nothing? */ - + /* Cleanup test directory */ if (!cleanup_service_reload_test (&directory)) return FALSE; - + _dbus_string_free (&directory); - + return TRUE; } diff --git a/bus/activation.h b/bus/activation.h index 03bfed28..97f25b1f 100644 --- a/bus/activation.h +++ b/bus/activation.h @@ -4,7 +4,7 @@ * Copyright (C) 2003 CodeFactory AB * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,7 +14,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -57,6 +57,8 @@ dbus_bool_t bus_activation_service_created (BusActivation *activation, dbus_bool_t bus_activation_list_services (BusActivation *registry, char ***listp, int *array_len); +dbus_bool_t dbus_activation_systemd_failure (BusActivation *activation, + DBusMessage *message); dbus_bool_t bus_activation_send_pending_auto_activation_messages (BusActivation *activation, BusService *service, @@ -64,5 +66,4 @@ dbus_bool_t bus_activation_send_pending_auto_activation_messages (BusActivati DBusError *error); - #endif /* BUS_ACTIVATION_H */ @@ -4,7 +4,7 @@ * Copyright (C) 2003, 2004 Red Hat, Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,13 +14,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "bus.h" #include "activation.h" #include "connection.h" @@ -35,6 +36,9 @@ #include <dbus/dbus-hash.h> #include <dbus/dbus-credentials.h> #include <dbus/dbus-internals.h> +#ifdef DBUS_CYGWIN +#include <signal.h> +#endif struct BusContext { @@ -58,6 +62,8 @@ struct BusContext unsigned int fork : 1; unsigned int syslog : 1; unsigned int keep_umask : 1; + unsigned int allow_anonymous : 1; + unsigned int systemd_activation : 1; }; static dbus_int32_t server_data_slot = -1; @@ -74,7 +80,7 @@ server_get_context (DBusServer *server) { BusContext *context; BusServerData *bd; - + if (!dbus_server_allocate_data_slot (&server_data_slot)) return NULL; @@ -101,7 +107,7 @@ server_watch_callback (DBusWatch *watch, * if the code in activation.c for the babysitter * watch handler is fixed. */ - + return dbus_watch_handle (watch, condition); } @@ -111,9 +117,9 @@ add_server_watch (DBusWatch *watch, { DBusServer *server = data; BusContext *context; - + context = server_get_context (server); - + return _dbus_loop_add_watch (context->loop, watch, server_watch_callback, server, NULL); @@ -125,9 +131,9 @@ remove_server_watch (DBusWatch *watch, { DBusServer *server = data; BusContext *context; - + context = server_get_context (server); - + _dbus_loop_remove_watch (context->loop, watch, server_watch_callback, server); } @@ -147,7 +153,7 @@ add_server_timeout (DBusTimeout *timeout, { DBusServer *server = data; BusContext *context; - + context = server_get_context (server); return _dbus_loop_add_timeout (context->loop, @@ -160,9 +166,9 @@ remove_server_timeout (DBusTimeout *timeout, { DBusServer *server = data; BusContext *context; - + context = server_get_context (server); - + _dbus_loop_remove_timeout (context->loop, timeout, server_timeout_callback, server); } @@ -173,7 +179,7 @@ new_connection_callback (DBusServer *server, void *data) { BusContext *context = data; - + if (!bus_connections_setup_connection (context->connections, new_connection)) { _dbus_verbose ("No memory to setup new connection\n"); @@ -191,15 +197,24 @@ new_connection_callback (DBusServer *server, dbus_connection_set_max_message_size (new_connection, context->limits.max_message_size); - + + dbus_connection_set_max_received_unix_fds (new_connection, + context->limits.max_incoming_unix_fds); + + dbus_connection_set_max_message_unix_fds (new_connection, + context->limits.max_message_unix_fds); + + dbus_connection_set_allow_anonymous (new_connection, + context->allow_anonymous); + /* on OOM, we won't have ref'd the connection so it will die. */ } static void free_server_data (void *data) { - BusServerData *bd = data; - + BusServerData *bd = data; + dbus_free (bd); } @@ -222,17 +237,17 @@ setup_server (BusContext *context, } bd->context = context; - + if (!dbus_server_set_auth_mechanisms (server, (const char**) auth_mechanisms)) { BUS_SET_OOM (error); return FALSE; } - + dbus_server_set_new_connection_function (server, new_connection_callback, context, NULL); - + if (!dbus_server_set_watch_functions (server, add_server_watch, remove_server_watch, @@ -253,7 +268,7 @@ setup_server (BusContext *context, BUS_SET_OOM (error); return FALSE; } - + return TRUE; } @@ -262,9 +277,11 @@ setup_server (BusContext *context, * when config files are reloaded. */ static dbus_bool_t -process_config_first_time_only (BusContext *context, - BusConfigParser *parser, - DBusError *error) +process_config_first_time_only (BusContext *context, + BusConfigParser *parser, + const DBusString *address, + dbus_bool_t systemd_activation, + DBusError *error) { DBusString log_prefix; DBusList *link; @@ -280,6 +297,8 @@ process_config_first_time_only (BusContext *context, retval = FALSE; auth_mechanisms = NULL; + context->systemd_activation = systemd_activation; + /* Check for an existing pid file. Of course this is a race; * we'd have to use fcntl() locks on the pid file to * avoid that. But we want to check for the pid file @@ -290,15 +309,34 @@ process_config_first_time_only (BusContext *context, { DBusString u; DBusStat stbuf; - + _dbus_string_init_const (&u, pidfile); if (_dbus_stat (&u, &stbuf, NULL)) { +#ifdef DBUS_CYGWIN + DBusString p; + long /* int */ pid; + + _dbus_string_init (&p); + _dbus_file_get_contents(&p, &u, NULL); + _dbus_string_parse_int(&p, 0, &pid, NULL); + _dbus_string_free(&p); + + if ((kill((int)pid, 0))) { + dbus_set_error(NULL, DBUS_ERROR_FILE_EXISTS, + "pid %ld not running, removing stale pid file\n", + pid); + _dbus_delete_file(&u, NULL); + } else { +#endif dbus_set_error (error, DBUS_ERROR_FAILED, "The pid file \"%s\" exists, if the message bus is not running, remove this file", pidfile); goto failed; +#ifdef DBUS_CYGWIN + } +#endif } } @@ -374,35 +412,58 @@ process_config_first_time_only (BusContext *context, } /* Listen on our addresses */ - - addresses = bus_config_parser_get_addresses (parser); - - link = _dbus_list_get_first_link (addresses); - while (link != NULL) + + if (address) { DBusServer *server; - - server = dbus_server_listen (link->data, error); + + server = dbus_server_listen (_dbus_string_get_const_data(address), error); if (server == NULL) - { - _DBUS_ASSERT_ERROR_IS_SET (error); - goto failed; - } + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto failed; + } else if (!setup_server (context, server, auth_mechanisms, error)) - { - _DBUS_ASSERT_ERROR_IS_SET (error); - goto failed; - } + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto failed; + } if (!_dbus_list_append (&context->servers, server)) goto oom; + } + else + { + addresses = bus_config_parser_get_addresses (parser); - link = _dbus_list_get_next_link (addresses, link); + link = _dbus_list_get_first_link (addresses); + while (link != NULL) + { + DBusServer *server; + + server = dbus_server_listen (link->data, error); + if (server == NULL) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto failed; + } + else if (!setup_server (context, server, auth_mechanisms, error)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto failed; + } + + if (!_dbus_list_append (&context->servers, server)) + goto oom; + + link = _dbus_list_get_next_link (addresses, link); + } } context->fork = bus_config_parser_get_fork (parser); context->syslog = bus_config_parser_get_syslog (parser); context->keep_umask = bus_config_parser_get_keep_umask (parser); + context->allow_anonymous = bus_config_parser_get_allow_anonymous (parser); _DBUS_ASSERT_ERROR_IS_CLEAR (error); retval = TRUE; @@ -436,7 +497,7 @@ process_config_every_time (BusContext *context, char *addr; const char *servicehelper; char *s; - + dbus_bool_t retval; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -541,7 +602,7 @@ process_config_every_time (BusContext *context, failed: _dbus_string_free (&full_address); - + if (addr) dbus_free (addr); @@ -616,6 +677,8 @@ bus_context_new (const DBusString *config_file, ForceForkSetting force_fork, DBusPipe *print_addr_pipe, DBusPipe *print_pid_pipe, + const DBusString *address, + dbus_bool_t systemd_activation, DBusError *error) { DBusString log_prefix; @@ -669,8 +732,8 @@ bus_context_new (const DBusString *config_file, _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; } - - if (!process_config_first_time_only (context, parser, error)) + + if (!process_config_first_time_only (context, parser, address, systemd_activation, error)) { _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; @@ -680,7 +743,7 @@ bus_context_new (const DBusString *config_file, _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; } - + /* we need another ref of the server data slot for the context * to own */ @@ -697,14 +760,14 @@ bus_context_new (const DBusString *config_file, DBusString addr; const char *a = bus_context_get_address (context); int bytes; - + _dbus_assert (a != NULL); if (!_dbus_string_init (&addr)) { BUS_SET_OOM (error); goto failed; } - + if (!_dbus_string_append (&addr, a) || !_dbus_string_append (&addr, "\n")) { @@ -728,10 +791,10 @@ bus_context_new (const DBusString *config_file, if (!_dbus_pipe_is_stdout_or_stderr (print_addr_pipe)) _dbus_pipe_close (print_addr_pipe, NULL); - + _dbus_string_free (&addr); } - + context->connections = bus_connections_new (context); if (context->connections == NULL) { @@ -768,8 +831,8 @@ bus_context_new (const DBusString *config_file, if ((force_fork != FORK_NEVER && context->fork) || force_fork == FORK_ALWAYS) { _dbus_verbose ("Forking and becoming daemon\n"); - - if (!_dbus_become_daemon (context->pidfile ? &u : NULL, + + if (!_dbus_become_daemon (context->pidfile ? &u : NULL, print_pid_pipe, error, context->keep_umask)) @@ -781,7 +844,7 @@ bus_context_new (const DBusString *config_file, else { _dbus_verbose ("Fork not requested\n"); - + /* Need to write PID file and to PID pipe for ourselves, * not for the child process. This is a no-op if the pidfile * is NULL and print_pid_pipe is NULL. @@ -817,7 +880,7 @@ bus_context_new (const DBusString *config_file, bus_config_parser_unref (parser); parser = NULL; } - + /* Here we change our credentials if required, * as soon as we've set up our sockets and pidfile */ @@ -836,10 +899,10 @@ bus_context_new (const DBusString *config_file, } dbus_server_free_data_slot (&server_data_slot); - + return context; - - failed: + + failed: if (parser != NULL) bus_config_parser_unref (parser); if (context != NULL) @@ -847,7 +910,7 @@ bus_context_new (const DBusString *config_file, if (server_data_slot >= 0) dbus_server_free_data_slot (&server_data_slot); - + return NULL; } @@ -877,7 +940,7 @@ bus_context_reload_config (BusContext *context, _DBUS_ASSERT_ERROR_IS_SET (error); goto failed; } - + if (!process_config_every_time (context, parser, TRUE, error)) { _DBUS_ASSERT_ERROR_IS_SET (error); @@ -906,19 +969,19 @@ shutdown_server (BusContext *context, if (server == NULL || !dbus_server_get_is_connected (server)) return; - + if (!dbus_server_set_watch_functions (server, NULL, NULL, NULL, context, NULL)) _dbus_assert_not_reached ("setting watch functions to NULL failed"); - + if (!dbus_server_set_timeout_functions (server, NULL, NULL, NULL, context, NULL)) _dbus_assert_not_reached ("setting timeout functions to NULL failed"); - + dbus_server_disconnect (server); } @@ -954,9 +1017,9 @@ bus_context_unref (BusContext *context) if (context->refcount == 0) { DBusList *link; - + _dbus_verbose ("Finalizing bus context %p\n", context); - + bus_context_shutdown (context); if (context->connections) @@ -964,13 +1027,13 @@ bus_context_unref (BusContext *context) bus_connections_unref (context->connections); context->connections = NULL; } - + if (context->registry) { bus_registry_unref (context->registry); context->registry = NULL; } - + if (context->activation) { bus_activation_unref (context->activation); @@ -981,7 +1044,7 @@ bus_context_unref (BusContext *context) while (link != NULL) { dbus_server_unref (link->data); - + link = _dbus_list_get_next_link (&context->servers, link); } _dbus_list_clear (&context->servers); @@ -991,7 +1054,7 @@ bus_context_unref (BusContext *context) bus_policy_unref (context->policy); context->policy = NULL; } - + if (context->loop) { _dbus_loop_unref (context->loop); @@ -1021,7 +1084,7 @@ bus_context_unref (BusContext *context) */ _dbus_delete_file (&u, NULL); - dbus_free (context->pidfile); + dbus_free (context->pidfile); } dbus_free (context); @@ -1048,6 +1111,12 @@ bus_context_get_servicehelper (BusContext *context) return context->servicehelper; } +dbus_bool_t +bus_context_get_systemd_activation (BusContext *context) +{ + return context->systemd_activation; +} + BusRegistry* bus_context_get_registry (BusContext *context) { @@ -1117,7 +1186,7 @@ bus_context_create_client_policy (BusContext *context, int bus_context_get_activation_timeout (BusContext *context) { - + return context->limits.activation_timeout; } @@ -1242,10 +1311,10 @@ bus_context_check_security_policy (BusContext *context, const char *sender_name; const char *sender_loginfo; const char *proposed_recipient_loginfo; - + type = dbus_message_get_type (message); dest = dbus_message_get_destination (message); - + /* dispatch.c was supposed to ensure these invariants */ _dbus_assert (dest != NULL || type == DBUS_MESSAGE_TYPE_SIGNAL || @@ -1265,12 +1334,12 @@ bus_context_check_security_policy (BusContext *context, sender_name = NULL; sender_loginfo = "(bus)"; } - + if (proposed_recipient != NULL) proposed_recipient_loginfo = bus_connection_get_loginfo (proposed_recipient); else proposed_recipient_loginfo = "bus"; - + switch (type) { case DBUS_MESSAGE_TYPE_METHOD_CALL: @@ -1278,19 +1347,19 @@ bus_context_check_security_policy (BusContext *context, case DBUS_MESSAGE_TYPE_METHOD_RETURN: case DBUS_MESSAGE_TYPE_ERROR: break; - + default: _dbus_verbose ("security check disallowing message of unknown type %d\n", type); dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, "Message bus will not accept messages of unknown type\n"); - + return FALSE; } requested_reply = FALSE; - + if (sender != NULL) { /* First verify the SELinux access controls. If allowed then @@ -1323,12 +1392,12 @@ bus_context_check_security_policy (BusContext *context, return FALSE; } - + if (bus_connection_is_active (sender)) { sender_policy = bus_connection_get_policy (sender); _dbus_assert (sender_policy != NULL); - + /* Fill in requested_reply variable with TRUE if this is a * reply and the reply was pending. */ @@ -1337,8 +1406,8 @@ bus_context_check_security_policy (BusContext *context, if (proposed_recipient != NULL /* not to the bus driver */ && addressed_recipient == proposed_recipient /* not eavesdropping */) { - DBusError error2; - + DBusError error2; + dbus_error_init (&error2); requested_reply = bus_connections_check_reply (bus_connection_get_connections (sender), transaction, @@ -1374,7 +1443,7 @@ bus_context_check_security_policy (BusContext *context, dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, "Client tried to send a message other than %s without being registered", "Hello"); - + return FALSE; } } @@ -1393,7 +1462,7 @@ bus_context_check_security_policy (BusContext *context, _dbus_assert ((sender != NULL && sender_policy != NULL) || (sender == NULL && sender_policy == NULL)); - + if (proposed_recipient != NULL) { /* only the bus driver can send to an inactive recipient (as it @@ -1418,11 +1487,11 @@ bus_context_check_security_policy (BusContext *context, } else recipient_policy = NULL; - + _dbus_assert ((proposed_recipient != NULL && recipient_policy != NULL) || (proposed_recipient != NULL && sender == NULL && recipient_policy == NULL) || (proposed_recipient == NULL && recipient_policy == NULL)); - + log = FALSE; if (sender_policy && !bus_client_policy_check_can_send (sender_policy, @@ -1482,7 +1551,7 @@ bus_context_check_security_policy (BusContext *context, dbus_message_get_member (message) : "(unset)", dbus_message_get_error_name (message) ? dbus_message_get_error_name (message) : "(unset)", - requested_reply, + requested_reply, dest ? dest : DBUS_SERVICE_DBUS, proposed_recipient_loginfo); @@ -1535,13 +1604,13 @@ bus_context_check_security_policy (BusContext *context, /* See if limits on size have been exceeded */ if (proposed_recipient && - dbus_connection_get_outgoing_size (proposed_recipient) > - context->limits.max_outgoing_bytes) + ((dbus_connection_get_outgoing_size (proposed_recipient) > context->limits.max_outgoing_bytes) || + (dbus_connection_get_outgoing_unix_fds (proposed_recipient) > context->limits.max_outgoing_unix_fds))) { dbus_set_error (error, DBUS_ERROR_LIMITS_EXCEEDED, "The destination service \"%s\" has a full message queue", dest ? dest : (proposed_recipient ? - bus_connection_get_name (proposed_recipient) : + bus_connection_get_name (proposed_recipient) : DBUS_SERVICE_DBUS)); _dbus_verbose ("security policy disallowing message due to full message queue\n"); return FALSE; @@ -1552,7 +1621,7 @@ bus_context_check_security_policy (BusContext *context, * connection). Only the addressed recipient may reply. */ if (type == DBUS_MESSAGE_TYPE_METHOD_CALL && - sender && + sender && addressed_recipient && addressed_recipient == proposed_recipient && /* not eavesdropping */ !bus_connections_expect_reply (bus_connection_get_connections (sender), @@ -1563,7 +1632,7 @@ bus_context_check_security_policy (BusContext *context, _dbus_verbose ("Failed to record reply expectation or problem with the message expecting a reply\n"); return FALSE; } - + _dbus_verbose ("security policy allowing message\n"); return TRUE; } @@ -4,7 +4,7 @@ * Copyright (C) 2003 Red Hat, Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,7 +14,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -24,11 +24,11 @@ #ifndef BUS_BUS_H #define BUS_BUS_H -#include <config.h> - #include <dbus/dbus.h> #include <dbus/dbus-string.h> #include <dbus/dbus-mainloop.h> +#include <dbus/dbus-pipe.h> +#include <dbus/dbus-sysdeps.h> typedef struct BusActivation BusActivation; typedef struct BusConnections BusConnections; @@ -47,8 +47,11 @@ typedef struct BusMatchRule BusMatchRule; typedef struct { long max_incoming_bytes; /**< How many incoming message bytes for a single connection */ + long max_incoming_unix_fds; /**< How many incoming message unix fds for a single connection */ long max_outgoing_bytes; /**< How many outgoing bytes can be queued for a single connection */ + long max_outgoing_unix_fds; /**< How many outgoing unix fds can be queued for a single connection */ long max_message_size; /**< Max size of a single message in bytes */ + long max_message_unix_fds; /**< Max number of unix fds of a single message*/ int activation_timeout; /**< How long to wait for an activation to time out */ int auth_timeout; /**< How long to wait for an authentication to time out */ int max_completed_connections; /**< Max number of authorized connections */ @@ -72,6 +75,8 @@ BusContext* bus_context_new (const DBusStri ForceForkSetting force_fork, DBusPipe *print_addr_pipe, DBusPipe *print_pid_pipe, + const DBusString *address, + dbus_bool_t systemd_activation, DBusError *error); dbus_bool_t bus_context_reload_config (BusContext *context, DBusError *error); @@ -83,6 +88,7 @@ dbus_bool_t bus_context_get_id (BusContext const char* bus_context_get_type (BusContext *context); const char* bus_context_get_address (BusContext *context); const char* bus_context_get_servicehelper (BusContext *context); +dbus_bool_t bus_context_get_systemd_activation (BusContext *context); BusRegistry* bus_context_get_registry (BusContext *context); BusConnections* bus_context_get_connections (BusContext *context); BusActivation* bus_context_get_activation (BusContext *context); diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c index c0620aed..b571fda3 100644 --- a/bus/config-loader-expat.c +++ b/bus/config-loader-expat.c @@ -21,16 +21,12 @@ * */ +#include <config.h> #include "config-parser.h" #include <dbus/dbus-internals.h> #include <expat.h> -static XML_Memory_Handling_Suite memsuite = -{ - dbus_malloc, - dbus_realloc, - dbus_free -}; +static XML_Memory_Handling_Suite memsuite; typedef struct { @@ -195,7 +191,11 @@ bus_config_load (const DBusString *file, _dbus_string_free (&context.content); return NULL; } - + + memsuite.malloc_fcn = dbus_malloc; + memsuite.realloc_fcn = dbus_realloc; + memsuite.free_fcn = dbus_free; + expat = XML_ParserCreate_MM ("UTF-8", &memsuite, NULL); if (expat == NULL) { diff --git a/bus/config-loader-libxml.c b/bus/config-loader-libxml.c index 3d82a633..c73a1815 100644 --- a/bus/config-loader-libxml.c +++ b/bus/config-loader-libxml.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "config-parser.h" #include <dbus/dbus-internals.h> #include <libxml/xmlreader.h> diff --git a/bus/config-parser-common.c b/bus/config-parser-common.c index 54a67468..f8d75be7 100644 --- a/bus/config-parser-common.c +++ b/bus/config-parser-common.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include <dbus/dbus-internals.h> #include <string.h> @@ -122,6 +123,10 @@ bus_config_parser_element_name_to_type (const char *name) { return ELEMENT_KEEP_UMASK; } + else if (strcmp (name, "allow_anonymous") == 0) + { + return ELEMENT_ALLOW_ANONYMOUS; + } return ELEMENT_NONE; } @@ -174,6 +179,8 @@ bus_config_parser_element_type_to_name (ElementType type) return "syslog"; case ELEMENT_KEEP_UMASK: return "keep_umask"; + case ELEMENT_ALLOW_ANONYMOUS: + return "allow_anonymous"; } _dbus_assert_not_reached ("bad element type"); diff --git a/bus/config-parser-common.h b/bus/config-parser-common.h index 8451ce08..da745606 100644 --- a/bus/config-parser-common.h +++ b/bus/config-parser-common.h @@ -24,8 +24,6 @@ #ifndef BUS_CONFIG_PARSER_COMMON_H #define BUS_CONFIG_PARSER_COMMON_H -#include <config.h> - typedef enum { ELEMENT_NONE, @@ -48,8 +46,9 @@ typedef enum ELEMENT_ASSOCIATE, ELEMENT_STANDARD_SESSION_SERVICEDIRS, ELEMENT_STANDARD_SYSTEM_SERVICEDIRS, + ELEMENT_KEEP_UMASK, ELEMENT_SYSLOG, - ELEMENT_KEEP_UMASK + ELEMENT_ALLOW_ANONYMOUS } ElementType; ElementType bus_config_parser_element_name_to_type (const char *element_name); diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index fd016a84..59ec2ba2 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "config-parser-common.h" #include "config-parser-trivial.h" #include "utils.h" @@ -131,6 +132,25 @@ bus_config_parser_unref (BusConfigParser *parser) } dbus_bool_t +bus_config_parser_check_doctype (BusConfigParser *parser, + const char *doctype, + DBusError *error) +{ + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + if (strcmp (doctype, "busconfig") != 0) + { + dbus_set_error (error, + DBUS_ERROR_FAILED, + "Configuration file has the wrong document type %s", + doctype); + return FALSE; + } + else + return TRUE; +} + +dbus_bool_t bus_config_parser_start_element (BusConfigParser *parser, const char *element_name, const char **attribute_names, diff --git a/bus/config-parser-trivial.h b/bus/config-parser-trivial.h index ce542bfb..31ddef6b 100644 --- a/bus/config-parser-trivial.h +++ b/bus/config-parser-trivial.h @@ -24,8 +24,6 @@ #ifndef BUS_CONFIG_PARSER_TRIVIAL_H #define BUS_CONFIG_PARSER_TRIVIAL_H -#include <config.h> - #include <dbus/dbus.h> #include <dbus/dbus-string.h> #include <dbus/dbus-list.h> @@ -41,6 +39,9 @@ BusConfigParser* bus_config_parser_new (const DBusString *basedir, BusConfigParser* bus_config_parser_ref (BusConfigParser *parser); void bus_config_parser_unref (BusConfigParser *parser); +dbus_bool_t bus_config_parser_check_doctype (BusConfigParser *parser, + const char *doctype, + DBusError *error); dbus_bool_t bus_config_parser_start_element (BusConfigParser *parser, const char *element_name, const char **attribute_names, diff --git a/bus/config-parser.c b/bus/config-parser.c index 5218910b..2d19f2b9 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "config-parser-common.h" #include "config-parser.h" #include "test.h" @@ -115,6 +117,8 @@ struct BusConfigParser unsigned int keep_umask : 1; /**< TRUE to keep original umask when forking */ unsigned int is_toplevel : 1; /**< FALSE if we are a sub-config-file inside another one */ + + unsigned int allow_anonymous : 1; /**< TRUE to allow anonymous connections */ }; static Element* @@ -402,6 +406,15 @@ bus_config_parser_new (const DBusString *basedir, parser->limits.max_incoming_bytes = _DBUS_ONE_MEGABYTE * 127; parser->limits.max_outgoing_bytes = _DBUS_ONE_MEGABYTE * 127; parser->limits.max_message_size = _DBUS_ONE_MEGABYTE * 32; + + /* We set relatively conservative values here since due to the + way SCM_RIGHTS works we need to preallocate an array for the + maximum number of file descriptors we can receive. Picking a + high value here thus translates directly to more memory + allocation. */ + parser->limits.max_incoming_unix_fds = 1024*4; + parser->limits.max_outgoing_unix_fds = 1024*4; + parser->limits.max_message_unix_fds = 1024; /* Making this long means the user has to wait longer for an error * message if something screws up, but making it too short means @@ -851,6 +864,20 @@ start_busconfig_child (BusConfigParser *parser, return TRUE; } + else if (element_type == ELEMENT_ALLOW_ANONYMOUS) + { + if (!check_no_attributes (parser, "allow_anonymous", attribute_names, attribute_values, error)) + return FALSE; + + if (push_element (parser, ELEMENT_ALLOW_ANONYMOUS) == NULL) + { + BUS_SET_OOM (error); + return FALSE; + } + + parser->allow_anonymous = TRUE; + return TRUE; + } else if (element_type == ELEMENT_SERVICEDIR) { if (!check_no_attributes (parser, "servicedir", attribute_names, attribute_values, error)) @@ -1812,16 +1839,31 @@ set_limit (BusConfigParser *parser, must_be_positive = TRUE; parser->limits.max_incoming_bytes = value; } + else if (strcmp (name, "max_incoming_unix_fds") == 0) + { + must_be_positive = TRUE; + parser->limits.max_incoming_unix_fds = value; + } else if (strcmp (name, "max_outgoing_bytes") == 0) { must_be_positive = TRUE; parser->limits.max_outgoing_bytes = value; } + else if (strcmp (name, "max_outgoing_unix_fds") == 0) + { + must_be_positive = TRUE; + parser->limits.max_outgoing_unix_fds = value; + } else if (strcmp (name, "max_message_size") == 0) { must_be_positive = TRUE; parser->limits.max_message_size = value; } + else if (strcmp (name, "max_message_unix_fds") == 0) + { + must_be_positive = TRUE; + parser->limits.max_message_unix_fds = value; + } else if (strcmp (name, "service_start_timeout") == 0) { must_be_positive = TRUE; @@ -1994,6 +2036,7 @@ bus_config_parser_end_element (BusConfigParser *parser, case ELEMENT_ASSOCIATE: case ELEMENT_STANDARD_SESSION_SERVICEDIRS: case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS: + case ELEMENT_ALLOW_ANONYMOUS: break; } @@ -2279,6 +2322,7 @@ bus_config_parser_content (BusConfigParser *parser, case ELEMENT_KEEP_UMASK: case ELEMENT_STANDARD_SESSION_SERVICEDIRS: case ELEMENT_STANDARD_SYSTEM_SERVICEDIRS: + case ELEMENT_ALLOW_ANONYMOUS: case ELEMENT_SELINUX: case ELEMENT_ASSOCIATE: if (all_whitespace (content)) @@ -2611,6 +2655,12 @@ bus_config_parser_get_keep_umask (BusConfigParser *parser) return parser->keep_umask; } +dbus_bool_t +bus_config_parser_get_allow_anonymous (BusConfigParser *parser) +{ + return parser->allow_anonymous; +} + const char * bus_config_parser_get_pidfile (BusConfigParser *parser) { @@ -2955,8 +3005,11 @@ limits_equal (const BusLimits *a, { return (a->max_incoming_bytes == b->max_incoming_bytes + || a->max_incoming_unix_fds == b->max_incoming_unix_fds || a->max_outgoing_bytes == b->max_outgoing_bytes + || a->max_outgoing_unix_fds == b->max_outgoing_unix_fds || a->max_message_size == b->max_message_size + || a->max_message_unix_fds == b->max_message_unix_fds || a->activation_timeout == b->activation_timeout || a->auth_timeout == b->auth_timeout || a->max_completed_connections == b->max_completed_connections @@ -3195,6 +3248,9 @@ static const char *test_session_service_dir_matches[] = #ifdef DBUS_UNIX "/testhome/foo/.testlocal/testshare/dbus-1/services", #endif +#ifdef DBUS_WIN + NULL, +#endif NULL }; @@ -3318,6 +3374,9 @@ static const char *test_system_service_dir_matches[] = "/testusr/testshare/dbus-1/system-services", #endif DBUS_DATADIR"/dbus-1/system-services", +#ifdef DBUS_WIN + NULL, +#endif NULL }; @@ -3447,8 +3506,12 @@ bus_config_parser_test (const DBusString *test_data_dir) if (!test_default_session_servicedirs()) return FALSE; +#ifdef DBUS_WIN + printf("default system service dir skipped\n"); +#else if (!test_default_system_servicedirs()) return FALSE; +#endif if (!process_test_valid_subdir (test_data_dir, "valid-config-files", VALID)) return FALSE; diff --git a/bus/config-parser.h b/bus/config-parser.h index 3aac1ed3..ba5bf749 100644 --- a/bus/config-parser.h +++ b/bus/config-parser.h @@ -24,8 +24,6 @@ #ifndef BUS_CONFIG_PARSER_H #define BUS_CONFIG_PARSER_H -#include <config.h> - #include <dbus/dbus.h> #include <dbus/dbus-string.h> #include <dbus/dbus-list.h> diff --git a/bus/connection.c b/bus/connection.c index 50807f1a..8e7d222a 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "connection.h" #include "dispatch.h" #include "policy.h" @@ -118,7 +120,7 @@ get_connections_for_uid (BusConnections *connections, /* val is NULL is 0 when it isn't in the hash yet */ - val = _dbus_hash_table_lookup_ulong (connections->completed_by_user, + val = _dbus_hash_table_lookup_uintptr (connections->completed_by_user, uid); current_count = _DBUS_POINTER_TO_INT (val); @@ -147,14 +149,14 @@ adjust_connections_for_uid (BusConnections *connections, if (current_count == 0) { - _dbus_hash_table_remove_ulong (connections->completed_by_user, uid); + _dbus_hash_table_remove_uintptr (connections->completed_by_user, uid); return TRUE; } else { dbus_bool_t retval; - retval = _dbus_hash_table_insert_ulong (connections->completed_by_user, + retval = _dbus_hash_table_insert_uintptr (connections->completed_by_user, uid, _DBUS_INT_TO_POINTER (current_count)); /* only positive adjustment can fail as otherwise @@ -437,7 +439,7 @@ bus_connections_new (BusContext *context) if (connections == NULL) goto failed_1; - connections->completed_by_user = _dbus_hash_table_new (DBUS_HASH_ULONG, + connections->completed_by_user = _dbus_hash_table_new (DBUS_HASH_UINTPTR, NULL, NULL); if (connections->completed_by_user == NULL) goto failed_2; @@ -584,9 +586,12 @@ cache_peer_loginfo_string (BusConnectionData *d, if (dbus_connection_get_windows_user (connection, &windows_sid)) { - if (!_dbus_string_append_printf (&loginfo_buf, "sid=\"%s\" ", windows_sid)) - goto oom; + dbus_bool_t did_append; + did_append = _dbus_string_append_printf (&loginfo_buf, + "sid=\"%s\" ", windows_sid); dbus_free (windows_sid); + if (!did_append) + goto oom; } if (!_dbus_string_steal_data (&loginfo_buf, &(d->cached_loginfo_string))) @@ -837,7 +842,7 @@ expire_incomplete_timeout (void *data) { BusConnections *connections = data; - _dbus_verbose ("Running %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("Running\n"); /* note that this may remove the timeout */ bus_connections_expire_incomplete (connections); @@ -1630,7 +1635,7 @@ cancel_pending_reply (void *data) { CancelPendingReplyData *d = data; - _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d); + _dbus_verbose ("d = %p\n", d); if (!bus_expire_list_remove (d->connections->pending_replies, &d->pending->expire_item)) @@ -1644,7 +1649,7 @@ cancel_pending_reply_data_free (void *data) { CancelPendingReplyData *d = data; - _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d); + _dbus_verbose ("d = %p\n", d); /* d->pending should be either freed or still * in the list of pending replies (owned by someone @@ -1781,7 +1786,7 @@ cancel_check_pending_reply (void *data) { CheckPendingReplyData *d = data; - _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d); + _dbus_verbose ("d = %p\n",d); bus_expire_list_add_link (d->connections->pending_replies, d->link); @@ -1793,7 +1798,7 @@ check_pending_reply_data_free (void *data) { CheckPendingReplyData *d = data; - _dbus_verbose ("%s: d = %p\n", _DBUS_FUNCTION_NAME, d); + _dbus_verbose ("d = %p\n",d); if (d->link != NULL) { diff --git a/bus/dbus.service.in b/bus/dbus.service.in new file mode 100644 index 00000000..399306f6 --- /dev/null +++ b/bus/dbus.service.in @@ -0,0 +1,10 @@ +[Unit] +Description=D-Bus System Message Bus +Requires=dbus.socket +After=syslog.target + +[Service] +ExecStartPre=@EXPANDED_BINDIR@/dbus-uuidgen --ensure +ExecStartPre=-/bin/rm -f @DBUS_SYSTEM_PID_FILE@ +ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --systemd-activation +ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig diff --git a/bus/dbus.socket.in b/bus/dbus.socket.in new file mode 100644 index 00000000..74cbe582 --- /dev/null +++ b/bus/dbus.socket.in @@ -0,0 +1,5 @@ +[Unit] +Description=D-Bus System Message Bus Socket + +[Socket] +ListenStream=@DBUS_SYSTEM_SOCKET@ diff --git a/bus/desktop-file.c b/bus/desktop-file.c index 754a83c3..ae441c5e 100644 --- a/bus/desktop-file.c +++ b/bus/desktop-file.c @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include <dbus/dbus-sysdeps.h> #include <dbus/dbus-internals.h> #include "desktop-file.h" @@ -330,7 +332,7 @@ new_line (BusDesktopFileParser *parser) line = §ion->lines[section->n_lines++]; - memset (line, 0, sizeof (BusDesktopFileLine)); + _DBUS_ZERO(*line); return line; } diff --git a/bus/desktop-file.h b/bus/desktop-file.h index 7f43458a..58e78e8f 100644 --- a/bus/desktop-file.h +++ b/bus/desktop-file.h @@ -4,7 +4,7 @@ * Copyright (C) 2003 CodeFactory AB * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,7 +14,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -35,6 +35,7 @@ #define DBUS_SERVICE_EXEC "Exec" #define DBUS_SERVICE_USER "User" #define DBUS_SERVICE_GROUP "Group" +#define DBUS_SERVICE_SYSTEMD_SERVICE "SystemdService" typedef struct BusDesktopFile BusDesktopFile; diff --git a/bus/dir-watch-default.c b/bus/dir-watch-default.c index 8e457eb6..69361b1f 100644 --- a/bus/dir-watch-default.c +++ b/bus/dir-watch-default.c @@ -30,11 +30,6 @@ /* NoOp */ void -bus_watch_directory (const char *dir, BusContext *context) -{ -} - -void bus_set_watched_dirs (BusContext *context, DBusList **directories) { } diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index 094993bb..39eff974 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -24,7 +24,6 @@ #include <config.h> -#define _GNU_SOURCE #include <stdlib.h> #include <unistd.h> #include <fcntl.h> diff --git a/bus/dir-watch-kqueue.c b/bus/dir-watch-kqueue.c index 4a01b748..4e436eb1 100644 --- a/bus/dir-watch-kqueue.c +++ b/bus/dir-watch-kqueue.c @@ -169,7 +169,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories) */ for (i = 0; new_dirs[i]; i++) { - for (j = 0; i < num_fds; j++) + for (j = 0; j < num_fds; j++) { if (dirs[j] && strcmp (new_dirs[i], dirs[j]) == 0) { diff --git a/bus/dispatch.c b/bus/dispatch.c index ca55177b..a80476cd 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -6,7 +6,7 @@ * Copyright (C) 2004 Imendio HB * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,13 +16,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "dispatch.h" #include "connection.h" #include "driver.h" @@ -35,6 +36,23 @@ #include <dbus/dbus-internals.h> #include <string.h> +#ifdef HAVE_UNIX_FD_PASSING +#include <dbus/dbus-sysdeps-unix.h> +#include <unistd.h> +#endif + +#ifndef TEST_CONNECTION +/* + TODO autotools: + move to build system as already done for cmake +*/ +#ifdef DBUS_UNIX +#define TEST_CONNECTION "debug-pipe:name=test-server" +#else +#define TEST_CONNECTION "tcp:host=localhost,port=1234" +#endif +#endif + static dbus_bool_t send_one_message (DBusConnection *connection, BusContext *context, @@ -51,7 +69,11 @@ send_one_message (DBusConnection *connection, message, NULL)) return TRUE; /* silently don't send it */ - + + if (dbus_message_contains_unix_fds(message) && + !dbus_connection_can_send_type(connection, DBUS_TYPE_UNIX_FD)) + return TRUE; /* silently don't send it */ + if (!bus_transaction_send (transaction, connection, message)) @@ -97,6 +119,17 @@ bus_dispatch_matches (BusTransaction *transaction, message, error)) return FALSE; + if (dbus_message_contains_unix_fds (message) && + !dbus_connection_can_send_type (addressed_recipient, + DBUS_TYPE_UNIX_FD)) + { + dbus_set_error (error, + DBUS_ERROR_NOT_SUPPORTED, + "Tried to send message with Unix file descriptors" + "to a client that doesn't support that."); + return FALSE; + } + /* Dispatch the message */ if (!bus_transaction_send (transaction, addressed_recipient, message)) { @@ -134,7 +167,7 @@ bus_dispatch_matches (BusTransaction *transaction, } _dbus_list_clear (&recipients); - + if (dbus_error_is_set (&tmp_error)) { dbus_move_error (&tmp_error, error); @@ -154,25 +187,25 @@ bus_dispatch (DBusConnection *connection, BusContext *context; DBusHandlerResult result; DBusConnection *addressed_recipient; - + result = DBUS_HANDLER_RESULT_HANDLED; - + transaction = NULL; addressed_recipient = NULL; dbus_error_init (&error); - + context = bus_connection_get_context (connection); _dbus_assert (context != NULL); - + /* If we can't even allocate an OOM error, we just go to sleep * until we can. */ while (!bus_connection_preallocate_oom_error (connection)) _dbus_wait_for_memory (); - + /* Ref connection in case we disconnect it at some point in here */ dbus_connection_ref (connection); - + service_name = dbus_message_get_destination (message); #ifdef DBUS_ENABLE_VERBOSE_MODE @@ -182,7 +215,7 @@ bus_dispatch (DBusConnection *connection, interface_name = dbus_message_get_interface (message); member_name = dbus_message_get_member (message); error_name = dbus_message_get_error_name (message); - + _dbus_verbose ("DISPATCH: %s %s %s to %s\n", interface_name ? interface_name : "(no interface)", member_name ? member_name : "(no member)", @@ -190,7 +223,7 @@ bus_dispatch (DBusConnection *connection, service_name ? service_name : "peer"); } #endif /* DBUS_ENABLE_VERBOSE_MODE */ - + /* If service_name is NULL, if it's a signal we send it to all * connections with a match rule. If it's not a signal, there * are some special cases here but mostly we just bail out. @@ -214,7 +247,7 @@ bus_dispatch (DBusConnection *connection, goto out; } } - + /* Create our transaction */ transaction = bus_transaction_new (context); if (transaction == NULL) @@ -222,7 +255,7 @@ bus_dispatch (DBusConnection *connection, BUS_SET_OOM (&error); goto out; } - + /* Assign a sender to the message */ if (bus_connection_is_active (connection)) { @@ -242,7 +275,7 @@ bus_dispatch (DBusConnection *connection, */ service_name = dbus_message_get_destination (message); } - + if (service_name && strcmp (service_name, DBUS_SERVICE_DBUS) == 0) /* to bus driver */ { @@ -270,9 +303,9 @@ bus_dispatch (DBusConnection *connection, BusRegistry *registry; _dbus_assert (service_name != NULL); - + registry = bus_connection_get_registry (connection); - + _dbus_string_init_const (&service_string, service_name); service = bus_registry_lookup (registry, &service_string); @@ -292,7 +325,7 @@ bus_dispatch (DBusConnection *connection, _dbus_verbose ("bus_activation_activate_service() failed: %s\n", error.name); goto out; } - + goto out; } else if (service == NULL) @@ -316,7 +349,7 @@ bus_dispatch (DBusConnection *connection, */ if (!bus_dispatch_matches (transaction, connection, addressed_recipient, message, &error)) goto out; - + out: if (dbus_error_is_set (&error)) { @@ -348,7 +381,7 @@ bus_dispatch (DBusConnection *connection, &error, message)) { bus_connection_send_oom_error (connection, message); - + /* cancel transaction due to OOM */ if (transaction != NULL) { @@ -357,8 +390,8 @@ bus_dispatch (DBusConnection *connection, } } } - - + + dbus_error_free (&error); } @@ -382,12 +415,12 @@ bus_dispatch_message_filter (DBusConnection *connection, dbus_bool_t bus_dispatch_add_connection (DBusConnection *connection) -{ +{ if (!dbus_connection_add_filter (connection, bus_dispatch_message_filter, NULL, NULL)) return FALSE; - + return TRUE; } @@ -424,7 +457,7 @@ block_connection_until_message_from_bus (BusContext *context, const char *what_is_expected) { _dbus_verbose ("expecting: %s\n", what_is_expected); - + while (dbus_connection_get_dispatch_status (connection) == DBUS_DISPATCH_COMPLETE && dbus_connection_get_is_connected (connection)) @@ -533,13 +566,13 @@ check_service_owner_changed_foreach (DBusConnection *connection, DBusError error; const char *service_name, *old_owner, *new_owner; - if (d->expected_kind == SERVICE_CREATED + if (d->expected_kind == SERVICE_CREATED && connection == d->skip_connection) return TRUE; dbus_error_init (&error); d->failed = TRUE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -573,7 +606,7 @@ check_service_owner_changed_foreach (DBusConnection *connection, if (dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY)) { dbus_error_free (&error); - _dbus_wait_for_memory (); + _dbus_wait_for_memory (); goto reget_service_info_data; } else @@ -599,7 +632,7 @@ check_service_owner_changed_foreach (DBusConnection *connection, goto out; } - if (*service_name == ':' && new_owner[0] + if (*service_name == ':' && new_owner[0] && strcmp (service_name, new_owner) != 0) { _dbus_warn ("inconsistent ServiceOwnedChanged message (\"%s\" [ %s -> %s ])\n", @@ -609,10 +642,10 @@ check_service_owner_changed_foreach (DBusConnection *connection, } d->failed = FALSE; - + out: dbus_error_free (&error); - + if (message) dbus_message_unref (message); @@ -629,7 +662,7 @@ kill_client_connection (BusContext *context, CheckServiceOwnerChangedData socd; _dbus_verbose ("killing connection %p\n", connection); - + s = dbus_bus_get_unique_name (connection); _dbus_assert (s != NULL); @@ -637,36 +670,36 @@ kill_client_connection (BusContext *context, _dbus_wait_for_memory (); dbus_connection_ref (connection); - + /* kick in the disconnect handler that unrefs the connection */ dbus_connection_close (connection); bus_test_run_everything (context); - + _dbus_assert (bus_test_client_listed (connection)); - + /* Run disconnect handler in test.c */ if (bus_connection_dispatch_one_message (connection)) _dbus_assert_not_reached ("something received on connection being killed other than the disconnect"); - + _dbus_assert (!dbus_connection_get_is_connected (connection)); dbus_connection_unref (connection); connection = NULL; _dbus_assert (!bus_test_client_listed (connection)); - + socd.expected_kind = SERVICE_DELETED; socd.expected_service_name = base_service; socd.failed = FALSE; socd.skip_connection = NULL; - + bus_test_clients_foreach (check_service_owner_changed_foreach, &socd); dbus_free (base_service); - + if (socd.failed) _dbus_assert_not_reached ("didn't get the expected NameOwnerChanged (deletion) messages"); - + if (!check_no_leftovers (context)) _dbus_assert_not_reached ("stuff left in message queues after disconnecting a client"); } @@ -676,7 +709,7 @@ kill_client_connection_unchecked (DBusConnection *connection) { /* This kills the connection without expecting it to affect * the rest of the bus. - */ + */ _dbus_verbose ("Unchecked kill of connection %p\n", connection); dbus_connection_ref (connection); @@ -722,11 +755,10 @@ check_no_leftovers (BusContext *context) nmd.failed = FALSE; bus_test_clients_foreach (check_no_messages_foreach, &nmd); - + if (nmd.failed) { - _dbus_verbose ("%s: leftover message found\n", - _DBUS_FUNCTION_NAME); + _dbus_verbose ("leftover message found\n"); return FALSE; } else @@ -756,7 +788,7 @@ check_hello_message (BusContext *context, name_message = NULL; _dbus_verbose ("check_hello_message for %p\n", connection); - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -766,7 +798,7 @@ check_hello_message (BusContext *context, return TRUE; dbus_connection_ref (connection); /* because we may get disconnected */ - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -775,44 +807,44 @@ check_hello_message (BusContext *context, } _dbus_assert (dbus_message_has_signature (message, "")); - + dbus_message_unref (message); message = NULL; if (!dbus_connection_get_is_connected (connection)) { _dbus_verbose ("connection was disconnected (presumably auth failed)\n"); - + dbus_connection_unref (connection); - + return TRUE; } - + /* send our message */ bus_test_run_clients_loop (SEND_PENDING (connection)); if (!dbus_connection_get_is_connected (connection)) { _dbus_verbose ("connection was disconnected (presumably auth failed)\n"); - + dbus_connection_unref (connection); - + return TRUE; } - + block_connection_until_message_from_bus (context, connection, "reply to Hello"); if (!dbus_connection_get_is_connected (connection)) { _dbus_verbose ("connection was disconnected (presumably auth failed)\n"); - + dbus_connection_unref (connection); - + return TRUE; } dbus_connection_unref (connection); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -830,7 +862,7 @@ check_hello_message (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) { if (dbus_message_is_error (message, @@ -848,7 +880,7 @@ check_hello_message (BusContext *context, else { CheckServiceOwnerChangedData socd; - + if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) { ; /* good, expected */ @@ -884,14 +916,14 @@ check_hello_message (BusContext *context, while (!dbus_bus_set_unique_name (connection, name)) _dbus_wait_for_memory (); - + socd.expected_kind = SERVICE_CREATED; socd.expected_service_name = name; socd.failed = FALSE; socd.skip_connection = connection; /* we haven't done AddMatch so won't get it ourselves */ bus_test_clients_foreach (check_service_owner_changed_foreach, &socd); - + if (socd.failed) goto out; @@ -912,7 +944,7 @@ check_hello_message (BusContext *context, "NameAcquired"); goto out; } - + retry_get_acquired_name: if (!dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &acquired, @@ -946,20 +978,20 @@ check_hello_message (BusContext *context, if (!check_no_leftovers (context)) goto out; - + retval = TRUE; - + out: - _dbus_verbose ("ending %s retval = %d\n", _DBUS_FUNCTION_NAME, retval); - + _dbus_verbose ("ending - retval = %d\n", retval); + dbus_error_free (&error); - + if (message) dbus_message_unref (message); if (name_message) dbus_message_unref (name_message); - + return retval; } @@ -980,7 +1012,7 @@ check_double_hello_message (BusContext *context, message = NULL; _dbus_verbose ("check_double_hello_message for %p\n", connection); - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -988,7 +1020,7 @@ check_double_hello_message (BusContext *context, if (message == NULL) return TRUE; - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -1006,15 +1038,15 @@ check_double_hello_message (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); - + _dbus_verbose ("connection was disconnected\n"); + dbus_connection_unref (connection); - + return TRUE; } dbus_connection_unref (connection); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -1032,7 +1064,7 @@ check_double_hello_message (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_ERROR) { warn_unexpected (connection, message, "method return for Hello"); @@ -1041,15 +1073,15 @@ check_double_hello_message (BusContext *context, if (!check_no_leftovers (context)) goto out; - + retval = TRUE; - + out: dbus_error_free (&error); - + if (message) dbus_message_unref (message); - + return retval; } @@ -1072,7 +1104,7 @@ check_get_connection_unix_user (BusContext *context, message = NULL; _dbus_verbose ("check_get_connection_unix_user for %p\n", connection); - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -1083,7 +1115,7 @@ check_get_connection_unix_user (BusContext *context, base_service_name = dbus_bus_get_unique_name (connection); - if (!dbus_message_append_args (message, + if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &base_service_name, DBUS_TYPE_INVALID)) { @@ -1108,10 +1140,10 @@ check_get_connection_unix_user (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); - + _dbus_verbose ("connection was disconnected\n"); + dbus_connection_unref (connection); - + return TRUE; } @@ -1183,10 +1215,10 @@ check_get_connection_unix_user (BusContext *context, out: dbus_error_free (&error); - + if (message) dbus_message_unref (message); - + return retval; } @@ -1209,7 +1241,7 @@ check_get_connection_unix_process_id (BusContext *context, message = NULL; _dbus_verbose ("check_get_connection_unix_process_id for %p\n", connection); - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -1220,7 +1252,7 @@ check_get_connection_unix_process_id (BusContext *context, base_service_name = dbus_bus_get_unique_name (connection); - if (!dbus_message_append_args (message, + if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &base_service_name, DBUS_TYPE_INVALID)) { @@ -1245,10 +1277,10 @@ check_get_connection_unix_process_id (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); - + _dbus_verbose ("connection was disconnected\n"); + dbus_connection_unref (connection); - + return TRUE; } @@ -1278,11 +1310,11 @@ check_get_connection_unix_process_id (BusContext *context, */ _dbus_verbose ("Windows correctly does not support GetConnectionUnixProcessID\n"); } -#endif +#endif else { warn_unexpected (connection, message, "not this error"); - + goto out; } } @@ -1291,7 +1323,7 @@ check_get_connection_unix_process_id (BusContext *context, #ifdef DBUS_WIN warn_unexpected (connection, message, "GetConnectionUnixProcessID to fail on Windows"); goto out; -#else +#else if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) { ; /* good, expected */ @@ -1350,10 +1382,10 @@ check_get_connection_unix_process_id (BusContext *context, out: dbus_error_free (&error); - + if (message) dbus_message_unref (message); - + return retval; } @@ -1375,7 +1407,7 @@ check_add_match_all (BusContext *context, message = NULL; _dbus_verbose ("check_add_match_all for %p\n", connection); - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -1391,7 +1423,7 @@ check_add_match_all (BusContext *context, dbus_message_unref (message); return TRUE; } - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -1402,32 +1434,32 @@ check_add_match_all (BusContext *context, message = NULL; dbus_connection_ref (connection); /* because we may get disconnected */ - + /* send our message */ bus_test_run_clients_loop (SEND_PENDING (connection)); if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); - + _dbus_verbose ("connection was disconnected\n"); + dbus_connection_unref (connection); - + return TRUE; } - + block_connection_until_message_from_bus (context, connection, "reply to AddMatch"); if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); - + _dbus_verbose ("connection was disconnected\n"); + dbus_connection_unref (connection); - + return TRUE; } dbus_connection_unref (connection); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -1445,7 +1477,7 @@ check_add_match_all (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) { if (dbus_message_is_error (message, @@ -1477,15 +1509,15 @@ check_add_match_all (BusContext *context, if (!check_no_leftovers (context)) goto out; - + retval = TRUE; - + out: dbus_error_free (&error); - + if (message) dbus_message_unref (message); - + return retval; } @@ -1500,7 +1532,7 @@ check_hello_connection (BusContext *context) dbus_error_init (&error); - connection = dbus_connection_open_private ("debug-pipe:name=test-server", &error); + connection = dbus_connection_open_private (TEST_CONNECTION, &error); if (connection == NULL) { _DBUS_ASSERT_ERROR_IS_SET (&error); @@ -1516,10 +1548,10 @@ check_hello_connection (BusContext *context) } spin_connection_until_authenticated (context, connection); - + if (!check_hello_message (context, connection)) return FALSE; - + if (dbus_bus_get_unique_name (connection) == NULL) { /* We didn't successfully register, so we can't @@ -1531,7 +1563,7 @@ check_hello_connection (BusContext *context) { if (!check_add_match_all (context, connection)) return FALSE; - + kill_client_connection (context, connection); } @@ -1552,17 +1584,17 @@ check_nonexistent_service_no_auto_start (BusContext *context, dbus_bool_t retval; const char *nonexistent = NONEXISTENT_SERVICE_NAME; dbus_uint32_t flags; - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "StartServiceByName"); - + if (message == NULL) return TRUE; dbus_message_set_auto_start (message, FALSE); - + flags = 0; if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &nonexistent, @@ -1572,7 +1604,7 @@ check_nonexistent_service_no_auto_start (BusContext *context, dbus_message_unref (message); return TRUE; } - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -1588,12 +1620,12 @@ check_nonexistent_service_no_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -1613,7 +1645,7 @@ check_nonexistent_service_no_auto_start (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -1638,11 +1670,11 @@ check_nonexistent_service_no_auto_start (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -1656,15 +1688,15 @@ check_nonexistent_service_auto_start (BusContext *context, DBusMessage *message; dbus_uint32_t serial; dbus_bool_t retval; - + message = dbus_message_new_method_call (NONEXISTENT_SERVICE_NAME, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Echo"); - + if (message == NULL) return TRUE; - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -1680,12 +1712,12 @@ check_nonexistent_service_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) @@ -1706,7 +1738,7 @@ check_nonexistent_service_auto_start (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -1731,11 +1763,11 @@ check_nonexistent_service_auto_start (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -1749,16 +1781,16 @@ check_base_service_activated (BusContext *context, dbus_bool_t retval; DBusError error; const char *base_service, *base_service_from_bus, *old_owner; - + retval = FALSE; - + dbus_error_init (&error); base_service = NULL; old_owner = NULL; base_service_from_bus = NULL; message = initial_message; - dbus_message_ref (message); + dbus_message_ref (message); if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, @@ -1798,7 +1830,7 @@ check_base_service_activated (BusContext *context, base_service); goto out; } - + if (strcmp (base_service, base_service_from_bus) != 0) { _dbus_warn ("Expected base service activation, got \"%s\" instead with owner \"%s\"\n", @@ -1812,14 +1844,14 @@ check_base_service_activated (BusContext *context, old_owner); goto out; } - + socd.expected_kind = SERVICE_CREATED; socd.expected_service_name = base_service; socd.failed = FALSE; socd.skip_connection = connection; bus_test_clients_foreach (check_service_owner_changed_foreach, &socd); - + if (socd.failed) goto out; } @@ -1834,7 +1866,7 @@ check_base_service_activated (BusContext *context, *base_service_p = base_service; retval = TRUE; - + out: if (message) dbus_message_unref (message); @@ -1854,9 +1886,9 @@ check_service_activated (BusContext *context, dbus_bool_t retval; DBusError error; dbus_uint32_t activation_result; - + retval = FALSE; - + dbus_error_init (&error); message = initial_message; @@ -1923,15 +1955,15 @@ check_service_activated (BusContext *context, socd.expected_service_name = service_name; bus_test_clients_foreach (check_service_owner_changed_foreach, &socd); - + if (socd.failed) goto out; - + dbus_message_unref (message); service_name = NULL; old_owner = NULL; base_service_from_bus = NULL; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -1943,10 +1975,10 @@ check_service_activated (BusContext *context, else { warn_unexpected (connection, message, "NameOwnerChanged for the activated name"); - + goto out; } - + if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN) { warn_unexpected (connection, message, "reply to StartServiceByName"); @@ -1984,7 +2016,7 @@ check_service_activated (BusContext *context, dbus_message_unref (message); message = NULL; - + if (!check_no_leftovers (context)) { _dbus_warn ("Messages were left over after verifying existent activation results\n"); @@ -1992,12 +2024,12 @@ check_service_activated (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); dbus_error_free (&error); - + return retval; } @@ -2011,9 +2043,9 @@ check_service_auto_activated (BusContext *context, DBusMessage *message; dbus_bool_t retval; DBusError error; - + retval = FALSE; - + dbus_error_init (&error); message = initial_message; @@ -2025,7 +2057,7 @@ check_service_auto_activated (BusContext *context, { const char *service_name; CheckServiceOwnerChangedData socd; - + reget_service_name_arg: if (!dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &service_name, @@ -2046,28 +2078,28 @@ check_service_auto_activated (BusContext *context, goto out; } } - + if (strcmp (service_name, activated_name) != 0) { _dbus_warn ("Expected to see service %s created, saw %s instead\n", activated_name, service_name); goto out; } - + socd.expected_kind = SERVICE_CREATED; socd.expected_service_name = service_name; socd.failed = FALSE; - socd.skip_connection = connection; + socd.skip_connection = connection; bus_test_clients_foreach (check_service_owner_changed_foreach, &socd); - + if (socd.failed) goto out; - + /* Note that this differs from regular activation in that we don't get a * reply to ActivateService here. */ - + dbus_message_unref (message); message = NULL; service_name = NULL; @@ -2075,16 +2107,16 @@ check_service_auto_activated (BusContext *context, else { warn_unexpected (connection, message, "NameOwnerChanged for the activated name"); - + goto out; } - + retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -2098,7 +2130,7 @@ check_service_deactivated (BusContext *context, CheckServiceOwnerChangedData socd; retval = FALSE; - + /* Now we are expecting ServiceOwnerChanged (deletion) messages for the base * service and the activated_name. The base service * notification is required to come last. @@ -2108,11 +2140,11 @@ check_service_deactivated (BusContext *context, socd.failed = FALSE; socd.skip_connection = NULL; bus_test_clients_foreach (check_service_owner_changed_foreach, - &socd); + &socd); if (socd.failed) goto out; - + socd.expected_kind = SERVICE_DELETED; socd.expected_service_name = base_service; socd.failed = FALSE; @@ -2124,7 +2156,7 @@ check_service_deactivated (BusContext *context, goto out; retval = TRUE; - + out: return retval; } @@ -2139,27 +2171,27 @@ check_send_exit_to_service (BusContext *context, DBusMessage *message; dbus_uint32_t serial; dbus_bool_t retval; - + _dbus_verbose ("Sending exit message to the test service\n"); retval = FALSE; - + /* Kill off the test service by sending it a quit message */ message = dbus_message_new_method_call (service_name, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Exit"); - + if (message == NULL) { /* Do this again; we still need the service to exit... */ if (!check_send_exit_to_service (context, connection, service_name, base_service)) goto out; - + return TRUE; } - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -2168,7 +2200,7 @@ check_send_exit_to_service (BusContext *context, if (!check_send_exit_to_service (context, connection, service_name, base_service)) goto out; - + return TRUE; } @@ -2190,12 +2222,12 @@ check_send_exit_to_service (BusContext *context, dbus_connection_return_message (connection, message); message = NULL; } - + if (!got_error) { /* If no error, wait for the test service to exit */ block_connection_until_message_from_bus (context, connection, "test service to exit"); - + bus_test_run_everything (context); } @@ -2210,7 +2242,7 @@ check_send_exit_to_service (BusContext *context, "error with the correct reply serial"); goto out; } - + if (!dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -2238,7 +2270,7 @@ check_send_exit_to_service (BusContext *context, * stuff. */ message = pop_message_waiting_for_memory (connection); - + if (message == NULL) { warn_unexpected (connection, NULL, @@ -2259,10 +2291,10 @@ check_send_exit_to_service (BusContext *context, "error with the correct reply serial"); goto out; } - + _dbus_verbose ("Got error %s after test service exited\n", dbus_message_get_error_name (message)); - + if (!check_no_leftovers (context)) { _dbus_warn ("Messages were left over after %s\n", @@ -2270,13 +2302,13 @@ check_send_exit_to_service (BusContext *context, goto out; } } - + retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -2291,9 +2323,9 @@ check_got_error (BusContext *context, va_list ap; dbus_bool_t error_found; const char *error_name; - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -2332,20 +2364,20 @@ check_got_error (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } - + typedef enum -{ +{ GOT_SERVICE_CREATED, GOT_SERVICE_DELETED, GOT_ERROR, - GOT_SOMETHING_ELSE + GOT_SOMETHING_ELSE } GotServiceInfo; static GotServiceInfo @@ -2419,7 +2451,7 @@ check_existent_service_no_auto_start (BusContext *context, dbus_uint32_t flags; base_service_message = NULL; - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -2429,7 +2461,7 @@ check_existent_service_no_auto_start (BusContext *context, return TRUE; dbus_message_set_auto_start (message, FALSE); - + flags = 0; if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &existent, @@ -2439,7 +2471,7 @@ check_existent_service_no_auto_start (BusContext *context, dbus_message_unref (message); return TRUE; } - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -2460,12 +2492,12 @@ check_existent_service_no_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -2486,7 +2518,7 @@ check_existent_service_no_auto_start (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -2511,7 +2543,7 @@ check_existent_service_no_auto_start (BusContext *context, else { GotServiceInfo message_kind; - + if (!check_base_service_activated (context, connection, message, &base_service)) goto out; @@ -2521,7 +2553,7 @@ check_existent_service_no_auto_start (BusContext *context, /* We may need to block here for the test service to exit or finish up */ block_connection_until_message_from_bus (context, connection, "test service to exit or finish up"); - + message = dbus_connection_borrow_message (connection); if (message == NULL) { @@ -2564,7 +2596,7 @@ check_existent_service_no_auto_start (BusContext *context, socd.expected_service_name = base_service; socd.failed = FALSE; socd.skip_connection = NULL; - + bus_test_clients_foreach (check_service_owner_changed_foreach, &socd); @@ -2577,10 +2609,10 @@ check_existent_service_no_auto_start (BusContext *context, if (message_kind != GOT_ERROR) { block_connection_until_message_from_bus (context, connection, "error about service exiting"); - + /* and process everything again */ bus_test_run_everything (context); - + if (!check_got_error (context, connection, DBUS_ERROR_SPAWN_CHILD_EXITED, DBUS_ERROR_NO_MEMORY, @@ -2598,11 +2630,11 @@ check_existent_service_no_auto_start (BusContext *context, "should have been a NameOwnerChanged (creation)\n"); goto out; } - + if (!check_service_activated (context, connection, EXISTENT_SERVICE_NAME, base_service, message)) goto out; - + dbus_message_unref (message); message = NULL; @@ -2621,14 +2653,14 @@ check_existent_service_no_auto_start (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); if (base_service_message) dbus_message_unref (base_service_message); - + return retval; } @@ -2645,7 +2677,7 @@ check_segfault_service_no_auto_start (BusContext *context, dbus_bool_t retval; const char *segv_service; dbus_uint32_t flags; - + message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, @@ -2655,7 +2687,7 @@ check_segfault_service_no_auto_start (BusContext *context, return TRUE; dbus_message_set_auto_start (message, FALSE); - + segv_service = "org.freedesktop.DBus.TestSuiteSegfaultService"; flags = 0; if (!dbus_message_append_args (message, @@ -2666,7 +2698,7 @@ check_segfault_service_no_auto_start (BusContext *context, dbus_message_unref (message); return TRUE; } - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -2682,12 +2714,12 @@ check_segfault_service_no_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -2707,7 +2739,7 @@ check_segfault_service_no_auto_start (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -2740,11 +2772,11 @@ check_segfault_service_no_auto_start (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -2764,10 +2796,10 @@ check_segfault_service_auto_start (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Echo"); - + if (message == NULL) return TRUE; - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -2783,12 +2815,12 @@ check_segfault_service_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -2808,7 +2840,7 @@ check_segfault_service_auto_start (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -2833,11 +2865,11 @@ check_segfault_service_auto_start (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } #endif @@ -2860,7 +2892,7 @@ check_existent_hello_from_self (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "RunHelloFromSelf"); - + if (message == NULL) return TRUE; @@ -2888,7 +2920,7 @@ check_existent_hello_from_self (BusContext *context, * doesn't send a reply due to OOM. */ block_connection_until_message_from_bus (context, connection, "reply from running hello from self"); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -2905,7 +2937,7 @@ check_existent_hello_from_self (BusContext *context, dbus_message_unref (message); message = NULL; - + return TRUE; } @@ -2922,7 +2954,7 @@ check_existent_ping (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.DBus.Peer", "Ping"); - + if (message == NULL) return TRUE; @@ -2941,7 +2973,7 @@ check_existent_ping (BusContext *context, * doesn't send a reply due to OOM. */ block_connection_until_message_from_bus (context, connection, "reply from running Ping"); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -2965,7 +2997,7 @@ check_existent_ping (BusContext *context, dbus_message_unref (message); message = NULL; - + return TRUE; } @@ -2979,12 +3011,12 @@ check_existent_get_machine_id (BusContext *context, DBusMessage *message; dbus_uint32_t serial; const char *machine_id; - + message = dbus_message_new_method_call (EXISTENT_SERVICE_NAME, "/org/freedesktop/TestSuite", "org.freedesktop.DBus.Peer", "GetMachineId"); - + if (message == NULL) return TRUE; @@ -3003,7 +3035,7 @@ check_existent_get_machine_id (BusContext *context, * doesn't send a reply due to OOM. */ block_connection_until_message_from_bus (context, connection, "reply from running GetMachineId"); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3039,14 +3071,14 @@ check_existent_get_machine_id (BusContext *context, dbus_message_unref (message); return FALSE; } - + /* We can't check that the machine id is correct because during make check it is * just made up for each process separately */ - + dbus_message_unref (message); message = NULL; - + return TRUE; } @@ -3070,7 +3102,7 @@ check_existent_service_auto_start (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Echo"); - + if (message == NULL) return TRUE; @@ -3102,12 +3134,12 @@ check_existent_service_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3152,7 +3184,7 @@ check_existent_service_auto_start (BusContext *context, dbus_connection_return_message (connection, message); message = NULL; - switch (message_kind) + switch (message_kind) { case GOT_SERVICE_CREATED: message = pop_message_waiting_for_memory (connection); @@ -3162,12 +3194,12 @@ check_existent_service_auto_start (BusContext *context, "should have been a NameOwnerChanged (creation)\n"); goto out; } - + /* Check that ServiceOwnerChanged (creation) was correctly received */ if (!check_service_auto_activated (context, connection, EXISTENT_SERVICE_NAME, base_service, message)) goto out; - + dbus_message_unref (message); message = NULL; @@ -3179,7 +3211,7 @@ check_existent_service_auto_start (BusContext *context, * failed to register under EXISTENT_SERVICE_NAME */ CheckServiceOwnerChangedData socd; - + socd.expected_kind = SERVICE_DELETED; socd.expected_service_name = base_service; socd.failed = FALSE; @@ -3208,7 +3240,7 @@ check_existent_service_auto_start (BusContext *context, * doesn't send a reply due to OOM. */ block_connection_until_message_from_bus (context, connection, "reply from echo message after auto-activation"); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3230,7 +3262,7 @@ check_existent_service_auto_start (BusContext *context, if (!check_existent_get_machine_id (context, connection)) goto out; - + if (!check_existent_hello_from_self (context, connection)) goto out; @@ -3238,7 +3270,7 @@ check_existent_service_auto_start (BusContext *context, EXISTENT_SERVICE_NAME, base_service)) goto out; - + retval = TRUE; out: @@ -3268,7 +3300,7 @@ check_launch_service_file_missing (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Echo"); - + if (message == NULL) return TRUE; @@ -3287,12 +3319,12 @@ check_launch_service_file_missing (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3312,7 +3344,7 @@ check_launch_service_file_missing (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -3338,11 +3370,11 @@ check_launch_service_file_missing (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -3383,12 +3415,12 @@ check_launch_service_user_missing (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_warn ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_warn ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3408,7 +3440,7 @@ check_launch_service_user_missing (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -3434,11 +3466,11 @@ check_launch_service_user_missing (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -3479,12 +3511,12 @@ check_launch_service_exec_missing (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_warn ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_warn ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3504,7 +3536,7 @@ check_launch_service_exec_missing (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -3538,11 +3570,11 @@ check_launch_service_exec_missing (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -3583,12 +3615,12 @@ check_launch_service_service_missing (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_warn ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_warn ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3608,7 +3640,7 @@ check_launch_service_service_missing (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -3642,11 +3674,11 @@ check_launch_service_service_missing (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -3667,10 +3699,10 @@ check_shell_fail_service_auto_start (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Echo"); - + if (message == NULL) return TRUE; - + if (!dbus_connection_send (connection, message, &serial)) { dbus_message_unref (message); @@ -3686,12 +3718,12 @@ check_shell_fail_service_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } - + retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3711,7 +3743,7 @@ check_shell_fail_service_auto_start (BusContext *context, dbus_message_get_sender (message) : "(none)"); goto out; } - + if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) { @@ -3737,11 +3769,11 @@ check_shell_fail_service_auto_start (BusContext *context, } retval = TRUE; - + out: if (message) dbus_message_unref (message); - + return retval; } @@ -3767,7 +3799,7 @@ check_shell_service_success_auto_start (BusContext *context, "/org/freedesktop/TestSuite", "org.freedesktop.TestSuite", "Echo"); - + if (message == NULL) return TRUE; @@ -3790,12 +3822,12 @@ check_shell_service_success_auto_start (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } retval = FALSE; - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3840,7 +3872,7 @@ check_shell_service_success_auto_start (BusContext *context, dbus_connection_return_message (connection, message); message = NULL; - switch (message_kind) + switch (message_kind) { case GOT_SERVICE_CREATED: message = pop_message_waiting_for_memory (connection); @@ -3850,12 +3882,12 @@ check_shell_service_success_auto_start (BusContext *context, "should have been a NameOwnerChanged (creation)\n"); goto out; } - + /* Check that ServiceOwnerChanged (creation) was correctly received */ if (!check_service_auto_activated (context, connection, SHELL_SUCCESS_SERVICE_NAME, base_service, message)) goto out; - + dbus_message_unref (message); message = NULL; @@ -3867,7 +3899,7 @@ check_shell_service_success_auto_start (BusContext *context, * failed to register under SHELL_SUCCESS_SERVICE_NAME */ CheckServiceOwnerChangedData socd; - + socd.expected_kind = SERVICE_DELETED; socd.expected_service_name = base_service; socd.failed = FALSE; @@ -3896,7 +3928,7 @@ check_shell_service_success_auto_start (BusContext *context, * doesn't send a reply due to OOM. */ block_connection_until_message_from_bus (context, connection, "reply from echo message after auto-activation"); - + message = pop_message_waiting_for_memory (connection); if (message == NULL) { @@ -3911,7 +3943,7 @@ check_shell_service_success_auto_start (BusContext *context, } if (!dbus_message_get_args (message, NULL, - DBUS_TYPE_STRING, &argv[0], + DBUS_TYPE_STRING, &argv[0], DBUS_TYPE_STRING, &argv[1], DBUS_TYPE_STRING, &argv[2], DBUS_TYPE_STRING, &argv[3], @@ -3924,59 +3956,59 @@ check_shell_service_success_auto_start (BusContext *context, goto out; } - /* don't worry about arg[0] as it may be different + /* don't worry about arg[0] as it may be different depending on the path to the tests */ if (strcmp("-test", argv[1]) != 0) { - _dbus_warn ("Unexpected argv[1] in shell success service test (expected: %s, got: %s)\n", + _dbus_warn ("Unexpected argv[1] in shell success service test (expected: %s, got: %s)\n", "-test", argv[1]); goto out; - } + } if (strcmp("that", argv[2]) != 0) { - _dbus_warn ("Unexpected argv[2] in shell success service test (expected: %s, got: %s)\n", + _dbus_warn ("Unexpected argv[2] in shell success service test (expected: %s, got: %s)\n", "that", argv[2]); goto out; - } + } if (strcmp("we get", argv[3]) != 0) { - _dbus_warn ("Unexpected argv[3] in shell success service test (expected: %s, got: %s)\n", + _dbus_warn ("Unexpected argv[3] in shell success service test (expected: %s, got: %s)\n", "we get", argv[3]); goto out; - } - + } + if (strcmp("back", argv[4]) != 0) { - _dbus_warn ("Unexpected argv[4] in shell success service test (expected: %s, got: %s)\n", + _dbus_warn ("Unexpected argv[4] in shell success service test (expected: %s, got: %s)\n", "back", argv[4]); goto out; - } + } if (strcmp("--what", argv[5]) != 0) { - _dbus_warn ("Unexpected argv[5] in shell success service test (expected: %s, got: %s)\n", + _dbus_warn ("Unexpected argv[5] in shell success service test (expected: %s, got: %s)\n", "--what", argv[5]); goto out; - } + } if (strcmp("we put in", argv[6]) != 0) { - _dbus_warn ("Unexpected argv[6] in shell success service test (expected: %s, got: %s)\n", + _dbus_warn ("Unexpected argv[6] in shell success service test (expected: %s, got: %s)\n", "we put in", argv[6]); goto out; - } + } dbus_message_unref (message); message = NULL; - + if (!check_send_exit_to_service (context, connection, SHELL_SUCCESS_SERVICE_NAME, base_service)) goto out; - + retval = TRUE; out: @@ -4002,7 +4034,7 @@ check_oom_check1_func (void *data) if (! (* d->func) (d->context)) return FALSE; - + if (!check_no_leftovers (d->context)) { _dbus_warn ("Messages were left over, should be covered by test suite\n"); @@ -4070,7 +4102,7 @@ check_get_services (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); dbus_connection_unref (connection); @@ -4142,15 +4174,15 @@ check_get_services (BusContext *context, *len = l; } } - + if (!check_no_leftovers (context)) goto out; - + retval = TRUE; - + out: dbus_error_free (&error); - + if (message) dbus_message_unref (message); @@ -4184,6 +4216,7 @@ check_list_services (BusContext *context, if (!_dbus_string_array_contains ((const char **)services, existent)) { _dbus_warn ("Did not get the expected %s from ListActivatableNames\n", existent); + dbus_free_string_array (services); return FALSE; } @@ -4231,7 +4264,7 @@ check_list_services (BusContext *context, if (!dbus_connection_get_is_connected (connection)) { - _dbus_verbose ("connection was disconnected: %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("connection was disconnected\n"); return TRUE; } @@ -4322,7 +4355,7 @@ check_list_services (BusContext *context, "should have been a NameOwnerChanged (creation)\n"); goto out; } - + if (!check_service_activated (context, connection, EXISTENT_SERVICE_NAME, base_service, message)) goto out; @@ -4339,7 +4372,7 @@ check_list_services (BusContext *context, break; } } - + if (!check_get_services (context, connection, "ListNames", &services, &len)) { return TRUE; @@ -4383,7 +4416,7 @@ check_oom_check2_func (void *data) if (! (* d->func) (d->context, d->connection)) return FALSE; - + if (!check_no_leftovers (d->context)) { _dbus_warn ("Messages were left over, should be covered by test suite\n"); @@ -4404,7 +4437,7 @@ check2_try_iterations (BusContext *context, d.func = func; d.context = context; d.connection = connection; - + if (!_dbus_test_oom_handling (description, check_oom_check2_func, &d)) { @@ -4427,19 +4460,19 @@ setenv_TEST_LAUNCH_HELPER_CONFIG(const DBusString *test_data_dir, { _dbus_string_free (&full); return FALSE; - } + } _dbus_string_init_const (&file, filename); - + if (!_dbus_concat_dir_and_file (&full, &file)) { _dbus_string_free (&full); return FALSE; } - _dbus_verbose ("Setting TEST_LAUNCH_HELPER_CONFIG to '%s'\n", + _dbus_verbose ("Setting TEST_LAUNCH_HELPER_CONFIG to '%s'\n", _dbus_string_get_const_data (&full)); - + _dbus_setenv ("TEST_LAUNCH_HELPER_CONFIG", _dbus_string_get_const_data (&full)); _dbus_string_free (&full); @@ -4463,12 +4496,12 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, _dbus_assert_not_reached ("no memory setting TEST_LAUNCH_HELPER_CONFIG"); dbus_error_init (&error); - + context = bus_context_new_test (test_data_dir, filename); if (context == NULL) return FALSE; - - foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error); + + foo = dbus_connection_open_private (TEST_CONNECTION, &error); if (foo == NULL) _dbus_assert_not_reached ("could not alloc connection"); @@ -4476,7 +4509,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, _dbus_assert_not_reached ("could not set up connection"); spin_connection_until_authenticated (context, foo); - + if (!check_hello_message (context, foo)) _dbus_assert_not_reached ("hello message failed"); @@ -4485,8 +4518,8 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, if (!check_add_match_all (context, foo)) _dbus_assert_not_reached ("AddMatch message failed"); - - bar = dbus_connection_open_private ("debug-pipe:name=test-server", &error); + + bar = dbus_connection_open_private (TEST_CONNECTION, &error); if (bar == NULL) _dbus_assert_not_reached ("could not alloc connection"); @@ -4494,14 +4527,14 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, _dbus_assert_not_reached ("could not set up connection"); spin_connection_until_authenticated (context, bar); - + if (!check_hello_message (context, bar)) _dbus_assert_not_reached ("hello message failed"); if (!check_add_match_all (context, bar)) _dbus_assert_not_reached ("AddMatch message failed"); - - baz = dbus_connection_open_private ("debug-pipe:name=test-server", &error); + + baz = dbus_connection_open_private (TEST_CONNECTION, &error); if (baz == NULL) _dbus_assert_not_reached ("could not alloc connection"); @@ -4509,31 +4542,36 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, _dbus_assert_not_reached ("could not set up connection"); spin_connection_until_authenticated (context, baz); - + if (!check_hello_message (context, baz)) _dbus_assert_not_reached ("hello message failed"); if (!check_add_match_all (context, baz)) _dbus_assert_not_reached ("AddMatch message failed"); +#ifdef DBUS_WIN_FIXME + _dbus_warn("TODO: testing of GetConnectionUnixUser message skipped for now\n"); + _dbus_warn("TODO: testing of GetConnectionUnixProcessID message skipped for now\n"); +#else if (!check_get_connection_unix_user (context, baz)) _dbus_assert_not_reached ("GetConnectionUnixUser message failed"); if (!check_get_connection_unix_process_id (context, baz)) _dbus_assert_not_reached ("GetConnectionUnixProcessID message failed"); +#endif if (!check_list_services (context, baz)) _dbus_assert_not_reached ("ListActivatableNames message failed"); - + if (!check_no_leftovers (context)) { _dbus_warn ("Messages were left over after setting up initial connections\n"); _dbus_assert_not_reached ("initial connection setup failed"); } - + check1_try_iterations (context, "create_and_hello", check_hello_connection); - + check2_try_iterations (context, foo, "nonexistent_service_no_auto_start", check_nonexistent_service_no_auto_start); @@ -4543,15 +4581,15 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, check2_try_iterations (context, foo, "segfault_service_no_auto_start", check_segfault_service_no_auto_start); #endif - + check2_try_iterations (context, foo, "existent_service_no_auto_start", check_existent_service_no_auto_start); - + check2_try_iterations (context, foo, "nonexistent_service_auto_start", check_nonexistent_service_auto_start); - -#ifdef DBUS_WIN_FIXME + +#ifdef DBUS_WIN_FIXME _dbus_warn("TODO: dispatch.c segfault_service_auto_start test\n"); #else /* only do the segfault test if we are not using the launcher */ @@ -4576,7 +4614,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, check2_try_iterations (context, foo, "existent_service_auto_auto_start", check_existent_service_auto_start); #endif - + if (!check_existent_service_auto_start (context, foo)) _dbus_assert_not_reached ("existent service auto start failed"); @@ -4590,7 +4628,7 @@ bus_dispatch_test_conf (const DBusString *test_data_dir, kill_client_connection_unchecked (baz); bus_context_unref (context); - + return TRUE; } @@ -4605,14 +4643,14 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir, /* save the config name for the activation helper */ if (!setenv_TEST_LAUNCH_HELPER_CONFIG (test_data_dir, filename)) _dbus_assert_not_reached ("no memory setting TEST_LAUNCH_HELPER_CONFIG"); - + dbus_error_init (&error); - + context = bus_context_new_test (test_data_dir, filename); if (context == NULL) return FALSE; - - foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error); + + foo = dbus_connection_open_private (TEST_CONNECTION, &error); if (foo == NULL) _dbus_assert_not_reached ("could not alloc connection"); @@ -4647,7 +4685,7 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir, kill_client_connection_unchecked (foo); bus_context_unref (context); - + return TRUE; } @@ -4660,6 +4698,9 @@ bus_dispatch_test (const DBusString *test_data_dir) "valid-config-files/debug-allow-all.conf", FALSE)) return FALSE; +#ifdef DBUS_WIN + _dbus_warn("Info: Launch helper activation tests skipped because launch-helper is not supported yet\n"); +#else /* run launch-helper activation tests */ _dbus_verbose ("Launch helper activation tests\n"); if (!bus_dispatch_test_conf (test_data_dir, @@ -4670,6 +4711,7 @@ bus_dispatch_test (const DBusString *test_data_dir) if (!bus_dispatch_test_conf_fail (test_data_dir, "valid-config-files-system/debug-allow-all-fail.conf")) return FALSE; +#endif return TRUE; } @@ -4682,16 +4724,16 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir) DBusError error; dbus_error_init (&error); - + /* Test SHA1 authentication */ _dbus_verbose ("Testing SHA1 context\n"); - + context = bus_context_new_test (test_data_dir, "valid-config-files/debug-allow-all-sha1.conf"); if (context == NULL) return FALSE; - foo = dbus_connection_open_private ("debug-pipe:name=test-server", &error); + foo = dbus_connection_open_private (TEST_CONNECTION, &error); if (foo == NULL) _dbus_assert_not_reached ("could not alloc connection"); @@ -4699,19 +4741,19 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir) _dbus_assert_not_reached ("could not set up connection"); spin_connection_until_authenticated (context, foo); - + if (!check_hello_message (context, foo)) _dbus_assert_not_reached ("hello message failed"); if (!check_add_match_all (context, foo)) _dbus_assert_not_reached ("addmatch message failed"); - + if (!check_no_leftovers (context)) { _dbus_warn ("Messages were left over after setting up initial SHA-1 connection\n"); _dbus_assert_not_reached ("initial connection setup failed"); } - + check1_try_iterations (context, "create_and_hello_sha1", check_hello_connection); @@ -4722,4 +4764,155 @@ bus_dispatch_sha1_test (const DBusString *test_data_dir) return TRUE; } +#ifdef HAVE_UNIX_FD_PASSING + +dbus_bool_t +bus_unix_fds_passing_test(const DBusString *test_data_dir) +{ + BusContext *context; + DBusConnection *foo, *bar; + DBusError error; + DBusMessage *m; + dbus_bool_t b; + int one[2], two[2], x, y, z; + char r; + + dbus_error_init (&error); + + context = bus_context_new_test (test_data_dir, "valid-config-files/debug-allow-all.conf"); + if (context == NULL) + _dbus_assert_not_reached ("could not alloc context"); + + foo = dbus_connection_open_private (TEST_CONNECTION, &error); + if (foo == NULL) + _dbus_assert_not_reached ("could not alloc connection"); + + if (!bus_setup_debug_client (foo)) + _dbus_assert_not_reached ("could not set up connection"); + + spin_connection_until_authenticated (context, foo); + + if (!check_hello_message (context, foo)) + _dbus_assert_not_reached ("hello message failed"); + + if (!check_add_match_all (context, foo)) + _dbus_assert_not_reached ("AddMatch message failed"); + + bar = dbus_connection_open_private (TEST_CONNECTION, &error); + if (bar == NULL) + _dbus_assert_not_reached ("could not alloc connection"); + + if (!bus_setup_debug_client (bar)) + _dbus_assert_not_reached ("could not set up connection"); + + spin_connection_until_authenticated (context, bar); + + if (!check_hello_message (context, bar)) + _dbus_assert_not_reached ("hello message failed"); + + if (!check_add_match_all (context, bar)) + _dbus_assert_not_reached ("AddMatch message failed"); + + if (!(m = dbus_message_new_signal("/", "a.b.c", "d"))) + _dbus_assert_not_reached ("could not alloc message"); + + if (!(_dbus_full_duplex_pipe(one, one+1, TRUE, &error))) + _dbus_assert_not_reached("Failed to allocate pipe #1"); + + if (!(_dbus_full_duplex_pipe(two, two+1, TRUE, &error))) + _dbus_assert_not_reached("Failed to allocate pipe #2"); + + if (!dbus_message_append_args(m, + DBUS_TYPE_UNIX_FD, one, + DBUS_TYPE_UNIX_FD, two, + DBUS_TYPE_UNIX_FD, two, + DBUS_TYPE_INVALID)) + _dbus_assert_not_reached("Failed to attach fds."); + + if (!_dbus_close(one[0], &error)) + _dbus_assert_not_reached("Failed to close pipe #1 "); + if (!_dbus_close(two[0], &error)) + _dbus_assert_not_reached("Failed to close pipe #2 "); + + if (!(dbus_connection_can_send_type(foo, DBUS_TYPE_UNIX_FD))) + _dbus_assert_not_reached("Connection cannot do fd passing"); + + if (!(dbus_connection_can_send_type(bar, DBUS_TYPE_UNIX_FD))) + _dbus_assert_not_reached("Connection cannot do fd passing"); + + if (!dbus_connection_send (foo, m, NULL)) + _dbus_assert_not_reached("Failed to send fds"); + + dbus_message_unref(m); + + bus_test_run_clients_loop (SEND_PENDING (foo)); + + bus_test_run_everything (context); + + block_connection_until_message_from_bus (context, foo, "unix fd reception on foo"); + + if (!(m = pop_message_waiting_for_memory (foo))) + _dbus_assert_not_reached("Failed to receive msg"); + + if (!dbus_message_is_signal(m, "a.b.c", "d")) + _dbus_assert_not_reached("bogus message received"); + + dbus_message_unref(m); + + block_connection_until_message_from_bus (context, bar, "unix fd reception on bar"); + + if (!(m = pop_message_waiting_for_memory (bar))) + _dbus_assert_not_reached("Failed to receive msg"); + + if (!dbus_message_is_signal(m, "a.b.c", "d")) + _dbus_assert_not_reached("bogus message received"); + + if (!dbus_message_get_args(m, + &error, + DBUS_TYPE_UNIX_FD, &x, + DBUS_TYPE_UNIX_FD, &y, + DBUS_TYPE_UNIX_FD, &z, + DBUS_TYPE_INVALID)) + _dbus_assert_not_reached("Failed to parse fds."); + + dbus_message_unref(m); + + if (write(x, "X", 1) != 1) + _dbus_assert_not_reached("Failed to write to pipe #1"); + if (write(y, "Y", 1) != 1) + _dbus_assert_not_reached("Failed to write to pipe #2"); + if (write(z, "Z", 1) != 1) + _dbus_assert_not_reached("Failed to write to pipe #2/2nd fd"); + + if (!_dbus_close(x, &error)) + _dbus_assert_not_reached("Failed to close pipe #1/other side "); + if (!_dbus_close(y, &error)) + _dbus_assert_not_reached("Failed to close pipe #2/other side "); + if (!_dbus_close(z, &error)) + _dbus_assert_not_reached("Failed to close pipe #2/other size 2nd fd "); + + if (read(one[1], &r, 1) != 1 || r != 'X') + _dbus_assert_not_reached("Failed to read value from pipe."); + if (read(two[1], &r, 1) != 1 || r != 'Y') + _dbus_assert_not_reached("Failed to read value from pipe."); + if (read(two[1], &r, 1) != 1 || r != 'Z') + _dbus_assert_not_reached("Failed to read value from pipe."); + + if (!_dbus_close(one[1], &error)) + _dbus_assert_not_reached("Failed to close pipe #1 "); + if (!_dbus_close(two[1], &error)) + _dbus_assert_not_reached("Failed to close pipe #2 "); + + _dbus_verbose ("Disconnecting foo\n"); + kill_client_connection_unchecked (foo); + + _dbus_verbose ("Disconnecting bar\n"); + kill_client_connection_unchecked (bar); + + bus_context_unref (context); + + return TRUE; +} +#endif + #endif /* DBUS_BUILD_TESTS */ diff --git a/bus/driver.c b/bus/driver.c index 5e8a7a26..cc8d1f26 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -5,7 +5,7 @@ * Copyright (C) 2003, 2004, 2005 Red Hat, Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,13 +15,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "activation.h" #include "connection.h" #include "driver.h" @@ -56,20 +57,20 @@ bus_driver_send_service_owner_changed (const char *service_name, null_service = ""; _dbus_verbose ("sending name owner changed: %s [%s -> %s]\n", - service_name, - old_owner ? old_owner : null_service, + service_name, + old_owner ? old_owner : null_service, new_owner ? new_owner : null_service); message = dbus_message_new_signal (DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "NameOwnerChanged"); - + if (message == NULL) { BUS_SET_OOM (error); return FALSE; } - + if (!dbus_message_set_sender (message, DBUS_SERVICE_DBUS)) goto oom; @@ -81,7 +82,7 @@ bus_driver_send_service_owner_changed (const char *service_name, goto oom; _dbus_assert (dbus_message_has_signature (message, "sss")); - + retval = bus_dispatch_matches (transaction, NULL, NULL, message, error); dbus_message_unref (message); @@ -102,17 +103,17 @@ bus_driver_send_service_lost (DBusConnection *connection, DBusMessage *message; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + message = dbus_message_new_signal (DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "NameLost"); - + if (message == NULL) { BUS_SET_OOM (error); return FALSE; } - + if (!dbus_message_set_destination (message, bus_connection_get_name (connection)) || !dbus_message_append_args (message, DBUS_TYPE_STRING, &service_name, @@ -145,7 +146,7 @@ bus_driver_send_service_acquired (DBusConnection *connection, DBusMessage *message; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + message = dbus_message_new_signal (DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "NameAcquired"); @@ -155,7 +156,7 @@ bus_driver_send_service_acquired (DBusConnection *connection, BUS_SET_OOM (error); return FALSE; } - + if (!dbus_message_set_destination (message, bus_connection_get_name (connection)) || !dbus_message_append_args (message, DBUS_TYPE_STRING, &service_name, @@ -193,9 +194,9 @@ create_unique_client_name (BusRegistry *registry, static int next_major_number = 0; static int next_minor_number = 0; int len; - + len = _dbus_string_get_length (str); - + while (TRUE) { /* start out with 1-0, go to 1-1, 1-2, 1-3, @@ -213,21 +214,21 @@ create_unique_client_name (BusRegistry *registry, _dbus_assert (next_minor_number >= 0); /* appname:MAJOR-MINOR */ - + if (!_dbus_string_append (str, ":")) return FALSE; - + if (!_dbus_string_append_int (str, next_major_number)) return FALSE; if (!_dbus_string_append (str, ".")) return FALSE; - + if (!_dbus_string_append_int (str, next_minor_number)) return FALSE; next_minor_number += 1; - + /* Check if a client with the name exists */ if (bus_registry_lookup (registry, str) == NULL) break; @@ -274,7 +275,7 @@ bus_driver_handle_hello (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_SET (error); return FALSE; } - + if (!_dbus_string_init (&unique_name)) { BUS_SET_OOM (error); @@ -284,7 +285,7 @@ bus_driver_handle_hello (DBusConnection *connection, retval = FALSE; registry = bus_connection_get_registry (connection); - + if (!create_unique_client_name (registry, &unique_name)) { BUS_SET_OOM (error); @@ -296,14 +297,14 @@ bus_driver_handle_hello (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_SET (error); goto out_0; } - + if (!dbus_message_set_sender (message, bus_connection_get_name (connection))) { BUS_SET_OOM (error); goto out_0; } - + if (!bus_driver_send_welcome_message (connection, message, transaction, error)) goto out_0; @@ -312,10 +313,10 @@ bus_driver_handle_hello (DBusConnection *connection, &unique_name, connection, 0, transaction, error); if (service == NULL) goto out_0; - + _dbus_assert (bus_connection_is_active (connection)); retval = TRUE; - + out_0: _dbus_string_free (&unique_name); return retval; @@ -331,17 +332,17 @@ bus_driver_send_welcome_message (DBusConnection *connection, const char *name; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + name = bus_connection_get_name (connection); _dbus_assert (name != NULL); - + welcome = dbus_message_new_method_return (hello_message); if (welcome == NULL) { BUS_SET_OOM (error); return FALSE; } - + if (!dbus_message_append_args (welcome, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) @@ -352,7 +353,7 @@ bus_driver_send_welcome_message (DBusConnection *connection, } _dbus_assert (dbus_message_has_signature (welcome, DBUS_TYPE_STRING_AS_STRING)); - + if (!bus_transaction_send_from_driver (transaction, connection, welcome)) { dbus_message_unref (welcome); @@ -381,9 +382,9 @@ bus_driver_handle_list_services (DBusConnection *connection, DBusMessageIter sub; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + registry = bus_connection_get_registry (connection); - + reply = dbus_message_new_method_return (message); if (reply == NULL) { @@ -399,7 +400,7 @@ bus_driver_handle_list_services (DBusConnection *connection, } dbus_message_iter_init_append (reply, &iter); - + if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &sub)) @@ -422,7 +423,7 @@ bus_driver_handle_list_services (DBusConnection *connection, return FALSE; } } - + i = 0; while (i < len) { @@ -445,7 +446,7 @@ bus_driver_handle_list_services (DBusConnection *connection, BUS_SET_OOM (error); return FALSE; } - + if (!bus_transaction_send_from_driver (transaction, connection, reply)) { dbus_message_unref (reply); @@ -567,17 +568,17 @@ bus_driver_handle_acquire_service (DBusConnection *connection, BusRegistry *registry; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + registry = bus_connection_get_registry (connection); - + if (!dbus_message_get_args (message, error, DBUS_TYPE_STRING, &name, DBUS_TYPE_UINT32, &flags, DBUS_TYPE_INVALID)) return FALSE; - + _dbus_verbose ("Trying to own name %s with flags 0x%x\n", name, flags); - + retval = FALSE; reply = NULL; @@ -588,7 +589,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection, &service_reply, transaction, error)) goto out; - + reply = dbus_message_new_method_return (message); if (reply == NULL) { @@ -609,12 +610,12 @@ bus_driver_handle_acquire_service (DBusConnection *connection, } retval = TRUE; - + out: if (reply) dbus_message_unref (reply); return retval; -} +} static dbus_bool_t bus_driver_handle_release_service (DBusConnection *connection, @@ -692,9 +693,9 @@ bus_driver_handle_service_exists (DBusConnection *connection, BusRegistry *registry; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + registry = bus_connection_get_registry (connection); - + if (!dbus_message_get_args (message, error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)) @@ -712,7 +713,7 @@ bus_driver_handle_service_exists (DBusConnection *connection, service = bus_registry_lookup (registry, &service_name); service_exists = service != NULL; } - + reply = dbus_message_new_method_return (message); if (reply == NULL) { @@ -735,7 +736,7 @@ bus_driver_handle_service_exists (DBusConnection *connection, } retval = TRUE; - + out: if (reply) dbus_message_unref (reply); @@ -755,9 +756,9 @@ bus_driver_handle_activate_service (DBusConnection *connection, BusActivation *activation; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + activation = bus_connection_get_activation (connection); - + if (!dbus_message_get_args (message, error, DBUS_TYPE_STRING, &name, DBUS_TYPE_UINT32, &flags, @@ -779,7 +780,7 @@ bus_driver_handle_activate_service (DBusConnection *connection, } retval = TRUE; - + out: return retval; } @@ -810,7 +811,7 @@ send_ack_reply (DBusConnection *connection, } dbus_message_unref (reply); - + return TRUE; } @@ -951,7 +952,7 @@ bus_driver_handle_add_match (DBusConnection *connection, const char *text; DBusString str; BusMatchmaker *matchmaker; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); text = NULL; @@ -968,7 +969,7 @@ bus_driver_handle_add_match (DBusConnection *connection, "(inactive)"); goto failed; } - + if (!dbus_message_get_args (message, error, DBUS_TYPE_STRING, &text, DBUS_TYPE_INVALID)) @@ -997,9 +998,9 @@ bus_driver_handle_add_match (DBusConnection *connection, bus_matchmaker_remove_rule (matchmaker, rule); goto failed; } - + bus_match_rule_unref (rule); - + return TRUE; failed: @@ -1019,12 +1020,12 @@ bus_driver_handle_remove_match (DBusConnection *connection, const char *text; DBusString str; BusMatchmaker *matchmaker; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); text = NULL; rule = NULL; - + if (!dbus_message_get_args (message, error, DBUS_TYPE_STRING, &text, DBUS_TYPE_INVALID)) @@ -1045,14 +1046,14 @@ bus_driver_handle_remove_match (DBusConnection *connection, if (!send_ack_reply (connection, transaction, message, error)) goto failed; - + matchmaker = bus_connection_get_matchmaker (connection); if (!bus_matchmaker_remove_rule_by_value (matchmaker, rule, error)) goto failed; bus_match_rule_unref (rule); - + return TRUE; failed: @@ -1074,7 +1075,7 @@ bus_driver_handle_get_service_owner (DBusConnection *connection, BusRegistry *registry; BusService *service; DBusMessage *reply; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); registry = bus_connection_get_registry (connection); @@ -1097,7 +1098,7 @@ bus_driver_handle_get_service_owner (DBusConnection *connection, } else if (service == NULL) { - dbus_set_error (error, + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, "Could not get owner of name '%s': no such name", text); goto failed; @@ -1113,7 +1114,7 @@ bus_driver_handle_get_service_owner (DBusConnection *connection, "Could not determine unique name for '%s'", text); goto failed; } - _dbus_assert (*base_name == ':'); + _dbus_assert (*base_name == ':'); } _dbus_assert (base_name != NULL); @@ -1122,11 +1123,11 @@ bus_driver_handle_get_service_owner (DBusConnection *connection, if (reply == NULL) goto oom; - if (! dbus_message_append_args (reply, + if (! dbus_message_append_args (reply, DBUS_TYPE_STRING, &base_name, DBUS_TYPE_INVALID)) goto oom; - + if (! bus_transaction_send_from_driver (transaction, connection, reply)) goto oom; @@ -1159,7 +1160,7 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, DBusMessage *reply; DBusMessageIter iter, array_iter; char *dbus_service_name = DBUS_SERVICE_DBUS; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); registry = bus_connection_get_registry (connection); @@ -1184,14 +1185,14 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, } else if (service == NULL) { - dbus_set_error (error, + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, "Could not get owners of name '%s': no such name", text); goto failed; } else { - if (!bus_service_list_queued_owners (service, + if (!bus_service_list_queued_owners (service, &base_names, error)) goto failed; @@ -1209,7 +1210,7 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, DBUS_TYPE_STRING_AS_STRING, &array_iter)) goto oom; - + link = _dbus_list_get_first_link (&base_names); while (link != NULL) { @@ -1217,8 +1218,8 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, _dbus_assert (link->data != NULL); uname = (char *)link->data; - - if (!dbus_message_iter_append_basic (&array_iter, + + if (!dbus_message_iter_append_basic (&array_iter, DBUS_TYPE_STRING, &uname)) goto oom; @@ -1228,8 +1229,8 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, if (! dbus_message_iter_close_container (&iter, &array_iter)) goto oom; - - + + if (! bus_transaction_send_from_driver (transaction, connection, reply)) goto oom; @@ -1284,7 +1285,7 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection, serv = bus_registry_lookup (registry, &str); if (serv == NULL) { - dbus_set_error (error, + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, "Could not get UID of name '%s': no such name", service); goto failed; @@ -1360,7 +1361,7 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection, serv = bus_registry_lookup (registry, &str); if (serv == NULL) { - dbus_set_error (error, + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, "Could not get PID of name '%s': no such name", service); goto failed; @@ -1436,7 +1437,7 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection, serv = bus_registry_lookup (registry, &str); if (serv == NULL) { - dbus_set_error (error, + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, "Could not get audit session data for name '%s': no such name", service); goto failed; @@ -1510,7 +1511,7 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne serv = bus_registry_lookup (registry, &str); if (serv == NULL) { - dbus_set_error (error, + dbus_set_error (error, DBUS_ERROR_NAME_HAS_NO_OWNER, "Could not get security context of name '%s': no such name", service); goto failed; @@ -1563,7 +1564,7 @@ bus_driver_handle_reload_config (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_CLEAR (error); reply = NULL; - + context = bus_connection_get_context (connection); if (!bus_context_reload_config (context, error)) goto failed; @@ -1608,7 +1609,7 @@ bus_driver_handle_get_id (DBusConnection *connection, } reply = NULL; - + context = bus_connection_get_context (connection); if (!bus_context_get_id (context, &uuid)) goto oom; @@ -1622,24 +1623,24 @@ bus_driver_handle_get_id (DBusConnection *connection, DBUS_TYPE_STRING, &v_STRING, DBUS_TYPE_INVALID)) goto oom; - + _dbus_assert (dbus_message_has_signature (reply, "s")); - + if (! bus_transaction_send_from_driver (transaction, connection, reply)) goto oom; - _dbus_string_free (&uuid); + _dbus_string_free (&uuid); dbus_message_unref (reply); return TRUE; oom: _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + BUS_SET_OOM (error); if (reply) dbus_message_unref (reply); - _dbus_string_free (&uuid); + _dbus_string_free (&uuid); return FALSE; } @@ -1660,7 +1661,7 @@ static struct { "Hello", "", DBUS_TYPE_STRING_AS_STRING, - bus_driver_handle_hello }, + bus_driver_handle_hello }, { "RequestName", DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_UINT32_AS_STRING, DBUS_TYPE_UINT32_AS_STRING, @@ -1739,10 +1740,10 @@ write_args_for_direction (DBusString *xml, DBusTypeReader typereader; DBusString sigstr; int current_type; - + _dbus_string_init_const (&sigstr, signature); _dbus_type_reader_init_types_only (&typereader, &sigstr, 0); - + while ((current_type = _dbus_type_reader_get_current_type (&typereader)) != DBUS_TYPE_INVALID) { const DBusString *subsig; @@ -1793,7 +1794,7 @@ bus_driver_generate_introspect_string (DBusString *xml) i = 0; while (i < _DBUS_N_ELEMENTS (message_handlers)) { - + if (!_dbus_string_append_printf (xml, " <method name=\"%s\">\n", message_handlers[i].name)) return FALSE; @@ -1806,22 +1807,22 @@ bus_driver_generate_introspect_string (DBusString *xml) if (!_dbus_string_append (xml, " </method>\n")) return FALSE; - + ++i; } if (!_dbus_string_append_printf (xml, " <signal name=\"NameOwnerChanged\">\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " </signal>\n")) return FALSE; @@ -1829,10 +1830,10 @@ bus_driver_generate_introspect_string (DBusString *xml) if (!_dbus_string_append_printf (xml, " <signal name=\"NameLost\">\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " </signal>\n")) return FALSE; @@ -1840,16 +1841,16 @@ bus_driver_generate_introspect_string (DBusString *xml) if (!_dbus_string_append_printf (xml, " <signal name=\"NameAcquired\">\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n")) return FALSE; - + if (!_dbus_string_append_printf (xml, " </signal>\n")) return FALSE; if (!_dbus_string_append (xml, " </interface>\n")) return FALSE; - + if (!_dbus_string_append (xml, "</node>\n")) return FALSE; @@ -1867,7 +1868,7 @@ bus_driver_handle_introspect (DBusConnection *connection, const char *v_STRING; _dbus_verbose ("Introspect() on bus driver\n"); - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); reply = NULL; @@ -1914,7 +1915,7 @@ bus_driver_handle_introspect (DBusConnection *connection, dbus_message_unref (reply); _dbus_string_free (&xml); - + return FALSE; } @@ -1929,6 +1930,14 @@ bus_driver_handle_message (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_CLEAR (error); + if (dbus_message_is_signal (message, "org.freedesktop.systemd1.Activator", "ActivationFailure")) + { + BusContext *context; + + context = bus_connection_get_context (connection); + return dbus_activation_systemd_failure(bus_context_get_activation(context), message); + } + if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_CALL) { _dbus_verbose ("Driver got a non-method-call message, ignoring\n"); @@ -1939,16 +1948,16 @@ bus_driver_handle_message (DBusConnection *connection, DBUS_INTERFACE_INTROSPECTABLE, "Introspect")) return bus_driver_handle_introspect (connection, transaction, message, error); - + interface = dbus_message_get_interface (message); if (interface == NULL) interface = DBUS_INTERFACE_DBUS; - + _dbus_assert (dbus_message_get_member (message) != NULL); - + name = dbus_message_get_member (message); sender = dbus_message_get_sender (message); - + if (strcmp (interface, DBUS_INTERFACE_DBUS) != 0) { @@ -1956,13 +1965,13 @@ bus_driver_handle_message (DBusConnection *connection, interface); goto unknown; } - + _dbus_verbose ("Driver got a method call: %s\n", dbus_message_get_member (message)); - + /* security checks should have kept this from getting here */ _dbus_assert (sender != NULL || strcmp (name, "Hello") == 0); - + i = 0; while (i < _DBUS_N_ELEMENTS (message_handlers)) { @@ -1976,7 +1985,7 @@ bus_driver_handle_message (DBusConnection *connection, _dbus_verbose ("Call to %s has wrong args (%s, expected %s)\n", name, dbus_message_get_signature (message), message_handlers[i].in_args); - + dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Call to %s has wrong args (%s, expected %s)\n", name, dbus_message_get_signature (message), @@ -1984,7 +1993,7 @@ bus_driver_handle_message (DBusConnection *connection, _DBUS_ASSERT_ERROR_IS_SET (error); return FALSE; } - + if ((* message_handlers[i].handler) (connection, transaction, message, error)) { _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -1998,7 +2007,7 @@ bus_driver_handle_message (DBusConnection *connection, return FALSE; } } - + ++i; } @@ -2009,7 +2018,7 @@ bus_driver_handle_message (DBusConnection *connection, dbus_set_error (error, DBUS_ERROR_UNKNOWN_METHOD, "%s does not understand message %s", DBUS_SERVICE_DBUS, name); - + return FALSE; } diff --git a/bus/expirelist.c b/bus/expirelist.c index 58e1f6d1..946a615c 100644 --- a/bus/expirelist.c +++ b/bus/expirelist.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "expirelist.h" #include "test.h" #include <dbus/dbus-internals.h> @@ -217,7 +218,7 @@ expire_timeout_handler (void *data) { BusExpireList *list = data; - _dbus_verbose ("Running %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("Running\n"); /* note that this may remove the timeout */ bus_expirelist_expire (list); @@ -4,7 +4,7 @@ * Copyright (C) 2003 Red Hat, Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,12 +14,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "bus.h" #include "driver.h" #include <dbus/dbus-internals.h> @@ -27,7 +29,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifdef HAVE_SIGNAL_H #include <signal.h> +#endif #ifdef HAVE_ERRNO_H #include <errno.h> #endif @@ -47,8 +51,8 @@ signal_handler (int sig) switch (sig) { -#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX - case SIGIO: +#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX + case SIGIO: /* explicit fall-through */ #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */ #ifdef SIGHUP @@ -56,7 +60,7 @@ signal_handler (int sig) { DBusString str; _dbus_string_init_const (&str, "foo"); - if ((reload_pipe[RELOAD_WRITE_END] > 0) && + if ((reload_pipe[RELOAD_WRITE_END] > 0) && !_dbus_write_socket (reload_pipe[RELOAD_WRITE_END], &str, 0, 1)) { _dbus_warn ("Unable to write to reload pipe.\n"); @@ -71,7 +75,7 @@ signal_handler (int sig) static void usage (void) { - fprintf (stderr, DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect]\n"); + fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--systemd-activation]\n"); exit (1); } @@ -82,7 +86,7 @@ version (void) "Copyright (C) 2002, 2003 Red Hat, Inc., CodeFactory AB, and others\n" "This is free software; see the source for copying conditions.\n" "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", - VERSION); + DBUS_VERSION_STRING); exit (0); } @@ -90,7 +94,7 @@ static void introspect (void) { DBusString xml; - const char *v_STRING; + const char *v_STRING; if (!_dbus_string_init (&xml)) goto oom; @@ -102,14 +106,15 @@ introspect (void) } v_STRING = _dbus_string_get_const_data (&xml); - printf ("%s\n", v_STRING); + printf ("%s\n", v_STRING); exit (0); - + oom: _dbus_warn ("Can not introspect - Out of memory\n"); exit (1); } + static void check_two_config_files (const DBusString *config_file, const char *extra_arg) @@ -123,6 +128,18 @@ check_two_config_files (const DBusString *config_file, } static void +check_two_addresses (const DBusString *address, + const char *extra_arg) +{ + if (_dbus_string_get_length (address) > 0) + { + fprintf (stderr, "--%s specified but address %s already requested\n", + extra_arg, _dbus_string_get_const_data (address)); + exit (1); + } +} + +static void check_two_addr_descriptors (const DBusString *addr_fd, const char *extra_arg) { @@ -208,9 +225,6 @@ setup_reload_pipe (DBusLoop *loop) exit (1); } - _dbus_fd_set_close_on_exec (reload_pipe[0]); - _dbus_fd_set_close_on_exec (reload_pipe[1]); - watch = _dbus_watch_new (reload_pipe[RELOAD_READ_END], DBUS_WATCH_READABLE, TRUE, handle_reload_watch, NULL, NULL); @@ -249,6 +263,7 @@ main (int argc, char **argv) { DBusError error; DBusString config_file; + DBusString address; DBusString addr_fd; DBusString pid_fd; const char *prev_arg; @@ -257,11 +272,16 @@ main (int argc, char **argv) int i; dbus_bool_t print_address; dbus_bool_t print_pid; + dbus_bool_t is_session_bus; int force_fork; + dbus_bool_t systemd_activation; if (!_dbus_string_init (&config_file)) return 1; + if (!_dbus_string_init (&address)) + return 1; + if (!_dbus_string_init (&addr_fd)) return 1; @@ -270,7 +290,9 @@ main (int argc, char **argv) print_address = FALSE; print_pid = FALSE; + is_session_bus = FALSE; force_fork = FORK_FOLLOW_CONFIG_FILE; + systemd_activation = FALSE; prev_arg = NULL; i = 1; @@ -290,6 +312,8 @@ main (int argc, char **argv) force_fork = FORK_NEVER; else if (strcmp (arg, "--fork") == 0) force_fork = FORK_ALWAYS; + else if (strcmp (arg, "--systemd-activation") == 0) + systemd_activation = TRUE; else if (strcmp (arg, "--system") == 0) { check_two_config_files (&config_file, "system"); @@ -309,7 +333,7 @@ main (int argc, char **argv) const char *file; check_two_config_files (&config_file, "config-file"); - + file = strchr (arg, '='); ++file; @@ -320,18 +344,40 @@ main (int argc, char **argv) strcmp (prev_arg, "--config-file") == 0) { check_two_config_files (&config_file, "config-file"); - + if (!_dbus_string_append (&config_file, arg)) exit (1); } else if (strcmp (arg, "--config-file") == 0) ; /* wait for next arg */ + else if (strstr (arg, "--address=") == arg) + { + const char *file; + + check_two_addresses (&address, "address"); + + file = strchr (arg, '='); + ++file; + + if (!_dbus_string_append (&address, file)) + exit (1); + } + else if (prev_arg && + strcmp (prev_arg, "--address") == 0) + { + check_two_addresses (&address, "address"); + + if (!_dbus_string_append (&address, arg)) + exit (1); + } + else if (strcmp (arg, "--address") == 0) + ; /* wait for next arg */ else if (strstr (arg, "--print-address=") == arg) { const char *desc; check_two_addr_descriptors (&addr_fd, "print-address"); - + desc = strchr (arg, '='); ++desc; @@ -344,7 +390,7 @@ main (int argc, char **argv) strcmp (prev_arg, "--print-address") == 0) { check_two_addr_descriptors (&addr_fd, "print-address"); - + if (!_dbus_string_append (&addr_fd, arg)) exit (1); @@ -357,7 +403,7 @@ main (int argc, char **argv) const char *desc; check_two_pid_descriptors (&pid_fd, "print-pid"); - + desc = strchr (arg, '='); ++desc; @@ -370,19 +416,19 @@ main (int argc, char **argv) strcmp (prev_arg, "--print-pid") == 0) { check_two_pid_descriptors (&pid_fd, "print-pid"); - + if (!_dbus_string_append (&pid_fd, arg)) exit (1); - + print_pid = TRUE; } else if (strcmp (arg, "--print-pid") == 0) print_pid = TRUE; /* and we'll get the next arg if appropriate */ else usage (); - + prev_arg = arg; - + ++i; } @@ -445,6 +491,8 @@ main (int argc, char **argv) dbus_error_init (&error); context = bus_context_new (&config_file, force_fork, &print_addr_pipe, &print_pid_pipe, + _dbus_string_get_length(&address) > 0 ? &address : NULL, + systemd_activation, &error); _dbus_string_free (&config_file); if (context == NULL) @@ -458,19 +506,19 @@ main (int argc, char **argv) /* bus_context_new() closes the print_addr_pipe and * print_pid_pipe */ - + setup_reload_pipe (bus_context_get_loop (context)); #ifdef SIGHUP _dbus_set_signal_handler (SIGHUP, signal_handler); #endif -#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX +#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX _dbus_set_signal_handler (SIGIO, signal_handler); #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */ - + _dbus_verbose ("We are on D-Bus...\n"); _dbus_loop_run (bus_context_get_loop (context)); - + bus_context_shutdown (context); bus_context_unref (context); bus_selinux_shutdown (); diff --git a/bus/messagebus-config.in b/bus/messagebus-config.in new file mode 100644 index 00000000..39459dcb --- /dev/null +++ b/bus/messagebus-config.in @@ -0,0 +1,178 @@ +#!/bin/sh +# +# messagebus-config, Copyright 2009 Yaakov Selkowitz +# +# This file is part of the Cygwin port of dbus. + +# ====================================================================== +# Initialization +# ====================================================================== +PROGNAME=$(basename $0) +_tdir=$(dirname $0) +PROGDIR=$(cd $_tdir && pwd) + +CSIH_SCRIPT=/usr/share/csih/cygwin-service-installation-helper.sh + +# Subdirectory where the new package is being installed +PREFIX=@prefix@ + +# Directory where the config files are stored +SYSCONFDIR=@sysconfdir@/dbus-1 +DEVDIR=/dev +LOGDIR=/var/log +RUNDIR=$(dirname @DBUS_SYSTEM_PID_FILE@) +SOCKDIR=$(dirname @DBUS_SYSTEM_SOCKET@) + +source ${CSIH_SCRIPT} + +# ====================================================================== +# Routine: install_service +# Install messagebus as a service +# ====================================================================== +install_service() { + + if csih_is_nt + then + + # Check if messagebus is installed and remove on user request. + if cygrunsrv -Q messagebus > /dev/null 2>&1 + then + csih_warning "The messagebus service is already installed." + echo + if csih_request "Do you want to reinstall it with different args?" + then + cygrunsrv -E messagebus + cygrunsrv -R messagebus + fi + fi + + # Install messagebus service if it is not already installed + if ! cygrunsrv -Q messagebus > /dev/null 2>&1 + then + echo + csih_warning "The following function requires administrator privileges!" + if csih_request "Do you want to install messagebus as service?" + then + if cygrunsrv -I messagebus -d "CYGWIN D-Bus system service" -p @EXPANDED_BINDIR@/dbus-daemon -a "--nofork --system" + then + echo + csih_inform "The messagebus service has been installed under the LocalSystem" + csih_inform "account (also known as SYSTEM). To start the service now, call" + csih_inform "\`net start messagebus' or \`cygrunsrv -S messagebus'. Otherwise, it" + csih_inform "will start automatically after the next reboot." + echo + csih_inform "Check ${SYSCONFDIR}/system.conf first, if it suits your needs." + fi + fi # user allowed us to install messagebus + fi # messagebus already installed + fi # csih_is_nt +} # --- End of install_service --- # + + +# ====================================================================== +# Main Entry Point +# ====================================================================== + + +# Check how the script has been started. If +# (1) it has been started by giving the full path and +# that path is /etc/postinstall, OR +# (2) Otherwise, if the environment variable +# CONFIG_AUTO_ANSWER_NO is set +# then set auto_answer to "no". This allows automatic +# creation of the config files in /etc w/o overwriting +# them if they already exist. In both cases, color +# escape sequences are suppressed, so as to prevent +# cluttering setup's logfiles. +if [ "$PROGDIR" = "/etc/postinstall" ] +then + csih_auto_answer="no" + csih_disable_color +fi +if [ -n "${CONFIG_AUTO_ANSWER_NO}" ] +then + csih_auto_answer="no" + csih_disable_color +fi + + +# ====================================================================== +# Parse options +# ====================================================================== +while : +do + case $# in + 0) + break + ;; + esac + + option=$1 + shift + + case "$option" in + -d | --debug ) + set -x + csih_trace_on + ;; + + -y | --yes ) + csih_auto_answer=yes + ;; + + -n | --no ) + csih_auto_answer=no + ;; + + *) + echo "usage: ${PROGNAME} [OPTION]..." + echo + echo "This script creates a basic messagebus configuration." + echo + echo "Options:" + echo " --debug -d Enable shell's debug output." + echo " --yes -y Answer all questions with \"yes\" automatically." + echo " --no -n Answer all questions with \"no\" automatically." + echo + exit 1 + ;; + + esac +done + +# ====================================================================== +# Action! +# ====================================================================== + +# Check for ${SYSCONFDIR} directory +csih_make_dir "${SYSCONFDIR}" "Cannot create global configuration files." +chmod 775 "${SYSCONFDIR}" +setfacl -m u:system:rwx "${SYSCONFDIR}" + +# Check for ${DEVDIR} directory +csih_make_dir "${DEVDIR}" "Syslogging using messagebus will not work." +chmod 775 "${DEVDIR}" +setfacl -m u:system:rwx "${DEVDIR}" + +# Check for ${LOGDIR} directory +csih_make_dir "${LOGDIR}" "Syslogging using messagebus will not work." +chmod 775 "${LOGDIR}" +setfacl -m u:system:rwx "${LOGDIR}" + +# Check for ${RUNDIR} directory +csih_make_dir "${RUNDIR}" "PID files of running processes will not be created." +chmod 775 "${RUNDIR}" +setfacl -m u:system:rwx "${RUNDIR}" + +# Check for ${SOCKDIR} directory +csih_make_dir "${SOCKDIR}" "SOCKET files of running processes will not be created." +chmod 775 "${SOCKDIR}" +setfacl -m u:system:rwx "${SOCKDIR}" + +# maybe: csih_auto_answer=no will skip, +# interactive user will get a chance to override +install_service + + +echo +echo "Configuration finished. Have fun!" diff --git a/bus/messagebus.in b/bus/messagebus.in index 1f1004b1..3e2ee07a 100755 --- a/bus/messagebus.in +++ b/bus/messagebus.in @@ -68,7 +68,7 @@ case "$1" in stop ;; status) - status $processname + status $servicename RETVAL=$? ;; restart) diff --git a/bus/org.freedesktop.dbus-session.plist.in b/bus/org.freedesktop.dbus-session.plist.in new file mode 100644 index 00000000..40ff370d --- /dev/null +++ b/bus/org.freedesktop.dbus-session.plist.in @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>org.freedesktop.dbus-session</string> + + <key>ServiceIPC</key> + <true/> + + <!-- Please uncomment on 10.4; OnDemand doesn't work properly there. --> + <!-- + <key>OnDemand</key> + <false /> + --> + + <key>ProgramArguments</key> + <array> + <string>@DBUS_DAEMONDIR@/dbus-daemon</string> + <string>--nofork</string> + <string>--session</string> + </array> + + <key>Sockets</key> + <dict> + <key>unix_domain_listener</key> + <dict> + <key>SecureSocketWithKey</key> + <string>DBUS_LAUNCHD_SESSION_BUS_SOCKET</string> + </dict> + </dict> +</dict> +</plist> diff --git a/bus/policy.c b/bus/policy.c index bc1d2d9d..a1fff861 100644 --- a/bus/policy.c +++ b/bus/policy.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "policy.h" #include "services.h" #include "test.h" @@ -168,13 +169,13 @@ bus_policy_new (void) policy->refcount = 1; - policy->rules_by_uid = _dbus_hash_table_new (DBUS_HASH_ULONG, + policy->rules_by_uid = _dbus_hash_table_new (DBUS_HASH_UINTPTR, NULL, free_rule_list_func); if (policy->rules_by_uid == NULL) goto failed; - policy->rules_by_gid = _dbus_hash_table_new (DBUS_HASH_ULONG, + policy->rules_by_gid = _dbus_hash_table_new (DBUS_HASH_UINTPTR, NULL, free_rule_list_func); if (policy->rules_by_gid == NULL) @@ -303,7 +304,7 @@ bus_policy_create_client_policy (BusPolicy *policy, { DBusList **list; - list = _dbus_hash_table_lookup_ulong (policy->rules_by_gid, + list = _dbus_hash_table_lookup_uintptr (policy->rules_by_gid, groups[i]); if (list != NULL) @@ -327,7 +328,7 @@ bus_policy_create_client_policy (BusPolicy *policy, { DBusList **list; - list = _dbus_hash_table_lookup_ulong (policy->rules_by_uid, + list = _dbus_hash_table_lookup_uintptr (policy->rules_by_uid, uid); if (list != NULL) @@ -517,7 +518,7 @@ get_list (DBusHashTable *hash, { DBusList **list; - list = _dbus_hash_table_lookup_ulong (hash, key); + list = _dbus_hash_table_lookup_uintptr (hash, key); if (list == NULL) { @@ -525,7 +526,7 @@ get_list (DBusHashTable *hash, if (list == NULL) return NULL; - if (!_dbus_hash_table_insert_ulong (hash, key, list)) + if (!_dbus_hash_table_insert_uintptr (hash, key, list)) { dbus_free (list); return NULL; @@ -638,7 +639,7 @@ merge_id_hash (DBusHashTable *dest, _dbus_hash_iter_init (to_absorb, &iter); while (_dbus_hash_iter_next (&iter)) { - unsigned long id = _dbus_hash_iter_get_ulong_key (&iter); + unsigned long id = _dbus_hash_iter_get_uintptr_key (&iter); DBusList **list = _dbus_hash_iter_get_value (&iter); DBusList **target = get_list (dest, id); diff --git a/bus/rc.messagebus.in b/bus/rc.messagebus.in index b147503d..c52ca777 100644 --- a/bus/rc.messagebus.in +++ b/bus/rc.messagebus.in @@ -61,7 +61,7 @@ case "$1" in stop ;; status) - status $processname + status $servicename RETVAL=$? ;; restart) diff --git a/bus/selinux.c b/bus/selinux.c index 5a9af5ac..fe04063a 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -20,9 +20,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include <dbus/dbus-internals.h> #include <dbus/dbus-string.h> +#ifndef DBUS_WIN #include <dbus/dbus-userdb.h> +#endif #include "selinux.h" #include "services.h" #include "policy.h" @@ -1088,4 +1092,3 @@ _dbus_change_to_daemon_user (const char *user, return TRUE; } #endif - diff --git a/bus/services.c b/bus/services.c index b260c633..0a049257 100644 --- a/bus/services.c +++ b/bus/services.c @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include <dbus/dbus-hash.h> #include <dbus/dbus-list.h> #include <dbus/dbus-mempool.h> diff --git a/bus/session.conf.in b/bus/session.conf.in index e7229ad5..e121ff93 100644 --- a/bus/session.conf.in +++ b/bus/session.conf.in @@ -12,7 +12,7 @@ the behavior of child processes. --> <keep_umask/> - <listen>unix:tmpdir=@DBUS_SESSION_SOCKET_DIR@</listen> + <listen>@DBUS_SESSION_BUS_DEFAULT_ADDRESS@</listen> <standard_session_servicedirs /> @@ -45,8 +45,11 @@ <!-- the memory limits are 1G instead of say 4G because they can't exceed 32-bit signed int max --> <limit name="max_incoming_bytes">1000000000</limit> + <limit name="max_incoming_unix_fds">250000000</limit> <limit name="max_outgoing_bytes">1000000000</limit> + <limit name="max_outgoing_unix_fds">250000000</limit> <limit name="max_message_size">1000000000</limit> + <limit name="max_message_unix_fds">4096</limit> <limit name="service_start_timeout">120000</limit> <limit name="auth_timeout">240000</limit> <limit name="max_completed_connections">100000</limit> diff --git a/bus/signals.c b/bus/signals.c index b020a76c..6f97b2b3 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "signals.h" #include "services.h" #include "utils.h" @@ -1018,25 +1020,173 @@ bus_match_rule_parse (DBusConnection *matches_go_to, return rule; } +typedef struct RulePool RulePool; +struct RulePool +{ + /* Maps non-NULL interface names to non-NULL (DBusList **)s */ + DBusHashTable *rules_by_iface; + + /* List of BusMatchRules which don't specify an interface */ + DBusList *rules_without_iface; +}; + struct BusMatchmaker { int refcount; - DBusList *all_rules; + /* Pools of rules, grouped by the type of message they match. 0 + * (DBUS_MESSAGE_TYPE_INVALID) represents rules that do not specify a message + * type. + */ + RulePool rules_by_type[DBUS_NUM_MESSAGE_TYPES]; }; +static void +rule_list_free (DBusList **rules) +{ + while (*rules != NULL) + { + BusMatchRule *rule; + + rule = (*rules)->data; + bus_match_rule_unref (rule); + _dbus_list_remove_link (rules, *rules); + } +} + +static void +rule_list_ptr_free (DBusList **list) +{ + /* We have to cope with NULL because the hash table frees the "existing" + * value (which is NULL) when creating a new table entry... + */ + if (list != NULL) + { + rule_list_free (list); + dbus_free (list); + } +} + BusMatchmaker* bus_matchmaker_new (void) { BusMatchmaker *matchmaker; + int i; matchmaker = dbus_new0 (BusMatchmaker, 1); if (matchmaker == NULL) return NULL; matchmaker->refcount = 1; - + + for (i = DBUS_MESSAGE_TYPE_INVALID; i < DBUS_NUM_MESSAGE_TYPES; i++) + { + RulePool *p = matchmaker->rules_by_type + i; + + p->rules_by_iface = _dbus_hash_table_new (DBUS_HASH_STRING, + dbus_free, (DBusFreeFunction) rule_list_ptr_free); + + if (p->rules_by_iface == NULL) + goto nomem; + } + return matchmaker; + + nomem: + for (i = DBUS_MESSAGE_TYPE_INVALID; i < DBUS_NUM_MESSAGE_TYPES; i++) + { + RulePool *p = matchmaker->rules_by_type + i; + + if (p->rules_by_iface == NULL) + break; + else + _dbus_hash_table_unref (p->rules_by_iface); + } + + return NULL; +} + +static DBusList ** +bus_matchmaker_get_rules (BusMatchmaker *matchmaker, + int message_type, + const char *interface, + dbus_bool_t create) +{ + RulePool *p; + + _dbus_assert (message_type >= 0); + _dbus_assert (message_type < DBUS_NUM_MESSAGE_TYPES); + + _dbus_verbose ("Looking up rules for message_type %d, interface %s\n", + message_type, + interface != NULL ? interface : "<null>"); + + p = matchmaker->rules_by_type + message_type; + + if (interface == NULL) + { + return &p->rules_without_iface; + } + else + { + DBusList **list; + + list = _dbus_hash_table_lookup_string (p->rules_by_iface, interface); + + if (list == NULL && create) + { + char *dupped_interface; + + list = dbus_new0 (DBusList *, 1); + if (list == NULL) + return NULL; + + dupped_interface = _dbus_strdup (interface); + if (dupped_interface == NULL) + { + dbus_free (list); + return NULL; + } + + _dbus_verbose ("Adding list for type %d, iface %s\n", message_type, + interface); + + if (!_dbus_hash_table_insert_string (p->rules_by_iface, + dupped_interface, list)) + { + dbus_free (list); + dbus_free (dupped_interface); + return NULL; + } + } + + return list; + } +} + +static void +bus_matchmaker_gc_rules (BusMatchmaker *matchmaker, + int message_type, + const char *interface, + DBusList **rules) +{ + RulePool *p; + + if (interface == NULL) + return; + + if (*rules != NULL) + return; + + _dbus_verbose ("GCing HT entry for message_type %u, interface %s\n", + message_type, interface); + + p = matchmaker->rules_by_type + message_type; + + _dbus_assert (_dbus_hash_table_lookup_string (p->rules_by_iface, interface) + == rules); + + _dbus_hash_table_remove_string (p->rules_by_iface, interface); } BusMatchmaker * @@ -1057,14 +1207,14 @@ bus_matchmaker_unref (BusMatchmaker *matchmaker) matchmaker->refcount -= 1; if (matchmaker->refcount == 0) { - while (matchmaker->all_rules != NULL) + int i; + + for (i = DBUS_MESSAGE_TYPE_INVALID; i < DBUS_NUM_MESSAGE_TYPES; i++) { - BusMatchRule *rule; + RulePool *p = matchmaker->rules_by_type + i; - rule = matchmaker->all_rules->data; - bus_match_rule_unref (rule); - _dbus_list_remove_link (&matchmaker->all_rules, - matchmaker->all_rules); + _dbus_hash_table_unref (p->rules_by_iface); + rule_list_free (&p->rules_without_iface); } dbus_free (matchmaker); @@ -1076,17 +1226,31 @@ dbus_bool_t bus_matchmaker_add_rule (BusMatchmaker *matchmaker, BusMatchRule *rule) { + DBusList **rules; + _dbus_assert (bus_connection_is_active (rule->matches_go_to)); - if (!_dbus_list_append (&matchmaker->all_rules, rule)) + _dbus_verbose ("Adding rule with message_type %d, interface %s\n", + rule->message_type, + rule->interface != NULL ? rule->interface : "<null>"); + + rules = bus_matchmaker_get_rules (matchmaker, rule->message_type, + rule->interface, TRUE); + + if (rules == NULL) + return FALSE; + + if (!_dbus_list_append (rules, rule)) return FALSE; if (!bus_connection_add_match_rule (rule->matches_go_to, rule)) { - _dbus_list_remove_last (&matchmaker->all_rules, rule); + _dbus_list_remove_last (rules, rule); + bus_matchmaker_gc_rules (matchmaker, rule->message_type, + rule->interface, rules); return FALSE; } - + bus_match_rule_ref (rule); #ifdef DBUS_ENABLE_VERBOSE_MODE @@ -1171,13 +1335,13 @@ match_rule_equal (BusMatchRule *a, } static void -bus_matchmaker_remove_rule_link (BusMatchmaker *matchmaker, +bus_matchmaker_remove_rule_link (DBusList **rules, DBusList *link) { BusMatchRule *rule = link->data; bus_connection_remove_match_rule (rule->matches_go_to, rule); - _dbus_list_remove_link (&matchmaker->all_rules, link); + _dbus_list_remove_link (rules, link); #ifdef DBUS_ENABLE_VERBOSE_MODE { @@ -1196,8 +1360,25 @@ void bus_matchmaker_remove_rule (BusMatchmaker *matchmaker, BusMatchRule *rule) { + DBusList **rules; + + _dbus_verbose ("Removing rule with message_type %d, interface %s\n", + rule->message_type, + rule->interface != NULL ? rule->interface : "<null>"); + bus_connection_remove_match_rule (rule->matches_go_to, rule); - _dbus_list_remove (&matchmaker->all_rules, rule); + + rules = bus_matchmaker_get_rules (matchmaker, rule->message_type, + rule->interface, FALSE); + + /* We should only be asked to remove a rule by identity right after it was + * added, so there should be a list for it. + */ + _dbus_assert (rules != NULL); + + _dbus_list_remove (rules, rule); + bus_matchmaker_gc_rules (matchmaker, rule->message_type, rule->interface, + rules); #ifdef DBUS_ENABLE_VERBOSE_MODE { @@ -1218,29 +1399,38 @@ bus_matchmaker_remove_rule_by_value (BusMatchmaker *matchmaker, BusMatchRule *value, DBusError *error) { - /* FIXME this is an unoptimized linear scan */ + DBusList **rules; + DBusList *link = NULL; - DBusList *link; + _dbus_verbose ("Removing rule by value with message_type %d, interface %s\n", + value->message_type, + value->interface != NULL ? value->interface : "<null>"); - /* we traverse backward because bus_connection_remove_match_rule() - * removes the most-recently-added rule - */ - link = _dbus_list_get_last_link (&matchmaker->all_rules); - while (link != NULL) + rules = bus_matchmaker_get_rules (matchmaker, value->message_type, + value->interface, FALSE); + + if (rules != NULL) { - BusMatchRule *rule; - DBusList *prev; + /* we traverse backward because bus_connection_remove_match_rule() + * removes the most-recently-added rule + */ + link = _dbus_list_get_last_link (rules); + while (link != NULL) + { + BusMatchRule *rule; + DBusList *prev; - rule = link->data; - prev = _dbus_list_get_prev_link (&matchmaker->all_rules, link); + rule = link->data; + prev = _dbus_list_get_prev_link (rules, link); - if (match_rule_equal (rule, value)) - { - bus_matchmaker_remove_rule_link (matchmaker, link); - break; - } + if (match_rule_equal (rule, value)) + { + bus_matchmaker_remove_rule_link (rules, link); + break; + } - link = prev; + link = prev; + } } if (link == NULL) @@ -1250,38 +1440,30 @@ bus_matchmaker_remove_rule_by_value (BusMatchmaker *matchmaker, return FALSE; } + bus_matchmaker_gc_rules (matchmaker, value->message_type, value->interface, + rules); + return TRUE; } -void -bus_matchmaker_disconnected (BusMatchmaker *matchmaker, - DBusConnection *disconnected) +static void +rule_list_remove_by_connection (DBusList **rules, + DBusConnection *connection) { DBusList *link; - /* FIXME - * - * This scans all match rules on the bus. We could avoid that - * for the rules belonging to the connection, since we keep - * a list of those; but for the rules that just refer to - * the connection we'd need to do something more elaborate. - * - */ - - _dbus_assert (bus_connection_is_active (disconnected)); - - link = _dbus_list_get_first_link (&matchmaker->all_rules); + link = _dbus_list_get_first_link (rules); while (link != NULL) { BusMatchRule *rule; DBusList *next; rule = link->data; - next = _dbus_list_get_next_link (&matchmaker->all_rules, link); + next = _dbus_list_get_next_link (rules, link); - if (rule->matches_go_to == disconnected) + if (rule->matches_go_to == connection) { - bus_matchmaker_remove_rule_link (matchmaker, link); + bus_matchmaker_remove_rule_link (rules, link); } else if (((rule->flags & BUS_MATCH_SENDER) && *rule->sender == ':') || ((rule->flags & BUS_MATCH_DESTINATION) && *rule->destination == ':')) @@ -1292,7 +1474,7 @@ bus_matchmaker_disconnected (BusMatchmaker *matchmaker, */ const char *name; - name = bus_connection_get_name (disconnected); + name = bus_connection_get_name (connection); _dbus_assert (name != NULL); /* because we're an active connection */ if (((rule->flags & BUS_MATCH_SENDER) && @@ -1300,7 +1482,7 @@ bus_matchmaker_disconnected (BusMatchmaker *matchmaker, ((rule->flags & BUS_MATCH_DESTINATION) && strcmp (rule->destination, name) == 0)) { - bus_matchmaker_remove_rule_link (matchmaker, link); + bus_matchmaker_remove_rule_link (rules, link); } } @@ -1308,6 +1490,44 @@ bus_matchmaker_disconnected (BusMatchmaker *matchmaker, } } +void +bus_matchmaker_disconnected (BusMatchmaker *matchmaker, + DBusConnection *connection) +{ + int i; + + /* FIXME + * + * This scans all match rules on the bus. We could avoid that + * for the rules belonging to the connection, since we keep + * a list of those; but for the rules that just refer to + * the connection we'd need to do something more elaborate. + */ + + _dbus_assert (bus_connection_is_active (connection)); + + _dbus_verbose ("Removing all rules for connection %p\n", connection); + + for (i = DBUS_MESSAGE_TYPE_INVALID; i < DBUS_NUM_MESSAGE_TYPES; i++) + { + RulePool *p = matchmaker->rules_by_type + i; + DBusHashIter iter; + + rule_list_remove_by_connection (&p->rules_without_iface, connection); + + _dbus_hash_iter_init (p->rules_by_iface, &iter); + while (_dbus_hash_iter_next (&iter)) + { + DBusList **items = _dbus_hash_iter_get_value (&iter); + + rule_list_remove_by_connection (items, connection); + + if (*items == NULL) + _dbus_hash_iter_remove_entry (&iter); + } + } +} + static dbus_bool_t connection_is_primary_owner (DBusConnection *connection, const char *service_name) @@ -1333,8 +1553,11 @@ static dbus_bool_t match_rule_matches (BusMatchRule *rule, DBusConnection *sender, DBusConnection *addressed_recipient, - DBusMessage *message) + DBusMessage *message, + BusMatchFlags already_matched) { + int flags; + /* All features of the match rule are AND'd together, * so FALSE if any of them don't match. */ @@ -1343,8 +1566,11 @@ match_rule_matches (BusMatchRule *rule, * or for addressed_recipient may mean a message with no * specific recipient (i.e. a signal) */ - - if (rule->flags & BUS_MATCH_MESSAGE_TYPE) + + /* Don't bother re-matching features we've already checked implicitly. */ + flags = rule->flags & (~already_matched); + + if (flags & BUS_MATCH_MESSAGE_TYPE) { _dbus_assert (rule->message_type != DBUS_MESSAGE_TYPE_INVALID); @@ -1352,7 +1578,7 @@ match_rule_matches (BusMatchRule *rule, return FALSE; } - if (rule->flags & BUS_MATCH_INTERFACE) + if (flags & BUS_MATCH_INTERFACE) { const char *iface; @@ -1366,7 +1592,7 @@ match_rule_matches (BusMatchRule *rule, return FALSE; } - if (rule->flags & BUS_MATCH_MEMBER) + if (flags & BUS_MATCH_MEMBER) { const char *member; @@ -1380,7 +1606,7 @@ match_rule_matches (BusMatchRule *rule, return FALSE; } - if (rule->flags & BUS_MATCH_SENDER) + if (flags & BUS_MATCH_SENDER) { _dbus_assert (rule->sender != NULL); @@ -1397,7 +1623,7 @@ match_rule_matches (BusMatchRule *rule, } } - if (rule->flags & BUS_MATCH_DESTINATION) + if (flags & BUS_MATCH_DESTINATION) { const char *destination; @@ -1420,7 +1646,7 @@ match_rule_matches (BusMatchRule *rule, } } - if (rule->flags & BUS_MATCH_PATH) + if (flags & BUS_MATCH_PATH) { const char *path; @@ -1434,7 +1660,7 @@ match_rule_matches (BusMatchRule *rule, return FALSE; } - if (rule->flags & BUS_MATCH_ARGS) + if (flags & BUS_MATCH_ARGS) { int i; DBusMessageIter iter; @@ -1504,38 +1730,19 @@ match_rule_matches (BusMatchRule *rule, return TRUE; } -dbus_bool_t -bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, - BusConnections *connections, - DBusConnection *sender, - DBusConnection *addressed_recipient, - DBusMessage *message, - DBusList **recipients_p) +static dbus_bool_t +get_recipients_from_list (DBusList **rules, + DBusConnection *sender, + DBusConnection *addressed_recipient, + DBusMessage *message, + DBusList **recipients_p) { - /* FIXME for now this is a wholly unoptimized linear search */ - /* Guessing the important optimization is to skip the signal-related - * match lists when processing method call and exception messages. - * So separate match rule lists for signals? - */ - DBusList *link; - _dbus_assert (*recipients_p == NULL); + if (rules == NULL) + return TRUE; - /* This avoids sending same message to the same connection twice. - * Purpose of the stamp instead of a bool is to avoid iterating over - * all connections resetting the bool each time. - */ - bus_connections_increment_stamp (connections); - - /* addressed_recipient is already receiving the message, don't add to list. - * NULL addressed_recipient means either bus driver, or this is a signal - * and thus lacks a specific addressed_recipient. - */ - if (addressed_recipient != NULL) - bus_connection_mark_stamp (addressed_recipient); - - link = _dbus_list_get_first_link (&matchmaker->all_rules); + link = _dbus_list_get_first_link (rules); while (link != NULL) { BusMatchRule *rule; @@ -1545,23 +1752,24 @@ bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, #ifdef DBUS_ENABLE_VERBOSE_MODE { char *s = match_rule_to_string (rule); - + _dbus_verbose ("Checking whether message matches rule %s for connection %p\n", s, rule->matches_go_to); dbus_free (s); } #endif - + if (match_rule_matches (rule, - sender, addressed_recipient, message)) + sender, addressed_recipient, message, + BUS_MATCH_MESSAGE_TYPE | BUS_MATCH_INTERFACE)) { _dbus_verbose ("Rule matched\n"); - + /* Append to the list if we haven't already */ if (bus_connection_mark_stamp (rule->matches_go_to)) { if (!_dbus_list_append (recipients_p, rule->matches_go_to)) - goto nomem; + return FALSE; } #ifdef DBUS_ENABLE_VERBOSE_MODE else @@ -1571,14 +1779,72 @@ bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, #endif /* DBUS_ENABLE_VERBOSE_MODE */ } - link = _dbus_list_get_next_link (&matchmaker->all_rules, link); + link = _dbus_list_get_next_link (rules, link); } return TRUE; +} - nomem: - _dbus_list_clear (recipients_p); - return FALSE; +dbus_bool_t +bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, + BusConnections *connections, + DBusConnection *sender, + DBusConnection *addressed_recipient, + DBusMessage *message, + DBusList **recipients_p) +{ + int type; + const char *interface; + DBusList **neither, **just_type, **just_iface, **both; + + _dbus_assert (*recipients_p == NULL); + + /* This avoids sending same message to the same connection twice. + * Purpose of the stamp instead of a bool is to avoid iterating over + * all connections resetting the bool each time. + */ + bus_connections_increment_stamp (connections); + + /* addressed_recipient is already receiving the message, don't add to list. + * NULL addressed_recipient means either bus driver, or this is a signal + * and thus lacks a specific addressed_recipient. + */ + if (addressed_recipient != NULL) + bus_connection_mark_stamp (addressed_recipient); + + type = dbus_message_get_type (message); + interface = dbus_message_get_interface (message); + + neither = bus_matchmaker_get_rules (matchmaker, DBUS_MESSAGE_TYPE_INVALID, + NULL, FALSE); + just_type = just_iface = both = NULL; + + if (interface != NULL) + just_iface = bus_matchmaker_get_rules (matchmaker, + DBUS_MESSAGE_TYPE_INVALID, interface, FALSE); + + if (type > DBUS_MESSAGE_TYPE_INVALID && type < DBUS_NUM_MESSAGE_TYPES) + { + just_type = bus_matchmaker_get_rules (matchmaker, type, NULL, FALSE); + + if (interface != NULL) + both = bus_matchmaker_get_rules (matchmaker, type, interface, FALSE); + } + + if (!(get_recipients_from_list (neither, sender, addressed_recipient, + message, recipients_p) && + get_recipients_from_list (just_iface, sender, addressed_recipient, + message, recipients_p) && + get_recipients_from_list (just_type, sender, addressed_recipient, + message, recipients_p) && + get_recipients_from_list (both, sender, addressed_recipient, + message, recipients_p))) + { + _dbus_list_clear (recipients_p); + return FALSE; + } + + return TRUE; } #ifdef DBUS_BUILD_TESTS @@ -1943,7 +2209,7 @@ check_matches (dbus_bool_t expected_to_match, _dbus_assert (rule != NULL); /* We can't test sender/destination rules since we pass NULL here */ - matched = match_rule_matches (rule, NULL, NULL, message); + matched = match_rule_matches (rule, NULL, NULL, message, 0); if (matched != expected_to_match) { diff --git a/bus/signals.h b/bus/signals.h index 4ea10755..eeb1d2d0 100644 --- a/bus/signals.h +++ b/bus/signals.h @@ -77,7 +77,7 @@ dbus_bool_t bus_matchmaker_remove_rule_by_value (BusMatchmaker *matchmaker, void bus_matchmaker_remove_rule (BusMatchmaker *matchmaker, BusMatchRule *rule); void bus_matchmaker_disconnected (BusMatchmaker *matchmaker, - DBusConnection *disconnected); + DBusConnection *connection); dbus_bool_t bus_matchmaker_get_recipients (BusMatchmaker *matchmaker, BusConnections *connections, DBusConnection *sender, diff --git a/bus/test-launch-helper.c b/bus/test-launch-helper.c index d78ca519..ab36b6ec 100644 --- a/bus/test-launch-helper.c +++ b/bus/test-launch-helper.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "test.h" #include "activation-helper.h" diff --git a/bus/test-main.c b/bus/test-main.c index f19d0d55..cb0ed008 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -21,12 +21,14 @@ * */ +#include <config.h> #include "test.h" #include <stdio.h> #include <stdlib.h> #include <dbus/dbus-string.h> #include <dbus/dbus-sysdeps.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-message-private.h> #include "selinux.h" #ifdef DBUS_BUILD_TESTS @@ -69,6 +71,7 @@ test_post_hook (void) if (_dbus_getenv ("DBUS_TEST_SELINUX")) bus_selinux_shutdown (); check_memleaks (progname); + _dbus_check_fdleaks(); } int @@ -138,6 +141,14 @@ main (int argc, char **argv) die ("service reload"); test_post_hook (); +#ifdef HAVE_UNIX_FD_PASSING + test_pre_hook (); + printf ("%s: Running unix fd passing test\n", argv[0]); + if (!bus_unix_fds_passing_test (&test_data_dir)) + die ("unix fd passing"); + test_post_hook (); +#endif + printf ("%s: Success\n", argv[0]); diff --git a/bus/test-system.c b/bus/test-system.c index 6224ab5e..56a7d4ea 100644 --- a/bus/test-system.c +++ b/bus/test-system.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "test.h" #include <stdio.h> #include <stdlib.h> @@ -4,7 +4,7 @@ * Copyright (C) 2003 Red Hat, Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,7 +14,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -45,7 +45,7 @@ client_watch_callback (DBusWatch *watch, * if the code in activation.c for the babysitter * watch handler is fixed. */ - + return dbus_watch_handle (watch, condition); } @@ -54,7 +54,7 @@ add_client_watch (DBusWatch *watch, void *data) { DBusConnection *connection = data; - + return _dbus_loop_add_watch (client_loop, watch, client_watch_callback, connection, NULL); @@ -65,7 +65,7 @@ remove_client_watch (DBusWatch *watch, void *data) { DBusConnection *connection = data; - + _dbus_loop_remove_watch (client_loop, watch, client_watch_callback, connection); } @@ -89,7 +89,7 @@ add_client_timeout (DBusTimeout *timeout, void *data) { DBusConnection *connection = data; - + return _dbus_loop_add_timeout (client_loop, timeout, client_timeout_callback, connection, NULL); } @@ -98,7 +98,7 @@ remove_client_timeout (DBusTimeout *timeout, void *data) { DBusConnection *connection = data; - + _dbus_loop_remove_timeout (client_loop, timeout, client_timeout_callback, connection); } @@ -111,27 +111,27 @@ client_disconnect_filter (DBusConnection *connection, DBUS_INTERFACE_LOCAL, "Disconnected")) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - + _dbus_verbose ("Removing client %p in disconnect handler\n", connection); - + _dbus_list_remove (&clients, connection); dbus_connection_unref (connection); - + if (clients == NULL) { _dbus_loop_unref (client_loop); client_loop = NULL; } - + return DBUS_HANDLER_RESULT_HANDLED; } dbus_bool_t bus_setup_debug_client (DBusConnection *connection) { - dbus_bool_t retval; + dbus_bool_t retval; if (!dbus_connection_add_filter (connection, client_disconnect_filter, @@ -146,7 +146,7 @@ bus_setup_debug_client (DBusConnection *connection) if (client_loop == NULL) goto out; } - + if (!dbus_connection_set_watch_functions (connection, add_client_watch, remove_client_watch, @@ -154,7 +154,7 @@ bus_setup_debug_client (DBusConnection *connection) connection, NULL)) goto out; - + if (!dbus_connection_set_timeout_functions (connection, add_client_timeout, remove_client_timeout, @@ -164,16 +164,16 @@ bus_setup_debug_client (DBusConnection *connection) if (!_dbus_list_append (&clients, connection)) goto out; - + retval = TRUE; - + out: if (!retval) { dbus_connection_remove_filter (connection, client_disconnect_filter, NULL); - + dbus_connection_set_watch_functions (connection, NULL, NULL, NULL, NULL, NULL); dbus_connection_set_timeout_functions (connection, @@ -187,7 +187,7 @@ bus_setup_debug_client (DBusConnection *connection) client_loop = NULL; } } - + return retval; } @@ -196,7 +196,7 @@ bus_test_clients_foreach (BusConnectionForeachFunction function, void *data) { DBusList *link; - + link = _dbus_list_get_first_link (&clients); while (link != NULL) { @@ -205,7 +205,7 @@ bus_test_clients_foreach (BusConnectionForeachFunction function, if (!(* function) (connection, data)) break; - + link = next; } } @@ -214,7 +214,7 @@ dbus_bool_t bus_test_client_listed (DBusConnection *connection) { DBusList *link; - + link = _dbus_list_get_first_link (&clients); while (link != NULL) { @@ -223,7 +223,7 @@ bus_test_client_listed (DBusConnection *connection) if (c == connection) return TRUE; - + link = next; } @@ -232,17 +232,17 @@ bus_test_client_listed (DBusConnection *connection) void bus_test_run_clients_loop (dbus_bool_t block_once) -{ +{ if (client_loop == NULL) return; _dbus_verbose ("---> Dispatching on \"client side\"\n"); - + /* dispatch before we block so pending dispatches * won't make our block return early */ _dbus_loop_dispatch (client_loop); - + /* Do one blocking wait, since we're expecting data */ if (block_once) { @@ -262,12 +262,12 @@ bus_test_run_bus_loop (BusContext *context, dbus_bool_t block_once) { _dbus_verbose ("---> Dispatching on \"server side\"\n"); - + /* dispatch before we block so pending dispatches * won't make our block return early */ _dbus_loop_dispatch (bus_context_get_loop (context)); - + /* Do one blocking wait, since we're expecting data */ if (block_once) { @@ -298,7 +298,7 @@ bus_context_new_test (const DBusString *test_data_dir, DBusString config_file; DBusString relative; BusContext *context; - + if (!_dbus_string_init (&config_file)) { _dbus_warn ("No memory\n"); @@ -321,25 +321,25 @@ bus_context_new_test (const DBusString *test_data_dir, _dbus_string_free (&config_file); return NULL; } - + dbus_error_init (&error); - context = bus_context_new (&config_file, FALSE, NULL, NULL, &error); + context = bus_context_new (&config_file, FALSE, NULL, NULL, NULL, FALSE, &error); if (context == NULL) { _DBUS_ASSERT_ERROR_IS_SET (&error); - + _dbus_warn ("Failed to create debug bus context from configuration file %s: %s\n", filename, error.message); dbus_error_free (&error); - + _dbus_string_free (&config_file); - + return NULL; } _dbus_string_free (&config_file); - + return context; } @@ -24,8 +24,6 @@ #ifndef BUS_TEST_H #define BUS_TEST_H -#include <config.h> - #ifdef DBUS_BUILD_TESTS #include <dbus/dbus.h> @@ -51,7 +49,9 @@ void bus_test_run_everything (BusContext *context); BusContext* bus_context_new_test (const DBusString *test_data_dir, const char *filename); - +#ifdef HAVE_UNIX_FD_PASSING +dbus_bool_t bus_unix_fds_passing_test (const DBusString *test_data_dir); +#endif #endif diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt new file mode 100644 index 00000000..c4e62d54 --- /dev/null +++ b/cmake/CMakeLists.txt @@ -0,0 +1,609 @@ +project(dbus) + +set (DBUS_MAJOR_VERSION "1") +set (DBUS_MINOR_VERSION "4") +set (DBUS_MICRO_VERSION "1") +# used by file version info +set (DBUS_PATCH_VERSION "0") +set (DBUS_VERSION ${DBUS_MAJOR_VERSION}.${DBUS_MINOR_VERSION}.${DBUS_MICRO_VERSION}) + +set (DBUS_VERSION_STRING "${DBUS_VERSION}") + +if (NOT DBUS_BUILD_TIMESTAMP) + message(STATUS "FIXME set DBUS_BUILD_TIMESTAMP to current date or fix current time stamp generation for having actual build date in version file info") + set (DBUS_BUILD_TIMESTAMP 20091231) +endif (NOT DBUS_BUILD_TIMESTAMP) + +# we need to be up to date +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR) +if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +endif(COMMAND cmake_policy) + +# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") + +########### basic vars ############### + + +if (DBUSDIR) + set(DBUS_INSTALL_DIR "${DBUSDIR}") +endif (DBUSDIR) +if ($ENV{DBUSDIR}) + set(DBUS_INSTALL_DIR "$ENV{DBUSDIR}") +endif ($ENV{DBUSDIR}) + +if (DBUS_INSTALL_DIR) + set(CMAKE_INSTALL_PREFIX "${DBUS_INSTALL_DIR}" CACHE TYPE PATH FORCE) +else (DBUS_INSTALL_DIR) + set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}") +endif (DBUS_INSTALL_DIR) + +# autotools style +if (NOT DATAROOTDIR) + set (DATAROOTDIR share) +endif() + +if (NOT DATADIR) + set (DATADIR ${DATAROOTDIR}) +endif() + +if (NOT DOCDIR) + SET(DOCDIR ${DATAROOTDIR}/doc/dbus) +endif() + +if (NOT DBUS_DATADIR) + SET(DBUS_DATADIR ${DATADIR}) +endif() + +set(prefix ${DBUS_INSTALL_DIR}) +set(exec_prefix ${prefix}) +set(EXPANDED_LIBDIR ${DBUS_INSTALL_DIR}/lib) +set(EXPANDED_INCLUDEDIR ${DBUS_INSTALL_DIR}/include) +set(EXPANDED_BINDIR ${DBUS_INSTALL_DIR}/bin) +set(EXPANDED_SYSCONFDIR ${DBUS_INSTALL_DIR}/etc) +set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR}) +set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id) +set(DBUS_BINDIR ${EXPANDED_BINDIR}) +set(DBUS_DAEMONDIR ${EXPANDED_BINDIR}) + + +#enable building of shared library +SET(BUILD_SHARED_LIBS ON) + +if (CYGWIN) + set (WIN32) +endif (CYGWIN) + +# search for required packages +if (WIN32) + # include local header first to avoid using old installed header + set (CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/..) + find_package(LibIconv) + include(Win32Macros) + addExplorerWrapper(${CMAKE_PROJECT_NAME}) +endif (WIN32) +find_package(LibXml2) +find_package(LibExpat) +find_package(X11) + +if(NOT WIN32) + OPTION(DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON) +endif(NOT WIN32) + +#AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) +OPTION(DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF) + +# do config checks +INCLUDE(ConfigureChecks.cmake) + +# @TODO: how to remove last dir from ${CMAKE_SOURCE_DIR} ? +SET(DBUS_SOURCE_DIR ${CMAKE_SOURCE_DIR}/..) + +# make some more macros available +include (MacroLibrary) + +if(VCS) + set(DBUS_VERBOSE_C_S 1 CACHE TYPE STRING FORCE) + set(DBUS_VERBOSE_C_S 1) +endif(VCS) + +if(WIN32) + set(CMAKE_DEBUG_POSTFIX "d") + if(MSVC) + # controll folders in msvc projects + include(ProjectSourceGroup) + if(NOT GROUP_CODE) + #set(GROUP_CODE split) #cmake default + set(GROUP_CODE flat) + endif(NOT GROUP_CODE) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + + + # Use the highest warning level + if (WALL) + set(WALL 1 CACHE TYPE STRING FORCE) + set(CMAKE_CXX_WARNING_LEVEL 4 CACHE TYPE STRING FORCE) + + if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + + if(CMAKE_C_FLAGS MATCHES "/W[0-4]") + STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + else(CMAKE_C_FLAGS MATCHES "/W[0-4]") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + endif(CMAKE_C_FLAGS MATCHES "/W[0-4]") + else (WALL) + set(CMAKE_CXX_WARNING_LEVEL 3 CACHE TYPE STRING FORCE) + endif (WALL) + + SET(MSVC_W_ERROR " /we4028 /we4013 /we4133 /we4047 /we4031 /we4002 /we4003 /we4114") + SET(MSVC_W_DISABLE " /wd4127 /wd4090 /wd4101 /wd4244") + + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}") + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /FIconfig.h ${MSVC_W_ERROR} ${MSVC_W_DISABLE}") + endif(MSVC) +endif(WIN32) + +if (UNIX AND NOT DBUS_DISABLE_ASSERTS) + # required for backtrace + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic") + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic") + add_definitions(-DDBUS_BUILT_R_DYNAMIC) +endif (UNIX AND NOT DBUS_DISABLE_ASSERTS) + +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") + +######################################################################### +# Windows CE (>= 5.0.0) +# +# WinCE support now relies on the presence of platform files, found in cmake/modules/platform +# Cmake 2.8.0 doesn't include WinCE platform files by default, but working ones can be found +# on CMake's bugtracker : +# http://public.kitware.com/Bug/view.php?id=7919 +# +# for cmake 2.8.0 get the following patch only : +# http://public.kitware.com/Bug/file_download.php?file_id=2944&type=bug +# +# after applying the patch, you can enable the WinCE build by specifying : +# cmake [...] -DCMAKE_SYSTEM_NAME=WinCE -DCMAKE_SYSTEM_VERSION=X.XX +# (where X.XX is your actual WinCE version, e.g. 5.02 for Windows Mobile 6) +# +# Note that you should have a proper cross-compilation environment set up prior to running +# cmake, ie. the PATH, INCLUDE and LIB env vars pointing to your CE SDK/toolchain. +# +if(WINCE) + +MESSAGE("Building for WinCE (${CMAKE_SYSTEM_VERSION})") + +endif(WINCE) +######################################################################### + + +ENABLE_TESTING() + +######################################################################### +# Disallow in-source build +#macro_ensure_out_of_source_build("dbus requires an out of source build. Please create a separate build directory and run 'cmake path_to_dbus [options]' there.") + +# ... and warn in case of an earlier in-source build +#set(generatedFileInSourceDir EXISTS ${dbus_SOURCE_DIR}/config.h) +#if(${generatedFileInSourceDir}) +# message(STATUS "config.h exists in your source directory.") +#endif(${generatedFileInSourceDir}) +######################################################################### + +if (WIN32 OR CYGWIN) + set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) +else (WIN32 OR CYGWIN) + set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) +endif (WIN32 OR CYGWIN) + +set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) + +# for including config.h and for includes like <dir/foo.h> +include_directories( ${CMAKE_SOURCE_DIR}/.. ${CMAKE_BINARY_DIR} ${CMAKE_INCLUDE_PATH} ) + +# linker search directories +link_directories(${DBUS_LIB_DIR} ${LIBRARY_OUTPUT_PATH} ) +include_directories( ${CMAKE_LIBRARY_PATH} ) + +set(DBUS_INCLUDES) + +ENABLE_TESTING() + +########### command line options ############### +# TODO: take check from configure.in + +#AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) +OPTION(DBUS_BUILD_TESTS "enable unit test code" ON) + +if(DBUS_BUILD_TESTS) + add_definitions(-DDBUS_BUILD_TESTS) +endif(DBUS_BUILD_TESTS) + +OPTION(DBUS_USE_OUTPUT_DEBUG_STRING "enable win32 debug port for message output" OFF) +if(DBUS_USE_OUTPUT_DEBUG_STRING) + add_definitions(-DDBUS_USE_OUTPUT_DEBUG_STRING) +endif(DBUS_USE_OUTPUT_DEBUG_STRING) + +if(WIN32) + # win32 dbus service support - this support is not complete + OPTION(DBUS_SERVICE "enable dbus service installer" OFF) +endif(WIN32) + +#AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no) +OPTION(DBUS_ENABLE_ANSI "enable -ansi -pedantic gcc flags" OFF) +if(DBUS_ENABLE_ANSI) + if(NOT MSVC) + add_definitions(-ansi -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -pedantic) + else(NOT MSVC) + add_definitions(-Za -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -W4) + endif(NOT MSVC) +endif(DBUS_ENABLE_ANSI) + +#AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) +OPTION(DBUS_ENABLE_VERBOSE_MODE "support verbose debug mode" ON) + +#AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes) +OPTION(DBUS_DISABLE_CHECKS "Disable public API sanity checking" OFF) + +if(NOT MSVC) + #AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no) + OPTION(DBUS_GCOV_ENABLED "compile with coverage profiling instrumentation (gcc only)" OFF) + if(DBUS_GCOV_ENABLED) + add_definitions(-fprofile-arcs -ftest-coverage) + # FIXME!!!! + ## remove optimization + # CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'` + endif(DBUS_GCOV_ENABLED) +endif(NOT MSVC) + +#AC_ARG_ENABLE(abstract-sockets, AS_HELP_STRING([--enable-abstract-sockets],[use abstract socket namespace (linux only)]),enable_abstract_sockets=$enableval,enable_abstract_sockets=auto) +# -> moved before include(ConfigureChecks.cmake) + +#AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto) +#selinux missing + +#AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto) +if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + OPTION(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX "build with dnotify support (linux only)" ON) # add a check ! +endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + +#AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support (FreeBSD only)]),enable_kqueue=$enableval,enable_kqueue=auto) +#missing + +#AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto) +STRING(TOUPPER ${CMAKE_SYSTEM_NAME} sysname) +if("${sysname}" MATCHES ".*SOLARIS.*") + OPTION(HAVE_CONSOLE_OWNER_FILE "enable console owner file (solaris only)" ON) + if(HAVE_CONSOLE_OWNER_FILE) + SET(DBUS_CONSOLE_OWNER_FILE "/dev/console" CACHE STRING "Directory to check for console ownerhip") + endif(HAVE_CONSOLE_OWNER_FILE) +endif("${sysname}" MATCHES ".*SOLARIS.*") + +#AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use])) +if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND) + message(FATAL "Neither expat nor libxml2 found!") +endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND) + +if(LIBEXPAT_FOUND) + OPTION(DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON) +else(LIBEXPAT_FOUND) + OPTION(DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" OFF) +endif(LIBEXPAT_FOUND) + +if(DBUS_USE_EXPAT) + SET(XML_LIB "Expat") + SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES}) + SET(XML_INCLUDE_DIR ${LIBEXPAT_INCLUDE_DIR}) +else(DBUS_USE_EXPAT) + SET(XML_LIB "LibXML2") + SET(XML_LIBRARY ${LIBXML2_LIBRARIES}) + SET(XML_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR}) +endif(DBUS_USE_EXPAT) + + +#AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install])) +#AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus])) +#AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check])) +#AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon])) +#AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon])) +#AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip])) +#AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner])) +#AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)])) +#AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon])) +# all missing or hardcoded for now + +# 'hidden' ones +set(atomic_int OFF) +set(atomic_int486 OFF) +if(CMAKE_COMPILER_IS_GNUCC AND NOT DBUS_ENABLE_ANSI) + FIND_PROGRAM(UNAME_EXECUTABLE + NAMES uname + PATHS /bin /usr/bin /usr/local/bin c:/Programme/MSys/bin d:/Programme/MSys/bin) + + if(UNAME_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${UNAME_EXECUTABLE} "-m" + OUTPUT_VARIABLE UNAME_OUTPUT) + + if("UNAME_OUTPUT" MATCHES "^.*i[0123]86.*$") + set(atomic_int ON) + else("UNAME_OUTPUT" MATCHES "^.*i[0123]86.*$") + if("UNAME_OUTPUT" MATCHES "^.*i?86.*$") + set(atomic_int ON) + set(atomic_int_486 ON) + endif("UNAME_OUTPUT" MATCHES "^.*i?86.*$") + endif("UNAME_OUTPUT" MATCHES "^.*i[0123]86.*$") + endif(UNAME_EXECUTABLE) +endif(CMAKE_COMPILER_IS_GNUCC AND NOT DBUS_ENABLE_ANSI) + +OPTION(DBUS_HAVE_ATOMIC_INT "Some atomic integer implementation present" ${atomic_int}) +OPTION(DBUS_USE_ATOMIC_INT_486 "Use atomic integer implementation for 486" ${atomic_int_486}) + +if(X11_FOUND) + OPTION(DBUS_BUILD_X11 "Build X11-dependent code " ON) +endif(X11_FOUND) + +# test binary names +if (WIN32) + set (EXT ".exe") +endif(WIN32) + +if (MSVC_IDE) + if(CMAKE_BUILD_TYPE MATCHES Debug) + set(IDE_BIN Debug/ ) + message(STATUS) + message(STATUS "Visual Studio: test programs will only work with 'Debug' configuration!") + message(STATUS "To run tests with 'Release' configuration use -DCMAKE_BUILD_TYPE=Release") + message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs") + message(STATUS) + else(CMAKE_BUILD_TYPE MATCHES Debug) + set(IDE_BIN Release/) + message(STATUS) + message(STATUS "Visual Studio: test programs will only work with 'Release' configuration!") + message(STATUS "To run tests with 'Debug' configuration use -DCMAKE_BUILD_TYPE=Debug") + message(STATUS "Add '..\\..\\test\\data' to the command line option of the test programs") + message(STATUS) + endif(CMAKE_BUILD_TYPE MATCHES Debug) + set (TEST_PATH_FORCE FORCE) + FILE(REMOVE ${CMAKE_BINARY_DIR}/data/dbus-1/services) +endif (MSVC_IDE) + +set(TEST_SERVICE_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files CACHE STRING "Full path to test file test/data/valid-service-files in builddir" ) +set(TEST_SERVICE_BINARY ${CMAKE_BINARY_DIR}/bin/${IDE_BIN}test-service${EXT} CACHE STRING "Full path to test file test/test-service in builddir" ${TEST_PATH_FORCE}) +set(TEST_SHELL_SERVICE_BINARY ${CMAKE_BINARY_DIR}/bin/${IDE_BIN}test-shell-service${EXT} CACHE STRING "Full path to test file test/test-shell-service in builddir" ${TEST_PATH_FORCE}) +set(TEST_EXIT_BINARY ${CMAKE_BINARY_DIR}/bin/${IDE_BIN}test-exit${EXT} CACHE STRING "Full path to test file test/test-exit in builddir" ${TEST_PATH_FORCE}) +set(TEST_SEGFAULT_BINARY ${CMAKE_BINARY_DIR}/bin/${IDE_BIN}test-segfault${EXT} CACHE STRING "Full path to test file test/test-segfault in builddir" ${TEST_PATH_FORCE}) +set(TEST_SLEEP_FOREVER_BINARY ${CMAKE_BINARY_DIR}/bin/${IDE_BIN}test-sleep-forever${EXT} CACHE STRING "Full path to test file test/test-sleep-forever in builddir" ${TEST_PATH_FORCE}) + +#### Find socket directories + if (NOT $ENV{TMPDIR} STREQUAL "") + set (DBUS_SESSION_SOCKET_DIR $ENV{TMPDIR}) + else (NOT $ENV{TMPDIR} STREQUAL "") + if (NOT $ENV{TEMP} STREQUAL "") + set (DBUS_SESSION_SOCKET_DIR $ENV{TEMP}) + else (NOT $ENV{TEMP} STREQUAL "") + if (NOT $ENV{TMP} STREQUAL "") + set (DBUS_SESSION_SOCKET_DIR $ENV{TMP}) + else (NOT $ENV{TMP} STREQUAL "") + if (WIN32) + #Should never happen, both TMP and TEMP seem always set on Windows + message(FATAL "Could not determine a usable temporary directory") + else(WIN32) + set (DBUS_SESSION_SOCKET_DIR /tmp) + endif(WIN32) + endif (NOT $ENV{TMP} STREQUAL "") + endif (NOT $ENV{TEMP} STREQUAL "") + endif (NOT $ENV{TMPDIR} STREQUAL "") + +#AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check])) + +#AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon])) + +#if ! test -z "$with_system_pid_file"; then +# DBUS_SYSTEM_PID_FILE=$with_system_pid_file +#elif test x$operating_system = xredhat ; then +# DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid +#else +# DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid +#fi +# TODO: fix redhet +if (WIN32) + # bus-test expects a non empty string + set (DBUS_SYSTEM_PID_FILE "/dbus-pid") +else (WIN32) + set (DBUS_SYSTEM_PID_FILE ${EXPANDED_LOCALSTATEDIR}/run/dbus/pid) +endif (WIN32) + +#AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon])) + +#AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip])) + +if (WIN32) + set (DBUS_CONSOLE_AUTH_DIR "") +else (WIN32) + set (DBUS_CONSOLE_AUTH_DIR "/var/run/console/") +endif (WIN32) + +#AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)])) + +set (DBUS_USER ) + + +if (WIN32) + set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "nonce-tcp:" CACHE STRING "system bus default address" ) + set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "nonce-tcp:" CACHE STRING "session bus default address" ) + + set (DBUS_SYSTEM_CONFIG_FILE "etc/dbus-1/system.conf") + set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf") + # bus-test expects a non empty string + set (DBUS_USER "Administrator") +else (WIN32) + set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:tmpdir=" CACHE STRING "system bus default address" ) + set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "unix:path=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default address" ) + set (sysconfdir "") + set (configdir ${sysconfdir}/dbus-1 ) + set (DBUS_SYSTEM_CONFIG_FILE ${configdir}/system.conf) + set (DBUS_SESSION_CONFIG_FILE ${configdir}/session.conf) + set (DBUS_USER "root") +endif (WIN32) + +set(DBUS_DAEMON_NAME dbus-daemon CACHE STRING "The name of the dbus daemon executable") + +########### create config.h ############### + +#include(ConfigureChecks.cmake) + +# better use flags for gcc +if (MINGW) + set (HAVE_GNUC_VARARGS 1) +endif(MINGW) + +# compiler definitions +add_definitions(-DHAVE_CONFIG_H=1) +add_definitions(${DBUS_BUS_CFLAGS} -DDBUS_API_SUBJECT_TO_CHANGE) + + +if (DBUS_BUILD_TESTS) + # set variables used for the .in files (substituted by configure_file) in test/data: + set(TEST_VALID_SERVICE_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files) + set(TEST_VALID_SERVICE_SYSTEM_DIR ${CMAKE_BINARY_DIR}/test/data/valid-service-files-system) + set(TEST_INVALID_SERVICE_SYSTEM_DIR ${CMAKE_BINARY_DIR}/test/data/invalid-service-files-system) + set(TEST_SOCKET_DIR ${DBUS_SESSION_SOCKET_DIR} ) + set(TEST_LAUNCH_HELPER_BINARY ${EXECUTABLE_OUTPUT_PATH}/dbus-daemon-launch-helper-test) + set(TEST_PRIVSERVER_BINARY ${EXECUTABLE_OUTPUT_PATH}/test-privserver) + if (UNIX) + set (TEST_LISTEN "debug-pipe:name=test-server</listen><listen>unix:tmpdir=${TEST_SOCKET_DIR}") + set (TEST_CONNECTION "debug-pipe:name=test-server") + endif (UNIX) + if (WIN32) + set (TEST_LISTEN "tcp:host=localhost,port=12436") + set (TEST_CONNECTION "${TEST_LISTEN}") + endif (WIN32) +endif (DBUS_BUILD_TESTS) + +set(DBUS_LIBRARIES dbus-1) +set(DBUS_INTERNAL_LIBRARIES dbus-internal) + +# settings for building and using static internal lib +# important note: DBUS_INTERNAL_xxxxx_DEFINITIONS must *not* be set when building dbus-1 library +set (DBUS_INTERNAL_ADD_LIBRARY_OPTIONS STATIC) +set (DBUS_INTERNAL_LIBRARY_DEFINITIONS "-DDBUS_STATIC_BUILD") +set (DBUS_INTERNAL_CLIENT_DEFINITIONS "-DDBUS_STATIC_BUILD") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dbus-env.bat.cmake ${CMAKE_BINARY_DIR}/bin/dbus-env.bat ) +install_files(/bin FILES ${CMAKE_BINARY_DIR}/bin/dbus-env.bat) +add_definitions(-DHAVE_CONFIG_H=1) + +########### subdirs ############### + +add_subdirectory( dbus ) +add_subdirectory( bus ) +if (DBUS_BUILD_TESTS) + add_subdirectory( test ) +endif (DBUS_BUILD_TESTS) +add_subdirectory( tools ) +add_subdirectory( doc ) + + +OPTION(DBUS_INSTALL_SYSTEM_LIBS "install required system libraries" OFF) +MESSAGE(" ") +MESSAGE("set -DDBUS_INSTALL_SYSTEM_LIBS=1 to install runtime libraries too") +MESSAGE("set DBUSDIR (environment or cmake option) to overwrite the default install directory ") +MESSAGE(" ") +MESSAGE(" ") +GET_FILENAME_COMPONENT(C_COMPILER ${CMAKE_C_COMPILER} NAME) +GET_FILENAME_COMPONENT(CXX_COMPILER ${CMAKE_CXX_COMPILER} NAME) + +message(" D-BUS ${DBUS_VERSION} ") +message(" =========== ") +message(" ") +message(" install prefix: ${prefix} ") +message(" install exec_prefix: ${exec_prefix} ") +message(" install libdir: ${EXPANDED_LIBDIR} ") +message(" install bindir: ${EXPANDED_BINDIR} ") +message(" install sysconfdir: ${EXPANDED_SYSCONFDIR} ") +#message(" install localstatedir: ${EXPANDED_LOCALSTATEDIR} ") +message(" install datadir: ${EXPANDED_DATADIR} ") +message(" source code location: ${DBUS_SOURCE_DIR} ") +message(" build dir: ${CMAKE_BINARY_DIR} ") +message(" c compiler: ${C_COMPILER} ") +message(" cflags: ${CMAKE_C_FLAGS} ") +message(" cflags debug: ${CMAKE_C_FLAGS_DEBUG} ") +message(" cflags release: ${CMAKE_C_FLAGS_RELEASE} ") +message(" cxx compiler: ${CXX_COMPILER} ") +message(" cxxflags: ${CMAKE_CXX_FLAGS} ") +message(" cxxflags debug: ${CMAKE_CXX_FLAGS_DEBUG} ") +message(" cxxflags release: ${CMAKE_CXX_FLAGS_RELEASE} ") +message(" 64-bit int: ${DBUS_INT64_TYPE} ") +message(" 32-bit int: ${DBUS_INT32_TYPE} ") +message(" 16-bit int: ${DBUS_INT16_TYPE} ") +message(" Doxygen: ${DOXYGEN} ") +message(" Docbook Generator: ${DOCBOOK_GENERATOR_NAME} ") + + +#message(" Maintainer mode: ${USE_MAINTAINER_MODE} ") +message(" gcc coverage profiling: ${DBUS_GCOV_ENABLED} ") +message(" Building unit tests: ${DBUS_BUILD_TESTS} ") +message(" Building verbose mode: ${DBUS_ENABLE_VERBOSE_MODE} ") +message(" Building w/o assertions: ${DBUS_DISABLE_ASSERTS} ") +message(" Building w/o checks: ${DBUS_DISABLE_CHECKS} ") +message(" installing system libs: ${DBUS_INSTALL_SYSTEM_LIBS} ") +#message(" Building SELinux support: ${have_selinux} ") +#message(" Building dnotify support: ${have_dnotify} ") +message(" Building Doxygen docs: ${DBUS_ENABLE_DOXYGEN_DOCS} ") +message(" Building XML docs: ${DBUS_ENABLE_XML_DOCS} ") +#message(" Gettext libs (empty OK): ${INTLLIBS} ") +message(" Using XML parser: ${XML_LIB} ") +message(" Daemon executable name: ${DBUS_DAEMON_NAME}") +if (WIN32) +message(" System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} ") +message(" Session bus address: ${DBUS_SESSION_BUS_DEFAULT_ADDRESS} ") +else (WIN32) +#message(" Init scripts style: ${with_init_scripts} ") +#message(" Abstract socket names: ${have_abstract_sockets} ") +message(" System bus socket: ${DBUS_SYSTEM_SOCKET} ") +message(" System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} ") +message(" System bus PID file: ${DBUS_SYSTEM_PID_FILE} ") +message(" Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR} ") +message(" Console auth dir: ${DBUS_CONSOLE_AUTH_DIR} ") +message(" System bus user: ${DBUS_USER} ") +message(" 'make check' socket dir: ${TEST_SOCKET_DIR} ") +endif (WIN32) +message(" Test listen address: ${TEST_LISTEN} ") +if (MSVC) +message(" build timestamp: ${DBUS_BUILD_TIMESTAMP} ") +endif (MSVC) + +MESSAGE(" ") +if (DBUS_BUILD_TESTS) + message("NOTE: building with unit tests increases the size of the installed library and renders it insecure.") +endif(DBUS_BUILD_TESTS) + +if (DBUS_BUILD_TESTS AND DBUS_DISABLE_ASSERTS) + message("NOTE: building with unit tests but without assertions means tests may not properly report failures (this configuration is only useful when doing something like profiling the tests)") +endif(DBUS_BUILD_TESTS AND DBUS_DISABLE_ASSERTS) + +if (DBUS_GCOV_ENABLED) + message("NOTE: building with coverage profiling is definitely for developers only.") +endif(DBUS_GCOV_ENABLED) + +if (DBUS_ENABLE_VERBOSE_MODE) + message("NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance.") +endif(DBUS_ENABLE_VERBOSE_MODE) + +if(NOT DBUS_DISABLE_ASSERTS) + message("NOTE: building with assertions increases library size and decreases performance.") +endif(NOT DBUS_DISABLE_ASSERTS) + +if (DBUS_DISABLE_CHECKS) + message("NOTE: building without checks for arguments passed to public API makes it harder to debug apps using D-BUS, but will slightly decrease D-BUS library size and _very_ slightly improve performance.") +endif(DBUS_DISABLE_CHECKS) +MESSAGE(" ") + +INCLUDE(modules/CPackInstallConfig.cmake) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake new file mode 100644 index 00000000..e48b60d1 --- /dev/null +++ b/cmake/ConfigureChecks.cmake @@ -0,0 +1,164 @@ +include(CheckIncludeFile) +include(CheckSymbolExists) +include(CheckStructMember) +include(CheckTypeSize) + +check_include_file(dirent.h HAVE_DIRENT_H) # dbus-sysdeps-util.c +check_include_file(io.h HAVE_IO_H) # internal +check_include_file(grp.h HAVE_GRP_H) # dbus-sysdeps-util-win.c +check_include_file(sys/poll.h HAVE_POLL) # dbus-sysdeps.c, dbus-sysdeps-win.c +check_include_file(sys/time.h HAVE_SYS_TIME_H)# dbus-sysdeps-win.c +check_include_file(sys/wait.h HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c +check_include_file(time.h HAVE_TIME_H) # dbus-sysdeps-win.c +check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H)# dbus-sysdeps-win.c +check_include_file(wspiapi.h HAVE_WSPIAPI_H) # dbus-sysdeps-win.c +check_include_file(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c +check_include_file(stdio.h HAVE_STDIO_H) # dbus-sysdeps.h +check_include_file(sys/syslimits.h HAVE_SYS_SYSLIMITS_H) # dbus-sysdeps-unix.c +check_include_file(errno.h HAVE_ERRNO_H) # dbus-sysdeps.c +check_include_file(signal.h HAVE_SIGNAL_H) +check_include_file(locale.h HAVE_LOCALE_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) # dbus-pipe.h +check_include_file(stdint.h HAVE_STDINT_H) # dbus-pipe.h + +check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c +check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c +check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c +check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c +check_symbol_exists(getpwnam_r "errno.h pwd.h" HAVE_POSIX_GETPWNAM_R) # dbus-sysdeps-util-unix.c +check_symbol_exists(setenv "stdlib.h" HAVE_SETENV) # dbus-sysdeps.c +check_symbol_exists(unsetenv "stdlib.h" HAVE_UNSETENV) # dbus-sysdeps.c +check_symbol_exists(clearenv "stdlib.h" HAVE_CLEARENV) # dbus-sysdeps.c +check_symbol_exists(writev "sys/uio.h" HAVE_WRITEV) # dbus-sysdeps.c, dbus-sysdeps-win.c +check_symbol_exists(setrlimit "sys/resource.h" HAVE_SETRLIMIT) # dbus-sysdeps.c, dbus-sysdeps-win.c, test/test-segfault.c +check_symbol_exists(socketpair "sys/socket.h" HAVE_SOCKETPAIR) # dbus-sysdeps.c +check_symbol_exists(socklen_t "sys/socket.h" HAVE_SOCKLEN_T) # dbus-sysdeps-unix.c +check_symbol_exists(setlocale "locale.h" HAVE_SETLOCALE) # dbus-test-main.c +check_symbol_exists(localeconv "locale.h" HAVE_LOCALECONV) # dbus-sysdeps.c +check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL) # dbus-send.c +check_symbol_exists(strtoull "stdlib.h" HAVE_STRTOULL) # dbus-send.c + +check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c + +# missing: +# HAVE_ABSTRACT_SOCKETS +# DBUS_HAVE_GCC33_GCOV + +check_type_size("short" SIZEOF_SHORT) +check_type_size("int" SIZEOF_INT) +check_type_size("long" SIZEOF_LONG) +check_type_size("long long" SIZEOF_LONG_LONG) +check_type_size("__int64" SIZEOF___INT64) + +# DBUS_INT64_TYPE +if(SIZEOF_INT EQUAL 8) + set (DBUS_HAVE_INT64 1) + set (DBUS_INT64_TYPE "int") +else(SIZEOF_INT EQUAL 8) + if(SIZEOF_LONG EQUAL 8) + set (DBUS_HAVE_INT64 1) + set (DBUS_INT64_TYPE "long") + else(SIZEOF_LONG EQUAL 8) + if(SIZEOF_LONG_LONG EQUAL 8) + set (DBUS_HAVE_INT64 1) + set (DBUS_INT64_TYPE "long long") + else(SIZEOF_LONG_LONG EQUAL 8) + if(SIZEOF___INT64 EQUAL 8) + set (DBUS_HAVE_INT64 1) + set (DBUS_INT64_TYPE "__int64") + endif(SIZEOF___INT64 EQUAL 8) + endif(SIZEOF_LONG_LONG EQUAL 8) + endif(SIZEOF_LONG EQUAL 8) +endif(SIZEOF_INT EQUAL 8) + +# DBUS_INT32_TYPE +if(SIZEOF_INT EQUAL 4) + set (DBUS_INT32_TYPE "int") +else(SIZEOF_INT EQUAL 4) + if(SIZEOF_LONG EQUAL 4) + set (DBUS_INT32_TYPE "long") + else(SIZEOF_LONG EQUAL 4) + if(SIZEOF_LONG_LONG EQUAL 4) + set (DBUS_INT32_TYPE "long long") + endif(SIZEOF_LONG_LONG EQUAL 4) + endif(SIZEOF_LONG EQUAL 4) +endif(SIZEOF_INT EQUAL 4) + +# DBUS_INT16_TYPE +if(SIZEOF_INT EQUAL 2) + set (DBUS_INT16_TYPE "int") +else(SIZEOF_INT EQUAL 2) + if(SIZEOF_SHORT EQUAL 2) + set (DBUS_INT16_TYPE "short") + endif(SIZEOF_SHORT EQUAL 2) +endif(SIZEOF_INT EQUAL 2) + +find_program(DOXYGEN doxygen) +find_program(XMLTO xmlto) + +if(MSVC) + SET(DBUS_VA_COPY_FUNC "_DBUS_VA_COPY_ASSIGN";) +else(MSVC) +write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h> + #include <stdlib.h> + static void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + va_copy (args2, args1); + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } + int main() { + f (0, 42); + return 0; + } +") +try_compile(DBUS_HAVE_VA_COPY + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c) + +if(DBUS_HAVE_VA_COPY) + SET(DBUS_VA_COPY_FUNC va_copy CACHE STRING "va_copy function") +else(DBUS_HAVE_VA_COPY) + write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h> + #include <stdlib.h> + static void f (int i, ...) { + va_list args1, args2; + va_start (args1, i); + __va_copy (args2, args1); + if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) + exit (1); + va_end (args1); va_end (args2); + } + int main() { + f (0, 42); + return 0; + } + ") + try_compile(DBUS_HAVE___VA_COPY + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c) + if(DBUS_HAVE___VA_COPY) + SET(DBUS_VA_COPY_FUNC __va_copy CACHE STRING "va_copy function") + else(DBUS_HAVE___VA_COPY) + SET(DBUS_VA_COPY_AS_ARRAY "1" CACHE STRING "'va_lists' cannot be copies as values") + endif(DBUS_HAVE___VA_COPY) +endif(DBUS_HAVE_VA_COPY) +endif(MSVC) # _not_ MSVC +#### Abstract sockets + +if (DBUS_ENABLE_ABSTRACT_SOCKETS) + + try_compile(HAVE_ABSTRACT_SOCKETS + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/modules/CheckForAbstractSockets.c) + +endif(DBUS_ENABLE_ABSTRACT_SOCKETS) + +if(HAVE_ABSTRACT_SOCKETS) + set(DBUS_PATH_OR_ABSTRACT_VALUE abstract) +else(HAVE_ABSTRACT_SOCKETS) + set(DBUS_PATH_OR_ABSTRACT_VALUE path) +endif(HAVE_ABSTRACT_SOCKETS) + diff --git a/cmake/Doxyfile.cmake b/cmake/Doxyfile.cmake new file mode 100644 index 00000000..e00984e7 --- /dev/null +++ b/cmake/Doxyfile.cmake @@ -0,0 +1,182 @@ +# Doxyfile 0.1 + +#--------------------------------------------------------------------------- +# General configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = D-Bus +PROJECT_NUMBER = @VERSION@ +OUTPUT_DIRECTORY = api +OUTPUT_LANGUAGE = English +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = NO +STRIP_CODE_COMMENTS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = YES +SHOW_INCLUDE_FILES = YES +JAVADOC_AUTOBRIEF = YES +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 8 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = YES +SHOW_USED_FILES = YES +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = YES +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_FORMAT = +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = @top_srcdir@/dbus +FILE_PATTERNS = *.c *.h +RECURSIVE = YES +#EXCLUDE = test + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. + +EXCLUDE_PATTERNS = Makefile.* ChangeLog CHANGES CHANGES.* README \ + README.* *.png AUTHORS DESIGN DESIGN.* *.desktop \ + DESKTOP* COMMENTS HOWTO magic NOTES TODO THANKS + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .3dbus +MAN_LINKS = YES +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = "DBUS_BEGIN_DECLS=" \ + "DBUS_END_DECLS=" \ + "DOXYGEN_SHOULD_SKIP_THIS" \ + "DBUS_GNUC_DEPRECATED=" \ + "_DBUS_DEFINE_GLOBAL_LOCK(name)=" \ + "_DBUS_GNUC_PRINTF(from,to)=" \ + "DBUS_EXPORT=" +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +PERL_PATH = +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +TEMPLATE_RELATIONS = YES +HIDE_UNDOC_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 640 +MAX_DOT_GRAPH_HEIGHT = 1024 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::addtions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/cmake/bus-test.bat.cmake b/cmake/bus-test.bat.cmake new file mode 100644 index 00000000..01688713 --- /dev/null +++ b/cmake/bus-test.bat.cmake @@ -0,0 +1,14 @@ +:: bus-test wrapper +@echo off + +:: session bus address +set DBUS_STARTER_BUS=tcp:host=localhost,port=1234 + +if NOT "%1" == "" ( + SET DATADIR=%1 +) else ( + SET DATADIR=test\data +) + +bin\bus-test.exe test\data + diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt new file mode 100644 index 00000000..876be810 --- /dev/null +++ b/cmake/bus/CMakeLists.txt @@ -0,0 +1,181 @@ +project(bus) + +add_definitions(-DDBUS_COMPILATION) + +SET(EFENCE "") +SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus) + +set (config_DATA + session.conf + system.conf +) + +# config files for installation +FOREACH(file ${config_DATA}) + CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/${file}.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${file}" IMMEDIATE @ONLY) +ENDFOREACH(file) + +# copy services for local daemon start to local service dir data/dbus-1/services +SET (SERVICE_FILES test/data/valid-service-files) +FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${SERVICE_FILES}/*.service.in" ) +FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME_WE) + SET (TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service) + IF (CONFIG_VERBOSE) + MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") + ENDIF (CONFIG_VERBOSE) + configure_file(${FILE} ${TARGET} ) +ENDFOREACH(FILE) + +if(DBUS_USE_EXPAT) + SET (XML_SOURCES ${BUS_DIR}/config-loader-expat.c) +else(DBUS_USE_EXPAT) + SET (XML_SOURCES ${BUS_DIR}/config-loader-libxml.c) +endif (DBUS_USE_EXPAT) + +# after next cvs update +#set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-default.c) +set (DIR_WATCH_SOURCE ) + +set (BUS_SOURCES + ${BUS_DIR}/activation.c + ${BUS_DIR}/activation.h + ${BUS_DIR}/bus.c + ${BUS_DIR}/bus.h + ${BUS_DIR}/config-parser.c + ${BUS_DIR}/config-parser.h + ${BUS_DIR}/config-parser-common.c + ${BUS_DIR}/config-parser-common.h +# ${BUS_DIR}/config-parser-trivial.c + ${BUS_DIR}/connection.c + ${BUS_DIR}/connection.h + ${BUS_DIR}/desktop-file.c + ${BUS_DIR}/desktop-file.h + ${BUS_DIR}/dir-watch-default.c + ${BUS_DIR}/dir-watch.h + ${BUS_DIR}/dispatch.c + ${BUS_DIR}/dispatch.h + ${BUS_DIR}/driver.c + ${BUS_DIR}/driver.h + ${BUS_DIR}/expirelist.c + ${BUS_DIR}/expirelist.h + ${BUS_DIR}/policy.c + ${BUS_DIR}/policy.h + ${BUS_DIR}/selinux.h + ${BUS_DIR}/selinux.c + ${BUS_DIR}/services.c + ${BUS_DIR}/services.h + ${BUS_DIR}/signals.c + ${BUS_DIR}/signals.h + ${BUS_DIR}/test.c + ${BUS_DIR}/test.h + ${BUS_DIR}/utils.c + ${BUS_DIR}/utils.h + ${XML_SOURCES} + ${DIR_WATCH_SOURCE} +) + +include_directories(${XML_INCLUDE_DIR}) + +add_executable(dbus-daemon ${BUS_SOURCES} ${BUS_DIR}/main.c) +target_link_libraries(dbus-daemon ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) +set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME}) +set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + +install_targets(/bin dbus-daemon) +install_files(/etc/dbus-1 FILES ${config_DATA}) + +if (DBUS_SERVICE) + set (dbus_service_SOURCES + ${BUS_DIR}/bus-service-win.c + # TODO: add additional files + # ${BUS_DIR}/service-main.c + # ${BUS_SOURCES} + ) + + add_executable(dbus-service ${dbus_service_SOURCES} ) + target_link_libraries(dbus-service ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(dbus-service PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + install_targets(/bin dbus-service ) +endif (DBUS_SERVICE) + +if (DBUS_BUILD_TESTS) + add_executable(bus-test ${BUS_SOURCES} ${BUS_DIR}/test-main.c) + target_link_libraries(bus-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY}) + set_target_properties(bus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_BINARY_DIR}/test/data) +endif (DBUS_BUILD_TESTS) + +if(MSVC) + project_source_group(${GROUP_CODE} bus_test_SOURCES dummy) +endif(MSVC) + +## mop up the gcov files +#clean-local: +# /bin/rm *.bb *.bbg *.da *.gcov || true + +#install-data-hook: +# $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus +# $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d +# $(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services + +##install_file(${configdir}/system.d FILE + + +set(LAUNCH_HELPER_SOURCES ${XML_SOURCES} + ${BUS_DIR}/config-parser-common.c + ${BUS_DIR}/config-parser-trivial.c + ${BUS_DIR}/desktop-file.c + ${BUS_DIR}/utils.c + ${BUS_DIR}/activation-helper.c + +) + +if(NOT WIN32) +# TODO PENDING(kdab) fix build on windows (activation-helper.c) + add_executable(dbus-daemon-launch-helper ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/activation-helper-bin.c ) + target_link_libraries(dbus-daemon-launch-helper ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) + + add_executable(dbus-daemon-launch-helper-test ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/activation-helper-bin.c) + set_target_properties(dbus-daemon-launch-helper-test PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST") + target_link_libraries(dbus-daemon-launch-helper-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) + + add_executable(bus-test-launch-helper ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c) + set_target_properties(bus-test-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM") + target_link_libraries(bus-test-launch-helper ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY} ) + add_test(bus-test-launch-helper ${EXECUTABLE_OUTPUT_PATH}/bus-test-launch-helper ) + +endif(NOT WIN32) + +#### Init scripts fun +#SCRIPT_IN_FILES=messagebus.in +# rc.messagebus.in + +## Red Hat start +#if DBUS_INIT_SCRIPTS_RED_HAT + +#initddir=$(sysconfdir)/rc.d/init.d + +#initd_SCRIPTS= +# messagebus + +#endif +# ## Red Hat end + +## Slackware start +#if DBUS_INIT_SCRIPTS_SLACKWARE + +#initddir=$(sysconfdir)/rc.d/ + +#initd_SCRIPTS= +# rc.messagebus + +#endif +## Slackware end + +#MAN_IN_FILES=dbus-daemon.1.in +#man_MANS = dbus-daemon.1 + +#### Extra dist + +#EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) diff --git a/cmake/bus/dbus-daemon.xml b/cmake/bus/dbus-daemon.xml new file mode 100644 index 00000000..c6f4db07 --- /dev/null +++ b/cmake/bus/dbus-daemon.xml @@ -0,0 +1,744 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<!-- lifted from troff+man by doclifter --> +<refentry id='dbus-daemon'> +<!-- --> +<!-- dbus\-daemon manual page. --> +<!-- Copyright (C) 2003 Red Hat, Inc. --> + +<refmeta> +<refentrytitle>dbus-daemon</refentrytitle> +<manvolnum>1</manvolnum> +</refmeta> +<refnamediv id='name'> +<refname>dbus-daemon</refname> +<refpurpose>Message bus daemon</refpurpose> +</refnamediv> +<!-- body begins here --> +<refsynopsisdiv id='synopsis'> +<cmdsynopsis> + <command>dbus-daemon</command></cmdsynopsis> +<cmdsynopsis> + <command>dbus-daemon</command> <arg choice='opt'>--version </arg> + <arg choice='opt'>--session </arg> + <arg choice='opt'>--system </arg> + <arg choice='opt'>--config-file=<replaceable>FILE</replaceable></arg> + <arg choice='opt'><arg choice='plain'>--print-address </arg><arg choice='opt'><replaceable>=DESCRIPTOR</replaceable></arg></arg> + <arg choice='opt'><arg choice='plain'>--print-pid </arg><arg choice='opt'><replaceable>=DESCRIPTOR</replaceable></arg></arg> + <arg choice='opt'>--fork </arg> + <sbr/> +</cmdsynopsis> +</refsynopsisdiv> + + +<refsect1 id='description'><title>DESCRIPTION</title> +<para><command>dbus-daemon</command> is the D-Bus message bus daemon. See +<ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information about +the big picture. D-Bus is first a library that provides one-to-one +communication between any two applications; <command>dbus-daemon</command> is an +application that uses this library to implement a message bus +daemon. Multiple programs connect to the message bus daemon and can +exchange messages with one another.</para> + + +<para>There are two standard message bus instances: the systemwide message bus +(installed on many systems as the "messagebus" init service) and the +per-user-login-session message bus (started each time a user logs in). +<command>dbus-daemon</command> is used for both of these instances, but with +a different configuration file.</para> + + +<para>The --session option is equivalent to +"--config-file=/etc/dbus-1/session.conf" and the --system +option is equivalent to +"--config-file=/etc/dbus-1/system.conf". By creating +additional configuration files and using the --config-file option, +additional special-purpose message bus daemons could be created.</para> + + +<para>The systemwide daemon is normally launched by an init script, +standardly called simply "messagebus".</para> + + +<para>The systemwide daemon is largely used for broadcasting system events, +such as changes to the printer queue, or adding/removing devices.</para> + + +<para>The per-session daemon is used for various interprocess communication +among desktop applications (however, it is not tied to X or the GUI +in any way).</para> + + +<para>SIGHUP will cause the D-Bus daemon to PARTIALLY reload its +configuration file and to flush its user/group information caches. Some +configuration changes would require kicking all apps off the bus; so they will +only take effect if you restart the daemon. Policy changes should take effect +with SIGHUP.</para> + +</refsect1> + +<refsect1 id='options'><title>OPTIONS</title> +<para>The following options are supported:</para> +<variablelist remap='TP'> + <varlistentry> + <term><option>--config-file=FILE</option></term> + <listitem> +<para>Use the given configuration file.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--fork</option></term> + <listitem> +<para>Force the message bus to fork and become a daemon, even if +the configuration file does not specify that it should. +In most contexts the configuration file already gets this +right, though.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--print-address[=DESCRIPTOR]</option></term> + <listitem> +<para>Print the address of the message bus to standard output, or +to the given file descriptor. This is used by programs that +launch the message bus.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--print-pid[=DESCRIPTOR]</option></term> + <listitem> +<para>Print the process ID of the message bus to standard output, or +to the given file descriptor. This is used by programs that +launch the message bus.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--session</option></term> + <listitem> +<para>Use the standard configuration file for the per-login-session message +bus.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--system</option></term> + <listitem> +<para>Use the standard configuration file for the systemwide message bus.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--version</option></term> + <listitem> +<para>Print the version of the daemon.</para> + + </listitem> + </varlistentry> +</variablelist> +</refsect1> + +<refsect1 id='configuration_file'><title>CONFIGURATION FILE</title> +<para>A message bus daemon has a configuration file that specializes it +for a particular application. For example, one configuration +file might set up the message bus to be a systemwide message bus, +while another might set it up to be a per-user-login-session bus.</para> + + +<para>The configuration file also establishes resource limits, security +parameters, and so forth.</para> + + +<para>The configuration file is not part of any interoperability +specification and its backward compatibility is not guaranteed; this +document is documentation, not specification.</para> + + +<para>The standard systemwide and per-session message bus setups are +configured in the files "/etc/dbus-1/system.conf" and +"/etc/dbus-1/session.conf". These files normally +<include> a system-local.conf or session-local.conf; you can put local +overrides in those files to avoid modifying the primary configuration +files.</para> + + +<para>The configuration file is an XML document. It must have the following +doctype declaration:</para> +<literallayout remap='.nf'> + + <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + "<ulink url='http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd'>http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd</ulink>"> + +</literallayout> <!-- .fi --> + + +<para>The following elements may be present in the configuration file.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><busconfig></emphasis></term> + <listitem> +<para></para> + </listitem> + </varlistentry> +</variablelist> + +<para>Root element.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><type></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>The well-known type of the message bus. Currently known values are +"system" and "session"; if other values are set, they should be +either added to the D-Bus specification, or namespaced. The last +<type> element "wins" (previous values are ignored).</para> + + +<para>Example: <type>session</type></para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><include></emphasis></term> + <listitem> +<para></para> + </listitem> + </varlistentry> +</variablelist> + +<para>Include a file <include>filename.conf</include> at this point. If the +filename is relative, it is located relative to the configuration file +doing the including.</para> + + +<para><include> has an optional attribute "ignore_missing=(yes|no)" +which defaults to "no" if not provided. This attribute +controls whether it's a fatal error for the included file +to be absent.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><includedir></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>Include all files in <includedir>foo.d</includedir> at this +point. Files in the directory are included in undefined order. +Only files ending in ".conf" are included.</para> + + +<para>This is intended to allow extension of the system bus by particular +packages. For example, if CUPS wants to be able to send out +notification of printer queue changes, it could install a file to +/etc/dbus-1/system.d that allowed all apps to receive +this message and allowed the printer daemon user to send it.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><user></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>The user account the daemon should run as, as either a username or a +UID. If the daemon cannot change to this UID on startup, it will exit. +If this element is not present, the daemon will not change or care +about its UID.</para> + + +<para>The last <user> entry in the file "wins", the others are ignored.</para> + + +<para>The user is changed after the bus has completed initialization. So +sockets etc. will be created before changing user, but no data will be +read from clients before changing user. This means that sockets +and PID files can be created in a location that requires root +privileges for writing.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><fork></emphasis></term> + <listitem> +<para></para> + </listitem> + </varlistentry> +</variablelist> + +<para>If present, the bus daemon becomes a real daemon (forks +into the background, etc.). This is generally used +rather than the --fork command line option.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><listen></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>Add an address that the bus should listen on. The +address is in the standard D-Bus format that contains +a transport name plus possible parameters/options.</para> + + +<para>Example: <listen>unix:path=/tmp/foo</listen></para> + + +<para>If there are multiple <listen> elements, then the bus listens +on multiple addresses. The bus will pass its address to +started services or other interested parties with +the last address given in <listen> first. That is, +apps will try to connect to the last <listen> address first.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><auth></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>Lists permitted authorization mechanisms. If this element doesn't +exist, then all known mechanisms are allowed. If there are multiple +<auth> elements, all the listed mechanisms are allowed. The order in +which mechanisms are listed is not meaningful.</para> + + +<para>Example: <auth>EXTERNAL</auth></para> + + +<para>Example: <auth>DBUS_COOKIE_SHA1</auth></para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><servicedir></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>Adds a directory to scan for .service files. Directories are +scanned starting with the last to appear in the config file +(the first .service file found that provides a particular +service will be used).</para> + + +<para>Service files tell the bus how to automatically start a program. +They are primarily used with the per-user-session bus, +not the systemwide bus.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><standard_session_servicedirs/></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para><standard_session_servicedirs/> is equivalent to specifying a series +of <servicedir/> elements for each of the data directories in the "XDG +Base Directory Specification" with the subdirectory "dbus-1/services", +so for example "/usr/share/dbus-1/services" would be among the +directories searched.</para> + + +<para>The "XDG Base Directory Specification" can be found at +<ulink url='http://freedesktop.org/wiki/Standards/basedir-spec'>http://freedesktop.org/wiki/Standards/basedir-spec</ulink> if it hasn't moved, +otherwise try your favorite search engine.</para> + + +<para>The <standard_session_servicedirs/> option is only relevant to the +per-user-session bus daemon defined in +/etc/dbus-1/session.conf. Putting it in any other +configuration file would probably be nonsense.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><limit></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para><limit> establishes a resource limit. For example:</para> +<literallayout remap='.nf'> + <limit name="max_message_size">64</limit> + <limit name="max_completed_connections">512</limit> +</literallayout> <!-- .fi --> + + +<para>The name attribute is mandatory. +Available limit names are:</para> +<literallayout remap='.nf'> + "max_incoming_bytes" : total size in bytes of messages + incoming from a single connection + "max_outgoing_bytes" : total size in bytes of messages + queued up for a single connection + "max_message_size" : max size of a single message in + bytes + "service_start_timeout" : milliseconds (thousandths) until + a started service has to connect + "auth_timeout" : milliseconds (thousandths) a + connection is given to + authenticate + "max_completed_connections" : max number of authenticated connections + "max_incomplete_connections" : max number of unauthenticated + connections + "max_connections_per_user" : max number of completed connections from + the same user + "max_pending_service_starts" : max number of service launches in + progress at the same time + "max_names_per_connection" : max number of names a single + connection can own + "max_match_rules_per_connection": max number of match rules for a single + connection + "max_replies_per_connection" : max number of pending method + replies per connection + (number of calls-in-progress) + "reply_timeout" : milliseconds (thousandths) + until a method call times out +</literallayout> <!-- .fi --> + + +<para>The max incoming/outgoing queue sizes allow a new message to be queued +if one byte remains below the max. So you can in fact exceed the max +by max_message_size.</para> + + +<para>max_completed_connections divided by max_connections_per_user is the +number of users that can work together to denial-of-service all other users by using +up all connections on the systemwide bus.</para> + + +<para>Limits are normally only of interest on the systemwide bus, not the user session +buses.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><policy></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>The <policy> element defines a security policy to be applied to a particular +set of connections to the bus. A policy is made up of +<allow> and <deny> elements. Policies are normally used with the systemwide bus; +they are analogous to a firewall in that they allow expected traffic +and prevent unexpected traffic.</para> + + +<para>The <policy> element has one of three attributes:</para> +<literallayout remap='.nf'> + context="(default|mandatory)" + user="username or userid" + group="group name or gid" +</literallayout> <!-- .fi --> + + +<para> +Policies are applied to a connection as follows:</para> +<literallayout remap='.nf'> + - all context="default" policies are applied + - all group="connection's user's group" policies are applied + in undefined order + - all user="connection's auth user" policies are applied + in undefined order + - all context="mandatory" policies are applied +</literallayout> <!-- .fi --> + + +<para>Policies applied later will override those applied earlier, +when the policies overlap. Multiple policies with the same +user/group/context are applied in the order they appear +in the config file.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><deny></emphasis></term> + <listitem> +<para><emphasis remap='I'><allow></emphasis></para> + + </listitem> + </varlistentry> +</variablelist> + +<para>A <deny> element appears below a <policy> element and prohibits some +action. The <allow> element makes an exception to previous <deny> +statements, and works just like <deny> but with the inverse meaning.</para> + + +<para>The possible attributes of these elements are:</para> +<literallayout remap='.nf'> + send_interface="interface_name" + send_member="method_or_signal_name" + send_error="error_name" + send_destination="name" + send_type="method_call" | "method_return" | "signal" | "error" + send_path="/path/name" + + receive_interface="interface_name" + receive_member="method_or_signal_name" + receive_error="error_name" + receive_sender="name" + receive_type="method_call" | "method_return" | "signal" | "error" + receive_path="/path/name" + + send_requested_reply="true" | "false" + receive_requested_reply="true" | "false" + + eavesdrop="true" | "false" + + own="name" + user="username" + group="groupname" +</literallayout> <!-- .fi --> + + +<para>Examples:</para> +<literallayout remap='.nf'> + <deny send_interface="org.freedesktop.System" send_member="Reboot"/> + <deny receive_interface="org.freedesktop.System" receive_member="Reboot"/> + <deny own="org.freedesktop.System"/> + <deny send_destination="org.freedesktop.System"/> + <deny receive_sender="org.freedesktop.System"/> + <deny user="john"/> + <deny group="enemies"/> +</literallayout> <!-- .fi --> + + +<para>The <deny> element's attributes determine whether the deny "matches" a +particular action. If it matches, the action is denied (unless later +rules in the config file allow it).</para> + + +<para>send_destination and receive_sender rules mean that messages may not be +sent to or received from the *owner* of the given name, not that +they may not be sent *to that name*. That is, if a connection +owns services A, B, C, and sending to A is denied, sending to B or C +will not work either.</para> + + +<para>The other send_* and receive_* attributes are purely textual/by-value +matches against the given field in the message header.</para> + + +<para>"Eavesdropping" occurs when an application receives a message that +was explicitly addressed to a name the application does not own. +Eavesdropping thus only applies to messages that are addressed to +services (i.e. it does not apply to signals).</para> + + +<para>For <allow>, eavesdrop="true" indicates that the rule matches even +when eavesdropping. eavesdrop="false" is the default and means that +the rule only allows messages to go to their specified recipient. +For <deny>, eavesdrop="true" indicates that the rule matches +only when eavesdropping. eavesdrop="false" is the default for <deny> +also, but here it means that the rule applies always, even when +not eavesdropping. The eavesdrop attribute can only be combined with +receive rules (with receive_* attributes).</para> + + + +<para>The [send|receive]_requested_reply attribute works similarly to the eavesdrop +attribute. It controls whether the <deny> or <allow> matches a reply +that is expected (corresponds to a previous method call message). +This attribute only makes sense for reply messages (errors and method +returns), and is ignored for other message types.</para> + + +<para>For <allow>, [send|receive]_requested_reply="true" is the default and indicates that +only requested replies are allowed by the +rule. [send|receive]_requested_reply="false" means that the rule allows any reply +even if unexpected.</para> + + +<para>For <deny>, [send|receive]_requested_reply="false" is the default but indicates that +the rule matches only when the reply was not +requested. [send|receive]_requested_reply="true" indicates that the rule applies +always, regardless of pending reply state.</para> + + +<para>user and group denials mean that the given user or group may +not connect to the message bus.</para> + + +<para>For "name", "username", "groupname", etc. +the character "*" can be substituted, meaning "any." Complex globs +like "foo.bar.*" aren't allowed for now because they'd be work to +implement and maybe encourage sloppy security anyway.</para> + + +<para>It does not make sense to deny a user or group inside a <policy> +for a user or group; user/group denials can only be inside +context="default" or context="mandatory" policies.</para> + + +<para>A single <deny> rule may specify combinations of attributes such as +send_destination and send_interface and send_type. In this case, the +denial applies only if both attributes match the message being denied. +e.g. <deny send_interface="foo.bar" send_destination="foo.blah"/> would +deny messages with the given interface AND the given bus name. +To get an OR effect you specify multiple <deny> rules.</para> + + +<para>You can't include both send_ and receive_ attributes on the same +rule, since "whether the message can be sent" and "whether it can be +received" are evaluated separately.</para> + + +<para>Be careful with send_interface/receive_interface, because the +interface field in messages is optional.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><selinux></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>The <selinux> element contains settings related to Security Enhanced Linux. +More details below.</para> + +<variablelist remap='TP'> + <varlistentry> + <term><emphasis remap='I'><associate></emphasis></term> + <listitem> + +<para></para> <!-- FIXME: blank list item --> + </listitem> + </varlistentry> +</variablelist> + +<para>An <associate> element appears below an <selinux> element and +creates a mapping. Right now only one kind of association is possible:</para> +<literallayout remap='.nf'> + <associate own="org.freedesktop.Foobar" context="foo_t"/> +</literallayout> <!-- .fi --> + + +<para>This means that if a connection asks to own the name +"org.freedesktop.Foobar" then the source context will be the context +of the connection and the target context will be "foo_t" - see the +short discussion of SELinux below.</para> + + +<para>Note, the context here is the target context when requesting a name, +NOT the context of the connection owning the name.</para> + + +<para>There's currently no way to set a default for owning any name, if +we add this syntax it will look like:</para> +<literallayout remap='.nf'> + <associate own="*" context="foo_t"/> +</literallayout> <!-- .fi --> +<para>If you find a reason this is useful, let the developers know. +Right now the default will be the security context of the bus itself.</para> + + +<para>If two <associate> elements specify the same name, the element +appearing later in the configuration file will be used.</para> + +</refsect1> + +<refsect1 id='selinux'><title>SELinux</title> +<para>See <ulink url='http://www.nsa.gov/selinux/'>http://www.nsa.gov/selinux/</ulink> for full details on SELinux. Some useful excerpts:</para> + + +<para>Every subject (process) and object (e.g. file, socket, IPC object, +etc) in the system is assigned a collection of security attributes, +known as a security context. A security context contains all of the +security attributes associated with a particular subject or object +that are relevant to the security policy.</para> + + +<para>In order to better encapsulate security contexts and to provide +greater efficiency, the policy enforcement code of SELinux typically +handles security identifiers (SIDs) rather than security contexts. A +SID is an integer that is mapped by the security server to a security +context at runtime.</para> + + +<para>When a security decision is required, the policy enforcement code +passes a pair of SIDs (typically the SID of a subject and the SID of +an object, but sometimes a pair of subject SIDs or a pair of object +SIDs), and an object security class to the security server. The object +security class indicates the kind of object, e.g. a process, a regular +file, a directory, a TCP socket, etc.</para> + + +<para>Access decisions specify whether or not a permission is granted for a +given pair of SIDs and class. Each object class has a set of +associated permissions defined to control operations on objects with +that class.</para> + + +<para>D-Bus performs SELinux security checks in two places.</para> + + +<para>First, any time a message is routed from one connection to another +connection, the bus daemon will check permissions with the security context of +the first connection as source, security context of the second connection +as target, object class "dbus" and requested permission "send_msg".</para> + + +<para>If a security context is not available for a connection +(impossible when using UNIX domain sockets), then the target +context used is the context of the bus daemon itself. +There is currently no way to change this default, because we're +assuming that only UNIX domain sockets will be used to +connect to the systemwide bus. If this changes, we'll +probably add a way to set the default connection context.</para> + + +<para>Second, any time a connection asks to own a name, +the bus daemon will check permissions with the security +context of the connection as source, the security context specified +for the name in the config file as target, object +class "dbus" and requested permission "acquire_svc".</para> + + +<para>The security context for a bus name is specified with the +<associate> element described earlier in this document. +If a name has no security context associated in the +configuration file, the security context of the bus daemon +itself will be used.</para> + +</refsect1> + +<refsect1 id='author'><title>AUTHOR</title> +<para>See <ulink url='http://www.freedesktop.org/software/dbus/doc/AUTHORS'>http://www.freedesktop.org/software/dbus/doc/AUTHORS</ulink></para> + +</refsect1> + +<refsect1 id='bugs'><title>BUGS</title> +<para>Please send bug reports to the D-Bus mailing list or bug tracker, +see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para> +</refsect1> +</refentry> + diff --git a/cmake/bus/service.cmake b/cmake/bus/service.cmake new file mode 100644 index 00000000..25d17ff1 --- /dev/null +++ b/cmake/bus/service.cmake @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.freedektop.DBus.ServiceName +Exec=notepad diff --git a/cmake/bus/session.conf.cmake b/cmake/bus/session.conf.cmake new file mode 100644 index 00000000..6bba91e9 --- /dev/null +++ b/cmake/bus/session.conf.cmake @@ -0,0 +1,30 @@ +<!-- This configuration file controls the per-user-login-session message bus. + Add a session-local.conf and edit that rather than changing this + file directly. --> + +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <!-- Our well-known bus type, don't change this --> + <type>session</type> + + <listen>@DBUS_SESSION_BUS_DEFAULT_ADDRESS@</listen> + + <standard_session_servicedirs /> + + <policy context="default"> + <!-- Allow everything to be sent --> + <allow send_destination="*"/> + <!-- Allow everything to be received --> + <allow eavesdrop="true"/> + <!-- Allow anyone to own anything --> + <allow own="*"/> + </policy> + + <!-- This is included last so local configuration can override what's + in this standard file --> + <include ignore_missing="yes">session-local.conf</include> + + <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> + +</busconfig> diff --git a/cmake/bus/system.conf.cmake b/cmake/bus/system.conf.cmake new file mode 100644 index 00000000..ee85ecc4 --- /dev/null +++ b/cmake/bus/system.conf.cmake @@ -0,0 +1,62 @@ +<!-- This configuration file controls the systemwide message bus. + Add a system-local.conf and edit that rather than changing this + file directly. --> + +<!-- Note that there are any number of ways you can hose yourself + security-wise by screwing up this file; in particular, you + probably don't want to listen on any more addresses, add any more + auth mechanisms, run as a different user, etc. --> + +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + + <!-- Our well-known bus type, do not change this --> + <type>system</type> + + <!-- Run as special user --> + <user>@DBUS_USER@</user> + + <!-- Fork into daemon mode --> + <fork/> + + <!-- Write a pid file --> + <pidfile>@DBUS_SYSTEM_PID_FILE@</pidfile> + + <!-- Only allow socket-credentials-based authentication --> + <auth>EXTERNAL</auth> + + <!-- Only listen on a local socket. (abstract=/path/to/socket + means use abstract namespace, don't really create filesystem + file; only Linux supports this. Use path=/whatever on other + systems.) --> + <listen>@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@</listen> + + <policy context="default"> + <!-- Deny everything then punch holes --> + <deny send_interface="*"/> + <deny receive_interface="*"/> + <deny own="*"/> + <!-- But allow all users to connect --> + <allow user="*"/> + <!-- Allow anyone to talk to the message bus --> + <!-- FIXME I think currently these allow rules are always implicit + even if they aren't in here --> + <allow send_destination="org.freedesktop.DBus"/> + <allow receive_sender="org.freedesktop.DBus"/> + <!-- valid replies are always allowed --> + <allow send_requested_reply="true"/> + <allow receive_requested_reply="true"/> + </policy> + + <!-- Config files are placed here that among other things, punch + holes in the above policy for specific services. --> + <includedir>system.d</includedir> + + <!-- This is included last so local configuration can override what's + in this standard file --> + <include ignore_missing="yes">system-local.conf</include> + + <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> + +</busconfig> diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake new file mode 100644 index 00000000..c1b8aebf --- /dev/null +++ b/cmake/config.h.cmake @@ -0,0 +1,250 @@ +/* config.h. Generated by cmake from config.h.cmake */ + +#ifndef _DBUS_CONFIG_H +#define _DBUS_CONFIG_H +/****************************/ +/* indicate that we are building with cmake */ +#define DBUS_CMAKE 1 + +#cmakedefine HAVE_GNUC_VARARGS 1 + +#cmakedefine DBUS_CONSOLE_AUTH_DIR "@DBUS_CONSOLE_AUTH_DIR@" +#cmakedefine DBUS_DATADIR "@DBUS_DATADIR@" +#cmakedefine DBUS_BINDIR "@DBUS_BINDIR@" +#cmakedefine DBUS_SYSTEM_CONFIG_FILE "@DBUS_SYSTEM_CONFIG_FILE@" +#cmakedefine DBUS_SESSION_CONFIG_FILE "@DBUS_SESSION_CONFIG_FILE@" +#cmakedefine DBUS_DAEMON_NAME "@DBUS_DAEMON_NAME@" +#cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@" +#cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@" +#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@" +#cmakedefine DBUS_DAEMONDIR "@DBUS_DAEMONDIR@" +#cmakedefine PACKAGE "@PACKAGE@" +/* Version number of package */ +#cmakedefine DBUS_MAJOR_VERSION @DBUS_MAJOR_VERSION@ +#cmakedefine DBUS_MINOR_VERSION @DBUS_MINOR_VERSION@ +#cmakedefine DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@ +#cmakedefine DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@)) +#cmakedefine DBUS_VERSION_STRING "@DBUS_VERSION_STRING@" + +#define VERSION DBUS_VERSION_STRING + +#define TEST_LISTEN "@TEST_LISTEN@" +#define TEST_CONNECTION "@TEST_CONNECTION@" + +// test binaries +/* Full path to test file test/test-exit in builddir */ +#define TEST_BUS_BINARY "@TEST_BUS_BINARY@" +/* Full path to test file test/test-exit in builddir */ +#define TEST_EXIT_BINARY "@TEST_EXIT_BINARY@" +/* Full path to test file test/test-segfault in builddir */ +#define TEST_SEGFAULT_BINARY "@TEST_SEGFAULT_BINARY@" +/* Full path to test file test/test-service in builddir */ +#define TEST_SERVICE_BINARY "@TEST_SERVICE_BINARY@" +/* Full path to test file test/test-shell-service in builddir */ +#define TEST_SHELL_SERVICE_BINARY "@TEST_SHELL_SERVICE_BINARY@" +/* Full path to test file test/test-sleep-forever in builddir */ +#define TEST_SLEEP_FOREVER_BINARY "@TEST_SLEEP_FOREVER_BINARY@" + +/* Some dbus features */ +#cmakedefine DBUS_BUILD_TESTS 1 +#cmakedefine DBUS_ENABLE_ANSI 1 +#cmakedefine DBUS_ENABLE_VERBOSE_MODE 1 +#cmakedefine DBUS_DISABLE_ASSERTS 1 +#cmakedefine DBUS_DISABLE_CHECKS 1 +/* xmldocs */ +/* doxygen */ +#cmakedefine DBUS_GCOV_ENABLED 1 + +/* abstract-sockets */ + +#cmakedefine HAVE_ABSTRACT_SOCKETS 1 + +#cmakedefine DBUS_PATH_OR_ABSTRACT_VALUE 1 + +#if (defined DBUS_PATH_OR_ABSTRACT_VALUE) +#define DBUS_PATH_OR_ABSTRACT @DBUS_PATH_OR_ABSTRACT_VALUE@ +#endif + +#ifdef DBUS_PATH_OR_ABSTRACT_VALUE +#undef DBUS_PATH_OR_ABSTRACT_VALUE +#endif + +/* selinux */ +#cmakedefine DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX 1 +/* kqueue */ +#cmakedefine HAVE_CONSOLE_OWNER_FILE 1 +#define DBUS_CONSOLE_OWNER_FILE "@DBUS_CONSOLE_OWNER_FILE@" + +#cmakedefine DBUS_HAVE_ATOMIC_INT 1 +#cmakedefine DBUS_USE_ATOMIC_INT_486 1 +#if (defined(__i386__) || defined(__x86_64__)) +# define DBUS_HAVE_ATOMIC_INT 1 +# define DBUS_USE_ATOMIC_INT_486 1 +#endif + +#cmakedefine DBUS_BUILD_X11 1 + +#define _DBUS_VA_COPY_ASSIGN(a1,a2) { a1 = a2; } + +#cmakedefine DBUS_VA_COPY_FUNC +#if (defined DBUS_VA_COPY_FUNC) +# define DBUS_VA_COPY @DBUS_VA_COPY_FUNC@ +#endif + +#ifdef DBUS_VA_COPY_FUNC +#undef DBUS_VA_COPY_FUNC +#endif + +#cmakedefine DBUS_VA_COPY_AS_ARRAY @DBUS_VA_COPY_AS_ARRAY@ + +// headers +/* Define to 1 if you have dirent.h */ +#cmakedefine HAVE_DIRENT_H 1 + +/* Define to 1 if you have io.h */ +#cmakedefine HAVE_IO_H 1 + +/* Define to 1 if you have grp.h */ +#cmakedefine HAVE_GRP_H 1 + +/* Define to 1 if you have sys/poll.h */ +#cmakedefine HAVE_POLL 1 + +/* Define to 1 if you have sys/time.h */ +#cmakedefine HAVE_SYS_TIME 1 + +/* Define to 1 if you have sys/wait.h */ +#cmakedefine HAVE_SYS_WAIT 1 + +/* Define to 1 if you have time.h */ +#cmakedefine HAVE_TIME_H 1 + +/* Define to 1 if you have ws2tcpip.h */ +#cmakedefine HAVE_WS2TCPIP_H + +/* Define to 1 if you have wspiapi.h */ +#cmakedefine HAVE_WSPIAPI_H 1 + +/* Define to 1 if you have unistd.h */ +#cmakedefine HAVE_UNISTD_H 1 + +/* Define to 1 if you have stdio.h */ +#cmakedefine HAVE_STDIO_H 1 + +/* Define to 1 if you have sys/syslimits.h */ +#cmakedefine HAVE_SYS_SYSLIMITS_H 1 + +/* Define to 1 if you have errno.h */ +#cmakedefine HAVE_ERRNO_H 1 + +/* Define to 1 if you have signal.h */ +#cmakedefine HAVE_SIGNAL_H 1 + +/* Define to 1 if you have locale.h */ +#cmakedefine HAVE_LOCALE_H 1 + +/* Define to 1 if you have inttypes.h */ +#cmakedefine HAVE_INTTYPES_H 1 + +/* Define to 1 if you have stdint.h */ +#cmakedefine HAVE_STDINT_H 1 + +// symbols +/* Define to 1 if you have backtrace */ +#cmakedefine HAVE_BACKTRACE 1 + +/* Define to 1 if you have getgrouplist */ +#cmakedefine HAVE_GETGROUPLIST 1 + +/* Define to 1 if you have getpeerucred */ +#cmakedefine HAVE_GETPEERUCRED 1 + +/* Define to 1 if you have nanosleep */ +#cmakedefine HAVE_NANOSLEEP 1 + +/* Define to 1 if you have getpwnam_r */ +#cmakedefine HAVE_POSIX_GETPWNAM_R 1 + +/* Define to 1 if you have socketpair */ +#cmakedefine HAVE_SOCKETPAIR 1 + +/* Define to 1 if you have setenv */ +#cmakedefine HAVE_SETENV 1 + +/* Define to 1 if you have unsetenv */ +#cmakedefine HAVE_UNSETENV 1 + +/* Define to 1 if you have clearenv */ +#cmakedefine HAVE_CLEARENV 1 + +/* Define to 1 if you have writev */ +#cmakedefine HAVE_WRITEV 1 + +/* Define to 1 if you have socklen_t */ +#cmakedefine HAVE_SOCKLEN_T 1 + +/* Define to 1 if you have setlocale */ +#cmakedefine HAVE_SETLOCALE 1 + +/* Define to 1 if you have localeconv */ +#cmakedefine HAVE_LOCALECONV 1 + +/* Define to 1 if you have strtoll */ +#cmakedefine HAVE_STRTOLL 1 + +/* Define to 1 if you have strtoull */ +#cmakedefine HAVE_STRTOULL 1 + +// structs +/* Define to 1 if you have struct cmsgred */ +#cmakedefine HAVE_CMSGCRED 1 + +// system type defines +#if defined(_WIN32) || defined(_WIN64) || defined (_WIN32_WCE) +# define DBUS_WIN +# define DBUS_WIN_FIXME 1 +# ifdef _WIN32_WCE +# define DBUS_WINCE +# else +# define DBUS_WIN32 +# endif +#else +# define DBUS_UNIX +#endif + +#if defined(_WIN32) || defined(_WIN64) +// mingw mode_t +# ifdef HAVE_STDIO_H +# include <stdio.h> +# endif +# ifndef _MSC_VER +# define uid_t int +# define gid_t int +# else +# define snprintf _snprintf + typedef int mode_t; +# if !defined(_WIN32_WCE) +# define strtoll _strtoi64 +# define strtoull _strtoui64 +# define HAVE_STRTOLL 1 +# define HAVE_STRTOULL 1 +# endif +# endif +#endif // defined(_WIN32) || defined(_WIN64) + +#ifdef interface +#undef interface +#endif + +#ifndef SIGHUP +#define SIGHUP 1 +#endif + +#cmakedefine DBUS_VERBOSE_C_S 1 +#ifdef DBUS_VERBOSE_C_S +#define _dbus_verbose_C_S printf +#else +#define _dbus_verbose_C_S _dbus_verbose +#endif + +#endif // _DBUS_CONFIG_H diff --git a/cmake/cross-compile.sh b/cmake/cross-compile.sh new file mode 100755 index 00000000..c1821bdb --- /dev/null +++ b/cmake/cross-compile.sh @@ -0,0 +1,105 @@ +#!/bin/sh +# +# cross compile script for cmake +# +# initial written by Fridrich Strba +# refactored to debian/lenny by Ralf Habacker +# +# reported to work at least on debian/lenny +# + +if test -f /usr/bin/i686-pc-mingw32-gcc; then + cross_cc=i686-pc-mingw32 +elif test -f /usr/bin/i586-mingw32msvc-gcc; then + cross_cc=i586-mingw32msvc +else + echo "could not determine mingw cross compiler" + exit 1 +fi + +if test -d ~/$cross_cc; then + cross_root=~/$cross_cc +elif test -d /usr/$cross_cc/sys-root/mingw; then + cross_root=/usr/$cross_cc/sys-root/mingw +elif test -d /usr/$cross_cc/lib; then + cross_root=/usr/$cross_cc +else + echo "could not determine mingw cross compiler sdk" + exit 1 +fi + +# make cmake happy +export TEMP=/tmp + +HOST_CC=gcc; export HOST_CC; + +if test -d $cross_root/lib/pkgconfig; then + PKG_CONFIG_PATH="$cross_root/lib/pkgconfig:$cross_root/share/pkgconfig"; export PKG_CONFIG_PATH; +fi + +if test -d "$MINGW32_CLASSPATH" || test -f "$cross_root/share/java/libgcj.jar"; then + CLASSPATH="$CLASSPATH:${MINGW32_CLASSPATH:-$cross_root/share/java/libgcj.jar:$cross_root/share/java/libgcj-tools.jar}"; export CLASSPATH; +fi + +_PREFIX="/usr/bin/$cross_cc-"; +for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do + x=`echo $i|sed "s,${_PREFIX},,"|sed "s,\.awk*,,"|tr "a-z+-" "A-ZX_"`; + declare -x $x="$i" ; export $x; +done; +unset _PREFIX; + +CC="${MINGW32_CC:-$cross_cc-gcc}"; export CC; +CFLAGS="${MINGW32_CFLAGS:--O2 -g -pipe -Wall -fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls --param=ssp-buffer-size=4 -mms-bitfields}"; export CFLAGS; +LDFLAGS="${MINGW32_LDFLAGS:--Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a}"; export LDFLAGS; + +if [ -x "/usr/bin/$cross_cc-g++" ]; then + CXX="${MINGW32_CXX:-$cross_cc-g++}"; export CXX; + CXXFLAGS="${MINGW32_CXXFLAGS:--O2 -g -pipe -Wall -fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls --param=ssp-buffer-size=4 -mms-bitfields}"; export CXXFLAGS; +else + CXX=; export CXX; + ac_cv_prog_CXX=no; export ac_cv_prog_CXX; + CXXFLAGS=; export CXXFLAGS; +fi; +for i in `ls $cross_root/bin/*|grep -- "-config$"` ; do + x=`basename $i|tr "a-z+-" "A-ZX_"|sed "s,\.,,"`; + declare -x $x="$i" ; export $x; +done; +unset x i ; + +if ! test -f "$cross_root/lib/libexpat.dll.a"; then + (cd /tmp; wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-bin.zip) + (cd /tmp; wget http://www.winkde.org/pub/kde/ports/win32/repository/win32libs/expat-2.0.1-lib.zip) + (cd $cross_root; unzip -x /tmp/expat-2.0.1-bin.zip) + (cd $cross_root; unzip -x /tmp/expat-2.0.1-lib.zip) +fi + +if test -f "$cross_root/lib/libexpat.dll.a"; then + xml_library=-DDBUS_USE_EXPAT=On -DLIBEXPAT_INCLUDE_DIR:PATH=$cross_root/include -DLIBEXPAT_LIBRARIES:PATH=$cross_root/lib/libexpat.dll.a +else + echo "could not find a cross compile xml libraray" + exit 1 +fi + +cmake \ + -DCMAKE_SYSTEM_NAME="Windows" \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_INSTALL_PREFIX:PATH=$cross_root \ + -DCMAKE_INSTALL_LIBDIR:PATH=$cross_root/lib \ + -DINCLUDE_INSTALL_DIR:PATH=$cross_root/include \ + -DLIB_INSTALL_DIR:PATH=$cross_root/lib \ + -DSYSCONF_INSTALL_DIR:PATH=$cross_root/etc \ + -DSHARE_INSTALL_PREFIX:PATH=$cross_root/share \ + -DBUILD_SHARED_LIBS:BOOL=ON \ + -DCMAKE_C_COMPILER="/usr/bin/$cross_cc-gcc" \ + -DCMAKE_CXX_COMPILER="/usr/bin/$cross_cc-g++" \ + -DCMAKE_FIND_ROOT_PATH="$cross_root" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + -DCMAKE_CXX_COMPILER="/usr/bin/$cross_cc-g++" \ + -DCMAKE_FIND_ROOT_PATH="$cross_root" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \ + $xml_library \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ + $* + diff --git a/cmake/dbus-env.bat.cmake b/cmake/dbus-env.bat.cmake new file mode 100644 index 00000000..85f70051 --- /dev/null +++ b/cmake/dbus-env.bat.cmake @@ -0,0 +1,8 @@ +:: environment setting for dbus clients +@echo off + +:: session bus address +set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_DEFAULT_ADDRESS@ + +:: system bus address +set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
\ No newline at end of file diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt new file mode 100644 index 00000000..afbd544e --- /dev/null +++ b/cmake/dbus/CMakeLists.txt @@ -0,0 +1,313 @@ +project(dbus-lib) + +SET(DBUS_DIR ${CMAKE_SOURCE_DIR}/../dbus) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dbus-arch-deps.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h ) + +add_definitions(-DDBUS_COMPILATION) + +set (dbusinclude_HEADERS + ${DBUS_DIR}/dbus.h + ${DBUS_DIR}/dbus-address.h + ${DBUS_DIR}/dbus-bus.h + ${DBUS_DIR}/dbus-connection.h + ${DBUS_DIR}/dbus-errors.h + ${DBUS_DIR}/dbus-macros.h + ${DBUS_DIR}/dbus-memory.h + ${DBUS_DIR}/dbus-message.h + ${DBUS_DIR}/dbus-misc.h + ${DBUS_DIR}/dbus-pending-call.h + ${DBUS_DIR}/dbus-protocol.h + ${DBUS_DIR}/dbus-server.h + ${DBUS_DIR}/dbus-shared.h + ${DBUS_DIR}/dbus-signature.h + ${DBUS_DIR}/dbus-threads.h + ${DBUS_DIR}/dbus-types.h + dbus-arch-deps.h +) + +### source code that goes in the installed client library +### and is specific to library functionality +set (DBUS_LIB_SOURCES + ${DBUS_DIR}/dbus-address.c + ${DBUS_DIR}/dbus-auth.c + ${DBUS_DIR}/dbus-auth-script.c + ${DBUS_DIR}/dbus-bus.c + ${DBUS_DIR}/dbus-connection.c + ${DBUS_DIR}/dbus-credentials.c + ${DBUS_DIR}/dbus-errors.c + ${DBUS_DIR}/dbus-keyring.c + ${DBUS_DIR}/dbus-marshal-header.c + ${DBUS_DIR}/dbus-marshal-byteswap.c + ${DBUS_DIR}/dbus-marshal-recursive.c + ${DBUS_DIR}/dbus-marshal-validate.c + ${DBUS_DIR}/dbus-message.c + ${DBUS_DIR}/dbus-misc.c + ${DBUS_DIR}/dbus-nonce.c + ${DBUS_DIR}/dbus-object-tree.c + ${DBUS_DIR}/dbus-pending-call.c + ${DBUS_DIR}/dbus-resources.c + ${DBUS_DIR}/dbus-server.c + ${DBUS_DIR}/dbus-server-socket.c + ${DBUS_DIR}/dbus-server-debug-pipe.c + ${DBUS_DIR}/dbus-sha.c + ${DBUS_DIR}/dbus-signature.c + ${DBUS_DIR}/dbus-timeout.c + ${DBUS_DIR}/dbus-threads.c + ${DBUS_DIR}/dbus-transport.c + ${DBUS_DIR}/dbus-transport-socket.c + ${DBUS_DIR}/dbus-watch.c +#dbus-md5.c +# +# find a clean Windows implementation +# and move code to a *-win.c file +) + + +if(UNIX) + set (DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES} + ${DBUS_DIR}/dbus-transport-unix.c + ${DBUS_DIR}/dbus-server-unix.c + ) +else(UNIX) + set (DBUS_LIB_SOURCES ${DBUS_LIB_SOURCES} + ${DBUS_DIR}/dbus-transport-win.c + ${DBUS_DIR}/dbus-server-win.c + ) +endif(UNIX) + +set (DBUS_LIB_HEADERS + ${DBUS_DIR}/dbus-auth.h + ${DBUS_DIR}/dbus-auth-script.h + ${DBUS_DIR}/dbus-connection-internal.h + ${DBUS_DIR}/dbus-credentials.h + ${DBUS_DIR}/dbus-keyring.h + ${DBUS_DIR}/dbus-marshal-header.h + ${DBUS_DIR}/dbus-marshal-byteswap.h + ${DBUS_DIR}/dbus-marshal-recursive.h + ${DBUS_DIR}/dbus-marshal-validate.h + ${DBUS_DIR}/dbus-message-internal.h + ${DBUS_DIR}/dbus-message-private.h + ${DBUS_DIR}/dbus-misc.h + ${DBUS_DIR}/dbus-object-tree.h + ${DBUS_DIR}/dbus-protocol.h + ${DBUS_DIR}/dbus-resources.h + ${DBUS_DIR}/dbus-server-debug-pipe.h + ${DBUS_DIR}/dbus-server-protected.h + ${DBUS_DIR}/dbus-server-unix.h + ${DBUS_DIR}/dbus-sha.h + ${DBUS_DIR}/dbus-timeout.h + ${DBUS_DIR}/dbus-threads.h + ${DBUS_DIR}/dbus-threads-internal.h + ${DBUS_DIR}/dbus-transport.h + ${DBUS_DIR}/dbus-transport-protected.h + ${DBUS_DIR}/dbus-watch.h + ${CMAKE_BINARY_DIR}/config.h +##dbus-md5.h +) +if(UNIX) + set (DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS} + ${DBUS_DIR}/dbus-transport-unix.h + ) +else(UNIX) + set (DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS} + ${DBUS_DIR}/dbus-transport-win.h + ) +endif(UNIX) + + +### source code that goes in the installed client library +### AND is generic utility functionality used by the +### daemon or test programs (all symbols in here should +### be underscore-prefixed) +set (DBUS_SHARED_SOURCES + ${DBUS_DIR}/dbus-dataslot.c + ${DBUS_DIR}/dbus-file.c + ${DBUS_DIR}/dbus-hash.c + ${DBUS_DIR}/dbus-internals.c + ${DBUS_DIR}/dbus-list.c + ${DBUS_DIR}/dbus-marshal-basic.c + ${DBUS_DIR}/dbus-memory.c + ${DBUS_DIR}/dbus-mempool.c + ${DBUS_DIR}/dbus-string.c + ${DBUS_DIR}/dbus-sysdeps.c + ${DBUS_DIR}/dbus-pipe.c +) + +set (DBUS_SHARED_HEADERS + ${DBUS_DIR}/dbus-dataslot.h + ${DBUS_DIR}/dbus-file.h + ${DBUS_DIR}/dbus-hash.h + ${DBUS_DIR}/dbus-internals.h + ${DBUS_DIR}/dbus-list.h + ${DBUS_DIR}/dbus-marshal-basic.h + ${DBUS_DIR}/dbus-mempool.h + ${DBUS_DIR}/dbus-string.h + ${DBUS_DIR}/dbus-string-private.h + ${DBUS_DIR}/dbus-pipe.h + ${DBUS_DIR}/dbus-sysdeps.h +) + +### source code that is generic utility functionality used +### by the bus daemon or test apps, but is NOT included +### in the D-BUS client library (all symbols in here +### should be underscore-prefixed but don't really need +### to be unless they move to DBUS_SHARED_SOURCES later) +set (DBUS_UTIL_SOURCES + ${DBUS_DIR}/dbus-auth-util.c + ${DBUS_DIR}/dbus-credentials-util.c + ${DBUS_DIR}/dbus-mainloop.c + ${DBUS_DIR}/dbus-marshal-byteswap-util.c + ${DBUS_DIR}/dbus-marshal-recursive-util.c + ${DBUS_DIR}/dbus-marshal-validate-util.c + ${DBUS_DIR}/dbus-message-factory.c + ${DBUS_DIR}/dbus-message-util.c + ${DBUS_DIR}/dbus-shell.c + ${DBUS_DIR}/dbus-string-util.c + ${DBUS_DIR}/dbus-sysdeps-util.c +) + +if (DBUS_BUILD_TESTS) + set (DBUS_UTIL_SOURCES + ${DBUS_UTIL_SOURCES} + ${DBUS_DIR}/dbus-test.c + ) +endif (DBUS_BUILD_TESTS) + +set (DBUS_UTIL_HEADERS + ${DBUS_DIR}/dbus-mainloop.h + ${DBUS_DIR}/dbus-message-factory.h + ${DBUS_DIR}/dbus-shell.h + ${DBUS_DIR}/dbus-spawn.h + ${DBUS_DIR}/dbus-test.h +) + +### platform specific settings +if (WIN32) + set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES} + ${DBUS_DIR}/dbus-file-win.c + ${DBUS_DIR}/dbus-sysdeps-win.c + ${DBUS_DIR}/dbus-pipe-win.c + ${DBUS_DIR}/dbus-sysdeps-thread-win.c + ) + set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS} + ${DBUS_DIR}/dbus-sockets-win.h + ${DBUS_DIR}/dbus-sysdeps-win.h + ) + set (DBUS_UTIL_SOURCES ${DBUS_UTIL_SOURCES} + ${DBUS_DIR}/dbus-spawn-win.c + ${DBUS_DIR}/dbus-sysdeps-util-win.c + ) + if(WINCE) + set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES} + ${DBUS_DIR}/dbus-sysdeps-wince-glue.c + ) + set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS} + ${DBUS_DIR}/dbus-sysdeps-wince-glue.h + ) + endif(WINCE) +else (WIN32) + set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES} + ${DBUS_DIR}/dbus-file-unix.c + ${DBUS_DIR}/dbus-pipe-unix.c + ${DBUS_DIR}/dbus-sysdeps-unix.c + ${DBUS_DIR}/dbus-sysdeps-pthread.c + ${DBUS_DIR}/dbus-userdb.c + ${DBUS_DIR}/sd-daemon.c + ) + set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS} + ${DBUS_DIR}/dbus-server-unix.h + ${DBUS_DIR}/dbus-transport-unix.h + ${DBUS_DIR}/dbus-sysdeps-unix.h + ${DBUS_DIR}/dbus-userdb.h + ${DBUS_DIR}/sd-daemon.h + ) + set (DBUS_UTIL_SOURCES ${DBUS_UTIL_SOURCES} + ${DBUS_DIR}/dbus-spawn.c + ${DBUS_DIR}/dbus-userdb-util.c + ${DBUS_DIR}/dbus-sysdeps-util-unix.c + ) +endif (WIN32) + +set(libdbus_SOURCES + ${DBUS_LIB_SOURCES} + ${DBUS_SHARED_SOURCES} + # for debugging + ${DBUS_UTIL_SOURCES} +) + +set(libdbus_HEADERS + ${DBUS_LIB_HEADERS} + ${DBUS_SHARED_HEADERS} + # for debugging + ${DBUS_UTIL_HEADERS} +) +if (MSVC) + set (BUILD_FILEVERSION ${DBUS_MAJOR_VERSION},${DBUS_MINOR_VERSION},${DBUS_MICRO_VERSION},${DBUS_PATCH_VERSION}) + set (BUILD_TIMESTAMP ${DBUS_BUILD_TIMESTAMP}) + + configure_file(${DBUS_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/afxres.h "") + list(APPEND libdbus_SOURCES versioninfo.rc) + set_source_files_properties(versioninfo.rc COMPILE_FLAGS "-D__LINE__=1") +endif (MSVC) + +if(MSVC_IDE) + project_source_group(${GROUP_CODE} DBUS_LIB_SOURCES DBUS_LIB_HEADERS) + project_source_group(${GROUP_CODE} DBUS_SHARED_SOURCES DBUS_SHARED_HEADERS) + project_source_group(${GROUP_CODE} DBUS_UTIL_SOURCES DBUS_UTIL_SOURCES) +endif(MSVC_IDE) + +### Client library + +add_library(dbus-1 SHARED + ${libdbus_SOURCES} + ${libdbus_HEADERS} +) +if(WIN32) + if(WINCE) + target_link_libraries(dbus-1 ws2) + else(WINCE) + target_link_libraries(dbus-1 ws2_32 advapi32 netapi32) + endif(WINCE) +endif(WIN32) + +install_targets(/lib dbus-1 ) +install_files(/include/dbus FILES ${dbusinclude_HEADERS}) + +### Internal library, used for the daemon, tools and tests, compiled statically. + +add_library(dbus-internal ${DBUS_INTERNAL_ADD_LIBRARY_OPTIONS} + ${DBUS_LIB_SOURCES} + ${DBUS_LIB_HEADERS} + ${DBUS_SHARED_SOURCES} + ${DBUS_SHARED_HEADERS} + ${DBUS_UTIL_SOURCES} + ${DBUS_UTIL_HEADERS} +) +target_link_libraries(dbus-internal) +set_target_properties(dbus-internal PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_LIBRARY_DEFINITIONS}) +if(WIN32) + if(WINCE) + target_link_libraries(dbus-internal ws2) + else(WINCE) + target_link_libraries(dbus-internal ws2_32 advapi32 netapi32) + endif(WINCE) +endif(WIN32) + +if (DBUS_BUILD_TESTS) + set (TESTS_ENVIRONMENT "DBUS_TEST_DATA=${CMAKE_SOURCE_DIR}/test/data DBUS_TEST_HOMEDIR=${CMAKE_BUILD_DIR}/dbus") + ADD_EXECUTABLE(dbus-test ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c) + target_link_libraries(dbus-test ${DBUS_INTERNAL_LIBRARIES}) + add_test(dbus-test ${EXECUTABLE_OUTPUT_PATH}/dbus-test ${CMAKE_SOURCE_DIR}/../test/data) + set_target_properties(dbus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS}) +ENDIF (DBUS_BUILD_TESTS) + +if (UNIX) +# set version info +ENDIF (UNIX) + + +## mop up the gcov files +#clean-local: +#/bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true diff --git a/cmake/dbus/dbus-arch-deps.h.cmake b/cmake/dbus/dbus-arch-deps.h.cmake new file mode 100644 index 00000000..7d566e9f --- /dev/null +++ b/cmake/dbus/dbus-arch-deps.h.cmake @@ -0,0 +1,56 @@ +/* -*- mode: C; c-file-style: "gnu" -*- */ +/* dbus-arch-deps.h Header with architecture/compiler specific information, installed to libdir + * + * Copyright (C) 2003 Red Hat, Inc. + * + * Licensed under the Academic Free License version 2.0 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_ARCH_DEPS_H +#define DBUS_ARCH_DEPS_H + +#include <dbus/dbus-macros.h> + +DBUS_BEGIN_DECLS; + +#cmakedefine DBUS_HAVE_INT64 1 +#if DBUS_HAVE_INT64 +typedef @DBUS_INT64_TYPE@ dbus_int64_t; +typedef unsigned @DBUS_INT64_TYPE@ dbus_uint64_t; + +#define DBUS_INT64_CONSTANT(val) (val##LL) +#define DBUS_UINT64_CONSTANT(val) (val##ULL) + +#else +#undef DBUS_HAVE_INT64 +#undef DBUS_INT64_CONSTANT +#undef DBUS_UINT64_CONSTANT +#endif + +typedef @DBUS_INT32_TYPE@ dbus_int32_t; +typedef unsigned @DBUS_INT32_TYPE@ dbus_uint32_t; + +typedef @DBUS_INT16_TYPE@ dbus_int16_t; +typedef unsigned @DBUS_INT16_TYPE@ dbus_uint16_t; + +DBUS_END_DECLS; + +#endif /* DBUS_ARCH_DEPS_H */ diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt new file mode 100644 index 00000000..df6b587b --- /dev/null +++ b/cmake/doc/CMakeLists.txt @@ -0,0 +1,120 @@ +find_package(Doxygen) + +if(DOXYGEN_EXECUTABLE) + OPTION(DBUS_ENABLE_DOXYGEN_DOCS "build DOXYGEN documentation (requires Doxygen)" ON) +endif(DOXYGEN_EXECUTABLE) + +if (DBUS_ENABLE_DOXYGEN_DOCS) + set (top_srcdir ${CMAKE_SOURCE_DIR}/..) + configure_file(${CMAKE_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_BINARY_DIR}/Doxyfile ) + add_custom_target(doc + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile + ) +endif (DBUS_ENABLE_DOXYGEN_DOCS) + +# +# find docbook generator +# +find_program(MEINPROC4_EXECUTABLE meinproc4) + +find_program(XMLTO_EXECUTABLE xmlto) + +if (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE) + OPTION(DBUS_ENABLE_XML_DOCS "build XML documentation (requires xmlto or meinproc4)" ON) +endif (MEINPROC4_EXECUTABLE OR XMLTO_EXECUTABLE) + +if (MEINPROC4_EXECUTABLE) + set(DOCBOOK_GENERATOR_NAME "meinproc4" PARENT_SCOPE) + set(DBUS_XML_DOCS_ENABLED 1) + if(WIN32) + get_filename_component(_a ${MEINPROC4_EXECUTABLE} PATH) + get_filename_component(_meinproc_install_path ${_a} PATH) + else(WIN32) + set(_meinproc_install_path ${CMAKE_INSTALL_PREFIX}) + endif(WIN32) + set(STYLESHEET "${_meinproc_install_path}/share/apps/ksgmltools2/docbook/xsl/html/docbook.xsl") +endif (MEINPROC4_EXECUTABLE) + + +if (XMLTO_EXECUTABLE) + set (DOCBOOK_GENERATOR_NAME "xmlto" PARENT_SCOPE) + set(DBUS_XML_DOCS_ENABLED 1) + MESSAGE(STATUS "xmlto docbook generator found") +endif (XMLTO_EXECUTABLE) + +if (DBUS_ENABLE_XML_DOCS) + +macro (DOCBOOK _sources _options) + get_filename_component(_infile ${_sources} ABSOLUTE) + get_filename_component(_basename ${_infile} NAME_WE) + set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.html) + + if (EXISTS ${_sources}) + if (MEINPROC4_EXECUTABLE) + ADD_CUSTOM_TARGET(${_basename}.html ALL + ${MEINPROC4_EXECUTABLE} --stylesheet ${STYLESHEET} -o ${_outfile} ${_infile} + DEPENDS ${_infile} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + endif () + if (XMLTO_EXECUTABLE) + ADD_CUSTOM_TARGET(${_basename}.html ALL + ${XMLTO_EXECUTABLE} -vv ${_options} ${_infile} + DEPENDS ${_infile} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + endif () + install(FILES ${_outfile} DESTINATION share/doc/dbus) + else () + MESSAGE(STATUS "skipping xml doc generating for ${_infile}, file not found") + endif () + +endmacro (DOCBOOK) + +### copy tests to builddir so that generated tests and static tests +### are all in one place. +### todo how to add more filetypes +MACRO (COPYDIR _src _type) + FOREACH(FILE_TYPE ${_type}) + FOREACH(DIR ${_src}) + FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${DIR}/${FILE_TYPE}" ) + FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR}) + FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + SET (TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME}) + configure_file(${FILE} ${TARGET} COPYONLY) + IF (CONFIG_VERBOSE) + MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") + ENDIF (CONFIG_VERBOSE) + ENDFOREACH(FILE) + ENDFOREACH(DIR) + ENDFOREACH(FILE_TYPE) +ENDMACRO (COPYDIR) + +COPYDIR(doc *.png) +COPYDIR(doc *.svg) + +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-test-plan.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-tutorial.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-specification.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/../doc/dbus-faq.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/bus/dbus-daemon.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-monitor.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-send.xml html-nochunks) +DOCBOOK(${CMAKE_SOURCE_DIR}/tools/dbus-launch.xml html-nochunks) + +# +# handle html index file +# +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/index.html.cmake ${CMAKE_CURRENT_BINARY_DIR}/index.html ) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/index.html DESTINATION share/doc/dbus) + +set (EXTRA_DIST + ${CMAKE_SOURCE_DIR}/../doc/busconfig.dtd + ${CMAKE_SOURCE_DIR}/../doc/introspect.dtd + ${CMAKE_SOURCE_DIR}/../doc/introspect.xsl +) + +install(FILES ${EXTRA_DIST} DESTINATION share/doc/dbus) + +endif(DBUS_ENABLE_XML_DOCS) diff --git a/cmake/doc/index.html.cmake b/cmake/doc/index.html.cmake new file mode 100644 index 00000000..77dd6614 --- /dev/null +++ b/cmake/doc/index.html.cmake @@ -0,0 +1,55 @@ +<html> +<head> +<title>D-Bus Documentation Index</title> +</head> +<body> +<h1>D-Bus Documentation Index</h1> +<p>Version @DBUS_VERSION_STRING@</p> + +<table> + <tr> + <th width=10%> + </th> + <th width=30% align=left> + generic documentation + </th> + <th width=30% align=left> +application manuals + </th> + </tr> + <tr> + <td valign=top> + </td> + <td valign=top> +<a href="http://dbus.freedesktop.org">D-Bus Website</a> + <br> + <br> +<a href="dbus-tutorial.html">D-Bus Tutorial</a> + <br> + <br> +<a href="dbus-specification.html">D-Bus Specification</a> + <br> + <br> +<a href="dbus-faq.html">D-Bus FAQ</a> + <br> + <br> +<a href="dbus-test-plan.html">D-Bus Test Plan</a> + <br> + <br> + </td> + <td valign=top> +<a href="dbus-daemon.html">D-Bus Daemon manual</a> + <br> + <br> +<a href="dbus-launch.html">D-Bus launch manual</a> + <br> + <br> +<a href="dbus-send.html">D-Bus send tool manual</a> + <br> + <br> +<a href="dbus-monitor.html">D-Bus monitor manual</a> + </td> + </tr> +</table> +</body> +</html> diff --git a/cmake/modules/CPackInstallConfig.cmake b/cmake/modules/CPackInstallConfig.cmake new file mode 100644 index 00000000..f8073a25 --- /dev/null +++ b/cmake/modules/CPackInstallConfig.cmake @@ -0,0 +1,44 @@ + +if (DBUS_INSTALL_SYSTEM_LIBS) + if (MINGW) + if (DBUS_USE_EXPAT) + # expat + install_files(/bin FILES ${LIBEXPAT_LIBRARIES}) + else (DBUS_USE_EXPAT) + # xml2 + install_files(/bin FILES ${LIBXML2_LIBRARIES}) + install_files(/bin FILES ${LIBICONV_LIBRARIES}) + endif (DBUS_USE_EXPAT) + else (MINGW) + INCLUDE(InstallRequiredSystemLibraries) + endif (MINGW) +endif (DBUS_INSTALL_SYSTEM_LIBS) + +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "D-BUS For Windows") +SET(CPACK_PACKAGE_VENDOR "D-BUS Windows Team") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/../README") +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/../COPYING") +# duplicated from VERSION +SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) +SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) +SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) +#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "dbus ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "dbus") +IF(WIN32 AND NOT UNIX) + SET(CPACK_GENERATOR NSIS ZIP) # can be NSIS, STGZ, TBZ2, TGZ, TZ and ZIP + SET(CPACK_NSIS_COMPRESSOR "/SOLID lzma") + # There is a bug in NSI that does not handle full unix paths properly. Make + # sure there is at least one set of four (4) backlasshes. +# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp") + SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\dbus-launch.bat") + SET(CPACK_NSIS_DISPLAY_NAME "D-Bus for Windows") + SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\sourceforge.net/projects/windbus") + SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\sourceforge.net/projects/windbus") + SET(CPACK_NSIS_CONTACT "me@my-personal-home-page.com") + SET(CPACK_NSIS_MODIFY_PATH ON) +ELSE(WIN32 AND NOT UNIX) + SET(CPACK_STRIP_FILES "bin/MyExecutable") + SET(CPACK_SOURCE_STRIP_FILES "") +ENDIF(WIN32 AND NOT UNIX) +SET(CPACK_PACKAGE_EXECUTABLES "dbus-launch" "D-Bus Daemon") +INCLUDE(CPack) diff --git a/cmake/modules/CheckForAbstractSockets.c b/cmake/modules/CheckForAbstractSockets.c new file mode 100644 index 00000000..062b846c --- /dev/null +++ b/cmake/modules/CheckForAbstractSockets.c @@ -0,0 +1,33 @@ +#include <stdlib.h> +#include <string.h> +#include <stdio.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <errno.h> + +int main() { + int listen_fd; + struct sockaddr_un addr; + + listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); + + if (listen_fd < 0) + { + fprintf (stderr, "socket() failed: %s\n", strerror (errno)); + exit (1); + } + + memset (&addr, '\0', sizeof (addr)); + addr.sun_family = AF_UNIX; + strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); + addr.sun_path[0] = '\0'; /* this is what makes it abstract */ + + if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) + { + fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", + strerror (errno)); + exit (1); + } + else + exit (0); +}
\ No newline at end of file diff --git a/cmake/modules/CheckPrototypeExists.cmake b/cmake/modules/CheckPrototypeExists.cmake new file mode 100644 index 00000000..da319f13 --- /dev/null +++ b/cmake/modules/CheckPrototypeExists.cmake @@ -0,0 +1,35 @@ +# - Check if the prototype for a function exists. +# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) +# +# FUNCTION - the name of the function you are looking for +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories + +INCLUDE(CheckCXXSourceCompiles) + +MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH (it) + + SET(_CHECK_PROTO_EXISTS_SOURCE_CODE " +${_INCLUDE_FILES} +int main() +{ +#ifndef ${_SYMBOL} + int i = sizeof(&${_SYMBOL}); +#endif + return 0; +} +") + CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT}) +ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + diff --git a/cmake/modules/CheckStructMember.cmake b/cmake/modules/CheckStructMember.cmake new file mode 100644 index 00000000..fd5d3461 --- /dev/null +++ b/cmake/modules/CheckStructMember.cmake @@ -0,0 +1,36 @@ +# - Check if the given struct or class has the specified member variable +# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE) +# +# STRUCT - the name of the struct or class you are interested in +# MEMBER - the member which existence you want to check +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories + +INCLUDE(CheckCXXSourceCompiles) + +MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH (it) + + SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE " +${_INCLUDE_FILES} +int main() +{ + ${_STRUCT}* tmp; + tmp->${_MEMBER}; + return 0; +} +") + CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT}) + +ENDMACRO (CHECK_STRUCT_MEMBER) + diff --git a/cmake/modules/FindDoxygen.cmake b/cmake/modules/FindDoxygen.cmake new file mode 100644 index 00000000..1767901e --- /dev/null +++ b/cmake/modules/FindDoxygen.cmake @@ -0,0 +1,3 @@ + +find_program(DOXYGEN_EXECUTABLE NAMES doxygen DOC "doxygen executable") +mark_as_advanced(DOXYGEN_EXECUTABLE) diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake new file mode 100644 index 00000000..1fdaee95 --- /dev/null +++ b/cmake/modules/FindGLIB.cmake @@ -0,0 +1,42 @@ +# - Try to find the GLIB library +# Once done this will define +# +# GLIB_FOUND - system has GLIB +# GLIB_INCLUDES - the GLIB include directories +# GLIB_LIBRARIES - The libraries needed to use GLIB + +if (WIN32) + +INCLUDE(MacroGetenvWinPath) + +MACRO_GETENV_WIN_PATH(_program_FILES_DIR PROGRAMFILES) + +FIND_PATH(GLIB_INCLUDE_DIR glib.h + ${_program_FILES_DIR}/glib/include/glib-2.0 +) + + +# search for GLIB in the default install directory for applications (default of (n)make install) +FIND_LIBRARY(GLIB_LIBRARY NAMES glib-2.0 + PATHS + ${_program_FILES_DIR}/glib/lib +) + +if (GLIB_LIBRARY AND GLIB_INCLUDE_DIR) + set(GLIB_FOUND TRUE) + set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GLIB_INCLUDES}) + set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GLIB_LIBRARIES}) + +endif (GLIB_LIBRARY AND GLIB_INCLUDE_DIR) + +if (GLIB_FOUND) + if (NOT GLIB_FIND_QUIETLY) + message(STATUS "Found GLIB: ${GLIB_LIBRARY}") + endif (NOT GLIB_FIND_QUIETLY) +else (GLIB_FOUND) + if (GLIB_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find GLIB library") + endif (GLIB_FIND_REQUIRED) +endif (GLIB_FOUND) + +endif (WIN32) diff --git a/cmake/modules/FindLibExpat.cmake b/cmake/modules/FindLibExpat.cmake new file mode 100644 index 00000000..a07c8de4 --- /dev/null +++ b/cmake/modules/FindLibExpat.cmake @@ -0,0 +1,61 @@ +# - Try to find LIBEXPAT +# Once done this will define +# +# LIBEXPAT_FOUND - system has LIBEXPAT +# LIBEXPAT_INCLUDE_DIR - the LIBEXPAT include directory +# LIBEXPAT_LIBRARIES - the libraries needed to use LIBEXPAT +# LIBEXPAT_DEFINITIONS - Compiler switches required for using LIBEXPAT + +if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) + + # in cache already + SET(LIBEXPAT_FOUND TRUE) + +else (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) + + IF (WIN32) + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) + find_FILE(LIBEXPAT_DIR expat Source/lib/expat.h + PATHS + "${_progFiles}" + ) + if (LIBEXPAT_DIR) + set (_LIBEXPATIncDir ${LIBEXPAT_DIR}/Source/lib) + set (_LIBEXPATLinkDir ${LIBEXPAT_DIR}/libs) + endif (LIBEXPAT_DIR) + ELSE (WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + PKGCONFIG(LIBEXPAT-2.0 _LIBEXPATIncDir _LIBEXPATLinkDir _LIBEXPATLinkFlags _LiIconvCflags) + SET(LIBEXPAT_DEFINITIONS ${_LIBEXPATCflags}) + ENDIF (WIN32) + + FIND_PATH(LIBEXPAT_INCLUDE_DIR expat.h + PATHS + ${_LIBEXPATIncDir} + PATH_SUFFIXES LIBEXPAT + ) + + FIND_LIBRARY(LIBEXPAT_LIBRARIES NAMES expat libexpat + PATHS + ${_LIBEXPATLinkDir} + ) + + if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) + set(LIBEXPAT_FOUND TRUE) + endif (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) + + if (LIBEXPAT_FOUND) + if (NOT LIBEXPAT_FIND_QUIETLY) + message(STATUS "Found libexpat: ${LIBEXPAT_LIBRARIES}") + endif (NOT LIBEXPAT_FIND_QUIETLY) + else (LIBEXPAT_FOUND) + if (LIBEXPAT_FIND_REQUIRED) + message(SEND_ERROR "Could NOT find libexpat") + endif (LIBEXPAT_FIND_REQUIRED) + endif (LIBEXPAT_FOUND) + + MARK_AS_ADVANCED(LIBEXPAT_INCLUDE_DIR LIBEXPAT_LIBRARIES) + +endif (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) diff --git a/cmake/modules/FindLibIconv.cmake b/cmake/modules/FindLibIconv.cmake new file mode 100644 index 00000000..dac63449 --- /dev/null +++ b/cmake/modules/FindLibIconv.cmake @@ -0,0 +1,52 @@ +# - Try to find LibIconv +# Once done this will define +# +# LIBICONV_FOUND - system has LibIconv +# LIBICONV_INCLUDE_DIR - the LibIconv include directory +# LIBICONV_LIBRARIES - the libraries needed to use LibIconv +# LIBICONV_DEFINITIONS - Compiler switches required for using LibIconv + +if (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES) + + # in cache already + SET(LIBICONV_FOUND TRUE) + +else (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES) + + IF (NOT WIN32) + MESSAGE(FATAL_ERROR "Please set this to the correct values!") + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + PKGCONFIG(libiconv-1.9 _LibIconvIncDir _LibIconvLinkDir _LibIconvLinkFlags _LiIconvCflags) + SET(LIBICONV_DEFINITIONS ${_LibIconvCflags}) + ENDIF (NOT WIN32) + + FIND_PATH(LIBICONV_INCLUDE_DIR iconv.h + PATHS + ${_LibIconvIncDir} + PATH_SUFFIXES libiconv + ) + + FIND_LIBRARY(LIBICONV_LIBRARIES NAMES iconv libiconv + PATHS + ${_LibIconvLinkDir} + ) + + if (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES) + set(LIBICONV_FOUND TRUE) + endif (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES) + + if (LIBICONV_FOUND) + if (NOT LibIconv_FIND_QUIETLY) + message(STATUS "Found LibIconv: ${LIBICONV_LIBRARIES}") + endif (NOT LibIconv_FIND_QUIETLY) + else (LIBICONV_FOUND) + if (LibIconv_FIND_REQUIRED) + message(SEND_ERROR "Could NOT find LibIconv") + endif (LibIconv_FIND_REQUIRED) + endif (LIBICONV_FOUND) + + MARK_AS_ADVANCED(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARIES) + +endif (LIBICONV_INCLUDE_DIR AND LIBICONV_LIBRARIES) diff --git a/cmake/modules/MacroGetenvWinPath.cmake b/cmake/modules/MacroGetenvWinPath.cmake new file mode 100644 index 00000000..b18f7f63 --- /dev/null +++ b/cmake/modules/MacroGetenvWinPath.cmake @@ -0,0 +1,5 @@ + +MACRO (MACRO_GETENV_WIN_PATH var name) + set(${var} $ENV{${name}}) + STRING(REGEX REPLACE "\\\\" "/" ${var} "${${var}}") +ENDMACRO (MACRO_GETENV_WIN_PATH var name) diff --git a/cmake/modules/MacroLibrary.cmake b/cmake/modules/MacroLibrary.cmake new file mode 100644 index 00000000..6523530c --- /dev/null +++ b/cmake/modules/MacroLibrary.cmake @@ -0,0 +1,9 @@ +# - include MacroLibrary offers a collection of macros which extend the built-in cmake commands +# OPTIONAL_FIND_PACKAGE( <name> [QUIT] ) + +INCLUDE(MacroOptionalFindPackage) +#INCLUDE(MacroAdditionalCleanFiles) +#INCLUDE(MacroAddFileDependencies) +#INCLUDE(MacroGetenvWinPath) +#INCLUDE(MacroEnsureOutOfSourceBuild) + diff --git a/cmake/modules/MacroOptionalFindPackage.cmake b/cmake/modules/MacroOptionalFindPackage.cmake new file mode 100644 index 00000000..70681312 --- /dev/null +++ b/cmake/modules/MacroOptionalFindPackage.cmake @@ -0,0 +1,22 @@ +# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION() +# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] ) +# This macro is a combination of OPTION() and FIND_PACKAGE(), it +# works like FIND_PACKAGE(), but additionally it automatically creates +# an option name WITH_<name>, which can be disabled via the cmake GUI. +# or via -DWITH_<name>=OFF +# The standard <name>_FOUND variables can be used in the same way +# as when using the normal FIND_PACKAGE() + +MACRO (MACRO_OPTIONAL_FIND_PACKAGE _name ) + OPTION(WITH_${_name} "Search for ${_name} package" ON) + if (WITH_${_name}) + FIND_PACKAGE(${_name} ${ARGN}) + else (WITH_${_name}) + set(${_name}_FOUND) + set(${_name}_INCLUDE_DIR) + set(${_name}_INCLUDES) + set(${_name}_LIBRARY) + set(${_name}_LIBRARIES) + endif (WITH_${_name}) +ENDMACRO (MACRO_OPTIONAL_FIND_PACKAGE) + diff --git a/cmake/modules/ProjectSourceGroup.cmake b/cmake/modules/ProjectSourceGroup.cmake new file mode 100644 index 00000000..713a67a1 --- /dev/null +++ b/cmake/modules/ProjectSourceGroup.cmake @@ -0,0 +1,18 @@ +# folders in the msvc projects +# mode==flat : headers and ourses in no folders +# mode==split : standard behavior of cmake, split headers and sources +# mode== <other values" : code is in this folder +macro(project_source_group mode sources headers) + #message(STATUS ${mode}) + #message(STATUS ${sources} ${headers}) + if(${mode} MATCHES "flat") + source_group("Source Files" Files) + source_group("Header Files" Files) + source_group("cmake" FILES CMakeLists.txt) + else(${mode} MATCHES "flat") + if(NOT ${mode} MATCHES "split") + source_group("${mode}" FILES ${${sources}} ${${headers}}) + endif(NOT ${mode} MATCHES "split") + endif(${mode} MATCHES "flat") +endmacro(project_source_group mode sources headers) + diff --git a/cmake/modules/Win32Macros.cmake b/cmake/modules/Win32Macros.cmake new file mode 100644 index 00000000..4385cc97 --- /dev/null +++ b/cmake/modules/Win32Macros.cmake @@ -0,0 +1,44 @@ +# +# win32 macros +# +# Copyright (c) 2006-2007, Ralf Habacker +# +# Redistribution and use is allowed according to the terms of the BSD license. +# + +if (WIN32) + # + # addExplorerWrapper creates batch files for fast access + # to the build environment from the win32 explorer. + # + # For mingw and nmake projects it's opens a command shell, + # for Visual Studio IDE's (at least tested with VS 8 2005) it + # opens the related .sln file with paths setting specified at + # configure time. + # + MACRO (addExplorerWrapper _projectname) + # write explorer wrappers + get_filename_component(CMAKE_BIN_PATH ${CMAKE_COMMAND} PATH) + set (ADD_PATH "${CMAKE_BIN_PATH}") + + if (QT_QMAKE_EXECUTABLE) + get_filename_component(QT_BIN_PATH ${QT_QMAKE_EXECUTABLE} PATH) + set (ADD_PATH "${ADD_PATH};${QT_BIN_PATH}") + endif (QT_QMAKE_EXECUTABLE) + + # add here more pathes + + if (MINGW) + get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH) + set (ADD_PATH "${ADD_PATH};${MINGW_BIN_PATH}") + write_file (${CMAKE_BINARY_DIR}/${_projectname}-shell.bat "set PATH=${ADD_PATH};%PATH%\ncmd.exe") + else (MINGW) + if (CMAKE_BUILD_TOOL STREQUAL "nmake") + get_filename_component(VC_BIN_PATH ${CMAKE_CXX_COMPILER} PATH) + write_file (${CMAKE_BINARY_DIR}/${_projectname}-shell.bat "set PATH=${ADD_PATH};%PATH%\ncall \"${VC_BIN_PATH}\\vcvars32.bat\"\ncmd.exe") + else (CMAKE_BUILD_TOOL STREQUAL "nmake") + write_file (${CMAKE_BINARY_DIR}/${_projectname}-sln.bat "set PATH=${ADD_PATH};%PATH%\nstart ${_projectname}.sln") + endif (CMAKE_BUILD_TOOL STREQUAL "nmake") + endif (MINGW) + ENDMACRO (addExplorerWrapper) +endif(WIN32) diff --git a/cmake/readme-cmake.txt b/cmake/readme-cmake.txt new file mode 100644 index 00000000..4056d3cc --- /dev/null +++ b/cmake/readme-cmake.txt @@ -0,0 +1,39 @@ +This directory contains configuration files for the cmake build system + +Requirements +------------ +- cmake version >= 2.4.4 see http://www.cmake.org +- installed libxml2 or libexpat + +Building +-------- + +unix +1. install cmake and libxml or libexpat +2. get dbus sources +3. mkdir dbus-build +4. cd dbus-build +5. cmake <dbus-src-root>/cmake or cmake -DDBUS_USE_EXPAT=on <dbus-src-root>/cmake in case libexpat should de used +5. make +6. make install + +win32-mingw +1. install cmake and libxml or libexpat in <ProgramDir>\gnuwin32 +2. get dbus sources +3. mkdir dbus-build +4. cd dbus-build +5. cmake -G "MinGW Makefiles" <dbus-src-root>/cmake +6. make +7. make install + +win32-msvc +1. install cmake and libxml or libexpat in <ProgramDir>\gnuwin32 +2. get dbus sources +3. mkdir dbus-build +4. cd dbus-build +5. cmake -G <msvc available target, see cmake --help for a list> <dbus-src-root>/cmake +6. make +7. make install + +A list of all available build options could be find in the file ../README. + diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt new file mode 100644 index 00000000..7bb80aba --- /dev/null +++ b/cmake/test/CMakeLists.txt @@ -0,0 +1,172 @@ +project(test) + +add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS}) + +add_library(dbus_testutils STATIC + ${CMAKE_SOURCE_DIR}/../test/test-utils.h + ${CMAKE_SOURCE_DIR}/../test/test-utils.c +) +target_link_libraries(dbus_testutils ${DBUS_INTERNAL_LIBRARIES}) + +add_subdirectory( name-test ) + +set (test-service_SOURCES + ${CMAKE_SOURCE_DIR}/../test/test-service.c + ${CMAKE_SOURCE_DIR}/../test/test-utils.c + ${CMAKE_SOURCE_DIR}/../test/test-utils.h +) + +set (test-names_SOURCES + ${CMAKE_SOURCE_DIR}/../test/test-names.c + ${CMAKE_SOURCE_DIR}/../test/test-utils.c + ${CMAKE_SOURCE_DIR}/../test/test-utils.h +) + +set (break_loader_SOURCES + ${CMAKE_SOURCE_DIR}/../test/break-loader.c +) + +set (test-shell-service_SOURCES + ${CMAKE_SOURCE_DIR}/../test/test-shell-service.c + ${CMAKE_SOURCE_DIR}/../test/test-utils.c + ${CMAKE_SOURCE_DIR}/../test/test-utils.h +) + +set (shell-test_SOURCES + ${CMAKE_SOURCE_DIR}/../test/shell-test.c +) + +set (spawn-test_SOURCES + ${CMAKE_SOURCE_DIR}/../test/spawn-test.c +) + +set (test-exit_SOURCES + ${CMAKE_SOURCE_DIR}/../test/test-exit.c +) + +set (test-segfault_SOURCES + ${CMAKE_SOURCE_DIR}/../test/test-segfault.c +) + +set (test-sleep-forever_SOURCES + ${CMAKE_SOURCE_DIR}/../test/test-sleep-forever.c +) + +set (decode_gcov_SOURCES + ${CMAKE_SOURCE_DIR}/../test/decode-gcov.c +) + +add_executable(test-service ${test-service_SOURCES}) +target_link_libraries(test-service ${DBUS_INTERNAL_LIBRARIES}) + +add_executable(test-names ${test-names_SOURCES}) +target_link_libraries(test-names ${DBUS_INTERNAL_LIBRARIES}) + +add_executable(shell-test ${shell-test_SOURCES}) +target_link_libraries(shell-test ${DBUS_INTERNAL_LIBRARIES}) +ADD_TEST(shell-test ${EXECUTABLE_OUTPUT_PATH}/shell-test${EXT}) + +add_executable(test-shell-service ${test-shell-service_SOURCES}) +target_link_libraries(test-shell-service ${DBUS_INTERNAL_LIBRARIES}) + +add_executable(spawn-test ${spawn-test_SOURCES}) +target_link_libraries(spawn-test ${DBUS_INTERNAL_LIBRARIES}) + +add_executable(test-exit ${test-exit_SOURCES}) +target_link_libraries(test-exit ${DBUS_INTERNAL_LIBRARIES}) + +add_executable(test-segfault ${test-segfault_SOURCES}) +target_link_libraries(test-segfault ${DBUS_INTERNAL_LIBRARIES}) + +add_executable(test-sleep-forever ${test-sleep-forever_SOURCES}) +target_link_libraries(test-sleep-forever ${DBUS_INTERNAL_LIBRARIES}) + +#add_executable(decode-gcov ${decode_gcov_SOURCES}) +#target_link_libraries(decode-gcov ${DBUS_INTERNAL_LIBRARIES}) + +### keep these in creation order, i.e. uppermost dirs first +set (TESTDIRS + test/data + test/data/valid-messages + test/data/invalid-messages + test/data/incomplete-messages + test/data/auth + test/data/sha-1 + test/data/valid-config-files + test/data/valid-config-files/basic.d + test/data/valid-config-files/system.d + test/data/valid-config-files-system + test/data/valid-introspection-files + test/data/valid-messages + test/data/valid-service-files + test/data/valid-service-files-system + test/data/invalid-config-files + test/data/invalid-config-files-system + test/data/invalid-messages + test/data/invalid-service-files-system + test/data/equiv-config-files + test/data/equiv-config-files/basic + test/data/equiv-config-files/basic/basic.d + test/data/equiv-config-files/entities + test/data/equiv-config-files/entities/basic.d +) +set (CONFIG_VERBOSE 0) + +### copy tests to builddir so that generated tests and static tests +### are all in one place. +MESSAGE(STATUS "Copying test files to test directory") +FOREACH(FILE_TYPE *.message *.message-raw *.auth-script *.sha1 *.txt *.conf *.service) + FOREACH(DIR ${TESTDIRS}) + FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${DIR}/${FILE_TYPE}" ) + FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR}) + FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + SET (TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME}) + configure_file(${FILE} ${TARGET} COPYONLY) + IF (CONFIG_VERBOSE) + MESSAGE("${FILE}") + ENDIF (CONFIG_VERBOSE) + ENDFOREACH(FILE) + ENDFOREACH(DIR) +ENDFOREACH(FILE_TYPE) + +### generate test files +MESSAGE(STATUS "Generating test files from templates into test directory") + +FOREACH(FILE_TYPE *.conf.in *.service.in) + FOREACH(DIR ${TESTDIRS}) + FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${DIR}/${FILE_TYPE}" ) + FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DIR}) + FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + STRING(REGEX REPLACE "\\.in$" "" FILENAME ${FILENAME}) + SET (TARGET ${CMAKE_BINARY_DIR}/${DIR}/${FILENAME}) + STRING(REGEX REPLACE "\\.in$" ".cmake" _file ${FILE}) + IF (EXISTS ${_file}) + SET (FILE ${_file}) + ENDIF (EXISTS ${_file}) + configure_file(${FILE} ${TARGET} @ONLY IMMEDIATE) + IF (CONFIG_VERBOSE) + MESSAGE("${FILE}") + ENDIF (CONFIG_VERBOSE) + ENDFOREACH(FILE) + ENDFOREACH(DIR) +ENDFOREACH(FILE_TYPE) + +MESSAGE(STATUS "Copying generated bus config files to test directory") +set (OUTDIR ${CMAKE_BINARY_DIR}/test/data/valid-config-files) + +FILE(GLOB FILES "${CMAKE_BINARY_DIR}/bus/*.conf" ) +FILE(MAKE_DIRECTORY ${OUTDIR}) +FOREACH(FILE ${FILES}) + GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME) + SET (TARGET ${OUTDIR}/${FILENAME}) + configure_file(${FILE} ${TARGET} COPYONLY) + IF (CONFIG_VERBOSE) + MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n") + ENDIF (CONFIG_VERBOSE) +ENDFOREACH(FILE) + +# todo: for installation the TEST_..._BINARY variables must reflect the +# installation dir or has to be defined relative +# diff --git a/cmake/test/name-test/CMakeLists.txt b/cmake/test/name-test/CMakeLists.txt new file mode 100644 index 00000000..25ec7f65 --- /dev/null +++ b/cmake/test/name-test/CMakeLists.txt @@ -0,0 +1,39 @@ +if (DBUS_BUILD_TESTS) + +set (NAMEtest-DIR ../../../test/name-test) + +add_definitions(-DDBUS_COMPILATION) + +add_executable(test-pending-call-dispatch ${NAMEtest-DIR}/test-pending-call-dispatch.c) +target_link_libraries(test-pending-call-dispatch ${DBUS_INTERNAL_LIBRARIES}) +ADD_TEST(test-pending-call-dispatch ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-dispatch) + +add_executable(test-pending-call-timeout ${NAMEtest-DIR}/test-pending-call-timeout.c) +target_link_libraries(test-pending-call-timeout ${DBUS_INTERNAL_LIBRARIES}) +ADD_TEST(test-pending-call-timeout ${EXECUTABLE_OUTPUT_PATH}/test-pending-call-timeout) + +add_executable(test-thread-init ${NAMEtest-DIR}/test-threads-init.c) +target_link_libraries(test-thread-init ${DBUS_INTERNAL_LIBRARIES}) +ADD_TEST(test-thread-init ${EXECUTABLE_OUTPUT_PATH}/test-thread-init) + +add_executable(test-ids ${NAMEtest-DIR}/test-ids.c) +target_link_libraries(test-ids ${DBUS_INTERNAL_LIBRARIES}) +ADD_TEST(test-ids ${EXECUTABLE_OUTPUT_PATH}/test-ids) + +add_executable(test-shutdown ${NAMEtest-DIR}/test-shutdown.c) +target_link_libraries(test-shutdown ${DBUS_INTERNAL_LIBRARIES} dbus_testutils) +ADD_TEST(test-shutdown ${EXECUTABLE_OUTPUT_PATH}/test-shutdown) + +add_executable(test-privserver ${NAMEtest-DIR}/test-privserver.c) +target_link_libraries(test-privserver ${DBUS_INTERNAL_LIBRARIES} dbus_testutils) +ADD_TEST(test-privserver ${EXECUTABLE_OUTPUT_PATH}/test-privserver) + +add_executable(test-privserver-client ${NAMEtest-DIR}/test-privserver-client.c) +target_link_libraries(test-privserver-client ${DBUS_INTERNAL_LIBRARIES} dbus_testutils) +ADD_TEST(test-privserver-client ${EXECUTABLE_OUTPUT_PATH}/test-privserver-client) + +add_executable(test-autolaunch ${NAMEtest-DIR}/test-autolaunch.c) +target_link_libraries(test-autolaunch ${DBUS_INTERNAL_LIBRARIES} dbus_testutils) +ADD_TEST(test-autolaunch ${EXECUTABLE_OUTPUT_PATH}/test-autolaunch) + +endif (DBUS_BUILD_TESTS) diff --git a/cmake/tools/CMakeLists.txt b/cmake/tools/CMakeLists.txt new file mode 100644 index 00000000..e91a5094 --- /dev/null +++ b/cmake/tools/CMakeLists.txt @@ -0,0 +1,57 @@ +project(tools) + +set (dbus_send_SOURCES + ../../tools/dbus-print-message.c + ../../tools/dbus-print-message.h + ../../tools/dbus-send.c +) + +set (dbus_monitor_SOURCES + ../../tools/dbus-monitor.c + ../../tools/dbus-print-message.c + ../../tools/dbus-print-message.h +) + +if (WIN32) +set (dbus_launch_SOURCES + ../../tools/dbus-launch-win.c +) +else (WIN32) +set (dbus_launch_SOURCES + ../../tools/dbus-launch.c +) +endif (WIN32) + +if (DBUS_BUILD_X11) +set (dbus_launch_SOURCES + ${dbus_launch_SOURCES} + ../../tools/dbus-launch-x11.c +) +endif(DBUS_BUILD_X11) + +set (dbus_cleanup_sockets_SOURCES + ../../tools/dbus-cleanup-sockets.c +) + +set (dbus_viewer_SOURCES + ../../tools/dbus-names-model.c + ../../tools/dbus-names-model.h + ../../tools/dbus-tree-view.c + ../../tools/dbus-tree-view.h + ../../tools/dbus-viewer.c +) + +add_executable(dbus-send ${dbus_send_SOURCES}) +target_link_libraries(dbus-send ${DBUS_LIBRARIES}) +install_targets(/bin dbus-send ) + +add_executable(dbus-launch ${dbus_launch_SOURCES}) +target_link_libraries(dbus-launch ) +if (DBUS_BUILD_X11) + target_link_libraries(dbus-launch ${X11_LIBRARIES} ) +endif (DBUS_BUILD_X11) +install_targets(/bin dbus-launch ) + +add_executable(dbus-monitor ${dbus_monitor_SOURCES}) +target_link_libraries(dbus-monitor ${DBUS_LIBRARIES}) +install_targets(/bin dbus-monitor ) diff --git a/cmake/tools/dbus-launch.xml b/cmake/tools/dbus-launch.xml new file mode 100644 index 00000000..dc34898f --- /dev/null +++ b/cmake/tools/dbus-launch.xml @@ -0,0 +1,240 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<!-- lifted from troff+man by doclifter --> +<refentry id='dbuslaunch1'> +<!-- --> +<!-- dbus\-launch manual page. --> +<!-- Copyright (C) 2003 Red Hat, Inc. --> + +<refmeta> +<refentrytitle>dbus-launch</refentrytitle> +<manvolnum>1</manvolnum> +</refmeta> +<refnamediv id='name'> +<refname>dbus-launch</refname> +<refpurpose>Utility to start a message bus from a shell script</refpurpose> +</refnamediv> +<!-- body begins here --> +<refsynopsisdiv id='synopsis'> +<cmdsynopsis> + <command>dbus-launch</command> <arg choice='opt'>--version </arg> + <arg choice='opt'>--sh-syntax </arg> + <arg choice='opt'>--csh-syntax </arg> + <arg choice='opt'>--auto-syntax </arg> + <arg choice='opt'>--exit-with-session </arg> + <arg choice='opt'>--autolaunch=<replaceable>MACHINEID</replaceable></arg> + <arg choice='opt'>--config-file=<replaceable>FILENAME</replaceable></arg> + <arg choice='opt'><replaceable>PROGRAM</replaceable></arg> + <arg choice='opt' rep='repeat'><replaceable>ARGS</replaceable></arg> + <sbr/> +</cmdsynopsis> +</refsynopsisdiv> + + +<refsect1 id='description'><title>DESCRIPTION</title> +<para>The <command>dbus-launch</command> command is used to start a session bus +instance of <emphasis remap='I'>dbus-daemon</emphasis> from a shell script. +It would normally be called from a user's login +scripts. Unlike the daemon itself, <command>dbus-launch</command> exits, so +backticks or the $() construct can be used to read information from +<command>dbus-launch</command>.</para> + +<para>With no arguments, <command>dbus-launch</command> will launch a session bus +instance and print the address and pid of that instance to standard +output.</para> + +<para>You may specify a program to be run; in this case, <command>dbus-launch</command> +will launch a session bus instance, set the appropriate environment +variables so the specified program can find the bus, and then execute the +specified program, with the specified arguments. See below for +examples.</para> + +<para>If you launch a program, <command>dbus-launch</command> will not print the +information about the new bus to standard output.</para> + +<para>When <command>dbus-launch</command> prints bus information to standard output, by +default it is in a simple key-value pairs format. However, you may +request several alternate syntaxes using the --sh-syntax, --csh-syntax, +--binary-syntax, or +--auto-syntax options. Several of these cause <command>dbus-launch</command> to emit shell code +to set up the environment.</para> + +<para>With the --auto-syntax option, <command>dbus-launch</command> looks at the value +of the SHELL environment variable to determine which shell syntax +should be used. If SHELL ends in "csh", then csh-compatible code is +emitted; otherwise Bourne shell code is emitted. Instead of passing +--auto-syntax, you may explicity specify a particular one by using +--sh-syntax for Bourne syntax, or --csh-syntax for csh syntax. +In scripts, it's more robust to avoid --auto-syntax and you hopefully +know which shell your script is written in.</para> + + +<para>See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information +about D-Bus. See also the man page for <emphasis remap='I'>dbus-daemon</emphasis>.</para> + + +<para>Here is an example of how to use <command>dbus-launch</command> with an +sh-compatible shell to start the per-session bus daemon:</para> +<literallayout remap='.nf'> + + ## test for an existing bus daemon, just to be safe + if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + ## if not found, launch a new one + eval `dbus-launch --sh-syntax --exit-with-session` + echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" + fi + +</literallayout> <!-- .fi --> +<para>You might run something like that in your login scripts.</para> + + +<para>Another way to use <command>dbus-launch</command> is to run your main session +program, like so:</para> +<literallayout remap='.nf'> + +dbus-launch gnome-session + +</literallayout> <!-- .fi --> +<para>The above would likely be appropriate for ~/.xsession or ~/.Xclients.</para> + +</refsect1> + +<refsect1 id='automatic_launching'><title>AUTOMATIC LAUNCHING</title> +<para>If DBUS_SESSION_BUS_ADDRESS is not set for a process that tries to use +D-Bus, by default the process will attempt to invoke dbus-launch with +the --autolaunch option to start up a new session bus or find the +existing bus address on the X display or in a file in +~/.dbus/session-bus/</para> + + +<para>Whenever an autolaunch occurs, the application that had to +start a new bus will be in its own little world; it can effectively +end up starting a whole new session if it tries to use a lot of +bus services. This can be suboptimal or even totally broken, depending +on the app and what it tries to do.</para> + + +<para>There are two common reasons for autolaunch. One is ssh to a remote +machine. The ideal fix for that would be forwarding of +DBUS_SESSION_BUS_ADDRESS in the same way that DISPLAY is forwarded. +In the meantime, you can edit the session.conf config file to +have your session bus listen on TCP, and manually set +DBUS_SESSION_BUS_ADDRESS, if you like.</para> + + +<para>The second common reason for autolaunch is an su to another user, and +display of X applications running as the second user on the display +belonging to the first user. Perhaps the ideal fix in this case +would be to allow the second user to connect to the session bus of the +first user, just as they can connect to the first user's display. +However, a mechanism for that has not been coded.</para> + + +<para>You can always avoid autolaunch by manually setting +DBUS_SESSION_BUS_ADDRESS. Autolaunch happens because the default +address if none is set is "autolaunch:", so if any other address is +set there will be no autolaunch. You can however include autolaunch in +an explicit session bus address as a fallback, for example +DBUS_SESSION_BUS_ADDRESS="something:,autolaunch:" - in that case if +the first address doesn't work, processes will autolaunch. (The bus +address variable contains a comma-separated list of addresses to try.)</para> + + +<para>The --autolaunch option is considered an internal implementation +detail of libdbus, and in fact there are plans to change it. There's +no real reason to use it outside of the libdbus implementation anyhow.</para> + +</refsect1> + +<refsect1 id='options'><title>OPTIONS</title> +<para>The following options are supported:</para> +<variablelist remap='TP'> + <varlistentry> + <term><option>--auto-syntax</option></term> + <listitem> +<para>Choose --csh-syntax or --sh-syntax based on the SHELL environment variable.</para> + +<para><option>--binary-syntax</option> +Write to stdout a nul-terminated bus address, then the bus PID as a +binary integer of size sizeof(pid_t), then the bus X window ID as a +binary integer of size sizeof(long). Integers are in the machine's +byte order, not network byte order or any other canonical byte order.</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--close-stderr</option></term> + <listitem> +<para>Close the standard error output stream before starting the D-Bus +daemon. This is useful if you want to capture dbus-launch error +messages but you don't want dbus-daemon to keep the stream open to +your application.</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--config-file=FILENAME</option></term> + <listitem> +<para>Pass --config-file=FILENAME to the bus daemon, instead of passing it +the --session argument. See the man page for dbus-daemon</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--csh-syntax</option></term> + <listitem> +<para>Emit csh compatible code to set up environment variables.</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--exit-with-session</option></term> + <listitem> +<para>If this option is provided, a persistent "babysitter" process will be +created that watches stdin for HUP and tries to connect to the X +server. If this process gets a HUP on stdin or loses its X connection, +it kills the message bus daemon.</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--autolaunch=MACHINEID</option></term> + <listitem> +<para>This option implies that <command>dbus-launch</command> should scan for a +previously-started session and reuse the values found there. If no +session is found, it will start a new session. The +--exit-with-session option is implied if --autolaunch is given. +This option is for the exclusive use of libdbus, you do not want to +use it manually. It may change in the future.</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--sh-syntax</option></term> + <listitem> +<para>Emit Bourne-shell compatible code to set up environment variables.</para> + + </listitem> + </varlistentry> + <varlistentry> + <term><option>--version</option></term> + <listitem> +<para>Print the version of dbus-launch</para> + + </listitem> + </varlistentry> +</variablelist> +</refsect1> + +<refsect1 id='author'><title>AUTHOR</title> +<para>See <ulink url='http://www.freedesktop.org/software/dbus/doc/AUTHORS'>http://www.freedesktop.org/software/dbus/doc/AUTHORS</ulink></para> + +</refsect1> + +<refsect1 id='bugs'><title>BUGS</title> +<para>Please send bug reports to the D-Bus mailing list or bug tracker, +see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para> +</refsect1> +</refentry> + diff --git a/cmake/tools/dbus-monitor.xml b/cmake/tools/dbus-monitor.xml new file mode 100644 index 00000000..b41cace2 --- /dev/null +++ b/cmake/tools/dbus-monitor.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<!-- lifted from troff+man by doclifter --> +<refentry id='dbusmonitor1'> +<!-- --> +<!-- dbus\-monitor manual page. --> +<!-- Copyright (C) 2003 Red Hat, Inc. --> + +<refmeta> +<refentrytitle>dbus-monitor</refentrytitle> +<manvolnum>1</manvolnum> +</refmeta> +<refnamediv id='name'> +<refname>dbus-monitor</refname> +<refpurpose>debug probe to print message bus messages</refpurpose> +</refnamediv> +<!-- body begins here --> +<refsynopsisdiv id='synopsis'> +<cmdsynopsis> + <command>dbus-monitor</command> + <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg><arg choice='plain'>--address <replaceable>ADDRESS</replaceable></arg></group> + <group choice='opt'><arg choice='plain'>--profile </arg><arg choice='plain'>--monitor </arg></group> + <arg choice='opt'><arg choice='plain'><replaceable>watch</replaceable></arg><arg choice='plain'><replaceable>expressions</replaceable></arg></arg> + <sbr/> +</cmdsynopsis> +</refsynopsisdiv> + + +<refsect1 id='description'><title>DESCRIPTION</title> +<para>The <command>dbus-monitor</command> command is used to monitor messages going +through a D-Bus message bus. See +<ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more information about +the big picture.</para> + + +<para>There are two well-known message buses: the systemwide message bus +(installed on many systems as the "messagebus" service) and the +per-user-login-session message bus (started each time a user logs in). +The --system and --session options direct <command>dbus-monitor</command> to +monitor the system or session buses respectively. If neither is +specified, <command>dbus-monitor</command> monitors the session bus.</para> + + +<para><command>dbus-monitor</command> has two different output modes, the 'classic'-style +monitoring mode and profiling mode. The profiling format is a compact +format with a single line per message and microsecond-resolution timing +information. The --profile and --monitor options select the profiling +and monitoring output format respectively. If neither is specified, +<command>dbus-monitor</command> uses the monitoring output format.</para> + + +<para>In order to get <command>dbus-monitor</command> to see the messages you are interested +in, you should specify a set of watch expressions as you would expect to +be passed to the <emphasis remap='I'>dbus_bus_add_match</emphasis> function.</para> + + +<para>The message bus configuration may keep <command>dbus-monitor</command> from seeing +all messages, especially if you run the monitor as a non-root user.</para> + +</refsect1> + +<refsect1 id='options'><title>OPTIONS</title> +<variablelist remap='TP'> + <varlistentry> + <term><option>--system</option></term> + <listitem> +<para>Monitor the system message bus.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--session</option></term> + <listitem> +<para>Monitor the session message bus. (This is the default.)</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--address ADDRESS</option></term> + <listitem> +<para>Monitor an arbitrary message bus given at ADDRESS.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--profile</option></term> + <listitem> +<para>Use the profiling output format.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--monitor</option></term> + <listitem> +<para>Use the monitoring output format. (This is the default.)</para> + + </listitem> + </varlistentry> +</variablelist> +</refsect1> + +<refsect1 id='example'><title>EXAMPLE</title> +<para>Here is an example of using dbus-monitor to watch for the gnome typing +monitor to say things</para> +<literallayout remap='.nf'> + + dbus-monitor "type='signal',sender='org.gnome.TypingMonitor',interface='org.gnome.TypingMonitor'" + +</literallayout> <!-- .fi --> + +</refsect1> + +<refsect1 id='author'><title>AUTHOR</title> +<para>dbus-monitor was written by Philip Blundell. +The profiling output mode was added by Olli Salli.</para> + +</refsect1> + +<refsect1 id='bugs'><title>BUGS</title> +<para>Please send bug reports to the D-Bus mailing list or bug tracker, +see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para> +</refsect1> +</refentry> + diff --git a/cmake/tools/dbus-send.xml b/cmake/tools/dbus-send.xml new file mode 100644 index 00000000..7fefc03e --- /dev/null +++ b/cmake/tools/dbus-send.xml @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<!-- lifted from troff+man by doclifter --> +<refentry id='dbussend1'> +<!-- --> +<!-- dbus\-send manual page. --> +<!-- Copyright (C) 2003 Red Hat, Inc. --> + +<refmeta> +<refentrytitle>dbus-send</refentrytitle> +<manvolnum>1</manvolnum> +</refmeta> +<refnamediv id='name'> +<refname>dbus-send</refname> +<refpurpose>Send a message to a message bus</refpurpose> +</refnamediv> +<!-- body begins here --> +<refsynopsisdiv id='synopsis'> +<cmdsynopsis> + <command>dbus-send</command> + <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg></group> + <arg choice='opt'>--dest=<replaceable>NAME</replaceable></arg> + <arg choice='opt'>--print-reply </arg> + <arg choice='opt'>--type=<replaceable>TYPE</replaceable></arg> + <arg choice='plain'><replaceable><destination</replaceable></arg> + <arg choice='plain'><replaceable>object</replaceable></arg> + <arg choice='plain'><replaceable>path></replaceable></arg> + <arg choice='plain'><replaceable><message</replaceable></arg> + <arg choice='plain'><replaceable>name></replaceable></arg> + <arg choice='opt' rep='repeat'><replaceable>contents</replaceable></arg> + <sbr/> +</cmdsynopsis> +</refsynopsisdiv> + + +<refsect1 id='description'><title>DESCRIPTION</title> +<para>The <command>dbus-send</command> command is used to send a message to a D-Bus message +bus. See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more +information about the big picture.</para> + + +<para>There are two well-known message buses: the systemwide message bus +(installed on many systems as the "messagebus" service) and the +per-user-login-session message bus (started each time a user logs in). +The --system and --session options direct <command>dbus-send</command> to send +messages to the system or session buses respectively. If neither is +specified, <command>dbus-send</command> sends to the session bus.</para> + + +<para>Nearly all uses of <command>dbus-send</command> must provide the --dest argument +which is the name of a connection on the bus to send the message to. If +--dest is omitted, no destination is set.</para> + + +<para>The object path and the name of the message to send must always be +specified. Following arguments, if any, are the message contents +(message arguments). These are given as type-specified values and +may include containers (arrays, dicts, and variants) as described below.</para> + +<literallayout remap='.nf'> +<contents> ::= <item> | <container> [ <item> | <container>...] +<item> ::= <type>:<value> +<container> ::= <array> | <dict> | <variant> +<array> ::= array:<type>:<value>[,<value>...] +<dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...] +<variant> ::= variant:<type>:<value> +<type> ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath +</literallayout> <!-- .fi --> + +<para>D-Bus supports more types than these, but <command>dbus-send</command> currently +does not. Also, <command>dbus-send</command> does not permit empty containers +or nested containers (e.g. arrays of variants).</para> + + +<para>Here is an example invocation:</para> +<literallayout remap='.nf'> + + dbus-send --dest=org.freedesktop.ExampleName \ + /org/freedesktop/sample/object/name \ + org.freedesktop.ExampleInterface.ExampleMethod \ + int32:47 string:'hello world' double:65.32 \ + array:string:"1st item","next item","last item" \ + dict:string:int32:"one",1,"two",2,"three",3 \ + variant:int32:-8 \ + objpath:/org/freedesktop/sample/object/name + +</literallayout> <!-- .fi --> + +<para>Note that the interface is separated from a method or signal +name by a dot, though in the actual protocol the interface +and the interface member are separate fields.</para> + +</refsect1> + +<refsect1 id='options'><title>OPTIONS</title> +<para>The following options are supported:</para> +<variablelist remap='TP'> + <varlistentry> + <term><option>--dest=NAME</option></term> + <listitem> +<para>Specify the name of the connection to receive the message.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--print-reply</option></term> + <listitem> +<para>Block for a reply to the message sent, and print any reply received.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--system</option></term> + <listitem> +<para>Send to the system message bus.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--session</option></term> + <listitem> +<para>Send to the session message bus. (This is the default.)</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--type=TYPE</option></term> + <listitem> +<para>Specify "method_call" or "signal" (defaults to "signal").</para> + + </listitem> + </varlistentry> +</variablelist> +</refsect1> + +<refsect1 id='author'><title>AUTHOR</title> +<para>dbus-send was written by Philip Blundell.</para> + +</refsect1> + +<refsect1 id='bugs'><title>BUGS</title> +<para>Please send bug reports to the D-Bus mailing list or bug tracker, +see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para> +</refsect1> +</refentry> + @@ -1,10 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2009-10-06.20; # UTC +scriptversion=2005-05-14.22 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -18,7 +17,8 @@ scriptversion=2009-10-06.20; # UTC # 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, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then fi # Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break @@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15 ret=$? if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" + mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" + mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" @@ -138,6 +138,5 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/config.guess b/config.guess index dc84c68e..c2246a4f 100755 --- a/config.guess +++ b/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 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2009-11-20' +timestamp='2009-12-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -56,8 +56,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 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." diff --git a/config.h.in b/config.h.in index 4d2384ac..9621970d 100644 --- a/config.h.in +++ b/config.h.in @@ -33,9 +33,15 @@ /* File to check for console ownerhip */ #undef DBUS_CONSOLE_OWNER_FILE +/* Defined if we run on a cygwin API based system */ +#undef DBUS_CYGWIN + /* Directory for installing the DBUS daemon */ #undef DBUS_DAEMONDIR +/* Name of executable */ +#undef DBUS_DAEMON_NAME + /* Directory for installing DBUS data files */ #undef DBUS_DATADIR @@ -45,6 +51,9 @@ /* Disable public API sanity checking */ #undef DBUS_DISABLE_CHECKS +/* Use launchd autolaunch */ +#undef DBUS_ENABLE_LAUNCHD + /* Build with caching of user data */ #undef DBUS_ENABLE_USERDB_CACHE @@ -54,10 +63,6 @@ /* Defined if gcov is enabled to force a rebuild due to config.h changing */ #undef DBUS_GCOV_ENABLED -/* Always defined; expands to 1 if we have an atomic integer implementation, - else 0 */ -#undef DBUS_HAVE_ATOMIC_INT_COND - /* Defined if we have gcc 3.3 and thus the new gcov format */ #undef DBUS_HAVE_GCC33_GCOV @@ -67,6 +72,9 @@ /* Directory for installing the libexec binaries */ #undef DBUS_LIBEXECDIR +/* Prefix for installing DBUS */ +#undef DBUS_PREFIX + /* Where per-session bus puts its sockets */ #undef DBUS_SESSION_SOCKET_DIR @@ -82,15 +90,14 @@ /* Where to put test sockets */ #undef DBUS_TEST_SOCKET_DIR -/* Defined on UNIX and Linux systems and not on Windows */ +/* Defined if we run on a Unix-based system */ #undef DBUS_UNIX /* User for running the system BUS daemon */ #undef DBUS_USER -/* Always defined; expands to 1 if we should use atomic integer implementation - for 486, else 0 */ -#undef DBUS_USE_ATOMIC_INT_486_COND +/* Use the gcc __sync extension */ +#undef DBUS_USE_SYNC /* A 'va_copy' style function */ #undef DBUS_VA_COPY @@ -98,6 +105,12 @@ /* 'va_lists' cannot be copies as values */ #undef DBUS_VA_COPY_AS_ARRAY +/* Defined if we run on a W32 API based system */ +#undef DBUS_WIN + +/* Defined if we run on a W32 CE API based system */ +#undef DBUS_WINCE + /* The name of the gettext domain */ #undef GETTEXT_PACKAGE @@ -110,12 +123,18 @@ /* Have abstract socket namespace */ #undef HAVE_ABSTRACT_SOCKETS +/* Define to 1 if you have the `accept4' function. */ +#undef HAVE_ACCEPT4 + /* Adt audit API */ #undef HAVE_ADT /* Define to 1 if you have the `backtrace' function. */ #undef HAVE_BACKTRACE +/* Define to 1 if you have the <byteswap.h> header file. */ +#undef HAVE_BYTESWAP_H + /* Define to 1 if you have the `clearenv' function. */ #undef HAVE_CLEARENV @@ -131,6 +150,13 @@ /* Have the ddfd member of DIR */ #undef HAVE_DDFD +/* Define to 1 if you have the declaration of `MSG_NOSIGNAL', and to 0 if you + don't. */ +#undef HAVE_DECL_MSG_NOSIGNAL + +/* Define to 1 if you have the <dirent.h> header file. */ +#undef HAVE_DIRENT_H + /* Have dirfd function */ #undef HAVE_DIRFD @@ -176,6 +202,12 @@ /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL +/* Define to 1 if you have the `localeconv' function. */ +#undef HAVE_LOCALECONV + +/* Define to 1 if you have the <locale.h> header file. */ +#undef HAVE_LOCALE_H + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -191,6 +223,9 @@ /* Define if your system needs _NSGetEnviron to set up the environment */ #undef HAVE_NSGETENVIRON +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL @@ -203,9 +238,15 @@ /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT +/* Define to 1 if you have the <signal.h> header file. */ +#undef HAVE_SIGNAL_H + /* Define to 1 if you have the `socketpair' function. */ #undef HAVE_SOCKETPAIR @@ -224,6 +265,12 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strtoll' function. */ +#undef HAVE_STRTOLL + +/* Define to 1 if you have the `strtoull' function. */ +#undef HAVE_STRTOULL + /* Define to 1 if you have the <sys/inotify.h> header file. */ #undef HAVE_SYS_INOTIFY_H @@ -242,6 +289,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Supports sending UNIX file descriptors */ +#undef HAVE_UNIX_FD_PASSING + /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV @@ -257,6 +307,12 @@ /* Define to 1 if you have the `writev' function. */ #undef HAVE_WRITEV +/* Define to 1 if you have the <ws2tcpip.h> header file. */ +#undef HAVE_WS2TCPIP_H + +/* Define to 1 if you have the <wspiapi.h> header file. */ +#undef HAVE_WSPIAPI_H + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -279,6 +335,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -340,6 +399,28 @@ /* Full path to test file test/data/valid-service-files-system in builddir */ #undef TEST_VALID_SERVICE_SYSTEM_DIR +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Version number of package */ #undef VERSION @@ -373,6 +454,19 @@ #endif +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Defined to get newer W32 CE APIs */ +#undef _WIN32_WCE + /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus @@ -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 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2009-11-20' +timestamp='2010-01-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 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 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." @@ -380,7 +381,8 @@ case $basic_machine in | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ @@ -1085,6 +1087,11 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu + ;; tile*) basic_machine=tile-unknown os=-linux-gnu @@ -1435,6 +1442,8 @@ case $os in -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1,18 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for dbus 1.2.24. +# Generated by GNU Autoconf 2.67 for dbus 1.4.1. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -44,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -55,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -78,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -94,15 +89,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -114,12 +109,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -131,330 +130,299 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +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" + 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" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done + 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+"$@"} fi - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - fi - fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -exitcode=0 -if as_func_success; then - : + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo as_func_success failed. -fi + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi -if as_func_ret_success; then - : +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO 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'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -471,8 +439,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -482,29 +449,18 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -534,7 +490,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -553,10 +509,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -571,7 +527,6 @@ 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} @@ -720,10 +675,11 @@ fi -exec 7<&0 </dev/null 6>&1 +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -738,14 +694,14 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='dbus' PACKAGE_TARNAME='dbus' -PACKAGE_VERSION='1.2.24' -PACKAGE_STRING='dbus 1.2.24' +PACKAGE_VERSION='1.4.1' +PACKAGE_STRING='dbus 1.4.1' PACKAGE_BUGREPORT='' +PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ @@ -787,6 +743,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +DBUS_SESSION_BUS_DEFAULT_ADDRESS DBUS_SESSION_SOCKET_DIR TEST_SOCKET_DIR TEST_LAUNCH_HELPER_BINARY @@ -805,12 +762,18 @@ DBUS_LIBEXECDIR DBUS_BINDIR DBUS_DAEMONDIR DBUS_DATADIR +DBUS_PREFIX DBUS_USER DBUS_CONSOLE_OWNER_FILE DBUS_CONSOLE_AUTH_DIR DBUS_SYSTEM_PID_FILE DBUS_SYSTEM_BUS_DEFAULT_ADDRESS DBUS_SYSTEM_SOCKET +HAVE_SYSTEMD_FALSE +HAVE_SYSTEMD_TRUE +systemdsystemunitdir +DBUS_INIT_SCRIPTS_CYGWIN_FALSE +DBUS_INIT_SCRIPTS_CYGWIN_TRUE DBUS_INIT_SCRIPTS_SLACKWARE_FALSE DBUS_INIT_SCRIPTS_SLACKWARE_TRUE DBUS_INIT_SCRIPTS_RED_HAT_FALSE @@ -821,6 +784,12 @@ EXPANDED_LIBDIR EXPANDED_BINDIR EXPANDED_SYSCONFDIR EXPANDED_LOCALSTATEDIR +EXPANDED_PREFIX +DBUS_CAN_UPLOAD_DOCS_FALSE +DBUS_CAN_UPLOAD_DOCS_TRUE +DBUS_HAVE_MAN2HTML_FALSE +DBUS_HAVE_MAN2HTML_TRUE +MAN2HTML DBUS_XML_DOCS_ENABLED_FALSE DBUS_XML_DOCS_ENABLED_TRUE XMLTO @@ -852,6 +821,10 @@ HAVE_LIBAUDIT_FALSE HAVE_LIBAUDIT_TRUE HAVE_CONSOLE_OWNER_FILE_FALSE HAVE_CONSOLE_OWNER_FILE_TRUE +LAUNCHD_AGENT_DIR +DBUS_ENABLE_LAUNCHD_FALSE +DBUS_ENABLE_LAUNCHD_TRUE +LAUNCHCTL DBUS_BUS_ENABLE_KQUEUE_FALSE DBUS_BUS_ENABLE_KQUEUE_TRUE DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE @@ -879,6 +852,17 @@ DBUS_GCOV_ENABLED_TRUE R_DYNAMIC_LDFLAG DBUS_BUILD_TESTS_FALSE DBUS_BUILD_TESTS_TRUE +DBUS_CYGWIN_FALSE +DBUS_CYGWIN_TRUE +DBUS_UNIX_FALSE +DBUS_UNIX_TRUE +DBUS_WINCE_FALSE +DBUS_WINCE_TRUE +DBUS_WIN_FALSE +DBUS_WIN_TRUE +WINDRES +BUILD_FILEVERSION +BUILD_TIMESTAMP CXXCPP OTOOL64 OTOOL @@ -888,7 +872,6 @@ DSYMUTIL lt_ECHO RANLIB AR -OBJDUMP LN_S NM ac_ct_DUMPBIN @@ -958,6 +941,9 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +OBJDUMP +DLLTOOL +AS host_os host_vendor host_cpu @@ -996,6 +982,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -1031,6 +1018,7 @@ enable_inotify enable_kqueue enable_console_owner_file enable_userdb_cache +enable_launchd with_xml with_init_scripts with_session_socket_dir @@ -1039,9 +1027,12 @@ with_system_pid_file with_system_socket with_console_auth_dir with_console_owner_file +with_launchd_agent_dir with_dbus_user with_dbus_daemondir with_x +with_systemdsystemunitdir +with_dbus_test_dir ' ac_precious_vars='build_alias host_alias @@ -1056,7 +1047,11 @@ CXXFLAGS CCC CPP CXXCPP -XMKMF' +PKG_CONFIG +LIBXML_CFLAGS +LIBXML_LIBS +XMKMF +MAN2HTML' # Initialize some variables set by options. @@ -1119,8 +1114,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1165,8 +1161,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1192,8 +1187,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1397,8 +1391,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1414,8 +1407,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1445,17 +1437,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1472,15 +1464,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1503,8 +1493,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1518,8 +1507,8 @@ 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 + $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 @@ -1534,11 +1523,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1577,13 +1564,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1609,7 +1594,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 dbus 1.2.24 to adapt to many kinds of systems. +\`configure' configures dbus 1.4.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1623,7 +1608,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1683,7 +1668,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dbus 1.2.24:";; + short | recursive ) echo "Configuration of dbus 1.4.1:";; esac cat <<\_ACEOF @@ -1721,6 +1706,7 @@ Optional Features: --enable-console-owner-file enable console owner file --enable-userdb-cache build with userdb-cache support + --enable-launchd build with launchd auto-launch support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1744,10 +1730,17 @@ Optional Packages: directory to check for console ownerhip --with-console-owner-file=filename file whose owner determines current console owner + --with-launchd-agent-dir=dirname + directory to put the launchd agent (default: + /Library/LaunchAgents) --with-dbus-user=<user> User for running the DBUS daemon (messagebus) --with-dbus-daemondir=dirname Directory for installing the DBUS daemon --with-x use the X Window System + --with-systemdsystemunitdir=DIR + Directory for systemd service files + --with-dbus-test-dir=dirname + path where the tests tools are available Some influential environment variables: CC C compiler command @@ -1755,17 +1748,23 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor + PKG_CONFIG path to pkg-config utility + LIBXML_CFLAGS + C compiler flags for LIBXML, overriding pkg-config + LIBXML_LIBS linker flags for LIBXML, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System + MAN2HTML Path to man2html (optional) 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 the package provider. _ACEOF ac_status=$? fi @@ -1828,22 +1827,718 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dbus configure 1.2.24 -generated by GNU Autoconf 2.63 +dbus configure 1.4.1 +generated by GNU Autoconf 2.67 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 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_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +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;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 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_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +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;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +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;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval "test \"\${$3+set}\"" = set; then : + { $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 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $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 + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { 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_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +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;} + 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 () +{ + 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" +else + eval "$3=no" +fi +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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # 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 + 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 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +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 + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +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 : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case <limits.h> declares $2. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 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; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +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;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + 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_cxx_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 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +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 + +} # ac_fn_cxx_try_link + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include <stdio.h> +#include <stdlib.h> +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 <conftest.val; ac_retval=0 +else + ac_retval=1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.val + + fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_compute_int + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&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 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_decl 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 dbus $as_me 1.2.24, which was -generated by GNU Autoconf 2.63. Invocation command line was +It was created by dbus $as_me 1.4.1, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1879,8 +2574,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1917,9 +2612,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1935,13 +2630,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1953,11 +2648,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1966,13 +2659,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1991,11 +2684,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2008,11 +2699,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2026,11 +2715,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2044,46 +2731,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2094,19 +2788,23 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $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 ; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -2114,7 +2812,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2129,11 +2827,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -2143,17 +2841,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -2165,43 +2863,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2228,9 +2903,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2244,35 +2917,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&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 +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_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + 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_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2288,28 +2953,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $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 +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_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2325,6 +2986,312 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; 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_AS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as" + $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 +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; 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_AS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as" + $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_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AS" = x; then + AS="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 + AS=$ac_ct_AS + fi +else + AS="$ac_cv_prog_AS" +fi + + 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 test "${ac_cv_prog_DLLTOOL+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; 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 { 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_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 + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +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 : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" + $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 +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +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 : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump" + $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="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 + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + + + + + + + am__api_version='1.11' @@ -2342,10 +3309,10 @@ am__api_version='1.11' # 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:$LINENO: checking for a BSD-compatible install" >&5 +{ $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 +if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2353,11 +3320,11 @@ 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/* | \ + # 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\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2394,7 +3361,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2410,7 +3377,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2421,7 +3388,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 @@ -2432,15 +3399,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2462,11 +3425,8 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2475,13 +3435,10 @@ then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" @@ -2509,7 +3466,7 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi @@ -2530,9 +3487,9 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2543,24 +3500,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2570,9 +3527,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2583,24 +3540,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2609,7 +3566,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -2622,10 +3579,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +{ $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 test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2633,7 +3590,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do + for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( @@ -2645,11 +3602,12 @@ do esac done done -done + done IFS=$as_save_IFS fi + test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else @@ -2657,11 +3615,10 @@ fi # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" @@ -2674,9 +3631,9 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2687,24 +3644,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2712,11 +3669,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2724,7 +3681,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2734,11 +3691,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2758,9 +3715,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2776,7 +3731,7 @@ fi # Define the identity of the package. PACKAGE='dbus' - VERSION='1.2.24' + VERSION='1.4.1' cat >>confdefs.h <<_ACEOF @@ -2811,7 +3766,7 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} -{ $as_echo "$as_me:$LINENO: checking how to create a ustar tar archive" >&5 +{ $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' @@ -2884,13 +3839,13 @@ do done rm -rf conftest.dir -if test "${am_cv_prog_tar_ustar+set}" = set; then +if test "${am_cv_prog_tar_ustar+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_prog_tar_ustar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } @@ -2913,16 +3868,16 @@ _ACEOF ## must come before we use the $USE_MAINTAINER_MODE variable later -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= @@ -2937,7 +3892,7 @@ fi # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi @@ -2949,31 +3904,37 @@ esac AM_BACKSLASH='\' + +cat >>confdefs.h <<_ACEOF +#define DBUS_DAEMON_NAME "dbus-daemon" +_ACEOF + + # libtool versioning - this applies to libdbus # # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details # ## increment if the interface has additions, changes, removals. -LT_CURRENT=7 +LT_CURRENT=8 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=0 +LT_REVISION=3 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has ## precedence over adding, so set to 0 if both happened. -LT_AGE=4 +LT_AGE=5 DBUS_MAJOR_VERSION=1 -DBUS_MINOR_VERSION=2 -DBUS_MICRO_VERSION=24 -DBUS_VERSION=1.2.24 +DBUS_MINOR_VERSION=4 +DBUS_MICRO_VERSION=1 +DBUS_VERSION=1.4.1 @@ -2988,9 +3949,9 @@ 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3001,24 +3962,24 @@ 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 + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3028,9 +3989,9 @@ 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3041,24 +4002,24 @@ 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 + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3067,7 +4028,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -3081,9 +4042,9 @@ 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3094,24 +4055,24 @@ 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 + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3121,9 +4082,9 @@ 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3135,18 +4096,18 @@ 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 + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3165,10 +4126,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3180,9 +4141,9 @@ if test -z "$CC"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3193,24 +4154,24 @@ 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 + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3224,9 +4185,9 @@ if test -z "$CC"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3237,24 +4198,24 @@ 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 + 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:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3267,7 +4228,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -3278,57 +4239,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +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_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +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:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +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:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3344,8 +4285,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3361,17 +4302,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3388,7 +4329,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3407,84 +4348,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +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:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3499,32 +4397,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { 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>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { 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_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + 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 run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5 ; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +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 test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3536,17 +4485,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3559,31 +4508,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3597,37 +4538,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + 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:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $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 @@ -3636,20 +4556,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $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 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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3660,35 +4576,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3699,36 +4591,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3739,42 +4607,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $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 @@ -3791,18 +4634,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $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 test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> @@ -3859,32 +4698,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3895,17 +4711,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $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:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $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 : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3924,7 +4742,7 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +{ $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= @@ -3952,12 +4770,12 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $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 +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -3977,9 +4795,9 @@ fi depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4087,7 +4905,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $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 @@ -4103,22 +4921,18 @@ fi if test "x$CC" != xcc; then - { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else - { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4134,63 +4948,63 @@ _ACEOF # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* -if { (case "(($ac_try" in +if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' - { (case "(($ac_try" in + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* - if { (case "(($ac_try" in + if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - test -f conftest2.$ac_objext && { (case "(($ac_try" in + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && + test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # cc works too. : @@ -4207,15 +5021,13 @@ rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define NO_MINUS_C_MINUS_O 1 -_ACEOF +$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi @@ -4248,9 +5060,9 @@ if test -z "$CXX"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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_CXX+set}" = set; then +if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -4261,24 +5073,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4292,9 +5104,9 @@ if test -z "$CXX"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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_CXX+set}" = set; then +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -4305,24 +5117,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4335,7 +5147,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -4346,53 +5158,36 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" +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:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +{ $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_cxx_compiler_gnu+set}" = set; then +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4406,37 +5201,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes @@ -4445,20 +5219,16 @@ else fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then +if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4469,35 +5239,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4508,36 +5254,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4548,42 +5270,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -4608,9 +5305,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $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_CXX_dependencies_compiler_type+set}" = set; then +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4718,7 +5415,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type @@ -4734,106 +5431,19 @@ fi -{ $as_echo "$as_me:$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 - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char strerror (); -int -main () -{ -return strerror (); - ; - return 0; -} -_ACEOF -for ac_lib in '' cposix; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_strerror=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_strerror+set}" = set; then - break -fi -done -if test "${ac_cv_search_strerror+set}" = set; then - : -else - ac_cv_search_strerror=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:$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" - -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:$LINENO: checking how to run the C preprocessor" >&5 +{ $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 + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -4848,11 +5458,7 @@ do # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> @@ -4861,78 +5467,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -4944,7 +5506,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $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 @@ -4955,11 +5517,7 @@ do # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> @@ -4968,87 +5526,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -5058,9 +5569,9 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $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 +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5071,7 +5582,7 @@ 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_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 @@ -5091,7 +5602,7 @@ case `"$ac_path_GREP" --version 2>&1` in $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 - ac_count=`expr $ac_count + 1` + 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" @@ -5106,26 +5617,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + 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:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $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:$LINENO: checking for egrep" >&5 +{ $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 +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 @@ -5139,7 +5648,7 @@ 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_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 @@ -5159,7 +5668,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $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 - ac_count=`expr $ac_count + 1` + 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" @@ -5174,12 +5683,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + 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 @@ -5187,21 +5694,17 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $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" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $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 +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> @@ -5216,48 +5719,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -5267,18 +5745,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -5288,14 +5762,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> @@ -5322,66 +5792,279 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -( exit $ac_status ) -ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 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 -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } + +done + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = x""yes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + +{ $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 : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +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" +#endif +char strerror (); +int +main () +{ +return strerror (); + ; + return 0; +} +_ACEOF +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_strerror+set}" = set; then : + break +fi +done +if test "${ac_cv_search_strerror+set}" = set; then : + +else + ac_cv_search_strerror=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $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" + +fi + +{ $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_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + 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 <string.h> -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 _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* -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +fi + +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 <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +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 + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then +if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -5390,41 +6073,17 @@ $ac_kw foo_t foo () {return 0; } #endif _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } - case $ac_cv_c_inline in inline | yes) ;; *) @@ -5442,7 +6101,7 @@ esac case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $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 @@ -5465,9 +6124,9 @@ macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +{ $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 test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -5475,7 +6134,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= + { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5484,7 +6143,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_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 @@ -5504,7 +6163,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -5519,19 +6178,17 @@ esac $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5549,9 +6206,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +{ $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 test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -5565,7 +6222,7 @@ 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 fgrep; 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 @@ -5585,7 +6242,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -5600,12 +6257,10 @@ esac $ac_path_FGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -5613,7 +6268,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5639,7 +6294,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -5648,7 +6303,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -5678,13 +6333,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $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 test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -5715,18 +6370,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +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 test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -5739,7 +6392,7 @@ case `$LD -v 2>&1 </dev/null` in ;; esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5751,9 +6404,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $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 test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -5800,7 +6453,7 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" @@ -5811,9 +6464,9 @@ else 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -5824,24 +6477,24 @@ 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 + 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_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5855,9 +6508,9 @@ if test -z "$DUMPBIN"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -5868,24 +6521,24 @@ 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 + 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_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5898,7 +6551,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -5918,44 +6571,44 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +{ $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 test "${lt_cv_nm_interface+set}" = set; 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:5928: $ac_compile\"" >&5) + (eval echo "\"\$as_me:6581: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5931: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:6584: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5934: output\"" >&5) + (eval echo "\"\$as_me:6587: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +{ $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 test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 @@ -6073,10 +6726,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6090,7 +6743,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no @@ -6100,17 +6753,17 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -6145,14 +6798,14 @@ esac -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +{ $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 test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -6181,9 +6834,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -6194,24 +6847,24 @@ 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 + 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_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6221,9 +6874,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -6234,24 +6887,24 @@ 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 + 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_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6260,7 +6913,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6277,12 +6930,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump - - - -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +{ $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 test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -6397,11 +7047,11 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6476,7 +7126,7 @@ tpf*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +{ $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 @@ -6496,9 +7146,9 @@ 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 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -6509,24 +7159,24 @@ 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 + 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6536,9 +7186,9 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -6549,24 +7199,24 @@ 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 + 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" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6575,7 +7225,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6601,9 +7251,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -6614,24 +7264,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6641,9 +7291,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -6654,24 +7304,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6680,7 +7330,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6700,9 +7350,9 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6713,24 +7363,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6740,9 +7390,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6753,24 +7403,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6779,7 +7429,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -6857,9 +7507,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +{ $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 test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -6975,18 +7625,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + 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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -7039,11 +7689,11 @@ _LT_EOF lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -7077,10 +7727,10 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi @@ -7106,7 +7756,7 @@ fi # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -7118,11 +7768,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -7136,12 +7786,12 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7139 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo '#line 7789 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -7175,11 +7825,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -7228,9 +7878,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + { $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 test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -7239,11 +7889,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7254,38 +7900,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7293,7 +7914,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -7303,11 +7924,11 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -7333,9 +7954,9 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -7346,24 +7967,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7373,9 +7994,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -7386,24 +8007,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7412,7 +8033,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7425,9 +8046,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -7438,24 +8059,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7465,9 +8086,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -7478,24 +8099,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7504,7 +8125,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7517,9 +8138,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -7530,24 +8151,24 @@ 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 + 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_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7557,9 +8178,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -7570,24 +8191,24 @@ 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 + 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_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7596,7 +8217,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7609,9 +8230,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -7622,24 +8243,24 @@ 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 + 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_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7649,9 +8270,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -7662,24 +8283,24 @@ 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 + 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_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7688,7 +8309,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7701,9 +8322,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -7714,24 +8335,24 @@ 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 + 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_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7741,9 +8362,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -7754,24 +8375,24 @@ 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 + 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_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7780,7 +8401,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -7816,9 +8437,9 @@ fi - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 + { $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 test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -7843,22 +8464,18 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +{ $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:$LINENO: checking for -exported_symbols_list linker flag" >&5 + { $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 test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7869,42 +8486,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) @@ -7941,135 +8533,13 @@ $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` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = 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 -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +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 : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -8092,9 +8562,9 @@ if test -z "$CXX"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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_CXX+set}" = set; then +if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -8105,24 +8575,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8136,9 +8606,9 @@ if test -z "$CXX"; then 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:$LINENO: checking for $ac_word" >&5 +{ $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_CXX+set}" = set; then +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -8149,24 +8619,24 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8179,7 +8649,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $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 @@ -8190,53 +8660,36 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +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:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +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=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $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:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +{ $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_cxx_compiler_gnu+set}" = set; then +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8250,37 +8703,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes @@ -8289,20 +8721,16 @@ else fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then +if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8313,35 +8741,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8352,36 +8756,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8392,42 +8772,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -8452,9 +8807,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $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_CXX_dependencies_compiler_type+set}" = set; then +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -8562,7 +8917,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type @@ -8585,10 +8940,10 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +{ $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; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -8603,11 +8958,7 @@ do # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> @@ -8616,78 +8967,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -8699,7 +9006,7 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes @@ -8710,11 +9017,7 @@ do # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> @@ -8723,81 +9026,37 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } fi @@ -8823,11 +9082,9 @@ fi enable_dlopen=no - enable_win32_dll=no - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8858,7 +9115,7 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8890,7 +9147,7 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then +if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default @@ -8906,7 +9163,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -8987,9 +9244,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +{ $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 test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -9002,7 +9259,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -9095,9 +9352,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + { $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 test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -9148,10 +9405,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9161,9 +9418,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 + { $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 test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -9214,10 +9471,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -9287,6 +9544,10 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* +## 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_prog_compiler_no_builtin_flag= @@ -9294,9 +9555,9 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $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 test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -9312,11 +9573,11 @@ 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:9315: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9576: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9319: \$? = $ac_status" >&5 + echo "$as_me:9580: \$? = $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. @@ -9329,7 +9590,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -9349,7 +9610,7 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +{ $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 @@ -9481,7 +9742,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -9621,7 +9882,7 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } @@ -9633,9 +9894,9 @@ $as_echo "$lt_prog_compiler_pic" >&6; } # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $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 test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -9651,11 +9912,11 @@ 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:9654: $lt_compile\"" >&5) + (eval echo "\"\$as_me:9915: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:9658: \$? = $ac_status" >&5 + echo "$as_me:9919: \$? = $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. @@ -9668,7 +9929,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -9692,9 +9953,9 @@ 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:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $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 test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -9720,7 +9981,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -9735,9 +9996,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $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 test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9756,11 +10017,11 @@ 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:9759: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10020: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9763: \$? = $ac_status" >&5 + echo "$as_me:10024: \$? = $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 @@ -9782,7 +10043,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9790,9 +10051,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $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 test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -9811,11 +10072,11 @@ 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:9814: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10075: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:9818: \$? = $ac_status" >&5 + echo "$as_me:10079: \$? = $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 @@ -9837,7 +10098,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -9846,7 +10107,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -9854,10 +10115,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -9870,7 +10131,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -9930,6 +10191,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -9951,6 +10215,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi supports_anon_versioning=no case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -10042,7 +10307,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -10112,7 +10377,7 @@ _LT_EOF fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -10287,6 +10552,7 @@ _LT_EOF if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then @@ -10312,11 +10578,7 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10327,27 +10589,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10361,16 +10603,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +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 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -10383,11 +10618,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10398,27 +10629,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10432,16 +10643,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +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 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -10653,42 +10857,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int foo(void) {} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +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' -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" 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' @@ -10701,7 +10879,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ link_all_deplibs=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -10944,7 +11122,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi fi -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -10981,16 +11159,16 @@ 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. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $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 { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $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 @@ -11004,11 +11182,11 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + 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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then archive_cmds_need_lc=no else @@ -11019,7 +11197,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } cat conftest.err 1>&5 fi $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac @@ -11183,7 +11361,7 @@ esac - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -11591,7 +11769,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -11605,11 +11783,7 @@ linux* | k*bsd*-gnu) save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11620,41 +11794,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then +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 fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -11663,13 +11809,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -11681,6 +11824,18 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -11869,7 +12024,7 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no @@ -11971,7 +12126,7 @@ fi - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + { $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= if test -n "$hardcode_libdir_flag_spec" || @@ -11996,7 +12151,7 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || @@ -12041,18 +12196,14 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $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 test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12070,43 +12221,18 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $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" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -12119,106 +12245,18 @@ fi ;; *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + { $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 test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12236,145 +12274,32 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +{ $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" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $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 test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12392,57 +12317,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $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" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + { $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 test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12460,57 +12356,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +{ $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" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + { $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 test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12528,43 +12395,18 @@ return dld_link (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +{ $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" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -12603,9 +12445,9 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + { $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 test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12614,7 +12456,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12617 "configure" +#line 12459 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12673,11 +12515,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12694,14 +12536,14 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + { $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 test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -12710,7 +12552,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12713 "configure" +#line 12555 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12769,11 +12611,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -12790,7 +12632,7 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi @@ -12829,12 +12671,12 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +{ $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:$LINENO: result: yes" >&5 + { $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 @@ -12843,15 +12685,15 @@ else if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac @@ -12869,12 +12711,12 @@ fi # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + { $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:$LINENO: result: $can_build_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + { $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 @@ -12895,14 +12737,14 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + { $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:$LINENO: result: $enable_static" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -13043,7 +12885,7 @@ cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -13052,7 +12894,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -13082,13 +12924,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $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 test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -13119,18 +12961,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +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 test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -13143,7 +12983,7 @@ case `$LD -v 2>&1 </dev/null` in ;; esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -13198,7 +13038,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld fi # PORTME: fill in a description of your system's C++ link characteristics - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in @@ -13299,11 +13139,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13314,27 +13150,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -13348,16 +13164,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +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 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -13371,11 +13180,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13386,27 +13191,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -13420,16 +13205,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +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 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -13714,7 +13492,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -14173,7 +13951,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; esac - { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no @@ -14201,11 +13979,11 @@ private: }; _LT_EOF -if { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. @@ -14386,7 +14164,7 @@ fi lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +{ $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; } # C++ specific cases for pic, static, wl, etc. @@ -14542,7 +14320,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -14606,7 +14384,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -14703,7 +14481,7 @@ case $host_os in lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } @@ -14712,9 +14490,9 @@ $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -14730,11 +14508,11 @@ 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:14733: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14511: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14737: \$? = $ac_status" >&5 + echo "$as_me:14515: \$? = $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. @@ -14747,7 +14525,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then @@ -14768,9 +14546,9 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $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_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -14796,7 +14574,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then @@ -14808,9 +14586,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $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_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -14829,11 +14607,11 @@ 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:14832: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14610: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14836: \$? = $ac_status" >&5 + echo "$as_me:14614: \$? = $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 @@ -14855,14 +14633,14 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $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_CXX+set}" = set; then +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -14881,11 +14659,11 @@ 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:14884: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14662: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14888: \$? = $ac_status" >&5 + echo "$as_me:14666: \$? = $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 @@ -14907,7 +14685,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } @@ -14916,7 +14694,7 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -14924,10 +14702,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -14937,7 +14715,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -14957,13 +14735,16 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; + linux* | k*bsd*-gnu) + link_all_deplibs_CXX=no + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no @@ -14991,16 +14772,16 @@ 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. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $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 { (eval echo "$as_me:$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:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $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 @@ -15014,11 +14795,11 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else @@ -15029,7 +14810,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } cat conftest.err 1>&5 fi $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac @@ -15100,7 +14881,7 @@ esac - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= @@ -15456,7 +15237,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -15470,11 +15251,7 @@ linux* | k*bsd*-gnu) save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15485,41 +15262,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then +if ac_fn_cxx_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -15528,13 +15277,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # before this can be enabled. hardcode_into_libs=yes - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15546,6 +15292,18 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -15734,7 +15492,7 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no @@ -15785,7 +15543,7 @@ fi - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + { $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_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || @@ -15810,7 +15568,7 @@ else # directories. hardcode_action_CXX=unsupported fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || @@ -15869,186 +15627,372 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# Set some internal variables depending on the platform for later use. +dbus_win=no +dbus_cygwin=no +dbus_unix=no +case "${host}" in + *-mingw32ce*) + dbus_win=yes + dbus_wince=yes + ;; + *-mingw32*) + dbus_win=yes + ;; + *-cygwin*) + dbus_cygwin=yes + dbus_unix=yes + ;; + *) + dbus_unix=yes + ;; +esac + +# Special defines for certain platforms +if test "$dbus_win" = yes; then + +$as_echo "#define DBUS_WIN 1" >>confdefs.h + + BUILD_TIMESTAMP=`date --iso-8601=minutes` + + # Assume DBUS_VERSION is always three numbers + BUILD_FILEVERSION=`echo "$DBUS_VERSION" | sed -e 's/\./,/g'`,0 + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. +set dummy ${ac_tool_prefix}windres; 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_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINDRES"; then + ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres" + $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 +WINDRES=$ac_cv_prog_WINDRES +if test -n "$WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 +$as_echo "$WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_WINDRES"; then + ac_ct_WINDRES=$WINDRES + # Extract the first word of "windres", so it can be a program name with args. +set dummy windres; 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_WINDRES+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_WINDRES"; then + ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # 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_WINDRES="windres" + $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_WINDRES=$ac_cv_prog_ac_ct_WINDRES +if test -n "$ac_ct_WINDRES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 +$as_echo "$ac_ct_WINDRES" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_WINDRES" = x; then + WINDRES="no" + 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 + WINDRES=$ac_ct_WINDRES + fi +else + WINDRES="$ac_cv_prog_WINDRES" +fi + + if test "$WINDRES" = no; then + as_fn_error $? "*** Could not find an implementation of windres in your PATH." "$LINENO" 5 + fi + if test "$dbus_wince" = yes; then + +$as_echo "#define DBUS_WINCE 1" >>confdefs.h + + +$as_echo "#define _WIN32_WCE 0x0502" >>confdefs.h + + fi +else + +$as_echo "#define DBUS_UNIX 1" >>confdefs.h + +fi +if test "$dbus_cygwin" = yes; then + +$as_echo "#define DBUS_CYGWIN 1" >>confdefs.h + +fi + + if test "$dbus_win" = yes; then + DBUS_WIN_TRUE= + DBUS_WIN_FALSE='#' +else + DBUS_WIN_TRUE='#' + DBUS_WIN_FALSE= +fi + + if test "$dbus_wince" = yes; then + DBUS_WINCE_TRUE= + DBUS_WINCE_FALSE='#' +else + DBUS_WINCE_TRUE='#' + DBUS_WINCE_FALSE= +fi + + if test "$dbus_unix" = yes; then + DBUS_UNIX_TRUE= + DBUS_UNIX_FALSE='#' +else + DBUS_UNIX_TRUE='#' + DBUS_UNIX_FALSE= +fi + + if test "$dbus_cygwin" = yes; then + DBUS_CYGWIN_TRUE= + DBUS_CYGWIN_FALSE='#' +else + DBUS_CYGWIN_TRUE='#' + DBUS_CYGWIN_FALSE= +fi + + # Check whether --enable-tests was given. -if test "${enable_tests+set}" = set; then +if test "${enable_tests+set}" = set; then : enableval=$enable_tests; enable_tests=$enableval else enable_tests=$USE_MAINTAINER_MODE fi # Check whether --enable-ansi was given. -if test "${enable_ansi+set}" = set; then +if test "${enable_ansi+set}" = set; then : enableval=$enable_ansi; enable_ansi=$enableval else enable_ansi=no fi # Check whether --enable-verbose-mode was given. -if test "${enable_verbose_mode+set}" = set; then +if test "${enable_verbose_mode+set}" = set; then : enableval=$enable_verbose_mode; enable_verbose_mode=$enableval else enable_verbose_mode=$USE_MAINTAINER_MODE fi # Check whether --enable-asserts was given. -if test "${enable_asserts+set}" = set; then +if test "${enable_asserts+set}" = set; then : enableval=$enable_asserts; enable_asserts=$enableval else enable_asserts=$USE_MAINTAINER_MODE fi # Check whether --enable-checks was given. -if test "${enable_checks+set}" = set; then +if test "${enable_checks+set}" = set; then : enableval=$enable_checks; enable_checks=$enableval else enable_checks=yes fi # Check whether --enable-xml-docs was given. -if test "${enable_xml_docs+set}" = set; then +if test "${enable_xml_docs+set}" = set; then : enableval=$enable_xml_docs; enable_xml_docs=$enableval else enable_xml_docs=auto fi # Check whether --enable-doxygen-docs was given. -if test "${enable_doxygen_docs+set}" = set; then +if test "${enable_doxygen_docs+set}" = set; then : enableval=$enable_doxygen_docs; enable_doxygen_docs=$enableval else enable_doxygen_docs=auto fi # Check whether --enable-gcov was given. -if test "${enable_gcov+set}" = set; then +if test "${enable_gcov+set}" = set; then : enableval=$enable_gcov; enable_gcov=$enableval else enable_gcov=no fi # Check whether --enable-abstract-sockets was given. -if test "${enable_abstract_sockets+set}" = set; then +if test "${enable_abstract_sockets+set}" = set; then : enableval=$enable_abstract_sockets; enable_abstract_sockets=$enableval else enable_abstract_sockets=auto fi # Check whether --enable-selinux was given. -if test "${enable_selinux+set}" = set; then +if test "${enable_selinux+set}" = set; then : enableval=$enable_selinux; enable_selinux=$enableval else enable_selinux=auto fi # Check whether --enable-libaudit was given. -if test "${enable_libaudit+set}" = set; then +if test "${enable_libaudit+set}" = set; then : enableval=$enable_libaudit; enable_libaudit=$enableval else enable_libaudit=auto fi # Check whether --enable-dnotify was given. -if test "${enable_dnotify+set}" = set; then +if test "${enable_dnotify+set}" = set; then : enableval=$enable_dnotify; enable_dnotify=$enableval else enable_dnotify=auto fi # Check whether --enable-inotify was given. -if test "${enable_inotify+set}" = set; then +if test "${enable_inotify+set}" = set; then : enableval=$enable_inotify; enable_inotify=$enableval else enable_inotify=auto fi # Check whether --enable-kqueue was given. -if test "${enable_kqueue+set}" = set; then +if test "${enable_kqueue+set}" = set; then : enableval=$enable_kqueue; enable_kqueue=$enableval else enable_kqueue=auto fi # Check whether --enable-console-owner-file was given. -if test "${enable_console_owner_file+set}" = set; then +if test "${enable_console_owner_file+set}" = set; then : enableval=$enable_console_owner_file; enable_console_owner_file=$enableval else enable_console_owner_file=auto fi # Check whether --enable-userdb-cache was given. -if test "${enable_userdb_cache+set}" = set; then +if test "${enable_userdb_cache+set}" = set; then : enableval=$enable_userdb_cache; enable_userdb_cache=$enableval else enable_userdb_cache=yes fi +# Check whether --enable-launchd was given. +if test "${enable_launchd+set}" = set; then : + enableval=$enable_launchd; enable_launchd=$enableval +else + enable_launchd=auto +fi + # Check whether --with-xml was given. -if test "${with_xml+set}" = set; then +if test "${with_xml+set}" = set; then : withval=$with_xml; fi # Check whether --with-init-scripts was given. -if test "${with_init_scripts+set}" = set; then +if test "${with_init_scripts+set}" = set; then : withval=$with_init_scripts; fi # Check whether --with-session-socket-dir was given. -if test "${with_session_socket_dir+set}" = set; then +if test "${with_session_socket_dir+set}" = set; then : withval=$with_session_socket_dir; fi # Check whether --with-test-socket-dir was given. -if test "${with_test_socket_dir+set}" = set; then +if test "${with_test_socket_dir+set}" = set; then : withval=$with_test_socket_dir; fi # Check whether --with-system-pid-file was given. -if test "${with_system_pid_file+set}" = set; then +if test "${with_system_pid_file+set}" = set; then : withval=$with_system_pid_file; fi # Check whether --with-system-socket was given. -if test "${with_system_socket+set}" = set; then +if test "${with_system_socket+set}" = set; then : withval=$with_system_socket; fi # Check whether --with-console-auth-dir was given. -if test "${with_console_auth_dir+set}" = set; then +if test "${with_console_auth_dir+set}" = set; then : withval=$with_console_auth_dir; fi # Check whether --with-console-owner-file was given. -if test "${with_console_owner_file+set}" = set; then +if test "${with_console_owner_file+set}" = set; then : withval=$with_console_owner_file; fi +# Check whether --with-launchd-agent-dir was given. +if test "${with_launchd_agent_dir+set}" = set; then : + withval=$with_launchd_agent_dir; +fi + + # Check whether --with-dbus_user was given. -if test "${with_dbus_user+set}" = set; then +if test "${with_dbus_user+set}" = set; then : withval=$with_dbus_user; fi # Check whether --with-dbus_daemondir was given. -if test "${with_dbus_daemondir+set}" = set; then +if test "${with_dbus_daemondir+set}" = set; then : withval=$with_dbus_daemondir; fi - -cat >>confdefs.h <<\_ACEOF -#define DBUS_UNIX 1 -_ACEOF - - if test x$enable_tests = xyes; then DBUS_BUILD_TESTS_TRUE= DBUS_BUILD_TESTS_FALSE='#' @@ -16059,30 +16003,22 @@ fi if test x$enable_tests = xyes; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_BUILD_TESTS 1 -_ACEOF +$as_echo "#define DBUS_BUILD_TESTS 1" >>confdefs.h fi if test x$enable_verbose_mode = xyes; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_ENABLE_VERBOSE_MODE 1 -_ACEOF +$as_echo "#define DBUS_ENABLE_VERBOSE_MODE 1" >>confdefs.h fi if test x$enable_asserts = xno; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_DISABLE_ASSERT 1 -_ACEOF +$as_echo "#define DBUS_DISABLE_ASSERT 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define G_DISABLE_ASSERT 1 -_ACEOF +$as_echo "#define G_DISABLE_ASSERT 1" >>confdefs.h R_DYNAMIC_LDFLAG="" else @@ -16094,9 +16030,7 @@ else # To get -rdynamic you pass -export-dynamic to libtool. -cat >>confdefs.h <<\_ACEOF -#define DBUS_BUILT_R_DYNAMIC 1 -_ACEOF +$as_echo "#define DBUS_BUILT_R_DYNAMIC 1" >>confdefs.h R_DYNAMIC_LDFLAG=-export-dynamic fi @@ -16104,22 +16038,16 @@ fi if test x$enable_checks = xno; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_DISABLE_CHECKS 1 -_ACEOF +$as_echo "#define DBUS_DISABLE_CHECKS 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define G_DISABLE_CHECKS 1 -_ACEOF +$as_echo "#define G_DISABLE_CHECKS 1" >>confdefs.h fi if test x$enable_userdb_cache = xyes; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_ENABLE_USERDB_CACHE 1 -_ACEOF +$as_echo "#define DBUS_ENABLE_USERDB_CACHE 1" >>confdefs.h fi @@ -16131,23 +16059,16 @@ cat >>confdefs.h <<_ACEOF _ACEOF - { $as_echo "$as_me:$LINENO: checking for gcc 3.3 version of gcov file format" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc 3.3 version of gcov file format" >&5 $as_echo_n "checking for gcc 3.3 version of gcov file format... " >&6; } have_gcc33_gcov=no - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5 ; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16158,40 +16079,13 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : have_gcc33_gcov=yes -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - if test x$have_gcc33_gcov = xyes ; then cat >>confdefs.h <<_ACEOF @@ -16199,7 +16093,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF fi - { $as_echo "$as_me:$LINENO: result: $have_gcc33_gcov" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc33_gcov" >&5 $as_echo "$have_gcc33_gcov" >&6; } fi if test x$enable_gcov = xyes; then @@ -16216,16 +16110,12 @@ fi # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } -if test "${ac_cv_gnu_library_2_1+set}" = set; then +if test "${ac_cv_gnu_library_2_1+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <features.h> @@ -16237,7 +16127,7 @@ cat >>conftest.$ac_ext <<_ACEOF _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then + $EGREP "Lucky GNU user" >/dev/null 2>&1; then : ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no @@ -16247,7 +16137,7 @@ rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 $as_echo "$ac_cv_gnu_library_2_1" >&6; } #### Integer sizes @@ -16256,352 +16146,26 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; } # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of char" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } -if test "${ac_cv_sizeof_char+set}" = set; then +if test "${ac_cv_sizeof_char+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_char=$ac_lo;; -'') if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (char) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_char=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (char)); } -static unsigned long int ulongval () { return (long int) (sizeof (char)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (char))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (char)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (char)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_char=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (char) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_char=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 $as_echo "$ac_cv_sizeof_char" >&6; } @@ -16615,352 +16179,26 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of short" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } -if test "${ac_cv_sizeof_short+set}" = set; then +if test "${ac_cv_sizeof_short+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_short=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (short)); } -static unsigned long int ulongval () { return (long int) (sizeof (short)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (short))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (short)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (short)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_short" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (short) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_short=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } @@ -16974,352 +16212,26 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then +if test "${ac_cv_sizeof_long+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (long) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_long=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } @@ -17333,352 +16245,26 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then +if test "${ac_cv_sizeof_int+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_int=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (int)); } -static unsigned long int ulongval () { return (long int) (sizeof (int)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_int=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } @@ -17692,352 +16278,26 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } -if test "${ac_cv_sizeof_void_p+set}" = set; then +if test "${ac_cv_sizeof_void_p+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_void_p=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (void *)); } -static unsigned long int ulongval () { return (long int) (sizeof (void *)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (void *))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (void *)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (void *)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (void *) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_void_p=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } @@ -18051,352 +16311,26 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long long" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } -if test "${ac_cv_sizeof_long_long+set}" = set; then +if test "${ac_cv_sizeof_long_long+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long_long=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long long)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (long long) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof_long_long=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } @@ -18410,352 +16344,26 @@ _ACEOF # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of __int64" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 $as_echo_n "checking size of __int64... " >&6; } -if test "${ac_cv_sizeof___int64+set}" = set; then +if test "${ac_cv_sizeof___int64+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (__int64))) <= $ac_mid)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof___int64=$ac_lo;; -'') if test "$ac_cv_type___int64" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof___int64=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (__int64)); } -static unsigned long int ulongval () { return (long int) (sizeof (__int64)); } -#include <stdio.h> -#include <stdlib.h> -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (__int64))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (__int64)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (__int64)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof___int64=`cat conftest.val` else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type___int64" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$ac_cv_type___int64" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (__int64) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +as_fn_error 77 "cannot compute sizeof (__int64) +See \`config.log' for more details" "$LINENO" 5 ; } else ac_cv_sizeof___int64=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 $as_echo "$ac_cv_sizeof___int64" >&6; } @@ -18767,7 +16375,7 @@ _ACEOF ### See what our 64 bit type is called -{ $as_echo "$as_me:$LINENO: checking 64-bit integer type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking 64-bit integer type" >&5 $as_echo_n "checking 64-bit integer type... " >&6; } case 8 in @@ -18809,7 +16417,7 @@ if test -z "$dbusint64" ; then DBUS_HAVE_INT64=0 DBUS_INT64_CONSTANT= DBUS_UINT64_CONSTANT= - { $as_echo "$as_me:$LINENO: result: none found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 $as_echo "none found" >&6; } else DBUS_INT64_TYPE="$dbusint64" @@ -18823,7 +16431,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF fi - { $as_echo "$as_me:$LINENO: result: $DBUS_INT64_TYPE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_INT64_TYPE" >&5 $as_echo "$DBUS_INT64_TYPE" >&6; } fi @@ -18833,7 +16441,7 @@ fi ### see what 32-bit int is called -{ $as_echo "$as_me:$LINENO: checking 32-bit integer type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit integer type" >&5 $as_echo_n "checking 32-bit integer type... " >&6; } case 4 in @@ -18850,19 +16458,17 @@ esac if test -z "$dbusint32" ; then DBUS_INT32_TYPE="no_int32_type_detected" - { { $as_echo "$as_me:$LINENO: error: No 32-bit integer type found" >&5 -$as_echo "$as_me: error: No 32-bit integer type found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "No 32-bit integer type found" "$LINENO" 5 else DBUS_INT32_TYPE="$dbusint32" - { $as_echo "$as_me:$LINENO: result: $DBUS_INT32_TYPE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_INT32_TYPE" >&5 $as_echo "$DBUS_INT32_TYPE" >&6; } fi ### see what 16-bit int is called -{ $as_echo "$as_me:$LINENO: checking 16-bit integer type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking 16-bit integer type" >&5 $as_echo_n "checking 16-bit integer type... " >&6; } case 2 in @@ -18876,12 +16482,10 @@ esac if test -z "$dbusint16" ; then DBUS_INT16_TYPE="no_int16_type_detected" - { { $as_echo "$as_me:$LINENO: error: No 16-bit integer type found" >&5 -$as_echo "$as_me: error: No 16-bit integer type found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "No 16-bit integer type found" "$LINENO" 5 else DBUS_INT16_TYPE="$dbusint16" - { $as_echo "$as_me:$LINENO: result: $DBUS_INT16_TYPE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_INT16_TYPE" >&5 $as_echo "$DBUS_INT16_TYPE" >&6; } fi @@ -18893,22 +16497,16 @@ case $host_os in # check at compile-time, so that it is possible to build universal # (with multiple architectures at once on the compile line) - ;; *) - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then +if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler @@ -18916,46 +16514,34 @@ cat >>conftest.$ac_ext <<_ACEOF typedef int dummy; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless - # there are some -arch flags. Note that *ppc* also matches - # ppc64. This check is also rather less than ideal. - case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; - esac -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <sys/param.h> @@ -18973,30 +16559,9 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <sys/param.h> @@ -19012,49 +16577,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <limits.h> @@ -19069,30 +16603,9 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <limits.h> @@ -19107,51 +16620,20 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; @@ -19177,24 +16659,7 @@ return use_ascii (foo) == use_ebcdic (foo); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -19206,20 +16671,10 @@ $as_echo "$ac_try_echo") >&5 ac_cv_c_bigendian=unknown fi fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -19239,79 +16694,46 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes + ac_cv_c_bigendian=yes fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +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:$LINENO: result: $ac_cv_c_bigendian" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) -cat >>confdefs.h <<\_ACEOF -#define AC_APPLE_UNIVERSAL_BUILD 1 -_ACEOF +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ;; esac -{ $as_echo "$as_me:$LINENO: checking for an implementation of va_copy()" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an implementation of va_copy()" >&5 $as_echo_n "checking for an implementation of va_copy()... " >&6; } -if test "${dbus_cv_va_copy+set}" = set; then +if test "${dbus_cv_va_copy+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include <stdarg.h> #include <stdlib.h> static void f (int i, ...) { @@ -19327,49 +16749,25 @@ else return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : dbus_cv_va_copy=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_cv_va_copy=no + dbus_cv_va_copy=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $dbus_cv_va_copy" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_cv_va_copy" >&5 $as_echo "$dbus_cv_va_copy" >&6; } -{ $as_echo "$as_me:$LINENO: checking for an implementation of __va_copy()" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an implementation of __va_copy()" >&5 $as_echo_n "checking for an implementation of __va_copy()... " >&6; } -if test "${dbus_cv___va_copy+set}" = set; then +if test "${dbus_cv___va_copy+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ #include <stdarg.h> #include <stdlib.h> static void f (int i, ...) { @@ -19385,41 +16783,16 @@ else return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : dbus_cv___va_copy=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_cv___va_copy=no + dbus_cv___va_copy=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $dbus_cv___va_copy" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_cv___va_copy" >&5 $as_echo "$dbus_cv___va_copy" >&6; } if test "x$dbus_cv_va_copy" = "xyes"; then @@ -19443,19 +16816,15 @@ 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:$LINENO: checking whether va_lists can be copied by value" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_lists can be copied by value" >&5 $as_echo_n "checking whether va_lists can be copied by value... " >&6; } -if test "${dbus_cv_va_val_copy+set}" = set; then +if test "${dbus_cv_va_val_copy+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : dbus_cv_va_val_copy=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> @@ -19482,45 +16851,18 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : dbus_cv_va_val_copy=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -dbus_cv_va_val_copy=no + dbus_cv_va_val_copy=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $dbus_cv_va_val_copy" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_cv_va_val_copy" >&5 $as_echo "$dbus_cv_va_val_copy" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -19531,73 +16873,61 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$dbus_cv_va_val_copy" = "xno"; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_VA_COPY_AS_ARRAY 1 -_ACEOF +$as_echo "#define DBUS_VA_COPY_AS_ARRAY 1" >>confdefs.h fi -#### Atomic integers (checks by Sebastian Wilhelmi for GLib) -{ $as_echo "$as_me:$LINENO: checking whether to use inline assembler routines for atomic integers" >&5 -$as_echo_n "checking whether to use inline assembler routines for atomic integers... " >&6; } -have_atomic_inc_cond=0 -if test x"$GCC" = xyes; then - if test "x$enable_ansi" = "xyes"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - else - case $host_cpu in - i386) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ;; - i?86) - case $host_os in - darwin*) - { $as_echo "$as_me:$LINENO: result: darwin" >&5 -$as_echo "darwin" >&6; } - # check at compile-time, so that it is possible to build universal - # (with multiple architectures at once on the compile line) - have_atomic_inc_cond="(defined(__i386__) || defined(__x86_64__))" - ;; - *) - { $as_echo "$as_me:$LINENO: result: i486" >&5 -$as_echo "i486" >&6; } - have_atomic_inc_cond=1 - ;; - esac - ;; - *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac - fi -fi +#### Atomic integers -cat >>confdefs.h <<_ACEOF -#define DBUS_USE_ATOMIC_INT_486_COND $have_atomic_inc_cond +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC knows __sync_sub_and_fetch()" >&5 +$as_echo_n "checking whether $CC knows __sync_sub_and_fetch()... " >&6; } +if test "${dbus_cv_sync_sub_and_fetch+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + dbus_cv_sync_sub_and_fetch=yes +else + dbus_cv_sync_sub_and_fetch=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_cv_sync_sub_and_fetch" >&5 +$as_echo "$dbus_cv_sync_sub_and_fetch" >&6; } + +if test "x$dbus_cv_sync_sub_and_fetch" = "xyes" ; then + have_sync=1 +else + have_sync=0 +fi cat >>confdefs.h <<_ACEOF -#define DBUS_HAVE_ATOMIC_INT_COND $have_atomic_inc_cond +#define DBUS_USE_SYNC $have_sync _ACEOF #### Various functions -{ $as_echo "$as_me:$LINENO: checking for library containing socket" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } -if test "${ac_cv_search_socket+set}" = set; then +if test "${ac_cv_search_socket+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19622,159 +16952,43 @@ for ac_lib in '' socket network; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_socket+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_socket+set}" = set; then : break fi done -if test "${ac_cv_search_socket+set}" = set; then - : +if test "${ac_cv_search_socket+set}" = set; then : + else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : - ac_cv_func_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -$as_echo "$ac_cv_func_gethostbyname" >&6; } -if test "x$ac_cv_func_gethostbyname" = x""yes; then - : else - -{ $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -19792,43 +17006,18 @@ return gethostbyname (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF @@ -19840,111 +17029,11 @@ fi fi - - - - - - - - - - - - -for ac_func in vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_func in vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -19955,16 +17044,12 @@ done #### Check for broken poll; taken from Glib's configure -{ $as_echo "$as_me:$LINENO: checking for broken poll" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll" >&5 $as_echo_n "checking for broken poll... " >&6; } -if test "$cross_compiling" = yes; then +if test "$cross_compiling" = yes; then : broken_poll="no (cross compiling)" else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> @@ -19986,57 +17071,24 @@ cat >>conftest.$ac_ext <<_ACEOF exit(0); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : broken_poll=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -broken_poll=yes + broken_poll=yes -cat >>confdefs.h <<\_ACEOF -#define BROKEN_POLL 1 -_ACEOF +$as_echo "#define BROKEN_POLL 1" >>confdefs.h fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - -{ $as_echo "$as_me:$LINENO: result: $broken_poll" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $broken_poll" >&5 $as_echo "$broken_poll" >&6; } -{ $as_echo "$as_me:$LINENO: checking for dirfd" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5 $as_echo_n "checking for dirfd... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> @@ -20055,54 +17107,23 @@ closedir(dirp); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : dbus_have_dirfd=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_have_dirfd=no + dbus_have_dirfd=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $dbus_have_dirfd" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_have_dirfd" >&5 $as_echo "$dbus_have_dirfd" >&6; } if test "$dbus_have_dirfd" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIRFD 1 -_ACEOF +$as_echo "#define HAVE_DIRFD 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: checking for DIR *dirp->dd_fd" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR *dirp->dd_fd" >&5 $as_echo_n "checking for DIR *dirp->dd_fd... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> @@ -20122,286 +17143,48 @@ closedir(dirp); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : dbus_have_ddfd=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_have_ddfd=no + dbus_have_ddfd=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $dbus_have_ddfd" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_have_ddfd" >&5 $as_echo "$dbus_have_ddfd" >&6; } if test "$dbus_have_ddfd" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DDFD 1 -_ACEOF +$as_echo "#define HAVE_DDFD 1" >>confdefs.h fi fi - -for ac_header in execinfo.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +for ac_header in dirent.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DIRENT_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +done -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_header in execinfo.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" +if test "x$ac_cv_header_execinfo_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_EXECINFO_H 1 _ACEOF - -for ac_func in backtrace -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_func in backtrace +do : + ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace" +if test "x$ac_cv_func_backtrace" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_BACKTRACE 1 _ACEOF fi @@ -20412,146 +17195,51 @@ fi done - for ac_header in errno.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +do : + ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ERRNO_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +done -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + +for ac_header in signal.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" +if test "x$ac_cv_header_signal_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNAL_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +done -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +for ac_header in locale.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" +if test "x$ac_cv_header_locale_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOCALE_H 1 +_ACEOF fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + +done + + +for ac_header in byteswap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" +if test "x$ac_cv_header_byteswap_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_BYTESWAP_H 1 _ACEOF fi @@ -20559,146 +17247,38 @@ fi done - for ac_header in unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +do : + ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNISTD_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +done -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + +for ac_header in ws2tcpip.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" +if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WS2TCPIP_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +done - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +for ac_header in wspiapi.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "wspiapi.h" "ac_cv_header_wspiapi_h" "$ac_includes_default" +if test "x$ac_cv_header_wspiapi_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_WSPIAPI_H 1 _ACEOF fi @@ -20724,20 +17304,16 @@ 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:$LINENO: checking for posix getpwnam_r" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix getpwnam_r" >&5 $as_echo_n "checking for posix getpwnam_r... " >&6; } -if test "${ac_cv_func_posix_getpwnam_r+set}" = set; then +if test "${ac_cv_func_posix_getpwnam_r+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_func_posix_getpwnam_r=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <errno.h> @@ -20760,44 +17336,17 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_posix_getpwnam_r=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_posix_getpwnam_r=no + ac_cv_func_posix_getpwnam_r=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_posix_getpwnam_r" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_posix_getpwnam_r" >&5 $as_echo "$ac_cv_func_posix_getpwnam_r" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -20808,85 +17357,48 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$ac_cv_func_posix_getpwnam_r" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_GETPWNAM_R 1 -_ACEOF +$as_echo "#define HAVE_POSIX_GETPWNAM_R 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: checking for nonposix getpwnam_r" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nonposix getpwnam_r" >&5 $as_echo_n "checking for nonposix getpwnam_r... " >&6; } -if test "${ac_cv_func_nonposix_getpwnam_r+set}" = set; then +if test "${ac_cv_func_nonposix_getpwnam_r+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <pwd.h> int main () { char buffer[10000]; - struct passwd pwd; - getpwnam_r ("", &pwd, buffer, - sizeof (buffer)); + struct passwd pwd; + getpwnam_r ("", &pwd, buffer, + sizeof (buffer)); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_nonposix_getpwnam_r=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_nonposix_getpwnam_r=no + ac_cv_func_nonposix_getpwnam_r=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_nonposix_getpwnam_r" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_nonposix_getpwnam_r" >&5 $as_echo "$ac_cv_func_nonposix_getpwnam_r" >&6; } - if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then + if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_NONPOSIX_GETPWNAM_R 1 -_ACEOF +$as_echo "#define HAVE_NONPOSIX_GETPWNAM_R 1" >>confdefs.h - fi + fi fi -{ $as_echo "$as_me:$LINENO: checking whether socklen_t is defined" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether socklen_t is defined" >&5 $as_echo_n "checking whether socklen_t is defined... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> @@ -20904,281 +17416,34 @@ foo = 1; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : dbus_have_socklen_t=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_have_socklen_t=no + dbus_have_socklen_t=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $dbus_have_socklen_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_have_socklen_t" >&5 $as_echo "$dbus_have_socklen_t" >&6; } if test "x$dbus_have_socklen_t" = "xyes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF +$as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h fi - for ac_header in sys/uio.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_uio_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -for ac_func in writev -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} +#define HAVE_SYS_UIO_H 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_func in writev +do : + ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" +if test "x$ac_cv_func_writev" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_WRITEV 1 _ACEOF fi @@ -21189,160 +17454,35 @@ fi done - for ac_header in sys/syslimits.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/syslimits.h" "ac_cv_header_sys_syslimits_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_syslimits_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SYSLIMITS_H 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +done -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 +ac_fn_c_check_decl "$LINENO" "MSG_NOSIGNAL" "ac_cv_have_decl_MSG_NOSIGNAL" " #include <sys/socket.h> +" +if test "x$ac_cv_have_decl_MSG_NOSIGNAL" = x""yes; then : + ac_have_decl=1 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_have_decl=0 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MSG_NOSIGNAL $ac_have_decl _ACEOF -fi - -done - -{ $as_echo "$as_me:$LINENO: checking for ISO C99 varargs macros in C" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C99 varargs macros in C" >&5 $as_echo_n "checking for ISO C99 varargs macros in C... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -21357,43 +17497,18 @@ call_a(2,3); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : dbus_have_iso_c_varargs=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_have_iso_c_varargs=no + dbus_have_iso_c_varargs=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $dbus_have_iso_c_varargs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_have_iso_c_varargs" >&5 $as_echo "$dbus_have_iso_c_varargs" >&6; } -{ $as_echo "$as_me:$LINENO: checking for GNUC varargs macros" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUC varargs macros" >&5 $as_echo_n "checking for GNUC varargs macros... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -21408,58 +17523,29 @@ call_a(2,3); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : dbus_have_gnuc_varargs=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_have_gnuc_varargs=no + dbus_have_gnuc_varargs=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $dbus_have_gnuc_varargs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_have_gnuc_varargs" >&5 $as_echo "$dbus_have_gnuc_varargs" >&6; } if test x$dbus_have_iso_c_varargs = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ISO_VARARGS 1 -_ACEOF +$as_echo "#define HAVE_ISO_VARARGS 1" >>confdefs.h fi if test x$dbus_have_gnuc_varargs = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_GNUC_VARARGS 1 -_ACEOF +$as_echo "#define HAVE_GNUC_VARARGS 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct cmsgcred" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct cmsgcred" >&5 $as_echo_n "checking for struct cmsgcred... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> @@ -21477,139 +17563,39 @@ cred.cmcred_pid = 0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : dbus_have_struct_cmsgcred=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - dbus_have_struct_cmsgcred=no + dbus_have_struct_cmsgcred=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $dbus_have_struct_cmsgcred" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dbus_have_struct_cmsgcred" >&5 $as_echo "$dbus_have_struct_cmsgcred" >&6; } if test x$dbus_have_struct_cmsgcred = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_CMSGCRED 1 -_ACEOF +$as_echo "#define HAVE_CMSGCRED 1" >>confdefs.h fi - - for ac_func in getpeerucred getpeereid -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" fi +done -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + +for ac_func in pipe2 accept4 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -21628,23 +17614,19 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu warn_on_xcompile=no -{ $as_echo "$as_me:$LINENO: checking abstract socket namespace" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking abstract socket namespace" >&5 $as_echo_n "checking abstract socket namespace... " >&6; } -if test "${ac_cv_have_abstract_sockets+set}" = set; then +if test "${ac_cv_have_abstract_sockets+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_have_abstract_sockets=no warn_on_xcompile=yes else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> @@ -21688,47 +17670,20 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_have_abstract_sockets=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_have_abstract_sockets=no + ac_cv_have_abstract_sockets=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_abstract_sockets" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_abstract_sockets" >&5 $as_echo "$ac_cv_have_abstract_sockets" >&6; } if test x$warn_on_xcompile = xyes ; then - { $as_echo "$as_me:$LINENO: WARNING: Cannot check for abstract sockets when cross-compiling, please use --enable-abstract-sockets" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot check for abstract sockets when cross-compiling, please use --enable-abstract-sockets" >&5 $as_echo "$as_me: WARNING: Cannot check for abstract sockets when cross-compiling, please use --enable-abstract-sockets" >&2;} fi ac_ext=c @@ -21741,9 +17696,7 @@ fi if test x$enable_abstract_sockets = xyes; then if test x$ac_cv_have_abstract_sockets = xno; then - { { $as_echo "$as_me:$LINENO: error: Abstract sockets explicitly required, and support not detected." >&5 -$as_echo "$as_me: error: Abstract sockets explicitly required, and support not detected." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Abstract sockets explicitly required, and support not detected." "$LINENO" 5 fi fi @@ -21754,9 +17707,7 @@ fi if test x$ac_cv_have_abstract_sockets = xyes ; then DBUS_PATH_OR_ABSTRACT=abstract -cat >>confdefs.h <<\_ACEOF -#define HAVE_ABSTRACT_SOCKETS 1 -_ACEOF +$as_echo "#define HAVE_ABSTRACT_SOCKETS 1" >>confdefs.h else DBUS_PATH_OR_ABSTRACT=path @@ -21766,21 +17717,134 @@ fi # unix:path=/foo or unix:abstract=/foo + + +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 : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $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 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $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 : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $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 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + 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 + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $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; } + PKG_CONFIG="" + fi + +fi + #### Sort out XML library # see what we have -{ $as_echo "$as_me:$LINENO: checking for XML_ParserCreate_MM in -lexpat" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate_MM in -lexpat" >&5 $as_echo_n "checking for XML_ParserCreate_MM in -lexpat... " >&6; } -if test "${ac_cv_lib_expat_XML_ParserCreate_MM+set}" = set; then +if test "${ac_cv_lib_expat_XML_ParserCreate_MM+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21798,183 +17862,24 @@ return XML_ParserCreate_MM (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_expat_XML_ParserCreate_MM=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_expat_XML_ParserCreate_MM=no + ac_cv_lib_expat_XML_ParserCreate_MM=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate_MM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate_MM" >&5 $as_echo "$ac_cv_lib_expat_XML_ParserCreate_MM" >&6; } -if test "x$ac_cv_lib_expat_XML_ParserCreate_MM" = x""yes; then - -for ac_header in expat.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test "x$ac_cv_lib_expat_XML_ParserCreate_MM" = x""yes; then : + for ac_header in expat.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" +if test "x$ac_cv_header_expat_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_EXPAT_H 1 _ACEOF have_expat=true else @@ -21993,113 +17898,79 @@ dbus_use_libxml=false dbus_use_expat=false if test x$with_xml = xexpat; then if ! $have_expat ; then - { { $as_echo "$as_me:$LINENO: error: Explicitly requested expat but expat not found" >&5 -$as_echo "$as_me: error: Explicitly requested expat but expat not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Explicitly requested expat but expat not found" "$LINENO" 5 fi dbus_use_expat=true elif test x$with_xml = xlibxml; then - succeeded=no +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5 +$as_echo_n "checking for LIBXML... " >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 +if test -n "$LIBXML_CFLAGS"; then + pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + else + pkg_failed=untried +fi +if test -n "$LIBXML_LIBS"; then + pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.0" 2>/dev/null` else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + pkg_failed=yes +fi + else + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.6.0" >&5 -$as_echo_n "checking for libxml-2.0 >= 2.6.0... " >&6; } +if test $pkg_failed = yes; then - if $PKG_CONFIG --exists "libxml-2.0 >= 2.6.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 -$as_echo_n "checking LIBXML_CFLAGS... " >&6; } - LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.0"` - { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 -$as_echo "$LIBXML_CFLAGS" >&6; } - - { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 -$as_echo_n "checking LIBXML_LIBS... " >&6; } - LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.0"` - { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 -$as_echo "$LIBXML_LIBS" >&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 + LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0 >= 2.6.0" 2>&1` else - LIBXML_CFLAGS="" - LIBXML_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - LIBXML_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 >= 2.6.0"` - + LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0 >= 2.6.0" 2>&1` fi + # Put the nasty error message in config.log where it belongs + echo "$LIBXML_PKG_ERRORS" >&5 - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - have_libxml=true - else - have_libxml=false - fi - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_libxml=false +elif test $pkg_failed = untried; then + have_libxml=false +else + LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS + LIBXML_LIBS=$pkg_cv_LIBXML_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_libxml=true +fi if ! $have_libxml ; then - { { $as_echo "$as_me:$LINENO: error: Explicitly requested libxml but libxml not found" >&5 -$as_echo "$as_me: error: Explicitly requested libxml but libxml not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Explicitly requested libxml but libxml not found" "$LINENO" 5 fi dbus_use_libxml=true else @@ -22107,9 +17978,7 @@ else ### our brutal OOM-handling unit test setup. ### http://bugzilla.gnome.org/show_bug.cgi?id=109368 if test x$have_expat = xfalse; then - { { $as_echo "$as_me:$LINENO: error: Could not find expat.h, check config.log for failed attempts" >&5 -$as_echo "$as_me: error: Could not find expat.h, check config.log for failed attempts" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Could not find expat.h, check config.log for failed attempts" "$LINENO" 5 fi ### By default, only use Expat since it's tested and known to work. If you're a ### general-purpose OS vendor, please don't enable libxml. For embedded use @@ -22144,104 +18013,16 @@ if $dbus_use_libxml; then fi # Thread lib detection -{ $as_echo "$as_me:$LINENO: checking for pthread_cond_timedwait" >&5 -$as_echo_n "checking for pthread_cond_timedwait... " >&6; } -if test "${ac_cv_func_pthread_cond_timedwait+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pthread_cond_timedwait to an innocuous variant, in case <limits.h> declares pthread_cond_timedwait. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define pthread_cond_timedwait innocuous_pthread_cond_timedwait - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pthread_cond_timedwait (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef pthread_cond_timedwait - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_cond_timedwait (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_cond_timedwait || defined __stub___pthread_cond_timedwait -choke me -#endif - -int -main () -{ -return pthread_cond_timedwait (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_pthread_cond_timedwait=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_pthread_cond_timedwait=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_cond_timedwait" >&5 -$as_echo "$ac_cv_func_pthread_cond_timedwait" >&6; } -if test "x$ac_cv_func_pthread_cond_timedwait" = x""yes; then - { $as_echo "$as_me:$LINENO: checking for pthread_cond_timedwait in -lpthread" >&5 +ac_fn_c_check_func "$LINENO" "pthread_cond_timedwait" "ac_cv_func_pthread_cond_timedwait" +if test "x$ac_cv_func_pthread_cond_timedwait" = x""yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_cond_timedwait in -lpthread" >&5 $as_echo_n "checking for pthread_cond_timedwait in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_cond_timedwait+set}" = set; then +if test "${ac_cv_lib_pthread_pthread_cond_timedwait+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -22259,43 +18040,18 @@ return pthread_cond_timedwait (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_cond_timedwait=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_cond_timedwait=no + ac_cv_lib_pthread_pthread_cond_timedwait=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_cond_timedwait" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_cond_timedwait" >&5 $as_echo "$ac_cv_lib_pthread_pthread_cond_timedwait" >&6; } -if test "x$ac_cv_lib_pthread_pthread_cond_timedwait" = x""yes; then +if test "x$ac_cv_lib_pthread_pthread_cond_timedwait" = x""yes; then : THREAD_LIBS="-lpthread" fi @@ -22303,109 +18059,21 @@ fi save_libs="$LIBS" LIBS="$LIBS $THREAD_LIBS" -{ $as_echo "$as_me:$LINENO: checking for pthread_condattr_setclock" >&5 -$as_echo_n "checking for pthread_condattr_setclock... " >&6; } -if test "${ac_cv_func_pthread_condattr_setclock+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pthread_condattr_setclock to an innocuous variant, in case <limits.h> declares pthread_condattr_setclock. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define pthread_condattr_setclock innocuous_pthread_condattr_setclock - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pthread_condattr_setclock (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef pthread_condattr_setclock - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_condattr_setclock (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_condattr_setclock || defined __stub___pthread_condattr_setclock -choke me -#endif - -int -main () -{ -return pthread_condattr_setclock (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_pthread_condattr_setclock=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_pthread_condattr_setclock=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_condattr_setclock" >&5 -$as_echo "$ac_cv_func_pthread_condattr_setclock" >&6; } -if test "x$ac_cv_func_pthread_condattr_setclock" = x""yes; then +ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" +if test "x$ac_cv_func_pthread_condattr_setclock" = x""yes; then : have_pthread_condattr_setclock=true else have_pthread_condattr_setclock=false fi if test x$have_pthread_condattr_setclock = xtrue; then - { $as_echo "$as_me:$LINENO: checking for library containing clock_getres" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_getres" >&5 $as_echo_n "checking for library containing clock_getres... " >&6; } -if test "${ac_cv_search_clock_getres+set}" = set; then +if test "${ac_cv_search_clock_getres+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -22430,65 +18098,34 @@ for ac_lib in '' rt; do ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_getres=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_clock_getres+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_clock_getres+set}" = set; then : break fi done -if test "${ac_cv_search_clock_getres+set}" = set; then - : +if test "${ac_cv_search_clock_getres+set}" = set; then : + else ac_cv_search_clock_getres=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_clock_getres" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_getres" >&5 $as_echo "$ac_cv_search_clock_getres" >&6; } ac_res=$ac_cv_search_clock_getres -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" THREAD_LIBS="$THREAD_LIBS -lrt" fi - { $as_echo "$as_me:$LINENO: checking for CLOCK_MONOTONIC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLOCK_MONOTONIC" >&5 $as_echo_n "checking for CLOCK_MONOTONIC... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <time.h> #include <pthread.h> @@ -22507,43 +18144,20 @@ clock_getres (CLOCK_MONOTONIC,&monotonic_timer); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : have_clock_monotonic=true else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_clock_monotonic=false + have_clock_monotonic=false fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$have_clock_monotonic = xtrue; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_MONOTONIC_CLOCK 1 -_ACEOF +$as_echo "#define HAVE_MONOTONIC_CLOCK 1" >>confdefs.h else - { $as_echo "$as_me:$LINENO: result: not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi fi @@ -22554,18 +18168,14 @@ if test x$enable_selinux = xno ; then have_selinux=no; else # See if we have SELinux library - { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then +if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lselinux $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -22583,43 +18193,18 @@ return is_selinux_enabled (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_selinux_is_selinux_enabled=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_selinux_is_selinux_enabled=no + ac_cv_lib_selinux_is_selinux_enabled=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 $as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } -if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then +if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then : have_selinux=yes else have_selinux=no @@ -22628,13 +18213,9 @@ fi # see if we have the SELinux header with the new D-Bus stuff in it if test x$have_selinux = xyes ; then - { $as_echo "$as_me:$LINENO: checking for DBUS Flask permissions in selinux/av_permissions.h" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS Flask permissions in selinux/av_permissions.h" >&5 $as_echo_n "checking for DBUS Flask permissions in selinux/av_permissions.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <selinux/av_permissions.h> int @@ -22648,47 +18229,24 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : have_selinux=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - have_selinux=no + have_selinux=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $have_selinux" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_selinux" >&5 $as_echo "$have_selinux" >&6; } fi if test x$enable_selinux = xauto ; then if test x$have_selinux = xno ; then - { $as_echo "$as_me:$LINENO: WARNING: Sufficiently new SELinux library not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Sufficiently new SELinux library not found" >&5 $as_echo "$as_me: WARNING: Sufficiently new SELinux library not found" >&2;} fi else if test x$have_selinux = xno ; then - { { $as_echo "$as_me:$LINENO: error: SElinux explicitly required, and SELinux library not found" >&5 -$as_echo "$as_me: error: SElinux explicitly required, and SELinux library not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "SElinux explicitly required, and SELinux library not found" "$LINENO" 5 fi fi fi @@ -22705,106 +18263,18 @@ fi if test x$have_selinux = xyes ; then # the selinux code creates threads # which requires libpthread even on linux - { $as_echo "$as_me:$LINENO: checking for pthread_create" >&5 -$as_echo_n "checking for pthread_create... " >&6; } -if test "${ac_cv_func_pthread_create+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pthread_create to an innocuous variant, in case <limits.h> declares pthread_create. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define pthread_create innocuous_pthread_create - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pthread_create (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef pthread_create - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_create (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_pthread_create || defined __stub___pthread_create -choke me -#endif - -int -main () -{ -return pthread_create (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_pthread_create=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_pthread_create=no -fi + ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" +if test "x$ac_cv_func_pthread_create" = x""yes; then : -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_create" >&5 -$as_echo "$ac_cv_func_pthread_create" >&6; } -if test "x$ac_cv_func_pthread_create" = x""yes; then - : else - { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then +if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -22822,43 +18292,18 @@ return pthread_create (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_create=no + ac_cv_lib_pthread_pthread_create=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then +if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then : SELINUX_THREAD_LIBS="-lpthread" fi @@ -22867,9 +18312,7 @@ fi SELINUX_LIBS="-lselinux $SELINUX_THREAD_LIBS" -cat >>confdefs.h <<\_ACEOF -#define HAVE_SELINUX 1 -_ACEOF +$as_echo "#define HAVE_SELINUX 1" >>confdefs.h else SELINUX_LIBS= @@ -22879,146 +18322,12 @@ fi if test x$enable_inotify = xno ; then have_inotify=no; else - -for ac_header in sys/inotify.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_header in sys/inotify.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_inotify_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_INOTIFY_H 1 _ACEOF have_inotify=yes else @@ -23031,106 +18340,14 @@ fi if test x$have_inotify = xyes; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_BUS_ENABLE_INOTIFY 1 -_ACEOF - - -for ac_func in inotify_init1 -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ +$as_echo "#define DBUS_BUS_ENABLE_INOTIFY 1" >>confdefs.h -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + for ac_func in inotify_init1 +do : + ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1" +if test "x$ac_cv_func_inotify_init1" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_INOTIFY_INIT1 1 _ACEOF fi @@ -23160,9 +18377,7 @@ fi if test x$have_dnotify = xyes; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX 1 -_ACEOF +$as_echo "#define DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX 1" >>confdefs.h fi @@ -23180,256 +18395,128 @@ if test x$enable_kqueue = xno ; then have_kqueue=no else have_kqueue=yes - if test "${ac_cv_header_sys_event_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sys/event.h" >&5 -$as_echo_n "checking for sys/event.h... " >&6; } -if test "${ac_cv_header_sys_event_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_event_h" >&5 -$as_echo "$ac_cv_header_sys_event_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sys/event.h usability" >&5 -$as_echo_n "checking sys/event.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <sys/event.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_event_h" = x""yes; then : - ac_header_compiler=no +else + have_kqueue=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sys/event.h presence" >&5 -$as_echo_n "checking sys/event.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <sys/event.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + ac_fn_c_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" +if test "x$ac_cv_func_kqueue" = x""yes; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + have_kqueue=no +fi - ac_header_preproc=no + + if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then + as_fn_error $? "kqueue support explicitly enabled but not available" "$LINENO" 5 + fi fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +if test x$have_kqueue = xyes; then -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sys/event.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sys/event.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sys/event.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sys/event.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sys/event.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sys/event.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sys/event.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sys/event.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sys/event.h: in the future, the compiler will take precedence" >&2;} +$as_echo "#define DBUS_BUS_ENABLE_KQUEUE 1" >>confdefs.h - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sys/event.h" >&5 -$as_echo_n "checking for sys/event.h... " >&6; } -if test "${ac_cv_header_sys_event_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sys_event_h=$ac_header_preproc fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_event_h" >&5 -$as_echo "$ac_cv_header_sys_event_h" >&6; } -fi -if test "x$ac_cv_header_sys_event_h" = x""yes; then - : + if test x$have_kqueue = xyes; then + DBUS_BUS_ENABLE_KQUEUE_TRUE= + DBUS_BUS_ENABLE_KQUEUE_FALSE='#' else - have_kqueue=no + DBUS_BUS_ENABLE_KQUEUE_TRUE='#' + DBUS_BUS_ENABLE_KQUEUE_FALSE= fi - { $as_echo "$as_me:$LINENO: checking for kqueue" >&5 -$as_echo_n "checking for kqueue... " >&6; } -if test "${ac_cv_func_kqueue+set}" = set; then - $as_echo_n "(cached) " >&6 +# launchd checks +if test x$enable_launchd = xno ; then + have_launchd=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define kqueue to an innocuous variant, in case <limits.h> declares kqueue. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define kqueue innocuous_kqueue + have_launchd=yes + ac_fn_c_check_header_mongrel "$LINENO" "launch.h" "ac_cv_header_launch_h" "$ac_includes_default" +if test "x$ac_cv_header_launch_h" = x""yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char kqueue (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +else + have_launchd=no +fi -#undef kqueue -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kqueue (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_kqueue || defined __stub___kqueue -choke me -#endif - -int -main () -{ -return kqueue (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_kqueue=yes + # Extract the first word of "launchctl", so it can be a program name with args. +set dummy launchctl; 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_LAUNCHCTL+set}" = set; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_kqueue=no -fi + case $LAUNCHCTL in + [\\/]* | ?:[\\/]*) + ac_cv_path_LAUNCHCTL="$LAUNCHCTL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_LAUNCHCTL="$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 -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + ;; +esac fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_kqueue" >&5 -$as_echo "$ac_cv_func_kqueue" >&6; } -if test "x$ac_cv_func_kqueue" = x""yes; then - : +LAUNCHCTL=$ac_cv_path_LAUNCHCTL +if test -n "$LAUNCHCTL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LAUNCHCTL" >&5 +$as_echo "$LAUNCHCTL" >&6; } else - have_kqueue=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then - { { $as_echo "$as_me:$LINENO: error: kqueue support explicitly enabled but not available" >&5 -$as_echo "$as_me: error: kqueue support explicitly enabled but not available" >&2;} - { (exit 1); exit 1; }; } + if test "x$LAUNCHCTL" = "x"; then + have_launchd=no + fi + + if test x$enable_launchd = xyes && test x$have_launchd = xno ; then + as_fn_error $? "launchd support explicitly enabled but not available" "$LINENO" 5 fi fi -if test x$have_kqueue = xyes; then +if test x$have_launchd = xyes; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_BUS_ENABLE_KQUEUE 1 -_ACEOF +$as_echo "#define DBUS_ENABLE_LAUNCHD 1" >>confdefs.h fi - if test x$have_kqueue = xyes; then - DBUS_BUS_ENABLE_KQUEUE_TRUE= - DBUS_BUS_ENABLE_KQUEUE_FALSE='#' + if test x$have_launchd = xyes; then + DBUS_ENABLE_LAUNCHD_TRUE= + DBUS_ENABLE_LAUNCHD_FALSE='#' else - DBUS_BUS_ENABLE_KQUEUE_TRUE='#' - DBUS_BUS_ENABLE_KQUEUE_FALSE= + DBUS_ENABLE_LAUNCHD_TRUE='#' + DBUS_ENABLE_LAUNCHD_FALSE= fi +#### Directory to place launchd agent file +if test "x$with_launchd_agent_dir" = "x"; then + LAUNCHD_AGENT_DIR="/Library/LaunchAgents" +else + LAUNCHD_AGENT_DIR="$with_launchd_agent_dir" +fi + + + if test x$enable_console_owner_file = xno ; then have_console_owner_file=no; else @@ -23437,9 +18524,7 @@ else solaris*) have_console_owner_file=yes; -cat >>confdefs.h <<\_ACEOF -#define HAVE_CONSOLE_OWNER_FILE 1 -_ACEOF +$as_echo "#define HAVE_CONSOLE_OWNER_FILE 1" >>confdefs.h ;; *) @@ -23461,18 +18546,14 @@ if test x$enable_libaudit = xno ; then have_libaudit=no; else # See if we have audit daemon & capabilities library - { $as_echo "$as_me:$LINENO: checking for audit_log_user_avc_message in -laudit" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_log_user_avc_message in -laudit" >&5 $as_echo_n "checking for audit_log_user_avc_message in -laudit... " >&6; } -if test "${ac_cv_lib_audit_audit_log_user_avc_message+set}" = set; then +if test "${ac_cv_lib_audit_audit_log_user_avc_message+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-laudit $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -23490,61 +18571,32 @@ return audit_log_user_avc_message (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_audit_audit_log_user_avc_message=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_audit_audit_log_user_avc_message=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_audit_audit_log_user_avc_message" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_log_user_avc_message" >&5 $as_echo "$ac_cv_lib_audit_audit_log_user_avc_message" >&6; } -if test "x$ac_cv_lib_audit_audit_log_user_avc_message" = x""yes; then +if test "x$ac_cv_lib_audit_audit_log_user_avc_message" = x""yes; then : have_libaudit=yes else have_libaudit=no fi if test x$have_libaudit = xyes ; then - { $as_echo "$as_me:$LINENO: checking for capng_clear in -lcap-ng" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capng_clear in -lcap-ng" >&5 $as_echo_n "checking for capng_clear in -lcap-ng... " >&6; } -if test "${ac_cv_lib_cap_ng_capng_clear+set}" = set; then +if test "${ac_cv_lib_cap_ng_capng_clear+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcap-ng $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -23562,43 +18614,18 @@ return capng_clear (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cap_ng_capng_clear=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_cap_ng_capng_clear=no + ac_cv_lib_cap_ng_capng_clear=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cap_ng_capng_clear" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_ng_capng_clear" >&5 $as_echo "$ac_cv_lib_cap_ng_capng_clear" >&6; } -if test "x$ac_cv_lib_cap_ng_capng_clear" = x""yes; then +if test "x$ac_cv_lib_cap_ng_capng_clear" = x""yes; then : have_libaudit=yes else have_libaudit=no @@ -23619,20 +18646,14 @@ fi if test x$have_libaudit = xyes ; then SELINUX_LIBS="$SELINUX_LIBS -laudit -lcap-ng" -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBAUDIT 1 -_ACEOF +$as_echo "#define HAVE_LIBAUDIT 1" >>confdefs.h fi # Check for ADT API -{ $as_echo "$as_me:$LINENO: checking for ADT API" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ADT API" >&5 $as_echo_n "checking for ADT API... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <bsm/adt.h> @@ -23646,79 +18667,97 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : check_adt_audit=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - check_adt_audit=no + check_adt_audit=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test ${check_adt_audit} = yes then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ADT /**/ -_ACEOF +$as_echo "#define HAVE_ADT /**/" >>confdefs.h ADT_LIBS="-lbsm" LIBS="-lbsm $LIBS" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi +# Check for SCM_RIGHTS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCM_RIGHTS" >&5 +$as_echo_n "checking for SCM_RIGHTS... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <sys/socket.h> +#include <sys/un.h> +static int x = SCM_RIGHTS; + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: supported" >&5 +$as_echo "supported" >&6; } + +$as_echo "#define HAVE_UNIX_FD_PASSING 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5 +$as_echo "not supported" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +NETWORK_libs= +if test x$dbus_win = xyes ; then + if test x$dbus_wince = xyes ; then + NETWORK_libs="-lws2" + else + NETWORK_libs="-lws2_32" + fi +fi #### Set up final flags DBUS_CLIENT_CFLAGS= -DBUS_CLIENT_LIBS="$THREAD_LIBS" +DBUS_CLIENT_LIBS="$THREAD_LIBS $NETWORK_libs" DBUS_BUS_CFLAGS="$XML_CFLAGS" -DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS" +DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS $NETWORK_libs" DBUS_LAUNCHER_CFLAGS="$XML_CFLAGS" -DBUS_LAUNCHER_LIBS="$XML_LIBS $THREAD_LIBS" +DBUS_LAUNCHER_LIBS="$XML_LIBS $THREAD_LIBS $NETWORK_libs" DBUS_TEST_CFLAGS= -DBUS_TEST_LIBS="$THREAD_LIBS" +DBUS_TEST_LIBS="$THREAD_LIBS $NETWORK_libs" ### X11 detection -{ $as_echo "$as_me:$LINENO: checking for X" >&5 +if test x$dbus_win = xyes ; then + enable_x11=no +else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. -if test "${with_x+set}" = set; then +if test "${with_x+set}" = set; then : withval=$with_x; fi @@ -23728,10 +18767,8 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 -$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -23748,7 +18785,7 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -23779,21 +18816,25 @@ fi # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include +/usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 +/usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include +/usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 +/usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 @@ -23815,37 +18856,14 @@ ac_x_header_dirs=' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <X11/Xlib.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir @@ -23853,8 +18871,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi done fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -23863,11 +18880,7 @@ if test "$ac_x_libraries" = no; then # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <X11/Xlib.h> int @@ -23878,35 +18891,12 @@ XrmInitialize () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS + LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! @@ -23918,10 +18908,8 @@ do done done fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( @@ -23942,7 +18930,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - { $as_echo "$as_me:$LINENO: result: $have_x" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else @@ -23953,16 +18941,14 @@ else ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -23975,16 +18961,12 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -23995,40 +18977,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -24039,46 +18994,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: neither works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi @@ -24094,11 +19022,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24116,44 +19040,17 @@ return XOpenDisplay (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24171,59 +19068,30 @@ return dnet_ntoa (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_dnet_ntoa=no + ac_cv_lib_dnet_dnet_ntoa=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24241,52 +19109,25 @@ return dnet_ntoa (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_stub_dnet_ntoa=no + ac_cv_lib_dnet_stub_dnet_ntoa=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, @@ -24297,105 +19138,20 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -$as_echo "$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24413,59 +19169,30 @@ return gethostbyname (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24483,43 +19210,18 @@ return gethostbyname (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gethostbyname=no + ac_cv_lib_bsd_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -24533,105 +19235,20 @@ fi # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - { $as_echo "$as_me:$LINENO: checking for connect" >&5 -$as_echo_n "checking for connect... " >&6; } -if test "${ac_cv_func_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define connect to an innocuous variant, in case <limits.h> declares connect. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef connect - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect -choke me -#endif + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -$as_echo "$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then +if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24649,148 +19266,38 @@ return connect (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_connect=no + ac_cv_lib_socket_connect=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then +if test "x$ac_cv_lib_socket_connect" = x""yes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - { $as_echo "$as_me:$LINENO: checking for remove" >&5 -$as_echo_n "checking for remove... " >&6; } -if test "${ac_cv_func_remove+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define remove to an innocuous variant, in case <limits.h> declares remove. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define remove innocuous_remove + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +if test "x$ac_cv_func_remove" = x""yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef remove - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_remove || defined __stub___remove -choke me -#endif - -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_remove=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_remove=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -$as_echo "$ac_cv_func_remove" >&6; } - if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then +if test "${ac_cv_lib_posix_remove+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24808,148 +19315,38 @@ return remove (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix_remove=no + ac_cv_lib_posix_remove=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then +if test "x$ac_cv_lib_posix_remove" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { $as_echo "$as_me:$LINENO: checking for shmat" >&5 -$as_echo_n "checking for shmat... " >&6; } -if test "${ac_cv_func_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shmat to an innocuous variant, in case <limits.h> declares shmat. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define shmat innocuous_shmat + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +if test "x$ac_cv_func_shmat" = x""yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef shmat - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shmat || defined __stub___shmat -choke me -#endif - -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shmat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shmat=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -$as_echo "$ac_cv_func_shmat" >&6; } - if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then +if test "${ac_cv_lib_ipc_shmat+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24967,43 +19364,18 @@ return shmat (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ipc_shmat=no + ac_cv_lib_ipc_shmat=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then +if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -25019,18 +19391,14 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -25048,43 +19416,18 @@ return IceConnectionNumber (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no + ac_cv_lib_ICE_IceConnectionNumber=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -25105,9 +19448,7 @@ fi if test x$enable_x11 = xyes ; then -cat >>confdefs.h <<\_ACEOF -#define DBUS_BUILD_X11 1 -_ACEOF +$as_echo "#define DBUS_BUILD_X11 1" >>confdefs.h DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" DBUS_X_CFLAGS="$X_CFLAGS" @@ -25118,12 +19459,13 @@ fi +fi #### gcc warning flags cc_supports_flag() { - { $as_echo "$as_me:$LINENO: checking whether $CC supports \"$@\"" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports \"$@\"" >&5 $as_echo_n "checking whether $CC supports \"$@\"... " >&6; } Cfile=/tmp/foo${$} touch ${Cfile}.c @@ -25131,22 +19473,18 @@ $as_echo_n "checking whether $CC supports \"$@\"... " >&6; } rc=$? rm -f ${Cfile}.c ${Cfile}.o case $rc in - 0) { $as_echo "$as_me:$LINENO: result: yes" >&5 + 0) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; };; - *) { $as_echo "$as_me:$LINENO: result: no" >&5 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; };; esac return $rc } ld_supports_flag() { - { $as_echo "$as_me:$LINENO: checking whether $LD supports \"$@\"" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $LD supports \"$@\"" >&5 $as_echo_n "checking whether $LD supports \"$@\"... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int one(void) { return 1; } @@ -25160,38 +19498,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : _ac_ld_flag_supported=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - _ac_ld_flag_supported=no + _ac_ld_flag_supported=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$_ac_ld_flag_supported" = "yes"; then rm -f conftest.c @@ -25208,7 +19521,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ rm -f conftest.c conftest.o conftest fi - { $as_echo "$as_me:$LINENO: result: $_ac_ld_flag_supported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ac_ld_flag_supported" >&5 $as_echo "$_ac_ld_flag_supported" >&6; } if test "$_ac_ld_flag_supported" = "yes" ; then return 0 @@ -25217,7 +19530,8 @@ $as_echo "$_ac_ld_flag_supported" >&6; } fi } -if test x$USE_MAINTAINER_MODE = xyes; then +# Don't bother with -Werror on Windows for now, too many warnings +if test x$dbus_win != xyes -a x$dbus_cygwin != xyes -a x$USE_MAINTAINER_MODE = xyes; then if cc_supports_flag "-Werror"; then CFLAGS="$CFLAGS -Werror" fi @@ -25285,7 +19599,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-fPIC[\ \ ]*) ;; - *) if cc_supports_flag -fPIC; then + *) if test x$dbus_win = xno && cc_supports_flag -fPIC; then PIC_CFLAGS="-fPIC" if ld_supports_flag -z,relro; then PIC_LDFLAGS="-Wl,-z,relro" @@ -25296,7 +19610,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-fPIE[\ \ ]*) ;; - *) if cc_supports_flag -fPIE; then + *) if test x$dbus_win = xno && cc_supports_flag -fPIE; then PIE_CFLAGS="-fPIE" if ld_supports_flag -z,relro; then PIE_LDFLAGS="-pie -Wl,-z,relro" @@ -25375,9 +19689,7 @@ if test "x$GCC" = "xyes"; then fi else if test x$enable_gcov = xyes; then - { { $as_echo "$as_me:$LINENO: error: --enable-gcov can only be used with gcc" >&5 -$as_echo "$as_me: error: --enable-gcov can only be used with gcc" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-gcov can only be used with gcc" "$LINENO" 5 fi fi @@ -25392,9 +19704,16 @@ if ld_supports_flag --gc-sections; then fi -{ $as_echo "$as_me:$LINENO: result: $ac_gcsections" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 $as_echo "$ac_gcsections" >&6; } +# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris +# +case $host_os in + solaris*) + CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;; +esac + # compress spaces in flags CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'` CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'` @@ -25404,9 +19723,9 @@ CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'` # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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_DOXYGEN+set}" = set; then +if test "${ac_cv_path_DOXYGEN+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DOXYGEN in @@ -25419,14 +19738,14 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="no" @@ -25435,16 +19754,16 @@ esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then - { $as_echo "$as_me:$LINENO: result: $DOXYGEN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build Doxygen documentation" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Doxygen documentation" >&5 $as_echo_n "checking whether to build Doxygen documentation... " >&6; } if test x$DOXYGEN = xno ; then @@ -25463,9 +19782,7 @@ fi if test x$enable_doxygen_docs = xyes; then if test x$have_doxygen = xno; then - { { $as_echo "$as_me:$LINENO: error: Building Doxygen docs explicitly required, but Doxygen not found" >&5 -$as_echo "$as_me: error: Building Doxygen docs explicitly required, but Doxygen not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Building Doxygen docs explicitly required, but Doxygen not found" "$LINENO" 5 fi fi @@ -25477,16 +19794,16 @@ else DBUS_DOXYGEN_DOCS_ENABLED_FALSE= fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_doxygen_docs" >&5 +$as_echo "$enable_doxygen_docs" >&6; } ### XML Documentation # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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_XMLTO+set}" = set; then +if test "${ac_cv_path_XMLTO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $XMLTO in @@ -25499,14 +19816,14 @@ 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 + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_XMLTO" && ac_cv_path_XMLTO="no" @@ -25515,16 +19832,16 @@ esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then - { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 $as_echo "$XMLTO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build XML documentation" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build XML documentation" >&5 $as_echo_n "checking whether to build XML documentation... " >&6; } if test x$XMLTO = xno ; then @@ -25543,9 +19860,7 @@ fi if test x$enable_xml_docs = xyes; then if test x$have_xmlto = xno; then - { { $as_echo "$as_me:$LINENO: error: Building XML docs explicitly required, but xmlto not found" >&5 -$as_echo "$as_me: error: Building XML docs explicitly required, but xmlto not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Building XML docs explicitly required, but xmlto not found" "$LINENO" 5 fi fi @@ -25557,8 +19872,68 @@ else DBUS_XML_DOCS_ENABLED_FALSE= fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xml_docs" >&5 +$as_echo "$enable_xml_docs" >&6; } + +# Extract the first word of "man2html", so it can be a program name with args. +set dummy man2html; 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_MAN2HTML+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $MAN2HTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_MAN2HTML="$MAN2HTML" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MAN2HTML="$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 +MAN2HTML=$ac_cv_path_MAN2HTML +if test -n "$MAN2HTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAN2HTML" >&5 +$as_echo "$MAN2HTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test x$MAN2HTML != x; then + DBUS_HAVE_MAN2HTML_TRUE= + DBUS_HAVE_MAN2HTML_FALSE='#' +else + DBUS_HAVE_MAN2HTML_TRUE='#' + DBUS_HAVE_MAN2HTML_FALSE= +fi + + + if test x$enable_doxygen_docs = xyes -a x$enable_xml_docs = xyes -a \ + x$MAN2HTML != x; then + DBUS_CAN_UPLOAD_DOCS_TRUE= + DBUS_CAN_UPLOAD_DOCS_FALSE='#' +else + DBUS_CAN_UPLOAD_DOCS_TRUE='#' + DBUS_CAN_UPLOAD_DOCS_FALSE= +fi + #### Have to go $localstatedir->$prefix/var->/usr/local/var @@ -25566,6 +19941,34 @@ $as_echo "yes" >&6; } ## (I know this is broken and should be done in the Makefile, but ## that's a major pain and almost nobody actually seems to care) + EXP_VAR=EXPANDED_PREFIX + FROM_VAR="$prefix" + + prefix_save=$prefix + exec_prefix_save=$exec_prefix + + if test "x$prefix" = "xNONE"; then + prefix="$ac_default_prefix" + fi + if test "x$exec_prefix" = "xNONE"; then + exec_prefix=$prefix + fi + + full_var="$FROM_VAR" + while true; do + new_full_var="`eval echo $full_var`" + if test "x$new_full_var" = "x$full_var"; then break; fi + full_var=$new_full_var + done + + full_var=$new_full_var + EXPANDED_PREFIX="$full_var" + + + prefix=$prefix_save + exec_prefix=$exec_prefix_save + + EXP_VAR=EXPANDED_LOCALSTATEDIR FROM_VAR="$localstatedir" @@ -25744,18 +20147,19 @@ if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-vers operating_system=slackware fi +if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then + operating_system=cygwin +fi + #### Sort out init scripts if test x$with_init_scripts = x; then - if test xredhat = x$operating_system ; then - with_init_scripts=redhat - else - if test xslackware = x$operating_system ; then - with_init_scripts=slackware - else - with_init_scripts=none - fi - fi + case x$operating_system in + xredhat) with_init_scripts=redhat ;; + xslackware) with_init_scripts=slackware ;; + xcygwin) with_init_scripts=cygwin ;; + *) with_init_scripts=none ;; + esac fi if test x$with_init_scripts = xredhat; then @@ -25766,7 +20170,6 @@ else DBUS_INIT_SCRIPTS_RED_HAT_FALSE= fi - if test x$with_init_scripts = xslackware; then DBUS_INIT_SCRIPTS_SLACKWARE_TRUE= DBUS_INIT_SCRIPTS_SLACKWARE_FALSE='#' @@ -25775,6 +20178,36 @@ else DBUS_INIT_SCRIPTS_SLACKWARE_FALSE= fi + if test x$with_init_scripts = xcygwin; then + DBUS_INIT_SCRIPTS_CYGWIN_TRUE= + DBUS_INIT_SCRIPTS_CYGWIN_FALSE='#' +else + DBUS_INIT_SCRIPTS_CYGWIN_TRUE='#' + DBUS_INIT_SCRIPTS_CYGWIN_FALSE= +fi + + +##### systemd unit files + +# Check whether --with-systemdsystemunitdir was given. +if test "${with_systemdsystemunitdir+set}" = set; then : + withval=$with_systemdsystemunitdir; +else + with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) +fi + +if test "x$with_systemdsystemunitdir" != xno; then + systemdsystemunitdir=$with_systemdsystemunitdir + +fi + if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then + HAVE_SYSTEMD_TRUE= + HAVE_SYSTEMD_FALSE='#' +else + HAVE_SYSTEMD_TRUE='#' + HAVE_SYSTEMD_FALSE= +fi + ##### Set up location for system bus socket if ! test -z "$with_system_socket"; then @@ -25856,6 +20289,15 @@ cat >>confdefs.h <<_ACEOF _ACEOF +#### Prefix to install into +DBUS_PREFIX=$EXPANDED_PREFIX + + +cat >>confdefs.h <<_ACEOF +#define DBUS_PREFIX "$DBUS_PREFIX" +_ACEOF + + #### Direcotry to install data files into DBUS_DATADIR=$EXPANDED_DATADIR @@ -25899,6 +20341,14 @@ _ACEOF #### Tell tests where to find certain stuff in builddir DBUS_PWD=`pwd` +# Useful in a cross-compilation environment, where the tests are run on the host system. + +# Check whether --with-dbus-test-dir was given. +if test "${with_dbus_test_dir+set}" = set; then : + withval=$with_dbus_test_dir; DBUS_PWD=$withval +fi + + @@ -25941,7 +20391,7 @@ _ACEOF TEST_SERVICE_BINARY=${DBUS_PWD}/test/test-service cat >>confdefs.h <<_ACEOF -#define TEST_SERVICE_BINARY "$TEST_SERVICE_BINARY" +#define TEST_SERVICE_BINARY "$TEST_SERVICE_BINARY$EXEEXT" _ACEOF @@ -25950,7 +20400,7 @@ _ACEOF TEST_SHELL_SERVICE_BINARY=${DBUS_PWD}/test/test-shell-service cat >>confdefs.h <<_ACEOF -#define TEST_SHELL_SERVICE_BINARY "$TEST_SHELL_SERVICE_BINARY" +#define TEST_SHELL_SERVICE_BINARY "$TEST_SHELL_SERVICE_BINARY$EXEEXT" _ACEOF @@ -25959,7 +20409,7 @@ _ACEOF TEST_EXIT_BINARY=${DBUS_PWD}/test/test-exit cat >>confdefs.h <<_ACEOF -#define TEST_EXIT_BINARY "$TEST_EXIT_BINARY" +#define TEST_EXIT_BINARY "$TEST_EXIT_BINARY$EXEEXT" _ACEOF @@ -25968,7 +20418,7 @@ _ACEOF TEST_SEGFAULT_BINARY=${DBUS_PWD}/test/test-segfault cat >>confdefs.h <<_ACEOF -#define TEST_SEGFAULT_BINARY "$TEST_SEGFAULT_BINARY" +#define TEST_SEGFAULT_BINARY "$TEST_SEGFAULT_BINARY$EXEEXT" _ACEOF @@ -25977,7 +20427,7 @@ _ACEOF TEST_SLEEP_FOREVER_BINARY=${DBUS_PWD}/test/test-sleep-forever cat >>confdefs.h <<_ACEOF -#define TEST_SLEEP_FOREVER_BINARY "$TEST_SLEEP_FOREVER_BINARY" +#define TEST_SLEEP_FOREVER_BINARY "$TEST_SLEEP_FOREVER_BINARY$EXEEXT" _ACEOF @@ -25986,7 +20436,7 @@ _ACEOF TEST_PRIVSERVER_BINARY=${DBUS_PWD}/test/name-test/test-privserver cat >>confdefs.h <<_ACEOF -#define TEST_PRIVSERVER_BINARY "$TEST_PRIVSERVER_BINARY" +#define TEST_PRIVSERVER_BINARY "$TEST_PRIVSERVER_BINARY$EXEEXT" _ACEOF @@ -25994,13 +20444,13 @@ _ACEOF cat >>confdefs.h <<_ACEOF -#define TEST_BUS_BINARY "$DBUS_PWD/bus/dbus-daemon" +#define TEST_BUS_BINARY "$DBUS_PWD/bus/dbus-daemon$EXEEXT" _ACEOF ## Export the non-setuid external helper -TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test" +TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT" cat >>confdefs.h <<_ACEOF @@ -26019,6 +20469,8 @@ else DEFAULT_SOCKET_DIR=/tmp fi +DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'` + if ! test -z "$with_test_socket_dir" ; then TEST_SOCKET_DIR="$with_test_socket_dir" else @@ -26043,256 +20495,38 @@ _ACEOF - -cat >>confdefs.h <<_ACEOF -#define DBUS_UNIX "1" -_ACEOF - - -# darwin needs this to initialize the environment - -for ac_header in crt_externs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if test x$dbus_win = xyes; then + DBUS_SESSION_BUS_DEFAULT_ADDRESS="nonce-tcp:" +elif test x$have_launchd = xyes; then + DBUS_SESSION_BUS_DEFAULT_ADDRESS="launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + DBUS_SESSION_BUS_DEFAULT_ADDRESS="unix:tmpdir=$DBUS_SESSION_SOCKET_DIR" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +# darwin needs this to initialize the environment +for ac_header in crt_externs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "crt_externs.h" "ac_cv_header_crt_externs_h" "$ac_includes_default" +if test "x$ac_cv_header_crt_externs_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_CRT_EXTERNS_H 1 _ACEOF fi done -{ $as_echo "$as_me:$LINENO: checking for _NSGetEnviron" >&5 -$as_echo_n "checking for _NSGetEnviron... " >&6; } -if test "${ac_cv_func__NSGetEnviron+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define _NSGetEnviron to an innocuous variant, in case <limits.h> declares _NSGetEnviron. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define _NSGetEnviron innocuous__NSGetEnviron - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _NSGetEnviron (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef _NSGetEnviron +ac_fn_c_check_func "$LINENO" "_NSGetEnviron" "ac_cv_func__NSGetEnviron" +if test "x$ac_cv_func__NSGetEnviron" = x""yes; then : -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _NSGetEnviron (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub__NSGetEnviron || defined __stub____NSGetEnviron -choke me -#endif - -int -main () -{ -return _NSGetEnviron (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func__NSGetEnviron=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func__NSGetEnviron=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__NSGetEnviron" >&5 -$as_echo "$ac_cv_func__NSGetEnviron" >&6; } -if test "x$ac_cv_func__NSGetEnviron" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_NSGETENVIRON 1 -_ACEOF +$as_echo "#define HAVE_NSGETENVIRON 1" >>confdefs.h fi - -ac_config_files="$ac_config_files Doxyfile dbus/dbus-arch-deps.h bus/system.conf bus/session.conf bus/messagebus bus/rc.messagebus bus/dbus-daemon.1 Makefile dbus/Makefile bus/Makefile tools/Makefile test/Makefile test/name-test/Makefile doc/Makefile dbus-1.pc test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf test/data/valid-config-files-system/debug-allow-all-pass.conf test/data/valid-config-files-system/debug-allow-all-fail.conf test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service" +ac_config_files="$ac_config_files Doxyfile dbus/versioninfo.rc dbus/dbus-arch-deps.h bus/system.conf bus/session.conf bus/messagebus bus/messagebus-config bus/org.freedesktop.dbus-session.plist bus/rc.messagebus bus/dbus.service bus/dbus.socket Makefile dbus/Makefile bus/Makefile tools/Makefile test/Makefile test/name-test/Makefile doc/Makefile doc/dbus-daemon.1 dbus-1.pc test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf test/data/valid-config-files-system/debug-allow-all-pass.conf test/data/valid-config-files-system/debug-allow-all-fail.conf test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -26321,13 +20555,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -26335,8 +20569,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -26359,11 +20593,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + { $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 else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $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;} fi fi @@ -26377,14 +20611,15 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -26400,147 +20635,127 @@ else fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"AMDEP\" 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_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + 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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_WIN_TRUE}" && test -z "${DBUS_WIN_FALSE}"; then + as_fn_error $? "conditional \"DBUS_WIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_WINCE_TRUE}" && test -z "${DBUS_WINCE_FALSE}"; then + as_fn_error $? "conditional \"DBUS_WINCE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_UNIX_TRUE}" && test -z "${DBUS_UNIX_FALSE}"; then + as_fn_error $? "conditional \"DBUS_UNIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_CYGWIN_TRUE}" && test -z "${DBUS_CYGWIN_FALSE}"; then + as_fn_error $? "conditional \"DBUS_CYGWIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_BUILD_TESTS_TRUE}" && test -z "${DBUS_BUILD_TESTS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_BUILD_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_BUILD_TESTS\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_BUILD_TESTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_GCOV_ENABLED_TRUE}" && test -z "${DBUS_GCOV_ENABLED_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_GCOV_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_GCOV_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_GCOV_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_USE_EXPAT_TRUE}" && test -z "${DBUS_USE_EXPAT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_USE_EXPAT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_USE_EXPAT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_USE_EXPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_USE_LIBXML_TRUE}" && test -z "${DBUS_USE_LIBXML_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_USE_LIBXML\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_USE_LIBXML\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_USE_LIBXML\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SELINUX_TRUE}" && test -z "${HAVE_SELINUX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_SELINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_SELINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"HAVE_SELINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_BUS_ENABLE_INOTIFY_TRUE}" && test -z "${DBUS_BUS_ENABLE_INOTIFY_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_BUS_ENABLE_INOTIFY\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_BUS_ENABLE_INOTIFY\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_BUS_ENABLE_INOTIFY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_TRUE}" && test -z "${DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_BUS_ENABLE_KQUEUE_TRUE}" && test -z "${DBUS_BUS_ENABLE_KQUEUE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_BUS_ENABLE_KQUEUE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_BUS_ENABLE_KQUEUE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_BUS_ENABLE_KQUEUE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_ENABLE_LAUNCHD_TRUE}" && test -z "${DBUS_ENABLE_LAUNCHD_FALSE}"; then + as_fn_error $? "conditional \"DBUS_ENABLE_LAUNCHD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CONSOLE_OWNER_FILE_TRUE}" && test -z "${HAVE_CONSOLE_OWNER_FILE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CONSOLE_OWNER_FILE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_CONSOLE_OWNER_FILE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"HAVE_CONSOLE_OWNER_FILE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBAUDIT_TRUE}" && test -z "${HAVE_LIBAUDIT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LIBAUDIT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_LIBAUDIT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"HAVE_LIBAUDIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_DOXYGEN_DOCS_ENABLED_TRUE}" && test -z "${DBUS_DOXYGEN_DOCS_ENABLED_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_DOXYGEN_DOCS_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_DOXYGEN_DOCS_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_DOXYGEN_DOCS_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_XML_DOCS_ENABLED_TRUE}" && test -z "${DBUS_XML_DOCS_ENABLED_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_XML_DOCS_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_XML_DOCS_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_XML_DOCS_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_HAVE_MAN2HTML_TRUE}" && test -z "${DBUS_HAVE_MAN2HTML_FALSE}"; then + as_fn_error $? "conditional \"DBUS_HAVE_MAN2HTML\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_CAN_UPLOAD_DOCS_TRUE}" && test -z "${DBUS_CAN_UPLOAD_DOCS_FALSE}"; then + as_fn_error $? "conditional \"DBUS_CAN_UPLOAD_DOCS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_INIT_SCRIPTS_RED_HAT_TRUE}" && test -z "${DBUS_INIT_SCRIPTS_RED_HAT_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_INIT_SCRIPTS_RED_HAT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_INIT_SCRIPTS_RED_HAT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_INIT_SCRIPTS_RED_HAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBUS_INIT_SCRIPTS_SLACKWARE_TRUE}" && test -z "${DBUS_INIT_SCRIPTS_SLACKWARE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"DBUS_INIT_SCRIPTS_SLACKWARE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"DBUS_INIT_SCRIPTS_SLACKWARE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"DBUS_INIT_SCRIPTS_SLACKWARE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DBUS_INIT_SCRIPTS_CYGWIN_TRUE}" && test -z "${DBUS_INIT_SCRIPTS_CYGWIN_FALSE}"; then + as_fn_error $? "conditional \"DBUS_INIT_SCRIPTS_CYGWIN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -26550,17 +20765,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -26568,23 +20784,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -26592,7 +20800,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -26603,7 +20817,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -26626,13 +20840,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -26642,15 +20849,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -26662,12 +20869,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -26679,7 +20890,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -26693,8 +20986,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -26714,76 +21011,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -26812,8 +21058,56 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -26832,10 +21126,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -26850,13 +21144,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dbus $as_me 1.2.24, which was -generated by GNU Autoconf 2.63. Invocation command line was +This file was extended by dbus $as_me 1.4.1, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -26888,13 +21188,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -26913,16 +21215,17 @@ $config_headers Configuration commands: $config_commands -Report bugs to <bug-autoconf@gnu.org>." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dbus config.status 1.2.24 -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +dbus config.status 1.4.1 +configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -26940,11 +21243,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -26958,27 +21266,29 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -26986,11 +21296,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -27041,6 +21350,9 @@ 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' +AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_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"`' @@ -27069,7 +21381,6 @@ 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"`' @@ -27228,7 +21539,6 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ -OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ @@ -27396,12 +21706,16 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;; + "dbus/versioninfo.rc") CONFIG_FILES="$CONFIG_FILES dbus/versioninfo.rc" ;; "dbus/dbus-arch-deps.h") CONFIG_FILES="$CONFIG_FILES dbus/dbus-arch-deps.h" ;; "bus/system.conf") CONFIG_FILES="$CONFIG_FILES bus/system.conf" ;; "bus/session.conf") CONFIG_FILES="$CONFIG_FILES bus/session.conf" ;; "bus/messagebus") CONFIG_FILES="$CONFIG_FILES bus/messagebus" ;; + "bus/messagebus-config") CONFIG_FILES="$CONFIG_FILES bus/messagebus-config" ;; + "bus/org.freedesktop.dbus-session.plist") CONFIG_FILES="$CONFIG_FILES bus/org.freedesktop.dbus-session.plist" ;; "bus/rc.messagebus") CONFIG_FILES="$CONFIG_FILES bus/rc.messagebus" ;; - "bus/dbus-daemon.1") CONFIG_FILES="$CONFIG_FILES bus/dbus-daemon.1" ;; + "bus/dbus.service") CONFIG_FILES="$CONFIG_FILES bus/dbus.service" ;; + "bus/dbus.socket") CONFIG_FILES="$CONFIG_FILES bus/dbus.socket" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "dbus/Makefile") CONFIG_FILES="$CONFIG_FILES dbus/Makefile" ;; "bus/Makefile") CONFIG_FILES="$CONFIG_FILES bus/Makefile" ;; @@ -27409,6 +21723,7 @@ do "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/name-test/Makefile") CONFIG_FILES="$CONFIG_FILES test/name-test/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/dbus-daemon.1") CONFIG_FILES="$CONFIG_FILES doc/dbus-daemon.1" ;; "dbus-1.pc") CONFIG_FILES="$CONFIG_FILES dbus-1.pc" ;; "test/data/valid-config-files/debug-allow-all.conf") CONFIG_FILES="$CONFIG_FILES test/data/valid-config-files/debug-allow-all.conf" ;; "test/data/valid-config-files/debug-allow-all-sha1.conf") CONFIG_FILES="$CONFIG_FILES test/data/valid-config-files/debug-allow-all-sha1.conf" ;; @@ -27428,9 +21743,7 @@ do "test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service") CONFIG_FILES="$CONFIG_FILES test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service" ;; "test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service") CONFIG_FILES="$CONFIG_FILES test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -27457,7 +21770,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -27468,11 +21781,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -27480,7 +21789,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr='
' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -27497,24 +21812,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -27536,7 +21845,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -27550,7 +21859,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -27603,22 +21912,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -27646,9 +21961,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -27733,9 +22046,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -27748,9 +22059,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -27778,12 +22087,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + 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 - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -27794,7 +22101,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -27807,9 +22114,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -27837,47 +22142,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -27934,7 +22199,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -27944,12 +22208,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -27959,7 +22222,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -27988,26 +22251,22 @@ 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_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || 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"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { $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;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -28018,25 +22277,19 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + { $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" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || 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" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -28074,7 +22327,7 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -28169,47 +22422,7 @@ $as_echo X"$file" | q } s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done @@ -28269,6 +22482,15 @@ available_tags="CXX " # ### BEGIN LIBTOOL CONFIG +# Assembler program. +AS=$AS + +# DLL creation program. +DLLTOOL=$DLLTOOL + +# Object dumper program. +OBJDUMP=$OBJDUMP + # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision @@ -28338,9 +22560,6 @@ NL2SP=$lt_lt_NL2SP reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -29023,15 +23242,12 @@ _LT_EOF done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -29052,10 +23268,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -29064,7 +23280,7 @@ echo " D-Bus $VERSION ============== - prefix: ${prefix} + prefix: ${EXPANDED_PREFIX} exec_prefix: ${exec_prefix} libdir: ${EXPANDED_LIBDIR} libexecdir: ${EXPANDED_LIBEXECDIR} @@ -29080,8 +23296,9 @@ echo " 64-bit int: ${DBUS_INT64_TYPE} 32-bit int: ${DBUS_INT32_TYPE} 16-bit int: ${DBUS_INT16_TYPE} - Doxygen: ${DOXYGEN} - xmlto: ${XMLTO}" + Doxygen: ${DOXYGEN:-not found} + xmlto: ${XMLTO:-not found} + man2html: ${MAN2HTML:-not found}" echo " Maintainer mode: ${USE_MAINTAINER_MODE} @@ -29098,6 +23315,7 @@ echo " Building Doxygen docs: ${enable_doxygen_docs} Building XML docs: ${enable_xml_docs} Building cache support: ${enable_userdb_cache} + Building launchd support: ${have_launchd} Gettext libs (empty OK): ${INTLLIBS} Using XML parser: ${with_xml} Init scripts style: ${with_init_scripts} @@ -29105,7 +23323,7 @@ echo " System bus socket: ${DBUS_SYSTEM_SOCKET} System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} System bus PID file: ${DBUS_SYSTEM_PID_FILE} - Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR} + Session bus address: ${DBUS_SESSION_BUS_DEFAULT_ADDRESS} Console auth dir: ${DBUS_CONSOLE_AUTH_DIR} Console owner file: ${have_console_owner_file} Console owner file path: ${DBUS_CONSOLE_OWNER_FILE} @@ -29113,6 +23331,10 @@ echo " Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services 'make check' socket dir: ${TEST_SOCKET_DIR} " +if test x$have_launchd = xyes; then + echo " launchd agent dir: ${LAUNCHD_AGENT_DIR}" +fi +echo if test x$enable_tests = xyes; then echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure." diff --git a/configure.in b/configure.in index 486c612d..b0d76550 100644 --- a/configure.in +++ b/configure.in @@ -2,15 +2,19 @@ dnl -*- mode: m4 -*- AC_PREREQ(2.52) m4_define([dbus_major_version], [1]) -m4_define([dbus_minor_version], [2]) -m4_define([dbus_micro_version], [24]) +m4_define([dbus_minor_version], [4]) +m4_define([dbus_micro_version], [1]) m4_define([dbus_version], [dbus_major_version.dbus_minor_version.dbus_micro_version]) AC_INIT(dbus, [dbus_version]) AC_CANONICAL_HOST +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_RC -AM_INIT_AUTOMAKE([1.9 tar-ustar]) +AC_CONFIG_MACRO_DIR([m4]) + +AM_INIT_AUTOMAKE([1.9 tar-ustar -Wno-portability]) AM_CONFIG_HEADER(config.h) # Honor aclocal flags @@ -25,22 +29,24 @@ AM_MAINTAINER_MODE m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +AC_DEFINE_UNQUOTED(DBUS_DAEMON_NAME,"dbus-daemon",[Name of executable]) + # libtool versioning - this applies to libdbus # # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details # ## increment if the interface has additions, changes, removals. -LT_CURRENT=7 +LT_CURRENT=8 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=0 +LT_REVISION=3 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has ## precedence over adding, so set to 0 if both happened. -LT_AGE=4 +LT_AGE=5 AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) @@ -59,10 +65,61 @@ AC_SUBST(DBUS_VERSION) AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX +AC_USE_SYSTEM_EXTENSIONS AC_ISC_POSIX AC_HEADER_STDC AC_C_INLINE AM_PROG_LIBTOOL +AC_PROG_MKDIR_P + +# Set some internal variables depending on the platform for later use. +dbus_win=no +dbus_cygwin=no +dbus_unix=no +case "${host}" in + *-mingw32ce*) + dbus_win=yes + dbus_wince=yes + ;; + *-mingw32*) + dbus_win=yes + ;; + *-cygwin*) + dbus_cygwin=yes + dbus_unix=yes + ;; + *) + dbus_unix=yes + ;; +esac + +# Special defines for certain platforms +if test "$dbus_win" = yes; then + AC_DEFINE(DBUS_WIN,1,[Defined if we run on a W32 API based system]) + BUILD_TIMESTAMP=`date --iso-8601=minutes` + AC_SUBST(BUILD_TIMESTAMP) + # Assume DBUS_VERSION is always three numbers + BUILD_FILEVERSION=`echo "$DBUS_VERSION" | sed -e 's/\./,/g'`,0 + AC_SUBST(BUILD_FILEVERSION) + AC_CHECK_TOOL(WINDRES, windres, no) + if test "$WINDRES" = no; then + AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.]) + fi + if test "$dbus_wince" = yes; then + AC_DEFINE(DBUS_WINCE,1,[Defined if we run on a W32 CE API based system]) + AC_DEFINE(_WIN32_WCE, 0x0502, [Defined to get newer W32 CE APIs]) + fi +else + AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system]) +fi +if test "$dbus_cygwin" = yes; then + AC_DEFINE(DBUS_CYGWIN,1,[Defined if we run on a cygwin API based system]) +fi + +AM_CONDITIONAL(DBUS_WIN, test "$dbus_win" = yes) +AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes) +AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes) +AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes) AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no) @@ -80,6 +137,7 @@ AC_ARG_ENABLE(inotify, AS_HELP_STRING([--enable-inotify],[build with inotify sup AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto) AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto) AC_ARG_ENABLE(userdb-cache, AS_HELP_STRING([--enable-userdb-cache],[build with userdb-cache support]),enable_userdb_cache=$enableval,enable_userdb_cache=yes) +AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto) AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use])) AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install])) @@ -89,12 +147,11 @@ AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[ AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon])) AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip])) AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner])) +AC_ARG_WITH(launchd-agent-dir, AS_HELP_STRING([--with-launchd-agent-dir=[dirname]],[directory to put the launchd agent (default: /Library/LaunchAgents)])) AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)])) AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon])) -AC_DEFINE(DBUS_UNIX,1,[dbus on unix]) - -dnl DBUS_BUILD_TESTS controls unit tests built in to .c files +dnl DBUS_BUILD_TESTS controls unit tests built in to .c files dnl and also some stuff in the test/ subdir AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes) if test x$enable_tests = xyes; then @@ -111,7 +168,7 @@ if test x$enable_asserts = xno; then R_DYNAMIC_LDFLAG="" else # -rdynamic is needed for glibc's backtrace_symbols to work. - # No clue how much overhead this adds, but it's useful + # No clue how much overhead this adds, but it's useful # to do this on any assertion failure, # so for now it's enabled anytime asserts are (currently not # in production builds). @@ -137,7 +194,7 @@ if test x$enable_gcov = xyes; then AC_MSG_CHECKING([for gcc 3.3 version of gcov file format]) have_gcc33_gcov=no - AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])], + AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])], have_gcc33_gcov=yes) if test x$have_gcc33_gcov = xyes ; then AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format]) @@ -171,7 +228,7 @@ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ] ) -#### Integer sizes +#### Integer sizes AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) @@ -390,47 +447,29 @@ if test "x$dbus_cv_va_val_copy" = "xno"; then fi -#### Atomic integers (checks by Sebastian Wilhelmi for GLib) -AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers]) -have_atomic_inc_cond=0 -if test x"$GCC" = xyes; then - if test "x$enable_ansi" = "xyes"; then - AC_MSG_RESULT([no]) - else - case $host_cpu in - i386) - AC_MSG_RESULT([no]) - ;; - i?86) - case $host_os in - darwin*) - AC_MSG_RESULT([darwin]) - # check at compile-time, so that it is possible to build universal - # (with multiple architectures at once on the compile line) - have_atomic_inc_cond="(defined(__i386__) || defined(__x86_64__))" - ;; - *) - AC_MSG_RESULT([i486]) - have_atomic_inc_cond=1 - ;; - esac - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac - fi +#### Atomic integers + +AC_CACHE_CHECK([whether $CC knows __sync_sub_and_fetch()], + dbus_cv_sync_sub_and_fetch, + [AC_LINK_IFELSE( + AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]]), + [dbus_cv_sync_sub_and_fetch=yes], + [dbus_cv_sync_sub_and_fetch=no]) + ]) + +if test "x$dbus_cv_sync_sub_and_fetch" = "xyes" ; then + have_sync=1 +else + have_sync=0 fi -AC_DEFINE_UNQUOTED([DBUS_USE_ATOMIC_INT_486_COND], [$have_atomic_inc_cond], - [Always defined; expands to 1 if we should use atomic integer implementation for 486, else 0]) -AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT_COND, [$have_atomic_inc_cond], - [Always defined; expands to 1 if we have an atomic integer implementation, else 0]) + +AC_DEFINE_UNQUOTED([DBUS_USE_SYNC], [$have_sync], [Use the gcc __sync extension]) #### Various functions AC_SEARCH_LIBS(socket,[socket network]) AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) -AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll) +AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull) #### Check for broken poll; taken from Glib's configure @@ -469,13 +508,13 @@ DIR *dirp; dirp = opendir("."); dirfd(dirp); closedir(dirp); -], +], dbus_have_dirfd=yes, dbus_have_dirfd=no) AC_MSG_RESULT($dbus_have_dirfd) if test "$dbus_have_dirfd" = yes; then AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function]) else - AC_MSG_CHECKING(for DIR *dirp->dd_fd) + AC_MSG_CHECKING(for DIR *dirp->dd_fd) AC_TRY_LINK([ #include <sys/types.h> #include <dirent.h> @@ -493,19 +532,31 @@ closedir(dirp); fi fi +AC_CHECK_HEADERS(dirent.h) + AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)]) AC_CHECK_HEADERS(errno.h) +AC_CHECK_HEADERS(signal.h) + +AC_CHECK_HEADERS(locale.h) + +AC_CHECK_HEADERS(byteswap.h) + AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS(ws2tcpip.h) + +AC_CHECK_HEADERS(wspiapi.h) + # Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris # case $host_os in solaris*) CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;; esac - + # checking for a posix version of getpwnam_r # if we are cross compiling and can not run the test # assume getpwnam_r is the posix version @@ -524,10 +575,10 @@ AC_CACHE_CHECK([for posix getpwnam_r], struct passwd pwd, *pwptr = &pwd; int error; errno = 0; - error = getpwnam_r ("", &pwd, buffer, + error = getpwnam_r ("", &pwd, buffer, sizeof (buffer), &pwptr); - return (error < 0 && errno == ENOSYS) - || error == ENOSYS; + return (error < 0 && errno == ENOSYS) + || error == ENOSYS; ]])], [ac_cv_func_posix_getpwnam_r=yes], [ac_cv_func_posix_getpwnam_r=no], @@ -536,22 +587,22 @@ AC_CACHE_CHECK([for posix getpwnam_r], AC_LANG_POP(C) if test "$ac_cv_func_posix_getpwnam_r" = yes; then - AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1, - [Have POSIX function getpwnam_r]) + AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1, + [Have POSIX function getpwnam_r]) else - AC_CACHE_CHECK([for nonposix getpwnam_r], - ac_cv_func_nonposix_getpwnam_r, - [AC_TRY_LINK([#include <pwd.h>], - [char buffer[10000]; - struct passwd pwd; - getpwnam_r ("", &pwd, buffer, - sizeof (buffer));], - [ac_cv_func_nonposix_getpwnam_r=yes], - [ac_cv_func_nonposix_getpwnam_r=no])]) - if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then - AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1, - [Have non-POSIX function getpwnam_r]) - fi + AC_CACHE_CHECK([for nonposix getpwnam_r], + ac_cv_func_nonposix_getpwnam_r, + [AC_TRY_LINK([#include <pwd.h>], + [char buffer[10000]; + struct passwd pwd; + getpwnam_r ("", &pwd, buffer, + sizeof (buffer));], + [ac_cv_func_nonposix_getpwnam_r=yes], + [ac_cv_func_nonposix_getpwnam_r=no])]) + if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then + AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1, + [Have non-POSIX function getpwnam_r]) + fi fi dnl check for socklen_t @@ -570,13 +621,16 @@ if test "x$dbus_have_socklen_t" = "xyes"; then AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type]) fi -dnl check for writev header and writev function so we're +dnl check for writev header and writev function so we're dnl good to go if HAVE_WRITEV gets defined. AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)]) dnl needed on darwin for NAME_MAX AC_CHECK_HEADERS(sys/syslimits.h) +dnl Make it easy to check if we have MSG_NOSIGNAL without actually having to include sys/socket.h +AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [[ #include <sys/socket.h> ]]) + dnl check for flavours of varargs macros (test from GLib) AC_MSG_CHECKING(for ISO C99 varargs macros in C) AC_TRY_COMPILE([],[ @@ -620,6 +674,8 @@ fi AC_CHECK_FUNCS(getpeerucred getpeereid) +AC_CHECK_FUNCS(pipe2 accept4) + #### Abstract sockets if test x$enable_abstract_sockets = xauto; then @@ -640,9 +696,9 @@ AC_CACHE_CHECK([abstract socket namespace], [[ int listen_fd; struct sockaddr_un addr; - + listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); - + if (listen_fd < 0) { fprintf (stderr, "socket() failed: %s\n", strerror (errno)); @@ -653,14 +709,14 @@ AC_CACHE_CHECK([abstract socket namespace], addr.sun_family = AF_UNIX; strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); addr.sun_path[0] = '\0'; /* this is what makes it abstract */ - + if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) { - fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", + fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", strerror (errno)); exit (1); } - else + else exit (0); ]])], [ac_cv_have_abstract_sockets=yes], @@ -693,10 +749,12 @@ else DBUS_PATH_OR_ABSTRACT=path fi -# this is used in addresses to prefer abstract, e.g. -# unix:path=/foo or unix:abstract=/foo +# this is used in addresses to prefer abstract, e.g. +# unix:path=/foo or unix:abstract=/foo AC_SUBST(DBUS_PATH_OR_ABSTRACT) +PKG_PROG_PKG_CONFIG + #### Sort out XML library # see what we have @@ -719,7 +777,7 @@ elif test x$with_xml = xlibxml; then fi dbus_use_libxml=true else - ### expat is the default because libxml can't currently survive + ### expat is the default because libxml can't currently survive ### our brutal OOM-handling unit test setup. ### http://bugzilla.gnome.org/show_bug.cgi?id=109368 if test x$have_expat = xfalse; then @@ -775,7 +833,7 @@ if test x$enable_selinux = xno ; then have_selinux=no; else # See if we have SELinux library - AC_CHECK_LIB(selinux, is_selinux_enabled, + AC_CHECK_LIB(selinux, is_selinux_enabled, have_selinux=yes, have_selinux=no) # see if we have the SELinux header with the new D-Bus stuff in it @@ -794,7 +852,7 @@ else if test x$have_selinux = xno ; then AC_MSG_WARN([Sufficiently new SELinux library not found]) fi - else + else if test x$have_selinux = xno ; then AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found]) fi @@ -835,7 +893,7 @@ if test x$enable_dnotify = xno ; then have_dnotify=no; else if test x$have_inotify = xno -a x$host_os = xlinux-gnu -o x$host_os = xlinux; then - have_dnotify=yes; + have_dnotify=yes; else have_dnotify=no; fi @@ -866,7 +924,39 @@ if test x$have_kqueue = xyes; then AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue]) fi -AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) +AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) + +# launchd checks +if test x$enable_launchd = xno ; then + have_launchd=no +else + have_launchd=yes + AC_CHECK_HEADER([launch.h], , have_launchd=no) + AC_PATH_PROG([LAUNCHCTL], [launchctl]) + if test "x$LAUNCHCTL" = "x"; then + have_launchd=no + fi + + if test x$enable_launchd = xyes && test x$have_launchd = xno ; then + AC_MSG_ERROR([launchd support explicitly enabled but not available]) + fi +fi + +dnl check if launchd is enabled +if test x$have_launchd = xyes; then + AC_DEFINE(DBUS_ENABLE_LAUNCHD,1,[Use launchd autolaunch]) +fi + +AM_CONDITIONAL(DBUS_ENABLE_LAUNCHD, test x$have_launchd = xyes) + +#### Directory to place launchd agent file +if test "x$with_launchd_agent_dir" = "x"; then + LAUNCHD_AGENT_DIR="/Library/LaunchAgents" +else + LAUNCHD_AGENT_DIR="$with_launchd_agent_dir" +fi + +AC_SUBST(LAUNCHD_AGENT_DIR) dnl console owner file if test x$enable_console_owner_file = xno ; then @@ -889,7 +979,7 @@ if test x$enable_libaudit = xno ; then have_libaudit=no; else # See if we have audit daemon & capabilities library - AC_CHECK_LIB(audit, audit_log_user_avc_message, + AC_CHECK_LIB(audit, audit_log_user_avc_message, have_libaudit=yes, have_libaudit=no) if test x$have_libaudit = xyes ; then AC_CHECK_LIB(cap-ng, capng_clear, @@ -921,32 +1011,54 @@ else AC_MSG_RESULT(no) fi +# Check for SCM_RIGHTS +AC_MSG_CHECKING([for SCM_RIGHTS]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include <sys/socket.h> +#include <sys/un.h> +static int x = SCM_RIGHTS; +]], [[]])], +[ AC_MSG_RESULT([supported]) + AC_DEFINE([HAVE_UNIX_FD_PASSING], [1], [Supports sending UNIX file descriptors]) ], +[ AC_MSG_RESULT([not supported]) ]) + +NETWORK_libs= +if test x$dbus_win = xyes ; then + if test x$dbus_wince = xyes ; then + NETWORK_libs="-lws2" + else + NETWORK_libs="-lws2_32" + fi +fi #### Set up final flags DBUS_CLIENT_CFLAGS= -DBUS_CLIENT_LIBS="$THREAD_LIBS" +DBUS_CLIENT_LIBS="$THREAD_LIBS $NETWORK_libs" AC_SUBST(DBUS_CLIENT_CFLAGS) AC_SUBST(DBUS_CLIENT_LIBS) DBUS_BUS_CFLAGS="$XML_CFLAGS" -DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS" +DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS $NETWORK_libs" AC_SUBST(DBUS_BUS_CFLAGS) AC_SUBST(DBUS_BUS_LIBS) DBUS_LAUNCHER_CFLAGS="$XML_CFLAGS" -DBUS_LAUNCHER_LIBS="$XML_LIBS $THREAD_LIBS" +DBUS_LAUNCHER_LIBS="$XML_LIBS $THREAD_LIBS $NETWORK_libs" AC_SUBST(DBUS_LAUNCHER_CFLAGS) AC_SUBST(DBUS_LAUNCHER_LIBS) DBUS_TEST_CFLAGS= -DBUS_TEST_LIBS="$THREAD_LIBS" +DBUS_TEST_LIBS="$THREAD_LIBS $NETWORK_libs" AC_SUBST(DBUS_TEST_CFLAGS) AC_SUBST(DBUS_TEST_LIBS) ### X11 detection +if test x$dbus_win = xyes ; then + enable_x11=no +else AC_PATH_XTRA -## for now enable_x11 just tracks have_x11, +## for now enable_x11 just tracks have_x11, ## there's no --enable-x11 if test x$no_x = xyes ; then have_x11=no @@ -967,6 +1079,7 @@ fi AC_SUBST(DBUS_X_CFLAGS) AC_SUBST(DBUS_X_LIBS) +fi #### gcc warning flags @@ -1015,7 +1128,8 @@ ld_supports_flag() { fi } -if test x$USE_MAINTAINER_MODE = xyes; then +# Don't bother with -Werror on Windows for now, too many warnings +if test x$dbus_win != xyes -a x$dbus_cygwin != xyes -a x$USE_MAINTAINER_MODE = xyes; then if cc_supports_flag "-Werror"; then CFLAGS="$CFLAGS -Werror" fi @@ -1061,7 +1175,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-Wfloat-equal[\ \ ]*) ;; *) if cc_supports_flag -Wfloat-equals; then - CFLAGS="$CFLAGS -Wfloat-equal" + CFLAGS="$CFLAGS -Wfloat-equal" fi ;; esac @@ -1084,7 +1198,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-fPIC[\ \ ]*) ;; - *) if cc_supports_flag -fPIC; then + *) if test x$dbus_win = xno && cc_supports_flag -fPIC; then PIC_CFLAGS="-fPIC" if ld_supports_flag -z,relro; then PIC_LDFLAGS="-Wl,-z,relro" @@ -1095,7 +1209,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-fPIE[\ \ ]*) ;; - *) if cc_supports_flag -fPIE; then + *) if test x$dbus_win = xno && cc_supports_flag -fPIE; then PIE_CFLAGS="-fPIE" if ld_supports_flag -z,relro; then PIE_LDFLAGS="-pie -Wl,-z,relro" @@ -1105,18 +1219,18 @@ if test "x$GCC" = "xyes"; then fi ;; esac - + ### Disabled warnings, and compiler flag overrides - + # Let's just ignore unused for now case " $CFLAGS " in *[\ \ ]-Wno-unused[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wno-unused" ;; - esac - + esac + # This group is for warnings we currently don't pass. # We would like to, however. Please fix. - + # http://bugs.freedesktop.org/show_bug.cgi?id=17433 case " $CFLAGS " in *[\ \ ]-Wno-sign-compare[\ \ ]*) ;; @@ -1129,7 +1243,7 @@ if test "x$GCC" = "xyes"; then fi ;; esac - + # This one is special - it's not a warning override. # http://bugs.freedesktop.org/show_bug.cgi?id=10599 case " $CFLAGS " in @@ -1157,7 +1271,7 @@ if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; - esac + esac fi if test x$enable_gcov = xyes; then case " $CFLAGS " in @@ -1180,9 +1294,9 @@ else fi AC_SUBST(PIC_CFLAGS) -AC_SUBST(PIC_LDFLAGS) +AC_SUBST(PIC_LDFLAGS) AC_SUBST(PIE_CFLAGS) -AC_SUBST(PIE_LDFLAGS) +AC_SUBST(PIE_LDFLAGS) if ld_supports_flag --gc-sections; then SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" @@ -1192,6 +1306,13 @@ AC_SUBST(SECTION_FLAGS) AC_SUBST(SECTION_LDFLAGS) AC_MSG_RESULT($ac_gcsections) +# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris +# +case $host_os in + solaris*) + CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;; +esac + changequote(,)dnl # compress spaces in flags CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'` @@ -1226,7 +1347,7 @@ if test x$enable_doxygen_docs = xyes; then fi AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes) -AC_MSG_RESULT(yes) +AC_MSG_RESULT($enable_doxygen_docs) ### XML Documentation @@ -1255,13 +1376,22 @@ if test x$enable_xml_docs = xyes; then fi AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes) -AC_MSG_RESULT(yes) +AC_MSG_RESULT($enable_xml_docs) + +AC_PATH_PROG([MAN2HTML], [man2html]) +AC_ARG_VAR([MAN2HTML], [Path to man2html (optional)]) +AM_CONDITIONAL(DBUS_HAVE_MAN2HTML, test x$MAN2HTML != x) + +AM_CONDITIONAL(DBUS_CAN_UPLOAD_DOCS, + test x$enable_doxygen_docs = xyes -a x$enable_xml_docs = xyes -a \ + x$MAN2HTML != x) #### Have to go $localstatedir->$prefix/var->/usr/local/var #### find the actual value for $prefix that we'll end up with ## (I know this is broken and should be done in the Makefile, but ## that's a major pain and almost nobody actually seems to care) +AS_AC_EXPAND(EXPANDED_PREFIX, "$prefix") AS_AC_EXPAND(EXPANDED_LOCALSTATEDIR, "$localstatedir") AS_AC_EXPAND(EXPANDED_SYSCONFDIR, "$sysconfdir") AS_AC_EXPAND(EXPANDED_BINDIR, "$bindir") @@ -1279,23 +1409,33 @@ if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-vers operating_system=slackware fi +if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then + operating_system=cygwin +fi + #### Sort out init scripts if test x$with_init_scripts = x; then - if test xredhat = x$operating_system ; then - with_init_scripts=redhat - else - if test xslackware = x$operating_system ; then - with_init_scripts=slackware - else - with_init_scripts=none - fi - fi + case x$operating_system in + xredhat) with_init_scripts=redhat ;; + xslackware) with_init_scripts=slackware ;; + xcygwin) with_init_scripts=cygwin ;; + *) with_init_scripts=none ;; + esac fi AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat) - AM_CONDITIONAL(DBUS_INIT_SCRIPTS_SLACKWARE, test x$with_init_scripts = xslackware) +AM_CONDITIONAL(DBUS_INIT_SCRIPTS_CYGWIN, test x$with_init_scripts = xcygwin) + +##### systemd unit files +AC_ARG_WITH([systemdsystemunitdir], +AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +if test "x$with_systemdsystemunitdir" != xno; then + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +fi +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) ##### Set up location for system bus socket if ! test -z "$with_system_socket"; then @@ -1307,7 +1447,7 @@ fi AC_SUBST(DBUS_SYSTEM_SOCKET) AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default]) -## system bus only listens on local domain sockets, and never +## system bus only listens on local domain sockets, and never ## on an abstract socket (so only root can create the socket) DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET" AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS) @@ -1357,6 +1497,11 @@ fi AC_SUBST(DBUS_USER) AC_DEFINE_UNQUOTED(DBUS_USER,"$DBUS_USER", [User for running the system BUS daemon]) +#### Prefix to install into +DBUS_PREFIX=$EXPANDED_PREFIX +AC_SUBST(DBUS_PREFIX) +AC_DEFINE_UNQUOTED(DBUS_PREFIX,"$DBUS_PREFIX", [Prefix for installing DBUS]) + #### Direcotry to install data files into DBUS_DATADIR=$EXPANDED_DATADIR AC_SUBST(DBUS_DATADIR) @@ -1384,30 +1529,39 @@ AC_DEFINE_UNQUOTED(DBUS_LIBEXECDIR,"$DBUS_LIBEXECDIR", [Directory for installing #### Tell tests where to find certain stuff in builddir DBUS_PWD=`pwd` +# Useful in a cross-compilation environment, where the tests are run on the host system. +AC_ARG_WITH(dbus-test-dir, AS_HELP_STRING([--with-dbus-test-dir=[dirname]],[path where the tests tools are available]), + DBUS_PWD=$withval) AC_DEFUN([TEST_PATH], [ TEST_$1=${DBUS_PWD}/test/$2 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1", [Full path to test file test/$2 in builddir]) AC_SUBST(TEST_$1) ]) +AC_DEFUN([TEST_PROG], [ +TEST_$1=${DBUS_PWD}/test/$2 +AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1$EXEEXT", + [Full path to test file test/$2 in builddir]) +AC_SUBST(TEST_$1) +]) TEST_PATH(VALID_SERVICE_DIR, data/valid-service-files) TEST_PATH(INVALID_SERVICE_DIR, data/invalid-service-files) TEST_PATH(VALID_SERVICE_SYSTEM_DIR, data/valid-service-files-system) TEST_PATH(INVALID_SERVICE_SYSTEM_DIR, data/invalid-service-files-system) -TEST_PATH(SERVICE_BINARY, test-service) -TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service) -TEST_PATH(EXIT_BINARY, test-exit) -TEST_PATH(SEGFAULT_BINARY, test-segfault) -TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever) -TEST_PATH(PRIVSERVER_BINARY, name-test/test-privserver) - -AC_DEFINE_UNQUOTED(TEST_BUS_BINARY, "$DBUS_PWD/bus/dbus-daemon", +TEST_PROG(SERVICE_BINARY, test-service) +TEST_PROG(SHELL_SERVICE_BINARY, test-shell-service) +TEST_PROG(EXIT_BINARY, test-exit) +TEST_PROG(SEGFAULT_BINARY, test-segfault) +TEST_PROG(SLEEP_FOREVER_BINARY, test-sleep-forever) +TEST_PROG(PRIVSERVER_BINARY, name-test/test-privserver) + +AC_DEFINE_UNQUOTED(TEST_BUS_BINARY, "$DBUS_PWD/bus/dbus-daemon$EXEEXT", [Full path to the daemon in the builddir]) AC_SUBST(TEST_BUS_BINARY) ## Export the non-setuid external helper -TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test" +TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test$EXEEXT" AC_SUBST(TEST_LAUNCH_HELPER_BINARY) AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY", [Full path to the launch helper test program in the builddir]) @@ -1423,6 +1577,8 @@ else DEFAULT_SOCKET_DIR=/tmp fi +DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'` + if ! test -z "$with_test_socket_dir" ; then TEST_SOCKET_DIR="$with_test_socket_dir" else @@ -1439,7 +1595,14 @@ fi AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets]) AC_SUBST(DBUS_SESSION_SOCKET_DIR) -AC_DEFINE_UNQUOTED(DBUS_UNIX, "1", [Defined on UNIX and Linux systems and not on Windows]) +if test x$dbus_win = xyes; then + DBUS_SESSION_BUS_DEFAULT_ADDRESS="nonce-tcp:" +elif test x$have_launchd = xyes; then + DBUS_SESSION_BUS_DEFAULT_ADDRESS="launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET" +else + DBUS_SESSION_BUS_DEFAULT_ADDRESS="unix:tmpdir=$DBUS_SESSION_SOCKET_DIR" +fi +AC_SUBST(DBUS_SESSION_BUS_DEFAULT_ADDRESS) # darwin needs this to initialize the environment AC_CHECK_HEADERS(crt_externs.h) @@ -1455,12 +1618,16 @@ AH_VERBATIM(_DARWIN_ENVIRON, AC_OUTPUT([ Doxyfile +dbus/versioninfo.rc dbus/dbus-arch-deps.h bus/system.conf bus/session.conf bus/messagebus +bus/messagebus-config +bus/org.freedesktop.dbus-session.plist bus/rc.messagebus -bus/dbus-daemon.1 +bus/dbus.service +bus/dbus.socket Makefile dbus/Makefile bus/Makefile @@ -1468,6 +1635,7 @@ tools/Makefile test/Makefile test/name-test/Makefile doc/Makefile +doc/dbus-daemon.1 dbus-1.pc test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf @@ -1493,7 +1661,7 @@ echo " D-Bus $VERSION ============== - prefix: ${prefix} + prefix: ${EXPANDED_PREFIX} exec_prefix: ${exec_prefix} libdir: ${EXPANDED_LIBDIR} libexecdir: ${EXPANDED_LIBEXECDIR} @@ -1509,8 +1677,9 @@ echo " 64-bit int: ${DBUS_INT64_TYPE} 32-bit int: ${DBUS_INT32_TYPE} 16-bit int: ${DBUS_INT16_TYPE} - Doxygen: ${DOXYGEN} - xmlto: ${XMLTO}" + Doxygen: ${DOXYGEN:-not found} + xmlto: ${XMLTO:-not found} + man2html: ${MAN2HTML:-not found}" echo " Maintainer mode: ${USE_MAINTAINER_MODE} @@ -1527,6 +1696,7 @@ echo " Building Doxygen docs: ${enable_doxygen_docs} Building XML docs: ${enable_xml_docs} Building cache support: ${enable_userdb_cache} + Building launchd support: ${have_launchd} Gettext libs (empty OK): ${INTLLIBS} Using XML parser: ${with_xml} Init scripts style: ${with_init_scripts} @@ -1534,7 +1704,7 @@ echo " System bus socket: ${DBUS_SYSTEM_SOCKET} System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} System bus PID file: ${DBUS_SYSTEM_PID_FILE} - Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR} + Session bus address: ${DBUS_SESSION_BUS_DEFAULT_ADDRESS} Console auth dir: ${DBUS_CONSOLE_AUTH_DIR} Console owner file: ${have_console_owner_file} Console owner file path: ${DBUS_CONSOLE_OWNER_FILE} @@ -1542,6 +1712,10 @@ echo " Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services 'make check' socket dir: ${TEST_SOCKET_DIR} " +if test x$have_launchd = xyes; then + echo " launchd agent dir: ${LAUNCHD_AGENT_DIR}" +fi +echo if test x$enable_tests = xyes; then echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure." diff --git a/dbus-1.pc.in b/dbus-1.pc.in index 866f81ce..e3e63c4f 100644 --- a/dbus-1.pc.in +++ b/dbus-1.pc.in @@ -5,11 +5,12 @@ includedir=@includedir@ system_bus_default_address=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ sysconfdir=@EXPANDED_SYSCONFDIR@ session_bus_services_dir=@EXPANDED_DATADIR@/dbus-1/services +system_bus_services_dir=@EXPANDED_DATADIR@/dbus-1/system-services +interfaces_dir=@EXPANDED_DATADIR@/dbus-1/interfaces daemondir=@DBUS_DAEMONDIR@ Name: dbus Description: Free desktop message bus Version: @VERSION@ -Libs: -L${libdir} -ldbus-1 @DBUS_CLIENT_LIBS@ +Libs: -L${libdir} -ldbus-1 @DBUS_CLIENT_LIBS@ Cflags: -I${includedir}/dbus-1.0 -I${libdir}/dbus-1.0/include - diff --git a/dbus/Makefile.am b/dbus/Makefile.am index 597fe08d..8d698ca3 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -11,6 +11,101 @@ dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus lib_LTLIBRARIES=libdbus-1.la +# +# Deal with W32 .def and version-info.rc stuff +# +if DBUS_WIN + +SUFFIXES = rc + +.rc.o: + $(WINDRES) $< -o $@ + +dbus_res = versioninfo.o +dbus_res_ldflag = -Wl,$(dbus_res) +no_undefined = -no-undefined +export_symbols = +export_symvols_internal = + +libdbus_1_la_DEPENDENCIES = $(dbus_res) +intllibs = + +else +dbus_res = +dbus_res_ldflag = +no_undefined = +## don't export symbols that start with "_" (we use this +## convention for internal symbols) +export_symbols = -export-symbols-regex "^[^_].*" +export_symbols_internal = + +intllibs = @LTLIBINTL@ + +endif + + +# +# Platform-dependent sources: +# +if DBUS_WIN +DBUS_LIB_arch_sources = \ + dbus-server-win.c \ + dbus-server-win.h + +if DBUS_WINCE +wince_source = dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c +else +wince_source = +endif + +DBUS_SHARED_arch_sources = \ + $(wince_source) \ + dbus-file-win.c \ + dbus-pipe-win.c \ + dbus-sockets-win.h \ + dbus-sysdeps-win.c \ + dbus-sysdeps-win.h \ + dbus-sysdeps-thread-win.c \ + dbus-transport-win.c \ + dbus-transport-win.h + +DBUS_UTIL_arch_sources = \ + dbus-sysdeps-util-win.c \ + dbus-spawn-win.c +else + +if DBUS_ENABLE_LAUNCHD +launchd_source = dbus-server-launchd.h dbus-server-launchd.c +else +launchd_source = +endif + +DBUS_LIB_arch_sources = \ + dbus-uuidgen.c \ + dbus-uuidgen.h \ + dbus-server-unix.c \ + dbus-server-unix.h + +DBUS_SHARED_arch_sources = \ + $(launchd_source) \ + dbus-file-unix.c \ + dbus-pipe-unix.c \ + dbus-sysdeps-unix.c \ + dbus-sysdeps-unix.h \ + dbus-sysdeps-pthread.c \ + dbus-transport-unix.c \ + dbus-transport-unix.h \ + dbus-userdb.c \ + dbus-userdb.h \ + sd-daemon.c \ + sd-daemon.h + +DBUS_UTIL_arch_sources = \ + dbus-sysdeps-util-unix.c \ + dbus-userdb-util.c \ + dbus-spawn.c +endif + dbusinclude_HEADERS= \ dbus.h \ dbus-address.h \ @@ -61,6 +156,8 @@ DBUS_LIB_SOURCES= \ dbus-message-internal.h \ dbus-message-private.h \ dbus-misc.c \ + dbus-nonce.h \ + dbus-nonce.c \ dbus-object-tree.c \ dbus-object-tree.h \ dbus-pending-call.c \ @@ -73,8 +170,7 @@ DBUS_LIB_SOURCES= \ dbus-server-protected.h \ dbus-server-socket.c \ dbus-server-socket.h \ - dbus-server-unix.c \ - dbus-server-unix.h \ + $(DBUS_LIB_arch_sources) \ dbus-sha.c \ dbus-sha.h \ dbus-signature.c \ @@ -87,10 +183,6 @@ DBUS_LIB_SOURCES= \ dbus-transport-protected.h \ dbus-transport-socket.c \ dbus-transport-socket.h \ - dbus-transport-unix.c \ - dbus-transport-unix.h \ - dbus-uuidgen.c \ - dbus-uuidgen.h \ dbus-watch.c \ dbus-watch.h @@ -98,12 +190,14 @@ DBUS_LIB_SOURCES= \ ## dbus-md5.h \ ### source code that goes in the installed client library -### AND is generic utility functionality used by the -### daemon or test programs (all symbols in here should +### AND is generic utility functionality used by the +### daemon or test programs (all symbols in here should ### be underscore-prefixed) DBUS_SHARED_SOURCES= \ dbus-dataslot.c \ dbus-dataslot.h \ + dbus-file.c \ + dbus-file.h \ dbus-hash.c \ dbus-hash.h \ dbus-internals.c \ @@ -115,21 +209,19 @@ DBUS_SHARED_SOURCES= \ dbus-memory.c \ dbus-mempool.c \ dbus-mempool.h \ + dbus-pipe.c \ + dbus-pipe.h \ dbus-string.c \ dbus-string.h \ dbus-string-private.h \ + $(DBUS_SHARED_arch_sources) \ dbus-sysdeps.c \ - dbus-sysdeps.h \ - dbus-sysdeps-pthread.c \ - dbus-sysdeps-unix.c \ - dbus-sysdeps-unix.h \ - dbus-userdb.c \ - dbus-userdb.h + dbus-sysdeps.h ### source code that is generic utility functionality used ### by the bus daemon or test apps, but is NOT included -### in the D-Bus client library (all symbols in here -### should be underscore-prefixed but don't really need +### in the D-Bus client library (all symbols in here +### should be underscore-prefixed but don't really need ### to be unless they move to DBUS_SHARED_SOURCES later) DBUS_UTIL_SOURCES= \ dbus-auth-util.c \ @@ -144,42 +236,40 @@ DBUS_UTIL_SOURCES= \ dbus-message-util.c \ dbus-shell.c \ dbus-shell.h \ - dbus-spawn.c \ + $(DBUS_UTIL_arch_sources) \ dbus-spawn.h \ dbus-string-util.c \ dbus-sysdeps-util.c \ - dbus-sysdeps-util-unix.c \ dbus-test.c \ - dbus-test.h \ - dbus-userdb-util.c + dbus-test.h libdbus_1_la_SOURCES= \ $(DBUS_LIB_SOURCES) \ $(DBUS_SHARED_SOURCES) -libdbus_convenience_la_SOURCES= \ +libdbus_internal_la_SOURCES= \ $(DBUS_LIB_SOURCES) \ $(DBUS_SHARED_SOURCES) \ $(DBUS_UTIL_SOURCES) - BUILT_SOURCES=$(dbusarchinclude_HEADERS) EXTRA_DIST=dbus-arch-deps.h.in + ## this library is the same as libdbus, but exports all the symbols ## and is only used for static linking within the dbus package. -noinst_LTLIBRARIES=libdbus-convenience.la +noinst_LTLIBRARIES=libdbus-internal.la +libdbus_1_la_CPPFLAGS= -Ddbus_1_EXPORTS libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS) -## don't export symbols that start with "_" (we use this -## convention for internal symbols) -libdbus_1_la_LDFLAGS= -export-symbols-regex "^[^_].*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@ +libdbus_1_la_LDFLAGS= $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@ -libdbus_convenience_la_LIBADD=$(DBUS_CLIENT_LIBS) -libdbus_convenience_la_LDFLAGS=@R_DYNAMIC_LDFLAG@ +libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD +libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS) +libdbus_internal_la_LDFLAGS=$(export_symbols_internal) @R_DYNAMIC_LDFLAG@ ## note that TESTS has special meaning (stuff to use in make check) -## so if adding tests not to be run in make check, don't add them to +## so if adding tests not to be run in make check, don't add them to ## TESTS if DBUS_BUILD_TESTS TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus @@ -188,16 +278,20 @@ else TESTS= endif -## we use noinst_PROGRAMS not check_PROGRAMS so that we build +## we use noinst_PROGRAMS not check_PROGRAMS so that we build ## even when not doing "make check" noinst_PROGRAMS=$(TESTS) dbus_test_SOURCES= \ dbus-test-main.c -dbus_test_LDADD=libdbus-convenience.la $(DBUS_TEST_LIBS) +dbus_test_LDADD=libdbus-internal.la $(DBUS_TEST_LIBS) dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ ## mop up the gcov files clean-local: /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true + +update-systemd: + curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c + curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h diff --git a/dbus/Makefile.in b/dbus/Makefile.in index 2ab720bb..236f3670 100644 --- a/dbus/Makefile.in +++ b/dbus/Makefile.in @@ -36,20 +36,23 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@DBUS_WIN_FALSE@libdbus_1_la_DEPENDENCIES = $(am__DEPENDENCIES_1) @DBUS_BUILD_TESTS_TRUE@TESTS = dbus-test$(EXEEXT) noinst_PROGRAMS = $(am__EXEEXT_1) subdir = dbus DIST_COMMON = $(dbusarchinclude_HEADERS) $(dbusinclude_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/dbus-arch-deps.h.in + $(srcdir)/dbus-arch-deps.h.in $(srcdir)/versioninfo.rc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = dbus-arch-deps.h +CONFIG_CLEAN_FILES = versioninfo.rc dbus-arch-deps.h CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -77,23 +80,89 @@ am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(dbusincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -libdbus_1_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__objects_1 = dbus-address.lo dbus-auth.lo dbus-auth-script.lo \ - dbus-bus.lo dbus-connection.lo dbus-credentials.lo \ - dbus-errors.lo dbus-keyring.lo dbus-marshal-header.lo \ - dbus-marshal-byteswap.lo dbus-marshal-recursive.lo \ - dbus-marshal-validate.lo dbus-message.lo dbus-misc.lo \ - dbus-object-tree.lo dbus-pending-call.lo dbus-resources.lo \ - dbus-server.lo dbus-server-debug-pipe.lo dbus-server-socket.lo \ - dbus-server-unix.lo dbus-sha.lo dbus-signature.lo \ - dbus-timeout.lo dbus-threads.lo dbus-transport.lo \ - dbus-transport-socket.lo dbus-transport-unix.lo \ - dbus-uuidgen.lo dbus-watch.lo -am__objects_2 = dbus-dataslot.lo dbus-hash.lo dbus-internals.lo \ - dbus-list.lo dbus-marshal-basic.lo dbus-memory.lo \ - dbus-mempool.lo dbus-string.lo dbus-sysdeps.lo \ - dbus-sysdeps-pthread.lo dbus-sysdeps-unix.lo dbus-userdb.lo -am_libdbus_1_la_OBJECTS = $(am__objects_1) $(am__objects_2) +am__libdbus_1_la_SOURCES_DIST = dbus-address.c dbus-auth.c dbus-auth.h \ + dbus-auth-script.c dbus-auth-script.h dbus-bus.c \ + dbus-connection.c dbus-connection-internal.h \ + dbus-credentials.c dbus-credentials.h dbus-errors.c \ + dbus-keyring.c dbus-keyring.h dbus-marshal-header.c \ + dbus-marshal-header.h dbus-marshal-byteswap.c \ + dbus-marshal-byteswap.h dbus-marshal-recursive.c \ + dbus-marshal-recursive.h dbus-marshal-validate.c \ + dbus-marshal-validate.h dbus-message.c dbus-message-internal.h \ + dbus-message-private.h dbus-misc.c dbus-nonce.h dbus-nonce.c \ + dbus-object-tree.c dbus-object-tree.h dbus-pending-call.c \ + dbus-pending-call-internal.h dbus-resources.c dbus-resources.h \ + dbus-server.c dbus-server-debug-pipe.c \ + dbus-server-debug-pipe.h dbus-server-protected.h \ + dbus-server-socket.c dbus-server-socket.h dbus-uuidgen.c \ + dbus-uuidgen.h dbus-server-unix.c dbus-server-unix.h \ + dbus-server-win.c dbus-server-win.h dbus-sha.c dbus-sha.h \ + dbus-signature.c dbus-timeout.c dbus-timeout.h \ + dbus-threads-internal.h dbus-threads.c dbus-transport.c \ + dbus-transport.h dbus-transport-protected.h \ + dbus-transport-socket.c dbus-transport-socket.h dbus-watch.c \ + dbus-watch.h dbus-dataslot.c dbus-dataslot.h dbus-file.c \ + dbus-file.h dbus-hash.c dbus-hash.h dbus-internals.c \ + dbus-internals.h dbus-list.c dbus-list.h dbus-marshal-basic.c \ + dbus-marshal-basic.h dbus-memory.c dbus-mempool.c \ + dbus-mempool.h dbus-pipe.c dbus-pipe.h dbus-string.c \ + dbus-string.h dbus-string-private.h dbus-server-launchd.h \ + dbus-server-launchd.c dbus-file-unix.c dbus-pipe-unix.c \ + dbus-sysdeps-unix.c dbus-sysdeps-unix.h dbus-sysdeps-pthread.c \ + dbus-transport-unix.c dbus-transport-unix.h dbus-userdb.c \ + dbus-userdb.h sd-daemon.c sd-daemon.h \ + dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c \ + dbus-file-win.c dbus-pipe-win.c dbus-sockets-win.h \ + dbus-sysdeps-win.c dbus-sysdeps-win.h \ + dbus-sysdeps-thread-win.c dbus-transport-win.c \ + dbus-transport-win.h dbus-sysdeps.c dbus-sysdeps.h +@DBUS_WIN_FALSE@am__objects_1 = libdbus_1_la-dbus-uuidgen.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-server-unix.lo +@DBUS_WIN_TRUE@am__objects_1 = libdbus_1_la-dbus-server-win.lo +am__objects_2 = libdbus_1_la-dbus-address.lo libdbus_1_la-dbus-auth.lo \ + libdbus_1_la-dbus-auth-script.lo libdbus_1_la-dbus-bus.lo \ + libdbus_1_la-dbus-connection.lo \ + libdbus_1_la-dbus-credentials.lo libdbus_1_la-dbus-errors.lo \ + libdbus_1_la-dbus-keyring.lo \ + libdbus_1_la-dbus-marshal-header.lo \ + libdbus_1_la-dbus-marshal-byteswap.lo \ + libdbus_1_la-dbus-marshal-recursive.lo \ + libdbus_1_la-dbus-marshal-validate.lo \ + libdbus_1_la-dbus-message.lo libdbus_1_la-dbus-misc.lo \ + libdbus_1_la-dbus-nonce.lo libdbus_1_la-dbus-object-tree.lo \ + libdbus_1_la-dbus-pending-call.lo \ + libdbus_1_la-dbus-resources.lo libdbus_1_la-dbus-server.lo \ + libdbus_1_la-dbus-server-debug-pipe.lo \ + libdbus_1_la-dbus-server-socket.lo $(am__objects_1) \ + libdbus_1_la-dbus-sha.lo libdbus_1_la-dbus-signature.lo \ + libdbus_1_la-dbus-timeout.lo libdbus_1_la-dbus-threads.lo \ + libdbus_1_la-dbus-transport.lo \ + libdbus_1_la-dbus-transport-socket.lo \ + libdbus_1_la-dbus-watch.lo +@DBUS_ENABLE_LAUNCHD_TRUE@@DBUS_WIN_FALSE@am__objects_3 = libdbus_1_la-dbus-server-launchd.lo +@DBUS_WINCE_TRUE@@DBUS_WIN_TRUE@am__objects_4 = libdbus_1_la-dbus-sysdeps-wince-glue.lo +@DBUS_WIN_FALSE@am__objects_5 = $(am__objects_3) \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-file-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-pipe-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-sysdeps-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-sysdeps-pthread.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-transport-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-dbus-userdb.lo \ +@DBUS_WIN_FALSE@ libdbus_1_la-sd-daemon.lo +@DBUS_WIN_TRUE@am__objects_5 = $(am__objects_4) \ +@DBUS_WIN_TRUE@ libdbus_1_la-dbus-file-win.lo \ +@DBUS_WIN_TRUE@ libdbus_1_la-dbus-pipe-win.lo \ +@DBUS_WIN_TRUE@ libdbus_1_la-dbus-sysdeps-win.lo \ +@DBUS_WIN_TRUE@ libdbus_1_la-dbus-sysdeps-thread-win.lo \ +@DBUS_WIN_TRUE@ libdbus_1_la-dbus-transport-win.lo +am__objects_6 = libdbus_1_la-dbus-dataslot.lo \ + libdbus_1_la-dbus-file.lo libdbus_1_la-dbus-hash.lo \ + libdbus_1_la-dbus-internals.lo libdbus_1_la-dbus-list.lo \ + libdbus_1_la-dbus-marshal-basic.lo libdbus_1_la-dbus-memory.lo \ + libdbus_1_la-dbus-mempool.lo libdbus_1_la-dbus-pipe.lo \ + libdbus_1_la-dbus-string.lo $(am__objects_5) \ + libdbus_1_la-dbus-sysdeps.lo +am_libdbus_1_la_OBJECTS = $(am__objects_2) $(am__objects_6) libdbus_1_la_OBJECTS = $(am_libdbus_1_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) @@ -101,25 +170,140 @@ am__v_lt_0 = --silent libdbus_1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdbus_1_la_LDFLAGS) $(LDFLAGS) -o $@ -libdbus_convenience_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am__objects_3 = dbus-auth-util.lo dbus-credentials-util.lo \ - dbus-mainloop.lo dbus-marshal-byteswap-util.lo \ - dbus-marshal-recursive-util.lo dbus-marshal-validate-util.lo \ - dbus-message-factory.lo dbus-message-util.lo dbus-shell.lo \ - dbus-spawn.lo dbus-string-util.lo dbus-sysdeps-util.lo \ - dbus-sysdeps-util-unix.lo dbus-test.lo dbus-userdb-util.lo -am_libdbus_convenience_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) -libdbus_convenience_la_OBJECTS = $(am_libdbus_convenience_la_OBJECTS) -libdbus_convenience_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +libdbus_internal_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__libdbus_internal_la_SOURCES_DIST = dbus-address.c dbus-auth.c \ + dbus-auth.h dbus-auth-script.c dbus-auth-script.h dbus-bus.c \ + dbus-connection.c dbus-connection-internal.h \ + dbus-credentials.c dbus-credentials.h dbus-errors.c \ + dbus-keyring.c dbus-keyring.h dbus-marshal-header.c \ + dbus-marshal-header.h dbus-marshal-byteswap.c \ + dbus-marshal-byteswap.h dbus-marshal-recursive.c \ + dbus-marshal-recursive.h dbus-marshal-validate.c \ + dbus-marshal-validate.h dbus-message.c dbus-message-internal.h \ + dbus-message-private.h dbus-misc.c dbus-nonce.h dbus-nonce.c \ + dbus-object-tree.c dbus-object-tree.h dbus-pending-call.c \ + dbus-pending-call-internal.h dbus-resources.c dbus-resources.h \ + dbus-server.c dbus-server-debug-pipe.c \ + dbus-server-debug-pipe.h dbus-server-protected.h \ + dbus-server-socket.c dbus-server-socket.h dbus-uuidgen.c \ + dbus-uuidgen.h dbus-server-unix.c dbus-server-unix.h \ + dbus-server-win.c dbus-server-win.h dbus-sha.c dbus-sha.h \ + dbus-signature.c dbus-timeout.c dbus-timeout.h \ + dbus-threads-internal.h dbus-threads.c dbus-transport.c \ + dbus-transport.h dbus-transport-protected.h \ + dbus-transport-socket.c dbus-transport-socket.h dbus-watch.c \ + dbus-watch.h dbus-dataslot.c dbus-dataslot.h dbus-file.c \ + dbus-file.h dbus-hash.c dbus-hash.h dbus-internals.c \ + dbus-internals.h dbus-list.c dbus-list.h dbus-marshal-basic.c \ + dbus-marshal-basic.h dbus-memory.c dbus-mempool.c \ + dbus-mempool.h dbus-pipe.c dbus-pipe.h dbus-string.c \ + dbus-string.h dbus-string-private.h dbus-server-launchd.h \ + dbus-server-launchd.c dbus-file-unix.c dbus-pipe-unix.c \ + dbus-sysdeps-unix.c dbus-sysdeps-unix.h dbus-sysdeps-pthread.c \ + dbus-transport-unix.c dbus-transport-unix.h dbus-userdb.c \ + dbus-userdb.h sd-daemon.c sd-daemon.h \ + dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c \ + dbus-file-win.c dbus-pipe-win.c dbus-sockets-win.h \ + dbus-sysdeps-win.c dbus-sysdeps-win.h \ + dbus-sysdeps-thread-win.c dbus-transport-win.c \ + dbus-transport-win.h dbus-sysdeps.c dbus-sysdeps.h \ + dbus-auth-util.c dbus-credentials-util.c dbus-mainloop.c \ + dbus-mainloop.h dbus-marshal-byteswap-util.c \ + dbus-marshal-recursive-util.c dbus-marshal-validate-util.c \ + dbus-message-factory.c dbus-message-factory.h \ + dbus-message-util.c dbus-shell.c dbus-shell.h \ + dbus-sysdeps-util-unix.c dbus-userdb-util.c dbus-spawn.c \ + dbus-sysdeps-util-win.c dbus-spawn-win.c dbus-spawn.h \ + dbus-string-util.c dbus-sysdeps-util.c dbus-test.c dbus-test.h +@DBUS_WIN_FALSE@am__objects_7 = libdbus_internal_la-dbus-uuidgen.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-server-unix.lo +@DBUS_WIN_TRUE@am__objects_7 = libdbus_internal_la-dbus-server-win.lo +am__objects_8 = libdbus_internal_la-dbus-address.lo \ + libdbus_internal_la-dbus-auth.lo \ + libdbus_internal_la-dbus-auth-script.lo \ + libdbus_internal_la-dbus-bus.lo \ + libdbus_internal_la-dbus-connection.lo \ + libdbus_internal_la-dbus-credentials.lo \ + libdbus_internal_la-dbus-errors.lo \ + libdbus_internal_la-dbus-keyring.lo \ + libdbus_internal_la-dbus-marshal-header.lo \ + libdbus_internal_la-dbus-marshal-byteswap.lo \ + libdbus_internal_la-dbus-marshal-recursive.lo \ + libdbus_internal_la-dbus-marshal-validate.lo \ + libdbus_internal_la-dbus-message.lo \ + libdbus_internal_la-dbus-misc.lo \ + libdbus_internal_la-dbus-nonce.lo \ + libdbus_internal_la-dbus-object-tree.lo \ + libdbus_internal_la-dbus-pending-call.lo \ + libdbus_internal_la-dbus-resources.lo \ + libdbus_internal_la-dbus-server.lo \ + libdbus_internal_la-dbus-server-debug-pipe.lo \ + libdbus_internal_la-dbus-server-socket.lo $(am__objects_7) \ + libdbus_internal_la-dbus-sha.lo \ + libdbus_internal_la-dbus-signature.lo \ + libdbus_internal_la-dbus-timeout.lo \ + libdbus_internal_la-dbus-threads.lo \ + libdbus_internal_la-dbus-transport.lo \ + libdbus_internal_la-dbus-transport-socket.lo \ + libdbus_internal_la-dbus-watch.lo +@DBUS_ENABLE_LAUNCHD_TRUE@@DBUS_WIN_FALSE@am__objects_9 = libdbus_internal_la-dbus-server-launchd.lo +@DBUS_WINCE_TRUE@@DBUS_WIN_TRUE@am__objects_10 = libdbus_internal_la-dbus-sysdeps-wince-glue.lo +@DBUS_WIN_FALSE@am__objects_11 = $(am__objects_9) \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-file-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-pipe-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-sysdeps-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-sysdeps-pthread.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-transport-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-userdb.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-sd-daemon.lo +@DBUS_WIN_TRUE@am__objects_11 = $(am__objects_10) \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-file-win.lo \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-pipe-win.lo \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-sysdeps-win.lo \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-sysdeps-thread-win.lo \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-transport-win.lo +am__objects_12 = libdbus_internal_la-dbus-dataslot.lo \ + libdbus_internal_la-dbus-file.lo \ + libdbus_internal_la-dbus-hash.lo \ + libdbus_internal_la-dbus-internals.lo \ + libdbus_internal_la-dbus-list.lo \ + libdbus_internal_la-dbus-marshal-basic.lo \ + libdbus_internal_la-dbus-memory.lo \ + libdbus_internal_la-dbus-mempool.lo \ + libdbus_internal_la-dbus-pipe.lo \ + libdbus_internal_la-dbus-string.lo $(am__objects_11) \ + libdbus_internal_la-dbus-sysdeps.lo +@DBUS_WIN_FALSE@am__objects_13 = \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-sysdeps-util-unix.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-userdb-util.lo \ +@DBUS_WIN_FALSE@ libdbus_internal_la-dbus-spawn.lo +@DBUS_WIN_TRUE@am__objects_13 = \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-sysdeps-util-win.lo \ +@DBUS_WIN_TRUE@ libdbus_internal_la-dbus-spawn-win.lo +am__objects_14 = libdbus_internal_la-dbus-auth-util.lo \ + libdbus_internal_la-dbus-credentials-util.lo \ + libdbus_internal_la-dbus-mainloop.lo \ + libdbus_internal_la-dbus-marshal-byteswap-util.lo \ + libdbus_internal_la-dbus-marshal-recursive-util.lo \ + libdbus_internal_la-dbus-marshal-validate-util.lo \ + libdbus_internal_la-dbus-message-factory.lo \ + libdbus_internal_la-dbus-message-util.lo \ + libdbus_internal_la-dbus-shell.lo $(am__objects_13) \ + libdbus_internal_la-dbus-string-util.lo \ + libdbus_internal_la-dbus-sysdeps-util.lo \ + libdbus_internal_la-dbus-test.lo +am_libdbus_internal_la_OBJECTS = $(am__objects_8) $(am__objects_12) \ + $(am__objects_14) +libdbus_internal_la_OBJECTS = $(am_libdbus_internal_la_OBJECTS) +libdbus_internal_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libdbus_convenience_la_LDFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) $(libdbus_internal_la_LDFLAGS) \ $(LDFLAGS) -o $@ @DBUS_BUILD_TESTS_TRUE@am__EXEEXT_1 = dbus-test$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_dbus_test_OBJECTS = dbus-test-main.$(OBJEXT) dbus_test_OBJECTS = $(am_dbus_test_OBJECTS) -dbus_test_DEPENDENCIES = libdbus-convenience.la $(am__DEPENDENCIES_1) +dbus_test_DEPENDENCIES = libdbus-internal.la $(am__DEPENDENCIES_1) dbus_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(dbus_test_LDFLAGS) $(LDFLAGS) -o $@ @@ -149,10 +333,10 @@ 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_0 = @echo " GEN " $@; -SOURCES = $(libdbus_1_la_SOURCES) $(libdbus_convenience_la_SOURCES) \ +SOURCES = $(libdbus_1_la_SOURCES) $(libdbus_internal_la_SOURCES) \ $(dbus_test_SOURCES) -DIST_SOURCES = $(libdbus_1_la_SOURCES) \ - $(libdbus_convenience_la_SOURCES) $(dbus_test_SOURCES) +DIST_SOURCES = $(am__libdbus_1_la_SOURCES_DIST) \ + $(am__libdbus_internal_la_SOURCES_DIST) $(dbus_test_SOURCES) HEADERS = $(dbusarchinclude_HEADERS) $(dbusinclude_HEADERS) ETAGS = etags CTAGS = ctags @@ -163,10 +347,13 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -198,6 +385,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -211,6 +400,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -224,6 +414,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -233,6 +424,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -248,6 +441,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -260,6 +454,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -289,6 +484,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -344,6 +540,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -357,6 +554,76 @@ INCLUDES = -I$(top_builddir) -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) @PIC_CFLAGS@ dbusincludedir = $(includedir)/dbus-1.0/dbus dbusarchincludedir = $(libdir)/dbus-1.0/include/dbus lib_LTLIBRARIES = libdbus-1.la + +# +# Deal with W32 .def and version-info.rc stuff +# +@DBUS_WIN_TRUE@SUFFIXES = rc +@DBUS_WIN_FALSE@dbus_res = +@DBUS_WIN_TRUE@dbus_res = versioninfo.o +@DBUS_WIN_FALSE@dbus_res_ldflag = +@DBUS_WIN_TRUE@dbus_res_ldflag = -Wl,$(dbus_res) +@DBUS_WIN_FALSE@no_undefined = +@DBUS_WIN_TRUE@no_undefined = -no-undefined +@DBUS_WIN_FALSE@export_symbols = -export-symbols-regex "^[^_].*" +@DBUS_WIN_TRUE@export_symbols = +@DBUS_WIN_TRUE@export_symvols_internal = +@DBUS_WIN_TRUE@libdbus_1_la_DEPENDENCIES = $(dbus_res) +@DBUS_WIN_FALSE@intllibs = @LTLIBINTL@ +@DBUS_WIN_TRUE@intllibs = +@DBUS_WIN_FALSE@export_symbols_internal = +@DBUS_WIN_FALSE@DBUS_LIB_arch_sources = \ +@DBUS_WIN_FALSE@ dbus-uuidgen.c \ +@DBUS_WIN_FALSE@ dbus-uuidgen.h \ +@DBUS_WIN_FALSE@ dbus-server-unix.c \ +@DBUS_WIN_FALSE@ dbus-server-unix.h + + +# +# Platform-dependent sources: +# +@DBUS_WIN_TRUE@DBUS_LIB_arch_sources = \ +@DBUS_WIN_TRUE@ dbus-server-win.c \ +@DBUS_WIN_TRUE@ dbus-server-win.h + +@DBUS_WINCE_FALSE@@DBUS_WIN_TRUE@wince_source = +@DBUS_WINCE_TRUE@@DBUS_WIN_TRUE@wince_source = dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c +@DBUS_WIN_FALSE@DBUS_SHARED_arch_sources = \ +@DBUS_WIN_FALSE@ $(launchd_source) \ +@DBUS_WIN_FALSE@ dbus-file-unix.c \ +@DBUS_WIN_FALSE@ dbus-pipe-unix.c \ +@DBUS_WIN_FALSE@ dbus-sysdeps-unix.c \ +@DBUS_WIN_FALSE@ dbus-sysdeps-unix.h \ +@DBUS_WIN_FALSE@ dbus-sysdeps-pthread.c \ +@DBUS_WIN_FALSE@ dbus-transport-unix.c \ +@DBUS_WIN_FALSE@ dbus-transport-unix.h \ +@DBUS_WIN_FALSE@ dbus-userdb.c \ +@DBUS_WIN_FALSE@ dbus-userdb.h \ +@DBUS_WIN_FALSE@ sd-daemon.c \ +@DBUS_WIN_FALSE@ sd-daemon.h + +@DBUS_WIN_TRUE@DBUS_SHARED_arch_sources = \ +@DBUS_WIN_TRUE@ $(wince_source) \ +@DBUS_WIN_TRUE@ dbus-file-win.c \ +@DBUS_WIN_TRUE@ dbus-pipe-win.c \ +@DBUS_WIN_TRUE@ dbus-sockets-win.h \ +@DBUS_WIN_TRUE@ dbus-sysdeps-win.c \ +@DBUS_WIN_TRUE@ dbus-sysdeps-win.h \ +@DBUS_WIN_TRUE@ dbus-sysdeps-thread-win.c \ +@DBUS_WIN_TRUE@ dbus-transport-win.c \ +@DBUS_WIN_TRUE@ dbus-transport-win.h + +@DBUS_WIN_FALSE@DBUS_UTIL_arch_sources = \ +@DBUS_WIN_FALSE@ dbus-sysdeps-util-unix.c \ +@DBUS_WIN_FALSE@ dbus-userdb-util.c \ +@DBUS_WIN_FALSE@ dbus-spawn.c + +@DBUS_WIN_TRUE@DBUS_UTIL_arch_sources = \ +@DBUS_WIN_TRUE@ dbus-sysdeps-util-win.c \ +@DBUS_WIN_TRUE@ dbus-spawn-win.c + +@DBUS_ENABLE_LAUNCHD_FALSE@@DBUS_WIN_FALSE@launchd_source = +@DBUS_ENABLE_LAUNCHD_TRUE@@DBUS_WIN_FALSE@launchd_source = dbus-server-launchd.h dbus-server-launchd.c dbusinclude_HEADERS = \ dbus.h \ dbus-address.h \ @@ -407,6 +674,8 @@ DBUS_LIB_SOURCES = \ dbus-message-internal.h \ dbus-message-private.h \ dbus-misc.c \ + dbus-nonce.h \ + dbus-nonce.c \ dbus-object-tree.c \ dbus-object-tree.h \ dbus-pending-call.c \ @@ -419,8 +688,7 @@ DBUS_LIB_SOURCES = \ dbus-server-protected.h \ dbus-server-socket.c \ dbus-server-socket.h \ - dbus-server-unix.c \ - dbus-server-unix.h \ + $(DBUS_LIB_arch_sources) \ dbus-sha.c \ dbus-sha.h \ dbus-signature.c \ @@ -433,21 +701,19 @@ DBUS_LIB_SOURCES = \ dbus-transport-protected.h \ dbus-transport-socket.c \ dbus-transport-socket.h \ - dbus-transport-unix.c \ - dbus-transport-unix.h \ - dbus-uuidgen.c \ - dbus-uuidgen.h \ dbus-watch.c \ dbus-watch.h ### source code that goes in the installed client library -### AND is generic utility functionality used by the -### daemon or test programs (all symbols in here should +### AND is generic utility functionality used by the +### daemon or test programs (all symbols in here should ### be underscore-prefixed) DBUS_SHARED_SOURCES = \ dbus-dataslot.c \ dbus-dataslot.h \ + dbus-file.c \ + dbus-file.h \ dbus-hash.c \ dbus-hash.h \ dbus-internals.c \ @@ -459,22 +725,20 @@ DBUS_SHARED_SOURCES = \ dbus-memory.c \ dbus-mempool.c \ dbus-mempool.h \ + dbus-pipe.c \ + dbus-pipe.h \ dbus-string.c \ dbus-string.h \ dbus-string-private.h \ + $(DBUS_SHARED_arch_sources) \ dbus-sysdeps.c \ - dbus-sysdeps.h \ - dbus-sysdeps-pthread.c \ - dbus-sysdeps-unix.c \ - dbus-sysdeps-unix.h \ - dbus-userdb.c \ - dbus-userdb.h + dbus-sysdeps.h ### source code that is generic utility functionality used ### by the bus daemon or test apps, but is NOT included -### in the D-Bus client library (all symbols in here -### should be underscore-prefixed but don't really need +### in the D-Bus client library (all symbols in here +### should be underscore-prefixed but don't really need ### to be unless they move to DBUS_SHARED_SOURCES later) DBUS_UTIL_SOURCES = \ dbus-auth-util.c \ @@ -489,42 +753,42 @@ DBUS_UTIL_SOURCES = \ dbus-message-util.c \ dbus-shell.c \ dbus-shell.h \ - dbus-spawn.c \ + $(DBUS_UTIL_arch_sources) \ dbus-spawn.h \ dbus-string-util.c \ dbus-sysdeps-util.c \ - dbus-sysdeps-util-unix.c \ dbus-test.c \ - dbus-test.h \ - dbus-userdb-util.c + dbus-test.h libdbus_1_la_SOURCES = \ $(DBUS_LIB_SOURCES) \ $(DBUS_SHARED_SOURCES) -libdbus_convenience_la_SOURCES = \ +libdbus_internal_la_SOURCES = \ $(DBUS_LIB_SOURCES) \ $(DBUS_SHARED_SOURCES) \ $(DBUS_UTIL_SOURCES) BUILT_SOURCES = $(dbusarchinclude_HEADERS) EXTRA_DIST = dbus-arch-deps.h.in -noinst_LTLIBRARIES = libdbus-convenience.la +noinst_LTLIBRARIES = libdbus-internal.la +libdbus_1_la_CPPFLAGS = -Ddbus_1_EXPORTS libdbus_1_la_LIBADD = $(DBUS_CLIENT_LIBS) -libdbus_1_la_LDFLAGS = -export-symbols-regex "^[^_].*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@ -libdbus_convenience_la_LIBADD = $(DBUS_CLIENT_LIBS) -libdbus_convenience_la_LDFLAGS = @R_DYNAMIC_LDFLAG@ +libdbus_1_la_LDFLAGS = $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@ +libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD +libdbus_internal_la_LIBADD = $(DBUS_CLIENT_LIBS) +libdbus_internal_la_LDFLAGS = $(export_symbols_internal) @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus dbus_test_SOURCES = \ dbus-test-main.c -dbus_test_LDADD = libdbus-convenience.la $(DBUS_TEST_LIBS) +dbus_test_LDADD = libdbus-internal.la $(DBUS_TEST_LIBS) dbus_test_LDFLAGS = @R_DYNAMIC_LDFLAG@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: rc .c .lo .o .obj .rc $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -555,6 +819,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +versioninfo.rc: $(top_builddir)/config.status $(srcdir)/versioninfo.rc.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ dbus-arch-deps.h: $(top_builddir)/config.status $(srcdir)/dbus-arch-deps.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @@ -599,8 +865,8 @@ clean-noinstLTLIBRARIES: done libdbus-1.la: $(libdbus_1_la_OBJECTS) $(libdbus_1_la_DEPENDENCIES) $(AM_V_CCLD)$(libdbus_1_la_LINK) -rpath $(libdir) $(libdbus_1_la_OBJECTS) $(libdbus_1_la_LIBADD) $(LIBS) -libdbus-convenience.la: $(libdbus_convenience_la_OBJECTS) $(libdbus_convenience_la_DEPENDENCIES) - $(AM_V_CCLD)$(libdbus_convenience_la_LINK) $(libdbus_convenience_la_OBJECTS) $(libdbus_convenience_la_LIBADD) $(LIBS) +libdbus-internal.la: $(libdbus_internal_la_OBJECTS) $(libdbus_internal_la_DEPENDENCIES) + $(AM_V_CCLD)$(libdbus_internal_la_LINK) $(libdbus_internal_la_OBJECTS) $(libdbus_internal_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -620,64 +886,136 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-address.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-auth-script.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-auth-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-auth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-bus.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-connection.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-credentials-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-credentials.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-dataslot.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-errors.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-hash.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-internals.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-keyring.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-mainloop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-basic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-byteswap-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-byteswap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-header.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-recursive-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-recursive.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-validate-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-marshal-validate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-memory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-mempool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-message-factory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-message-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-object-tree.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-pending-call.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-resources.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-server-debug-pipe.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-server-socket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-server-unix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-server.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-sha.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-shell.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-signature.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-spawn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-string-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-sysdeps-pthread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-sysdeps-unix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-sysdeps-util-unix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-sysdeps-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-sysdeps.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-test-main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-test.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-threads.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-timeout.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-transport-socket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-transport-unix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-transport.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-userdb-util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-userdb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-uuidgen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-watch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-address.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-auth-script.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-auth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-bus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-connection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-credentials.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-dataslot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-errors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-file-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-file-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-internals.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-keyring.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-marshal-basic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-marshal-byteswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-marshal-header.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-marshal-recursive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-marshal-validate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-memory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-mempool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-message.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-nonce.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-object-tree.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-pending-call.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-pipe-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-pipe-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-pipe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-resources.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-server-debug-pipe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-server-launchd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-server-socket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-server-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-server-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-signature.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sysdeps-pthread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sysdeps-thread-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sysdeps-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sysdeps-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-sysdeps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-threads.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-timeout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-transport-socket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-transport-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-transport-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-transport.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-userdb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-uuidgen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-dbus-watch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_1_la-sd-daemon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-address.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-auth-script.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-auth-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-auth.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-bus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-connection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-credentials-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-credentials.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-dataslot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-errors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-file-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-file-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-internals.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-keyring.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-mainloop.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-basic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-header.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-validate-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-marshal-validate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-memory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-mempool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-message-factory.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-message-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-message.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-nonce.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-object-tree.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-pending-call.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-pipe-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-pipe-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-pipe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-resources.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-server-debug-pipe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-server-launchd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-server-socket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-server-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-server-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-shell.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-signature.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-spawn-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-spawn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-string-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-pthread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-thread-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-sysdeps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-test.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-threads.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-timeout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-transport-socket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-transport-unix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-transport-win.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-transport.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-userdb-util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-userdb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-uuidgen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-dbus-watch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_internal_la-sd-daemon.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -703,6 +1041,1038 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +libdbus_1_la-dbus-address.lo: dbus-address.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-address.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-address.Tpo -c -o libdbus_1_la-dbus-address.lo `test -f 'dbus-address.c' || echo '$(srcdir)/'`dbus-address.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-address.Tpo $(DEPDIR)/libdbus_1_la-dbus-address.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-address.c' object='libdbus_1_la-dbus-address.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-address.lo `test -f 'dbus-address.c' || echo '$(srcdir)/'`dbus-address.c + +libdbus_1_la-dbus-auth.lo: dbus-auth.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-auth.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-auth.Tpo -c -o libdbus_1_la-dbus-auth.lo `test -f 'dbus-auth.c' || echo '$(srcdir)/'`dbus-auth.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-auth.Tpo $(DEPDIR)/libdbus_1_la-dbus-auth.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-auth.c' object='libdbus_1_la-dbus-auth.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-auth.lo `test -f 'dbus-auth.c' || echo '$(srcdir)/'`dbus-auth.c + +libdbus_1_la-dbus-auth-script.lo: dbus-auth-script.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-auth-script.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-auth-script.Tpo -c -o libdbus_1_la-dbus-auth-script.lo `test -f 'dbus-auth-script.c' || echo '$(srcdir)/'`dbus-auth-script.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-auth-script.Tpo $(DEPDIR)/libdbus_1_la-dbus-auth-script.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-auth-script.c' object='libdbus_1_la-dbus-auth-script.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-auth-script.lo `test -f 'dbus-auth-script.c' || echo '$(srcdir)/'`dbus-auth-script.c + +libdbus_1_la-dbus-bus.lo: dbus-bus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-bus.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-bus.Tpo -c -o libdbus_1_la-dbus-bus.lo `test -f 'dbus-bus.c' || echo '$(srcdir)/'`dbus-bus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-bus.Tpo $(DEPDIR)/libdbus_1_la-dbus-bus.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-bus.c' object='libdbus_1_la-dbus-bus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-bus.lo `test -f 'dbus-bus.c' || echo '$(srcdir)/'`dbus-bus.c + +libdbus_1_la-dbus-connection.lo: dbus-connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-connection.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-connection.Tpo -c -o libdbus_1_la-dbus-connection.lo `test -f 'dbus-connection.c' || echo '$(srcdir)/'`dbus-connection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-connection.Tpo $(DEPDIR)/libdbus_1_la-dbus-connection.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-connection.c' object='libdbus_1_la-dbus-connection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-connection.lo `test -f 'dbus-connection.c' || echo '$(srcdir)/'`dbus-connection.c + +libdbus_1_la-dbus-credentials.lo: dbus-credentials.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-credentials.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-credentials.Tpo -c -o libdbus_1_la-dbus-credentials.lo `test -f 'dbus-credentials.c' || echo '$(srcdir)/'`dbus-credentials.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-credentials.Tpo $(DEPDIR)/libdbus_1_la-dbus-credentials.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-credentials.c' object='libdbus_1_la-dbus-credentials.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-credentials.lo `test -f 'dbus-credentials.c' || echo '$(srcdir)/'`dbus-credentials.c + +libdbus_1_la-dbus-errors.lo: dbus-errors.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-errors.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-errors.Tpo -c -o libdbus_1_la-dbus-errors.lo `test -f 'dbus-errors.c' || echo '$(srcdir)/'`dbus-errors.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-errors.Tpo $(DEPDIR)/libdbus_1_la-dbus-errors.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-errors.c' object='libdbus_1_la-dbus-errors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-errors.lo `test -f 'dbus-errors.c' || echo '$(srcdir)/'`dbus-errors.c + +libdbus_1_la-dbus-keyring.lo: dbus-keyring.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-keyring.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-keyring.Tpo -c -o libdbus_1_la-dbus-keyring.lo `test -f 'dbus-keyring.c' || echo '$(srcdir)/'`dbus-keyring.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-keyring.Tpo $(DEPDIR)/libdbus_1_la-dbus-keyring.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-keyring.c' object='libdbus_1_la-dbus-keyring.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-keyring.lo `test -f 'dbus-keyring.c' || echo '$(srcdir)/'`dbus-keyring.c + +libdbus_1_la-dbus-marshal-header.lo: dbus-marshal-header.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-marshal-header.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-marshal-header.Tpo -c -o libdbus_1_la-dbus-marshal-header.lo `test -f 'dbus-marshal-header.c' || echo '$(srcdir)/'`dbus-marshal-header.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-marshal-header.Tpo $(DEPDIR)/libdbus_1_la-dbus-marshal-header.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-header.c' object='libdbus_1_la-dbus-marshal-header.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-marshal-header.lo `test -f 'dbus-marshal-header.c' || echo '$(srcdir)/'`dbus-marshal-header.c + +libdbus_1_la-dbus-marshal-byteswap.lo: dbus-marshal-byteswap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-marshal-byteswap.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-marshal-byteswap.Tpo -c -o libdbus_1_la-dbus-marshal-byteswap.lo `test -f 'dbus-marshal-byteswap.c' || echo '$(srcdir)/'`dbus-marshal-byteswap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-marshal-byteswap.Tpo $(DEPDIR)/libdbus_1_la-dbus-marshal-byteswap.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-byteswap.c' object='libdbus_1_la-dbus-marshal-byteswap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-marshal-byteswap.lo `test -f 'dbus-marshal-byteswap.c' || echo '$(srcdir)/'`dbus-marshal-byteswap.c + +libdbus_1_la-dbus-marshal-recursive.lo: dbus-marshal-recursive.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-marshal-recursive.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-marshal-recursive.Tpo -c -o libdbus_1_la-dbus-marshal-recursive.lo `test -f 'dbus-marshal-recursive.c' || echo '$(srcdir)/'`dbus-marshal-recursive.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-marshal-recursive.Tpo $(DEPDIR)/libdbus_1_la-dbus-marshal-recursive.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-recursive.c' object='libdbus_1_la-dbus-marshal-recursive.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-marshal-recursive.lo `test -f 'dbus-marshal-recursive.c' || echo '$(srcdir)/'`dbus-marshal-recursive.c + +libdbus_1_la-dbus-marshal-validate.lo: dbus-marshal-validate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-marshal-validate.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-marshal-validate.Tpo -c -o libdbus_1_la-dbus-marshal-validate.lo `test -f 'dbus-marshal-validate.c' || echo '$(srcdir)/'`dbus-marshal-validate.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-marshal-validate.Tpo $(DEPDIR)/libdbus_1_la-dbus-marshal-validate.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-validate.c' object='libdbus_1_la-dbus-marshal-validate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-marshal-validate.lo `test -f 'dbus-marshal-validate.c' || echo '$(srcdir)/'`dbus-marshal-validate.c + +libdbus_1_la-dbus-message.lo: dbus-message.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-message.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-message.Tpo -c -o libdbus_1_la-dbus-message.lo `test -f 'dbus-message.c' || echo '$(srcdir)/'`dbus-message.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-message.Tpo $(DEPDIR)/libdbus_1_la-dbus-message.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-message.c' object='libdbus_1_la-dbus-message.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-message.lo `test -f 'dbus-message.c' || echo '$(srcdir)/'`dbus-message.c + +libdbus_1_la-dbus-misc.lo: dbus-misc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-misc.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-misc.Tpo -c -o libdbus_1_la-dbus-misc.lo `test -f 'dbus-misc.c' || echo '$(srcdir)/'`dbus-misc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-misc.Tpo $(DEPDIR)/libdbus_1_la-dbus-misc.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-misc.c' object='libdbus_1_la-dbus-misc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-misc.lo `test -f 'dbus-misc.c' || echo '$(srcdir)/'`dbus-misc.c + +libdbus_1_la-dbus-nonce.lo: dbus-nonce.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-nonce.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-nonce.Tpo -c -o libdbus_1_la-dbus-nonce.lo `test -f 'dbus-nonce.c' || echo '$(srcdir)/'`dbus-nonce.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-nonce.Tpo $(DEPDIR)/libdbus_1_la-dbus-nonce.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-nonce.c' object='libdbus_1_la-dbus-nonce.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-nonce.lo `test -f 'dbus-nonce.c' || echo '$(srcdir)/'`dbus-nonce.c + +libdbus_1_la-dbus-object-tree.lo: dbus-object-tree.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-object-tree.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-object-tree.Tpo -c -o libdbus_1_la-dbus-object-tree.lo `test -f 'dbus-object-tree.c' || echo '$(srcdir)/'`dbus-object-tree.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-object-tree.Tpo $(DEPDIR)/libdbus_1_la-dbus-object-tree.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-object-tree.c' object='libdbus_1_la-dbus-object-tree.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-object-tree.lo `test -f 'dbus-object-tree.c' || echo '$(srcdir)/'`dbus-object-tree.c + +libdbus_1_la-dbus-pending-call.lo: dbus-pending-call.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-pending-call.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-pending-call.Tpo -c -o libdbus_1_la-dbus-pending-call.lo `test -f 'dbus-pending-call.c' || echo '$(srcdir)/'`dbus-pending-call.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-pending-call.Tpo $(DEPDIR)/libdbus_1_la-dbus-pending-call.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pending-call.c' object='libdbus_1_la-dbus-pending-call.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-pending-call.lo `test -f 'dbus-pending-call.c' || echo '$(srcdir)/'`dbus-pending-call.c + +libdbus_1_la-dbus-resources.lo: dbus-resources.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-resources.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-resources.Tpo -c -o libdbus_1_la-dbus-resources.lo `test -f 'dbus-resources.c' || echo '$(srcdir)/'`dbus-resources.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-resources.Tpo $(DEPDIR)/libdbus_1_la-dbus-resources.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-resources.c' object='libdbus_1_la-dbus-resources.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-resources.lo `test -f 'dbus-resources.c' || echo '$(srcdir)/'`dbus-resources.c + +libdbus_1_la-dbus-server.lo: dbus-server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-server.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-server.Tpo -c -o libdbus_1_la-dbus-server.lo `test -f 'dbus-server.c' || echo '$(srcdir)/'`dbus-server.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-server.Tpo $(DEPDIR)/libdbus_1_la-dbus-server.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server.c' object='libdbus_1_la-dbus-server.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-server.lo `test -f 'dbus-server.c' || echo '$(srcdir)/'`dbus-server.c + +libdbus_1_la-dbus-server-debug-pipe.lo: dbus-server-debug-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-server-debug-pipe.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-server-debug-pipe.Tpo -c -o libdbus_1_la-dbus-server-debug-pipe.lo `test -f 'dbus-server-debug-pipe.c' || echo '$(srcdir)/'`dbus-server-debug-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-server-debug-pipe.Tpo $(DEPDIR)/libdbus_1_la-dbus-server-debug-pipe.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-debug-pipe.c' object='libdbus_1_la-dbus-server-debug-pipe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-server-debug-pipe.lo `test -f 'dbus-server-debug-pipe.c' || echo '$(srcdir)/'`dbus-server-debug-pipe.c + +libdbus_1_la-dbus-server-socket.lo: dbus-server-socket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-server-socket.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-server-socket.Tpo -c -o libdbus_1_la-dbus-server-socket.lo `test -f 'dbus-server-socket.c' || echo '$(srcdir)/'`dbus-server-socket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-server-socket.Tpo $(DEPDIR)/libdbus_1_la-dbus-server-socket.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-socket.c' object='libdbus_1_la-dbus-server-socket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-server-socket.lo `test -f 'dbus-server-socket.c' || echo '$(srcdir)/'`dbus-server-socket.c + +libdbus_1_la-dbus-uuidgen.lo: dbus-uuidgen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-uuidgen.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-uuidgen.Tpo -c -o libdbus_1_la-dbus-uuidgen.lo `test -f 'dbus-uuidgen.c' || echo '$(srcdir)/'`dbus-uuidgen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-uuidgen.Tpo $(DEPDIR)/libdbus_1_la-dbus-uuidgen.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-uuidgen.c' object='libdbus_1_la-dbus-uuidgen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-uuidgen.lo `test -f 'dbus-uuidgen.c' || echo '$(srcdir)/'`dbus-uuidgen.c + +libdbus_1_la-dbus-server-unix.lo: dbus-server-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-server-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-server-unix.Tpo -c -o libdbus_1_la-dbus-server-unix.lo `test -f 'dbus-server-unix.c' || echo '$(srcdir)/'`dbus-server-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-server-unix.Tpo $(DEPDIR)/libdbus_1_la-dbus-server-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-unix.c' object='libdbus_1_la-dbus-server-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-server-unix.lo `test -f 'dbus-server-unix.c' || echo '$(srcdir)/'`dbus-server-unix.c + +libdbus_1_la-dbus-server-win.lo: dbus-server-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-server-win.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-server-win.Tpo -c -o libdbus_1_la-dbus-server-win.lo `test -f 'dbus-server-win.c' || echo '$(srcdir)/'`dbus-server-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-server-win.Tpo $(DEPDIR)/libdbus_1_la-dbus-server-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-win.c' object='libdbus_1_la-dbus-server-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-server-win.lo `test -f 'dbus-server-win.c' || echo '$(srcdir)/'`dbus-server-win.c + +libdbus_1_la-dbus-sha.lo: dbus-sha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sha.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sha.Tpo -c -o libdbus_1_la-dbus-sha.lo `test -f 'dbus-sha.c' || echo '$(srcdir)/'`dbus-sha.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sha.Tpo $(DEPDIR)/libdbus_1_la-dbus-sha.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sha.c' object='libdbus_1_la-dbus-sha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sha.lo `test -f 'dbus-sha.c' || echo '$(srcdir)/'`dbus-sha.c + +libdbus_1_la-dbus-signature.lo: dbus-signature.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-signature.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-signature.Tpo -c -o libdbus_1_la-dbus-signature.lo `test -f 'dbus-signature.c' || echo '$(srcdir)/'`dbus-signature.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-signature.Tpo $(DEPDIR)/libdbus_1_la-dbus-signature.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-signature.c' object='libdbus_1_la-dbus-signature.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-signature.lo `test -f 'dbus-signature.c' || echo '$(srcdir)/'`dbus-signature.c + +libdbus_1_la-dbus-timeout.lo: dbus-timeout.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-timeout.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-timeout.Tpo -c -o libdbus_1_la-dbus-timeout.lo `test -f 'dbus-timeout.c' || echo '$(srcdir)/'`dbus-timeout.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-timeout.Tpo $(DEPDIR)/libdbus_1_la-dbus-timeout.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-timeout.c' object='libdbus_1_la-dbus-timeout.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-timeout.lo `test -f 'dbus-timeout.c' || echo '$(srcdir)/'`dbus-timeout.c + +libdbus_1_la-dbus-threads.lo: dbus-threads.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-threads.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-threads.Tpo -c -o libdbus_1_la-dbus-threads.lo `test -f 'dbus-threads.c' || echo '$(srcdir)/'`dbus-threads.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-threads.Tpo $(DEPDIR)/libdbus_1_la-dbus-threads.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-threads.c' object='libdbus_1_la-dbus-threads.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-threads.lo `test -f 'dbus-threads.c' || echo '$(srcdir)/'`dbus-threads.c + +libdbus_1_la-dbus-transport.lo: dbus-transport.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-transport.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-transport.Tpo -c -o libdbus_1_la-dbus-transport.lo `test -f 'dbus-transport.c' || echo '$(srcdir)/'`dbus-transport.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-transport.Tpo $(DEPDIR)/libdbus_1_la-dbus-transport.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport.c' object='libdbus_1_la-dbus-transport.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-transport.lo `test -f 'dbus-transport.c' || echo '$(srcdir)/'`dbus-transport.c + +libdbus_1_la-dbus-transport-socket.lo: dbus-transport-socket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-transport-socket.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-transport-socket.Tpo -c -o libdbus_1_la-dbus-transport-socket.lo `test -f 'dbus-transport-socket.c' || echo '$(srcdir)/'`dbus-transport-socket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-transport-socket.Tpo $(DEPDIR)/libdbus_1_la-dbus-transport-socket.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport-socket.c' object='libdbus_1_la-dbus-transport-socket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-transport-socket.lo `test -f 'dbus-transport-socket.c' || echo '$(srcdir)/'`dbus-transport-socket.c + +libdbus_1_la-dbus-watch.lo: dbus-watch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-watch.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-watch.Tpo -c -o libdbus_1_la-dbus-watch.lo `test -f 'dbus-watch.c' || echo '$(srcdir)/'`dbus-watch.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-watch.Tpo $(DEPDIR)/libdbus_1_la-dbus-watch.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-watch.c' object='libdbus_1_la-dbus-watch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-watch.lo `test -f 'dbus-watch.c' || echo '$(srcdir)/'`dbus-watch.c + +libdbus_1_la-dbus-dataslot.lo: dbus-dataslot.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-dataslot.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-dataslot.Tpo -c -o libdbus_1_la-dbus-dataslot.lo `test -f 'dbus-dataslot.c' || echo '$(srcdir)/'`dbus-dataslot.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-dataslot.Tpo $(DEPDIR)/libdbus_1_la-dbus-dataslot.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-dataslot.c' object='libdbus_1_la-dbus-dataslot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-dataslot.lo `test -f 'dbus-dataslot.c' || echo '$(srcdir)/'`dbus-dataslot.c + +libdbus_1_la-dbus-file.lo: dbus-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-file.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-file.Tpo -c -o libdbus_1_la-dbus-file.lo `test -f 'dbus-file.c' || echo '$(srcdir)/'`dbus-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-file.Tpo $(DEPDIR)/libdbus_1_la-dbus-file.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-file.c' object='libdbus_1_la-dbus-file.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-file.lo `test -f 'dbus-file.c' || echo '$(srcdir)/'`dbus-file.c + +libdbus_1_la-dbus-hash.lo: dbus-hash.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-hash.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-hash.Tpo -c -o libdbus_1_la-dbus-hash.lo `test -f 'dbus-hash.c' || echo '$(srcdir)/'`dbus-hash.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-hash.Tpo $(DEPDIR)/libdbus_1_la-dbus-hash.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-hash.c' object='libdbus_1_la-dbus-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-hash.lo `test -f 'dbus-hash.c' || echo '$(srcdir)/'`dbus-hash.c + +libdbus_1_la-dbus-internals.lo: dbus-internals.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-internals.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-internals.Tpo -c -o libdbus_1_la-dbus-internals.lo `test -f 'dbus-internals.c' || echo '$(srcdir)/'`dbus-internals.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-internals.Tpo $(DEPDIR)/libdbus_1_la-dbus-internals.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-internals.c' object='libdbus_1_la-dbus-internals.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-internals.lo `test -f 'dbus-internals.c' || echo '$(srcdir)/'`dbus-internals.c + +libdbus_1_la-dbus-list.lo: dbus-list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-list.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-list.Tpo -c -o libdbus_1_la-dbus-list.lo `test -f 'dbus-list.c' || echo '$(srcdir)/'`dbus-list.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-list.Tpo $(DEPDIR)/libdbus_1_la-dbus-list.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-list.c' object='libdbus_1_la-dbus-list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-list.lo `test -f 'dbus-list.c' || echo '$(srcdir)/'`dbus-list.c + +libdbus_1_la-dbus-marshal-basic.lo: dbus-marshal-basic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-marshal-basic.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-marshal-basic.Tpo -c -o libdbus_1_la-dbus-marshal-basic.lo `test -f 'dbus-marshal-basic.c' || echo '$(srcdir)/'`dbus-marshal-basic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-marshal-basic.Tpo $(DEPDIR)/libdbus_1_la-dbus-marshal-basic.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-basic.c' object='libdbus_1_la-dbus-marshal-basic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-marshal-basic.lo `test -f 'dbus-marshal-basic.c' || echo '$(srcdir)/'`dbus-marshal-basic.c + +libdbus_1_la-dbus-memory.lo: dbus-memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-memory.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-memory.Tpo -c -o libdbus_1_la-dbus-memory.lo `test -f 'dbus-memory.c' || echo '$(srcdir)/'`dbus-memory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-memory.Tpo $(DEPDIR)/libdbus_1_la-dbus-memory.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-memory.c' object='libdbus_1_la-dbus-memory.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-memory.lo `test -f 'dbus-memory.c' || echo '$(srcdir)/'`dbus-memory.c + +libdbus_1_la-dbus-mempool.lo: dbus-mempool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-mempool.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-mempool.Tpo -c -o libdbus_1_la-dbus-mempool.lo `test -f 'dbus-mempool.c' || echo '$(srcdir)/'`dbus-mempool.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-mempool.Tpo $(DEPDIR)/libdbus_1_la-dbus-mempool.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-mempool.c' object='libdbus_1_la-dbus-mempool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-mempool.lo `test -f 'dbus-mempool.c' || echo '$(srcdir)/'`dbus-mempool.c + +libdbus_1_la-dbus-pipe.lo: dbus-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-pipe.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-pipe.Tpo -c -o libdbus_1_la-dbus-pipe.lo `test -f 'dbus-pipe.c' || echo '$(srcdir)/'`dbus-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-pipe.Tpo $(DEPDIR)/libdbus_1_la-dbus-pipe.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pipe.c' object='libdbus_1_la-dbus-pipe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-pipe.lo `test -f 'dbus-pipe.c' || echo '$(srcdir)/'`dbus-pipe.c + +libdbus_1_la-dbus-string.lo: dbus-string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-string.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-string.Tpo -c -o libdbus_1_la-dbus-string.lo `test -f 'dbus-string.c' || echo '$(srcdir)/'`dbus-string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-string.Tpo $(DEPDIR)/libdbus_1_la-dbus-string.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-string.c' object='libdbus_1_la-dbus-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-string.lo `test -f 'dbus-string.c' || echo '$(srcdir)/'`dbus-string.c + +libdbus_1_la-dbus-server-launchd.lo: dbus-server-launchd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-server-launchd.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-server-launchd.Tpo -c -o libdbus_1_la-dbus-server-launchd.lo `test -f 'dbus-server-launchd.c' || echo '$(srcdir)/'`dbus-server-launchd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-server-launchd.Tpo $(DEPDIR)/libdbus_1_la-dbus-server-launchd.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-launchd.c' object='libdbus_1_la-dbus-server-launchd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-server-launchd.lo `test -f 'dbus-server-launchd.c' || echo '$(srcdir)/'`dbus-server-launchd.c + +libdbus_1_la-dbus-file-unix.lo: dbus-file-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-file-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-file-unix.Tpo -c -o libdbus_1_la-dbus-file-unix.lo `test -f 'dbus-file-unix.c' || echo '$(srcdir)/'`dbus-file-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-file-unix.Tpo $(DEPDIR)/libdbus_1_la-dbus-file-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-file-unix.c' object='libdbus_1_la-dbus-file-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-file-unix.lo `test -f 'dbus-file-unix.c' || echo '$(srcdir)/'`dbus-file-unix.c + +libdbus_1_la-dbus-pipe-unix.lo: dbus-pipe-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-pipe-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-pipe-unix.Tpo -c -o libdbus_1_la-dbus-pipe-unix.lo `test -f 'dbus-pipe-unix.c' || echo '$(srcdir)/'`dbus-pipe-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-pipe-unix.Tpo $(DEPDIR)/libdbus_1_la-dbus-pipe-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pipe-unix.c' object='libdbus_1_la-dbus-pipe-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-pipe-unix.lo `test -f 'dbus-pipe-unix.c' || echo '$(srcdir)/'`dbus-pipe-unix.c + +libdbus_1_la-dbus-sysdeps-unix.lo: dbus-sysdeps-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps-unix.Tpo -c -o libdbus_1_la-dbus-sysdeps-unix.lo `test -f 'dbus-sysdeps-unix.c' || echo '$(srcdir)/'`dbus-sysdeps-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps-unix.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-unix.c' object='libdbus_1_la-dbus-sysdeps-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sysdeps-unix.lo `test -f 'dbus-sysdeps-unix.c' || echo '$(srcdir)/'`dbus-sysdeps-unix.c + +libdbus_1_la-dbus-sysdeps-pthread.lo: dbus-sysdeps-pthread.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps-pthread.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps-pthread.Tpo -c -o libdbus_1_la-dbus-sysdeps-pthread.lo `test -f 'dbus-sysdeps-pthread.c' || echo '$(srcdir)/'`dbus-sysdeps-pthread.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps-pthread.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps-pthread.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-pthread.c' object='libdbus_1_la-dbus-sysdeps-pthread.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sysdeps-pthread.lo `test -f 'dbus-sysdeps-pthread.c' || echo '$(srcdir)/'`dbus-sysdeps-pthread.c + +libdbus_1_la-dbus-transport-unix.lo: dbus-transport-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-transport-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-transport-unix.Tpo -c -o libdbus_1_la-dbus-transport-unix.lo `test -f 'dbus-transport-unix.c' || echo '$(srcdir)/'`dbus-transport-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-transport-unix.Tpo $(DEPDIR)/libdbus_1_la-dbus-transport-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport-unix.c' object='libdbus_1_la-dbus-transport-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-transport-unix.lo `test -f 'dbus-transport-unix.c' || echo '$(srcdir)/'`dbus-transport-unix.c + +libdbus_1_la-dbus-userdb.lo: dbus-userdb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-userdb.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-userdb.Tpo -c -o libdbus_1_la-dbus-userdb.lo `test -f 'dbus-userdb.c' || echo '$(srcdir)/'`dbus-userdb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-userdb.Tpo $(DEPDIR)/libdbus_1_la-dbus-userdb.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-userdb.c' object='libdbus_1_la-dbus-userdb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-userdb.lo `test -f 'dbus-userdb.c' || echo '$(srcdir)/'`dbus-userdb.c + +libdbus_1_la-sd-daemon.lo: sd-daemon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-sd-daemon.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-sd-daemon.Tpo -c -o libdbus_1_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-sd-daemon.Tpo $(DEPDIR)/libdbus_1_la-sd-daemon.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sd-daemon.c' object='libdbus_1_la-sd-daemon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c + +libdbus_1_la-dbus-sysdeps-wince-glue.lo: dbus-sysdeps-wince-glue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps-wince-glue.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Tpo -c -o libdbus_1_la-dbus-sysdeps-wince-glue.lo `test -f 'dbus-sysdeps-wince-glue.c' || echo '$(srcdir)/'`dbus-sysdeps-wince-glue.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps-wince-glue.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-wince-glue.c' object='libdbus_1_la-dbus-sysdeps-wince-glue.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sysdeps-wince-glue.lo `test -f 'dbus-sysdeps-wince-glue.c' || echo '$(srcdir)/'`dbus-sysdeps-wince-glue.c + +libdbus_1_la-dbus-file-win.lo: dbus-file-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-file-win.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-file-win.Tpo -c -o libdbus_1_la-dbus-file-win.lo `test -f 'dbus-file-win.c' || echo '$(srcdir)/'`dbus-file-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-file-win.Tpo $(DEPDIR)/libdbus_1_la-dbus-file-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-file-win.c' object='libdbus_1_la-dbus-file-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-file-win.lo `test -f 'dbus-file-win.c' || echo '$(srcdir)/'`dbus-file-win.c + +libdbus_1_la-dbus-pipe-win.lo: dbus-pipe-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-pipe-win.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-pipe-win.Tpo -c -o libdbus_1_la-dbus-pipe-win.lo `test -f 'dbus-pipe-win.c' || echo '$(srcdir)/'`dbus-pipe-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-pipe-win.Tpo $(DEPDIR)/libdbus_1_la-dbus-pipe-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pipe-win.c' object='libdbus_1_la-dbus-pipe-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-pipe-win.lo `test -f 'dbus-pipe-win.c' || echo '$(srcdir)/'`dbus-pipe-win.c + +libdbus_1_la-dbus-sysdeps-win.lo: dbus-sysdeps-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps-win.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps-win.Tpo -c -o libdbus_1_la-dbus-sysdeps-win.lo `test -f 'dbus-sysdeps-win.c' || echo '$(srcdir)/'`dbus-sysdeps-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps-win.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-win.c' object='libdbus_1_la-dbus-sysdeps-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sysdeps-win.lo `test -f 'dbus-sysdeps-win.c' || echo '$(srcdir)/'`dbus-sysdeps-win.c + +libdbus_1_la-dbus-sysdeps-thread-win.lo: dbus-sysdeps-thread-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps-thread-win.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps-thread-win.Tpo -c -o libdbus_1_la-dbus-sysdeps-thread-win.lo `test -f 'dbus-sysdeps-thread-win.c' || echo '$(srcdir)/'`dbus-sysdeps-thread-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps-thread-win.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps-thread-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-thread-win.c' object='libdbus_1_la-dbus-sysdeps-thread-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sysdeps-thread-win.lo `test -f 'dbus-sysdeps-thread-win.c' || echo '$(srcdir)/'`dbus-sysdeps-thread-win.c + +libdbus_1_la-dbus-transport-win.lo: dbus-transport-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-transport-win.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-transport-win.Tpo -c -o libdbus_1_la-dbus-transport-win.lo `test -f 'dbus-transport-win.c' || echo '$(srcdir)/'`dbus-transport-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-transport-win.Tpo $(DEPDIR)/libdbus_1_la-dbus-transport-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport-win.c' object='libdbus_1_la-dbus-transport-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-transport-win.lo `test -f 'dbus-transport-win.c' || echo '$(srcdir)/'`dbus-transport-win.c + +libdbus_1_la-dbus-sysdeps.lo: dbus-sysdeps.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_1_la-dbus-sysdeps.lo -MD -MP -MF $(DEPDIR)/libdbus_1_la-dbus-sysdeps.Tpo -c -o libdbus_1_la-dbus-sysdeps.lo `test -f 'dbus-sysdeps.c' || echo '$(srcdir)/'`dbus-sysdeps.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_1_la-dbus-sysdeps.Tpo $(DEPDIR)/libdbus_1_la-dbus-sysdeps.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps.c' object='libdbus_1_la-dbus-sysdeps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_1_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_1_la-dbus-sysdeps.lo `test -f 'dbus-sysdeps.c' || echo '$(srcdir)/'`dbus-sysdeps.c + +libdbus_internal_la-dbus-address.lo: dbus-address.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-address.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-address.Tpo -c -o libdbus_internal_la-dbus-address.lo `test -f 'dbus-address.c' || echo '$(srcdir)/'`dbus-address.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-address.Tpo $(DEPDIR)/libdbus_internal_la-dbus-address.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-address.c' object='libdbus_internal_la-dbus-address.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-address.lo `test -f 'dbus-address.c' || echo '$(srcdir)/'`dbus-address.c + +libdbus_internal_la-dbus-auth.lo: dbus-auth.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-auth.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-auth.Tpo -c -o libdbus_internal_la-dbus-auth.lo `test -f 'dbus-auth.c' || echo '$(srcdir)/'`dbus-auth.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-auth.Tpo $(DEPDIR)/libdbus_internal_la-dbus-auth.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-auth.c' object='libdbus_internal_la-dbus-auth.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-auth.lo `test -f 'dbus-auth.c' || echo '$(srcdir)/'`dbus-auth.c + +libdbus_internal_la-dbus-auth-script.lo: dbus-auth-script.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-auth-script.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-auth-script.Tpo -c -o libdbus_internal_la-dbus-auth-script.lo `test -f 'dbus-auth-script.c' || echo '$(srcdir)/'`dbus-auth-script.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-auth-script.Tpo $(DEPDIR)/libdbus_internal_la-dbus-auth-script.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-auth-script.c' object='libdbus_internal_la-dbus-auth-script.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-auth-script.lo `test -f 'dbus-auth-script.c' || echo '$(srcdir)/'`dbus-auth-script.c + +libdbus_internal_la-dbus-bus.lo: dbus-bus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-bus.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-bus.Tpo -c -o libdbus_internal_la-dbus-bus.lo `test -f 'dbus-bus.c' || echo '$(srcdir)/'`dbus-bus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-bus.Tpo $(DEPDIR)/libdbus_internal_la-dbus-bus.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-bus.c' object='libdbus_internal_la-dbus-bus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-bus.lo `test -f 'dbus-bus.c' || echo '$(srcdir)/'`dbus-bus.c + +libdbus_internal_la-dbus-connection.lo: dbus-connection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-connection.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-connection.Tpo -c -o libdbus_internal_la-dbus-connection.lo `test -f 'dbus-connection.c' || echo '$(srcdir)/'`dbus-connection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-connection.Tpo $(DEPDIR)/libdbus_internal_la-dbus-connection.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-connection.c' object='libdbus_internal_la-dbus-connection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-connection.lo `test -f 'dbus-connection.c' || echo '$(srcdir)/'`dbus-connection.c + +libdbus_internal_la-dbus-credentials.lo: dbus-credentials.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-credentials.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-credentials.Tpo -c -o libdbus_internal_la-dbus-credentials.lo `test -f 'dbus-credentials.c' || echo '$(srcdir)/'`dbus-credentials.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-credentials.Tpo $(DEPDIR)/libdbus_internal_la-dbus-credentials.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-credentials.c' object='libdbus_internal_la-dbus-credentials.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-credentials.lo `test -f 'dbus-credentials.c' || echo '$(srcdir)/'`dbus-credentials.c + +libdbus_internal_la-dbus-errors.lo: dbus-errors.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-errors.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-errors.Tpo -c -o libdbus_internal_la-dbus-errors.lo `test -f 'dbus-errors.c' || echo '$(srcdir)/'`dbus-errors.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-errors.Tpo $(DEPDIR)/libdbus_internal_la-dbus-errors.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-errors.c' object='libdbus_internal_la-dbus-errors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-errors.lo `test -f 'dbus-errors.c' || echo '$(srcdir)/'`dbus-errors.c + +libdbus_internal_la-dbus-keyring.lo: dbus-keyring.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-keyring.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-keyring.Tpo -c -o libdbus_internal_la-dbus-keyring.lo `test -f 'dbus-keyring.c' || echo '$(srcdir)/'`dbus-keyring.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-keyring.Tpo $(DEPDIR)/libdbus_internal_la-dbus-keyring.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-keyring.c' object='libdbus_internal_la-dbus-keyring.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-keyring.lo `test -f 'dbus-keyring.c' || echo '$(srcdir)/'`dbus-keyring.c + +libdbus_internal_la-dbus-marshal-header.lo: dbus-marshal-header.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-header.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-header.Tpo -c -o libdbus_internal_la-dbus-marshal-header.lo `test -f 'dbus-marshal-header.c' || echo '$(srcdir)/'`dbus-marshal-header.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-header.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-header.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-header.c' object='libdbus_internal_la-dbus-marshal-header.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-header.lo `test -f 'dbus-marshal-header.c' || echo '$(srcdir)/'`dbus-marshal-header.c + +libdbus_internal_la-dbus-marshal-byteswap.lo: dbus-marshal-byteswap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-byteswap.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap.Tpo -c -o libdbus_internal_la-dbus-marshal-byteswap.lo `test -f 'dbus-marshal-byteswap.c' || echo '$(srcdir)/'`dbus-marshal-byteswap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-byteswap.c' object='libdbus_internal_la-dbus-marshal-byteswap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-byteswap.lo `test -f 'dbus-marshal-byteswap.c' || echo '$(srcdir)/'`dbus-marshal-byteswap.c + +libdbus_internal_la-dbus-marshal-recursive.lo: dbus-marshal-recursive.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-recursive.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive.Tpo -c -o libdbus_internal_la-dbus-marshal-recursive.lo `test -f 'dbus-marshal-recursive.c' || echo '$(srcdir)/'`dbus-marshal-recursive.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-recursive.c' object='libdbus_internal_la-dbus-marshal-recursive.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-recursive.lo `test -f 'dbus-marshal-recursive.c' || echo '$(srcdir)/'`dbus-marshal-recursive.c + +libdbus_internal_la-dbus-marshal-validate.lo: dbus-marshal-validate.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-validate.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-validate.Tpo -c -o libdbus_internal_la-dbus-marshal-validate.lo `test -f 'dbus-marshal-validate.c' || echo '$(srcdir)/'`dbus-marshal-validate.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-validate.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-validate.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-validate.c' object='libdbus_internal_la-dbus-marshal-validate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-validate.lo `test -f 'dbus-marshal-validate.c' || echo '$(srcdir)/'`dbus-marshal-validate.c + +libdbus_internal_la-dbus-message.lo: dbus-message.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-message.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-message.Tpo -c -o libdbus_internal_la-dbus-message.lo `test -f 'dbus-message.c' || echo '$(srcdir)/'`dbus-message.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-message.Tpo $(DEPDIR)/libdbus_internal_la-dbus-message.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-message.c' object='libdbus_internal_la-dbus-message.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-message.lo `test -f 'dbus-message.c' || echo '$(srcdir)/'`dbus-message.c + +libdbus_internal_la-dbus-misc.lo: dbus-misc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-misc.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-misc.Tpo -c -o libdbus_internal_la-dbus-misc.lo `test -f 'dbus-misc.c' || echo '$(srcdir)/'`dbus-misc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-misc.Tpo $(DEPDIR)/libdbus_internal_la-dbus-misc.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-misc.c' object='libdbus_internal_la-dbus-misc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-misc.lo `test -f 'dbus-misc.c' || echo '$(srcdir)/'`dbus-misc.c + +libdbus_internal_la-dbus-nonce.lo: dbus-nonce.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-nonce.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-nonce.Tpo -c -o libdbus_internal_la-dbus-nonce.lo `test -f 'dbus-nonce.c' || echo '$(srcdir)/'`dbus-nonce.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-nonce.Tpo $(DEPDIR)/libdbus_internal_la-dbus-nonce.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-nonce.c' object='libdbus_internal_la-dbus-nonce.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-nonce.lo `test -f 'dbus-nonce.c' || echo '$(srcdir)/'`dbus-nonce.c + +libdbus_internal_la-dbus-object-tree.lo: dbus-object-tree.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-object-tree.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-object-tree.Tpo -c -o libdbus_internal_la-dbus-object-tree.lo `test -f 'dbus-object-tree.c' || echo '$(srcdir)/'`dbus-object-tree.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-object-tree.Tpo $(DEPDIR)/libdbus_internal_la-dbus-object-tree.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-object-tree.c' object='libdbus_internal_la-dbus-object-tree.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-object-tree.lo `test -f 'dbus-object-tree.c' || echo '$(srcdir)/'`dbus-object-tree.c + +libdbus_internal_la-dbus-pending-call.lo: dbus-pending-call.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-pending-call.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-pending-call.Tpo -c -o libdbus_internal_la-dbus-pending-call.lo `test -f 'dbus-pending-call.c' || echo '$(srcdir)/'`dbus-pending-call.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-pending-call.Tpo $(DEPDIR)/libdbus_internal_la-dbus-pending-call.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pending-call.c' object='libdbus_internal_la-dbus-pending-call.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-pending-call.lo `test -f 'dbus-pending-call.c' || echo '$(srcdir)/'`dbus-pending-call.c + +libdbus_internal_la-dbus-resources.lo: dbus-resources.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-resources.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-resources.Tpo -c -o libdbus_internal_la-dbus-resources.lo `test -f 'dbus-resources.c' || echo '$(srcdir)/'`dbus-resources.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-resources.Tpo $(DEPDIR)/libdbus_internal_la-dbus-resources.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-resources.c' object='libdbus_internal_la-dbus-resources.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-resources.lo `test -f 'dbus-resources.c' || echo '$(srcdir)/'`dbus-resources.c + +libdbus_internal_la-dbus-server.lo: dbus-server.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-server.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-server.Tpo -c -o libdbus_internal_la-dbus-server.lo `test -f 'dbus-server.c' || echo '$(srcdir)/'`dbus-server.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-server.Tpo $(DEPDIR)/libdbus_internal_la-dbus-server.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server.c' object='libdbus_internal_la-dbus-server.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-server.lo `test -f 'dbus-server.c' || echo '$(srcdir)/'`dbus-server.c + +libdbus_internal_la-dbus-server-debug-pipe.lo: dbus-server-debug-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-server-debug-pipe.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-server-debug-pipe.Tpo -c -o libdbus_internal_la-dbus-server-debug-pipe.lo `test -f 'dbus-server-debug-pipe.c' || echo '$(srcdir)/'`dbus-server-debug-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-server-debug-pipe.Tpo $(DEPDIR)/libdbus_internal_la-dbus-server-debug-pipe.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-debug-pipe.c' object='libdbus_internal_la-dbus-server-debug-pipe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-server-debug-pipe.lo `test -f 'dbus-server-debug-pipe.c' || echo '$(srcdir)/'`dbus-server-debug-pipe.c + +libdbus_internal_la-dbus-server-socket.lo: dbus-server-socket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-server-socket.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-server-socket.Tpo -c -o libdbus_internal_la-dbus-server-socket.lo `test -f 'dbus-server-socket.c' || echo '$(srcdir)/'`dbus-server-socket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-server-socket.Tpo $(DEPDIR)/libdbus_internal_la-dbus-server-socket.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-socket.c' object='libdbus_internal_la-dbus-server-socket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-server-socket.lo `test -f 'dbus-server-socket.c' || echo '$(srcdir)/'`dbus-server-socket.c + +libdbus_internal_la-dbus-uuidgen.lo: dbus-uuidgen.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-uuidgen.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-uuidgen.Tpo -c -o libdbus_internal_la-dbus-uuidgen.lo `test -f 'dbus-uuidgen.c' || echo '$(srcdir)/'`dbus-uuidgen.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-uuidgen.Tpo $(DEPDIR)/libdbus_internal_la-dbus-uuidgen.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-uuidgen.c' object='libdbus_internal_la-dbus-uuidgen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-uuidgen.lo `test -f 'dbus-uuidgen.c' || echo '$(srcdir)/'`dbus-uuidgen.c + +libdbus_internal_la-dbus-server-unix.lo: dbus-server-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-server-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-server-unix.Tpo -c -o libdbus_internal_la-dbus-server-unix.lo `test -f 'dbus-server-unix.c' || echo '$(srcdir)/'`dbus-server-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-server-unix.Tpo $(DEPDIR)/libdbus_internal_la-dbus-server-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-unix.c' object='libdbus_internal_la-dbus-server-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-server-unix.lo `test -f 'dbus-server-unix.c' || echo '$(srcdir)/'`dbus-server-unix.c + +libdbus_internal_la-dbus-server-win.lo: dbus-server-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-server-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-server-win.Tpo -c -o libdbus_internal_la-dbus-server-win.lo `test -f 'dbus-server-win.c' || echo '$(srcdir)/'`dbus-server-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-server-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-server-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-win.c' object='libdbus_internal_la-dbus-server-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-server-win.lo `test -f 'dbus-server-win.c' || echo '$(srcdir)/'`dbus-server-win.c + +libdbus_internal_la-dbus-sha.lo: dbus-sha.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sha.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sha.Tpo -c -o libdbus_internal_la-dbus-sha.lo `test -f 'dbus-sha.c' || echo '$(srcdir)/'`dbus-sha.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sha.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sha.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sha.c' object='libdbus_internal_la-dbus-sha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sha.lo `test -f 'dbus-sha.c' || echo '$(srcdir)/'`dbus-sha.c + +libdbus_internal_la-dbus-signature.lo: dbus-signature.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-signature.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-signature.Tpo -c -o libdbus_internal_la-dbus-signature.lo `test -f 'dbus-signature.c' || echo '$(srcdir)/'`dbus-signature.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-signature.Tpo $(DEPDIR)/libdbus_internal_la-dbus-signature.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-signature.c' object='libdbus_internal_la-dbus-signature.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-signature.lo `test -f 'dbus-signature.c' || echo '$(srcdir)/'`dbus-signature.c + +libdbus_internal_la-dbus-timeout.lo: dbus-timeout.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-timeout.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-timeout.Tpo -c -o libdbus_internal_la-dbus-timeout.lo `test -f 'dbus-timeout.c' || echo '$(srcdir)/'`dbus-timeout.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-timeout.Tpo $(DEPDIR)/libdbus_internal_la-dbus-timeout.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-timeout.c' object='libdbus_internal_la-dbus-timeout.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-timeout.lo `test -f 'dbus-timeout.c' || echo '$(srcdir)/'`dbus-timeout.c + +libdbus_internal_la-dbus-threads.lo: dbus-threads.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-threads.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-threads.Tpo -c -o libdbus_internal_la-dbus-threads.lo `test -f 'dbus-threads.c' || echo '$(srcdir)/'`dbus-threads.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-threads.Tpo $(DEPDIR)/libdbus_internal_la-dbus-threads.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-threads.c' object='libdbus_internal_la-dbus-threads.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-threads.lo `test -f 'dbus-threads.c' || echo '$(srcdir)/'`dbus-threads.c + +libdbus_internal_la-dbus-transport.lo: dbus-transport.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-transport.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-transport.Tpo -c -o libdbus_internal_la-dbus-transport.lo `test -f 'dbus-transport.c' || echo '$(srcdir)/'`dbus-transport.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-transport.Tpo $(DEPDIR)/libdbus_internal_la-dbus-transport.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport.c' object='libdbus_internal_la-dbus-transport.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-transport.lo `test -f 'dbus-transport.c' || echo '$(srcdir)/'`dbus-transport.c + +libdbus_internal_la-dbus-transport-socket.lo: dbus-transport-socket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-transport-socket.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-transport-socket.Tpo -c -o libdbus_internal_la-dbus-transport-socket.lo `test -f 'dbus-transport-socket.c' || echo '$(srcdir)/'`dbus-transport-socket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-transport-socket.Tpo $(DEPDIR)/libdbus_internal_la-dbus-transport-socket.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport-socket.c' object='libdbus_internal_la-dbus-transport-socket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-transport-socket.lo `test -f 'dbus-transport-socket.c' || echo '$(srcdir)/'`dbus-transport-socket.c + +libdbus_internal_la-dbus-watch.lo: dbus-watch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-watch.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-watch.Tpo -c -o libdbus_internal_la-dbus-watch.lo `test -f 'dbus-watch.c' || echo '$(srcdir)/'`dbus-watch.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-watch.Tpo $(DEPDIR)/libdbus_internal_la-dbus-watch.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-watch.c' object='libdbus_internal_la-dbus-watch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-watch.lo `test -f 'dbus-watch.c' || echo '$(srcdir)/'`dbus-watch.c + +libdbus_internal_la-dbus-dataslot.lo: dbus-dataslot.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-dataslot.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-dataslot.Tpo -c -o libdbus_internal_la-dbus-dataslot.lo `test -f 'dbus-dataslot.c' || echo '$(srcdir)/'`dbus-dataslot.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-dataslot.Tpo $(DEPDIR)/libdbus_internal_la-dbus-dataslot.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-dataslot.c' object='libdbus_internal_la-dbus-dataslot.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-dataslot.lo `test -f 'dbus-dataslot.c' || echo '$(srcdir)/'`dbus-dataslot.c + +libdbus_internal_la-dbus-file.lo: dbus-file.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-file.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-file.Tpo -c -o libdbus_internal_la-dbus-file.lo `test -f 'dbus-file.c' || echo '$(srcdir)/'`dbus-file.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-file.Tpo $(DEPDIR)/libdbus_internal_la-dbus-file.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-file.c' object='libdbus_internal_la-dbus-file.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-file.lo `test -f 'dbus-file.c' || echo '$(srcdir)/'`dbus-file.c + +libdbus_internal_la-dbus-hash.lo: dbus-hash.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-hash.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-hash.Tpo -c -o libdbus_internal_la-dbus-hash.lo `test -f 'dbus-hash.c' || echo '$(srcdir)/'`dbus-hash.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-hash.Tpo $(DEPDIR)/libdbus_internal_la-dbus-hash.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-hash.c' object='libdbus_internal_la-dbus-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-hash.lo `test -f 'dbus-hash.c' || echo '$(srcdir)/'`dbus-hash.c + +libdbus_internal_la-dbus-internals.lo: dbus-internals.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-internals.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-internals.Tpo -c -o libdbus_internal_la-dbus-internals.lo `test -f 'dbus-internals.c' || echo '$(srcdir)/'`dbus-internals.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-internals.Tpo $(DEPDIR)/libdbus_internal_la-dbus-internals.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-internals.c' object='libdbus_internal_la-dbus-internals.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-internals.lo `test -f 'dbus-internals.c' || echo '$(srcdir)/'`dbus-internals.c + +libdbus_internal_la-dbus-list.lo: dbus-list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-list.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-list.Tpo -c -o libdbus_internal_la-dbus-list.lo `test -f 'dbus-list.c' || echo '$(srcdir)/'`dbus-list.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-list.Tpo $(DEPDIR)/libdbus_internal_la-dbus-list.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-list.c' object='libdbus_internal_la-dbus-list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-list.lo `test -f 'dbus-list.c' || echo '$(srcdir)/'`dbus-list.c + +libdbus_internal_la-dbus-marshal-basic.lo: dbus-marshal-basic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-basic.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-basic.Tpo -c -o libdbus_internal_la-dbus-marshal-basic.lo `test -f 'dbus-marshal-basic.c' || echo '$(srcdir)/'`dbus-marshal-basic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-basic.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-basic.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-basic.c' object='libdbus_internal_la-dbus-marshal-basic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-basic.lo `test -f 'dbus-marshal-basic.c' || echo '$(srcdir)/'`dbus-marshal-basic.c + +libdbus_internal_la-dbus-memory.lo: dbus-memory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-memory.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-memory.Tpo -c -o libdbus_internal_la-dbus-memory.lo `test -f 'dbus-memory.c' || echo '$(srcdir)/'`dbus-memory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-memory.Tpo $(DEPDIR)/libdbus_internal_la-dbus-memory.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-memory.c' object='libdbus_internal_la-dbus-memory.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-memory.lo `test -f 'dbus-memory.c' || echo '$(srcdir)/'`dbus-memory.c + +libdbus_internal_la-dbus-mempool.lo: dbus-mempool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-mempool.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-mempool.Tpo -c -o libdbus_internal_la-dbus-mempool.lo `test -f 'dbus-mempool.c' || echo '$(srcdir)/'`dbus-mempool.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-mempool.Tpo $(DEPDIR)/libdbus_internal_la-dbus-mempool.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-mempool.c' object='libdbus_internal_la-dbus-mempool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-mempool.lo `test -f 'dbus-mempool.c' || echo '$(srcdir)/'`dbus-mempool.c + +libdbus_internal_la-dbus-pipe.lo: dbus-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-pipe.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-pipe.Tpo -c -o libdbus_internal_la-dbus-pipe.lo `test -f 'dbus-pipe.c' || echo '$(srcdir)/'`dbus-pipe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-pipe.Tpo $(DEPDIR)/libdbus_internal_la-dbus-pipe.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pipe.c' object='libdbus_internal_la-dbus-pipe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-pipe.lo `test -f 'dbus-pipe.c' || echo '$(srcdir)/'`dbus-pipe.c + +libdbus_internal_la-dbus-string.lo: dbus-string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-string.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-string.Tpo -c -o libdbus_internal_la-dbus-string.lo `test -f 'dbus-string.c' || echo '$(srcdir)/'`dbus-string.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-string.Tpo $(DEPDIR)/libdbus_internal_la-dbus-string.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-string.c' object='libdbus_internal_la-dbus-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-string.lo `test -f 'dbus-string.c' || echo '$(srcdir)/'`dbus-string.c + +libdbus_internal_la-dbus-server-launchd.lo: dbus-server-launchd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-server-launchd.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-server-launchd.Tpo -c -o libdbus_internal_la-dbus-server-launchd.lo `test -f 'dbus-server-launchd.c' || echo '$(srcdir)/'`dbus-server-launchd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-server-launchd.Tpo $(DEPDIR)/libdbus_internal_la-dbus-server-launchd.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-server-launchd.c' object='libdbus_internal_la-dbus-server-launchd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-server-launchd.lo `test -f 'dbus-server-launchd.c' || echo '$(srcdir)/'`dbus-server-launchd.c + +libdbus_internal_la-dbus-file-unix.lo: dbus-file-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-file-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-file-unix.Tpo -c -o libdbus_internal_la-dbus-file-unix.lo `test -f 'dbus-file-unix.c' || echo '$(srcdir)/'`dbus-file-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-file-unix.Tpo $(DEPDIR)/libdbus_internal_la-dbus-file-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-file-unix.c' object='libdbus_internal_la-dbus-file-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-file-unix.lo `test -f 'dbus-file-unix.c' || echo '$(srcdir)/'`dbus-file-unix.c + +libdbus_internal_la-dbus-pipe-unix.lo: dbus-pipe-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-pipe-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-pipe-unix.Tpo -c -o libdbus_internal_la-dbus-pipe-unix.lo `test -f 'dbus-pipe-unix.c' || echo '$(srcdir)/'`dbus-pipe-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-pipe-unix.Tpo $(DEPDIR)/libdbus_internal_la-dbus-pipe-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pipe-unix.c' object='libdbus_internal_la-dbus-pipe-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-pipe-unix.lo `test -f 'dbus-pipe-unix.c' || echo '$(srcdir)/'`dbus-pipe-unix.c + +libdbus_internal_la-dbus-sysdeps-unix.lo: dbus-sysdeps-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-unix.Tpo -c -o libdbus_internal_la-dbus-sysdeps-unix.lo `test -f 'dbus-sysdeps-unix.c' || echo '$(srcdir)/'`dbus-sysdeps-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-unix.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-unix.c' object='libdbus_internal_la-dbus-sysdeps-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-unix.lo `test -f 'dbus-sysdeps-unix.c' || echo '$(srcdir)/'`dbus-sysdeps-unix.c + +libdbus_internal_la-dbus-sysdeps-pthread.lo: dbus-sysdeps-pthread.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-pthread.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-pthread.Tpo -c -o libdbus_internal_la-dbus-sysdeps-pthread.lo `test -f 'dbus-sysdeps-pthread.c' || echo '$(srcdir)/'`dbus-sysdeps-pthread.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-pthread.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-pthread.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-pthread.c' object='libdbus_internal_la-dbus-sysdeps-pthread.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-pthread.lo `test -f 'dbus-sysdeps-pthread.c' || echo '$(srcdir)/'`dbus-sysdeps-pthread.c + +libdbus_internal_la-dbus-transport-unix.lo: dbus-transport-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-transport-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-transport-unix.Tpo -c -o libdbus_internal_la-dbus-transport-unix.lo `test -f 'dbus-transport-unix.c' || echo '$(srcdir)/'`dbus-transport-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-transport-unix.Tpo $(DEPDIR)/libdbus_internal_la-dbus-transport-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport-unix.c' object='libdbus_internal_la-dbus-transport-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-transport-unix.lo `test -f 'dbus-transport-unix.c' || echo '$(srcdir)/'`dbus-transport-unix.c + +libdbus_internal_la-dbus-userdb.lo: dbus-userdb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-userdb.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-userdb.Tpo -c -o libdbus_internal_la-dbus-userdb.lo `test -f 'dbus-userdb.c' || echo '$(srcdir)/'`dbus-userdb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-userdb.Tpo $(DEPDIR)/libdbus_internal_la-dbus-userdb.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-userdb.c' object='libdbus_internal_la-dbus-userdb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-userdb.lo `test -f 'dbus-userdb.c' || echo '$(srcdir)/'`dbus-userdb.c + +libdbus_internal_la-sd-daemon.lo: sd-daemon.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-sd-daemon.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-sd-daemon.Tpo -c -o libdbus_internal_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-sd-daemon.Tpo $(DEPDIR)/libdbus_internal_la-sd-daemon.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sd-daemon.c' object='libdbus_internal_la-sd-daemon.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-sd-daemon.lo `test -f 'sd-daemon.c' || echo '$(srcdir)/'`sd-daemon.c + +libdbus_internal_la-dbus-sysdeps-wince-glue.lo: dbus-sysdeps-wince-glue.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-wince-glue.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Tpo -c -o libdbus_internal_la-dbus-sysdeps-wince-glue.lo `test -f 'dbus-sysdeps-wince-glue.c' || echo '$(srcdir)/'`dbus-sysdeps-wince-glue.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-wince-glue.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-wince-glue.c' object='libdbus_internal_la-dbus-sysdeps-wince-glue.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-wince-glue.lo `test -f 'dbus-sysdeps-wince-glue.c' || echo '$(srcdir)/'`dbus-sysdeps-wince-glue.c + +libdbus_internal_la-dbus-file-win.lo: dbus-file-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-file-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-file-win.Tpo -c -o libdbus_internal_la-dbus-file-win.lo `test -f 'dbus-file-win.c' || echo '$(srcdir)/'`dbus-file-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-file-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-file-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-file-win.c' object='libdbus_internal_la-dbus-file-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-file-win.lo `test -f 'dbus-file-win.c' || echo '$(srcdir)/'`dbus-file-win.c + +libdbus_internal_la-dbus-pipe-win.lo: dbus-pipe-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-pipe-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-pipe-win.Tpo -c -o libdbus_internal_la-dbus-pipe-win.lo `test -f 'dbus-pipe-win.c' || echo '$(srcdir)/'`dbus-pipe-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-pipe-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-pipe-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-pipe-win.c' object='libdbus_internal_la-dbus-pipe-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-pipe-win.lo `test -f 'dbus-pipe-win.c' || echo '$(srcdir)/'`dbus-pipe-win.c + +libdbus_internal_la-dbus-sysdeps-win.lo: dbus-sysdeps-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-win.Tpo -c -o libdbus_internal_la-dbus-sysdeps-win.lo `test -f 'dbus-sysdeps-win.c' || echo '$(srcdir)/'`dbus-sysdeps-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-win.c' object='libdbus_internal_la-dbus-sysdeps-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-win.lo `test -f 'dbus-sysdeps-win.c' || echo '$(srcdir)/'`dbus-sysdeps-win.c + +libdbus_internal_la-dbus-sysdeps-thread-win.lo: dbus-sysdeps-thread-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-thread-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-thread-win.Tpo -c -o libdbus_internal_la-dbus-sysdeps-thread-win.lo `test -f 'dbus-sysdeps-thread-win.c' || echo '$(srcdir)/'`dbus-sysdeps-thread-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-thread-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-thread-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-thread-win.c' object='libdbus_internal_la-dbus-sysdeps-thread-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-thread-win.lo `test -f 'dbus-sysdeps-thread-win.c' || echo '$(srcdir)/'`dbus-sysdeps-thread-win.c + +libdbus_internal_la-dbus-transport-win.lo: dbus-transport-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-transport-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-transport-win.Tpo -c -o libdbus_internal_la-dbus-transport-win.lo `test -f 'dbus-transport-win.c' || echo '$(srcdir)/'`dbus-transport-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-transport-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-transport-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-transport-win.c' object='libdbus_internal_la-dbus-transport-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-transport-win.lo `test -f 'dbus-transport-win.c' || echo '$(srcdir)/'`dbus-transport-win.c + +libdbus_internal_la-dbus-sysdeps.lo: dbus-sysdeps.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps.Tpo -c -o libdbus_internal_la-dbus-sysdeps.lo `test -f 'dbus-sysdeps.c' || echo '$(srcdir)/'`dbus-sysdeps.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps.c' object='libdbus_internal_la-dbus-sysdeps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps.lo `test -f 'dbus-sysdeps.c' || echo '$(srcdir)/'`dbus-sysdeps.c + +libdbus_internal_la-dbus-auth-util.lo: dbus-auth-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-auth-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-auth-util.Tpo -c -o libdbus_internal_la-dbus-auth-util.lo `test -f 'dbus-auth-util.c' || echo '$(srcdir)/'`dbus-auth-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-auth-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-auth-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-auth-util.c' object='libdbus_internal_la-dbus-auth-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-auth-util.lo `test -f 'dbus-auth-util.c' || echo '$(srcdir)/'`dbus-auth-util.c + +libdbus_internal_la-dbus-credentials-util.lo: dbus-credentials-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-credentials-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-credentials-util.Tpo -c -o libdbus_internal_la-dbus-credentials-util.lo `test -f 'dbus-credentials-util.c' || echo '$(srcdir)/'`dbus-credentials-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-credentials-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-credentials-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-credentials-util.c' object='libdbus_internal_la-dbus-credentials-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-credentials-util.lo `test -f 'dbus-credentials-util.c' || echo '$(srcdir)/'`dbus-credentials-util.c + +libdbus_internal_la-dbus-mainloop.lo: dbus-mainloop.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-mainloop.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-mainloop.Tpo -c -o libdbus_internal_la-dbus-mainloop.lo `test -f 'dbus-mainloop.c' || echo '$(srcdir)/'`dbus-mainloop.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-mainloop.Tpo $(DEPDIR)/libdbus_internal_la-dbus-mainloop.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-mainloop.c' object='libdbus_internal_la-dbus-mainloop.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-mainloop.lo `test -f 'dbus-mainloop.c' || echo '$(srcdir)/'`dbus-mainloop.c + +libdbus_internal_la-dbus-marshal-byteswap-util.lo: dbus-marshal-byteswap-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-byteswap-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap-util.Tpo -c -o libdbus_internal_la-dbus-marshal-byteswap-util.lo `test -f 'dbus-marshal-byteswap-util.c' || echo '$(srcdir)/'`dbus-marshal-byteswap-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-byteswap-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-byteswap-util.c' object='libdbus_internal_la-dbus-marshal-byteswap-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-byteswap-util.lo `test -f 'dbus-marshal-byteswap-util.c' || echo '$(srcdir)/'`dbus-marshal-byteswap-util.c + +libdbus_internal_la-dbus-marshal-recursive-util.lo: dbus-marshal-recursive-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-recursive-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive-util.Tpo -c -o libdbus_internal_la-dbus-marshal-recursive-util.lo `test -f 'dbus-marshal-recursive-util.c' || echo '$(srcdir)/'`dbus-marshal-recursive-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-recursive-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-recursive-util.c' object='libdbus_internal_la-dbus-marshal-recursive-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-recursive-util.lo `test -f 'dbus-marshal-recursive-util.c' || echo '$(srcdir)/'`dbus-marshal-recursive-util.c + +libdbus_internal_la-dbus-marshal-validate-util.lo: dbus-marshal-validate-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-marshal-validate-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-marshal-validate-util.Tpo -c -o libdbus_internal_la-dbus-marshal-validate-util.lo `test -f 'dbus-marshal-validate-util.c' || echo '$(srcdir)/'`dbus-marshal-validate-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-marshal-validate-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-marshal-validate-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-marshal-validate-util.c' object='libdbus_internal_la-dbus-marshal-validate-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-marshal-validate-util.lo `test -f 'dbus-marshal-validate-util.c' || echo '$(srcdir)/'`dbus-marshal-validate-util.c + +libdbus_internal_la-dbus-message-factory.lo: dbus-message-factory.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-message-factory.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-message-factory.Tpo -c -o libdbus_internal_la-dbus-message-factory.lo `test -f 'dbus-message-factory.c' || echo '$(srcdir)/'`dbus-message-factory.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-message-factory.Tpo $(DEPDIR)/libdbus_internal_la-dbus-message-factory.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-message-factory.c' object='libdbus_internal_la-dbus-message-factory.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-message-factory.lo `test -f 'dbus-message-factory.c' || echo '$(srcdir)/'`dbus-message-factory.c + +libdbus_internal_la-dbus-message-util.lo: dbus-message-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-message-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-message-util.Tpo -c -o libdbus_internal_la-dbus-message-util.lo `test -f 'dbus-message-util.c' || echo '$(srcdir)/'`dbus-message-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-message-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-message-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-message-util.c' object='libdbus_internal_la-dbus-message-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-message-util.lo `test -f 'dbus-message-util.c' || echo '$(srcdir)/'`dbus-message-util.c + +libdbus_internal_la-dbus-shell.lo: dbus-shell.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-shell.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-shell.Tpo -c -o libdbus_internal_la-dbus-shell.lo `test -f 'dbus-shell.c' || echo '$(srcdir)/'`dbus-shell.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-shell.Tpo $(DEPDIR)/libdbus_internal_la-dbus-shell.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-shell.c' object='libdbus_internal_la-dbus-shell.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-shell.lo `test -f 'dbus-shell.c' || echo '$(srcdir)/'`dbus-shell.c + +libdbus_internal_la-dbus-sysdeps-util-unix.lo: dbus-sysdeps-util-unix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-util-unix.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-unix.Tpo -c -o libdbus_internal_la-dbus-sysdeps-util-unix.lo `test -f 'dbus-sysdeps-util-unix.c' || echo '$(srcdir)/'`dbus-sysdeps-util-unix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-unix.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-unix.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-util-unix.c' object='libdbus_internal_la-dbus-sysdeps-util-unix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-util-unix.lo `test -f 'dbus-sysdeps-util-unix.c' || echo '$(srcdir)/'`dbus-sysdeps-util-unix.c + +libdbus_internal_la-dbus-userdb-util.lo: dbus-userdb-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-userdb-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-userdb-util.Tpo -c -o libdbus_internal_la-dbus-userdb-util.lo `test -f 'dbus-userdb-util.c' || echo '$(srcdir)/'`dbus-userdb-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-userdb-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-userdb-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-userdb-util.c' object='libdbus_internal_la-dbus-userdb-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-userdb-util.lo `test -f 'dbus-userdb-util.c' || echo '$(srcdir)/'`dbus-userdb-util.c + +libdbus_internal_la-dbus-spawn.lo: dbus-spawn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-spawn.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-spawn.Tpo -c -o libdbus_internal_la-dbus-spawn.lo `test -f 'dbus-spawn.c' || echo '$(srcdir)/'`dbus-spawn.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-spawn.Tpo $(DEPDIR)/libdbus_internal_la-dbus-spawn.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-spawn.c' object='libdbus_internal_la-dbus-spawn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-spawn.lo `test -f 'dbus-spawn.c' || echo '$(srcdir)/'`dbus-spawn.c + +libdbus_internal_la-dbus-sysdeps-util-win.lo: dbus-sysdeps-util-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-util-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-win.Tpo -c -o libdbus_internal_la-dbus-sysdeps-util-win.lo `test -f 'dbus-sysdeps-util-win.c' || echo '$(srcdir)/'`dbus-sysdeps-util-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-util-win.c' object='libdbus_internal_la-dbus-sysdeps-util-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-util-win.lo `test -f 'dbus-sysdeps-util-win.c' || echo '$(srcdir)/'`dbus-sysdeps-util-win.c + +libdbus_internal_la-dbus-spawn-win.lo: dbus-spawn-win.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-spawn-win.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-spawn-win.Tpo -c -o libdbus_internal_la-dbus-spawn-win.lo `test -f 'dbus-spawn-win.c' || echo '$(srcdir)/'`dbus-spawn-win.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-spawn-win.Tpo $(DEPDIR)/libdbus_internal_la-dbus-spawn-win.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-spawn-win.c' object='libdbus_internal_la-dbus-spawn-win.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-spawn-win.lo `test -f 'dbus-spawn-win.c' || echo '$(srcdir)/'`dbus-spawn-win.c + +libdbus_internal_la-dbus-string-util.lo: dbus-string-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-string-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-string-util.Tpo -c -o libdbus_internal_la-dbus-string-util.lo `test -f 'dbus-string-util.c' || echo '$(srcdir)/'`dbus-string-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-string-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-string-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-string-util.c' object='libdbus_internal_la-dbus-string-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-string-util.lo `test -f 'dbus-string-util.c' || echo '$(srcdir)/'`dbus-string-util.c + +libdbus_internal_la-dbus-sysdeps-util.lo: dbus-sysdeps-util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-sysdeps-util.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util.Tpo -c -o libdbus_internal_la-dbus-sysdeps-util.lo `test -f 'dbus-sysdeps-util.c' || echo '$(srcdir)/'`dbus-sysdeps-util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util.Tpo $(DEPDIR)/libdbus_internal_la-dbus-sysdeps-util.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-sysdeps-util.c' object='libdbus_internal_la-dbus-sysdeps-util.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-sysdeps-util.lo `test -f 'dbus-sysdeps-util.c' || echo '$(srcdir)/'`dbus-sysdeps-util.c + +libdbus_internal_la-dbus-test.lo: dbus-test.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdbus_internal_la-dbus-test.lo -MD -MP -MF $(DEPDIR)/libdbus_internal_la-dbus-test.Tpo -c -o libdbus_internal_la-dbus-test.lo `test -f 'dbus-test.c' || echo '$(srcdir)/'`dbus-test.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdbus_internal_la-dbus-test.Tpo $(DEPDIR)/libdbus_internal_la-dbus-test.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dbus-test.c' object='libdbus_internal_la-dbus-test.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdbus_internal_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdbus_internal_la-dbus-test.lo `test -f 'dbus-test.c' || echo '$(srcdir)/'`dbus-test.c + mostlyclean-libtool: -rm -f *.lo @@ -1052,9 +2422,16 @@ uninstall-am: uninstall-dbusarchincludeHEADERS \ uninstall-dbusincludeHEADERS uninstall-libLTLIBRARIES +@DBUS_WIN_TRUE@.rc.o: +@DBUS_WIN_TRUE@ $(WINDRES) $< -o $@ + clean-local: /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true +update-systemd: + curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c + curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h + # 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/dbus/dbus-address.h b/dbus/dbus-address.h index 07d5339c..e51ef0ae 100644 --- a/dbus/dbus-address.h +++ b/dbus/dbus-address.h @@ -40,16 +40,22 @@ DBUS_BEGIN_DECLS /** Opaque type representing one of the semicolon-separated items in an address */ typedef struct DBusAddressEntry DBusAddressEntry; +DBUS_EXPORT dbus_bool_t dbus_parse_address (const char *address, DBusAddressEntry ***entry, int *array_len, DBusError *error); +DBUS_EXPORT const char *dbus_address_entry_get_value (DBusAddressEntry *entry, const char *key); +DBUS_EXPORT const char *dbus_address_entry_get_method (DBusAddressEntry *entry); +DBUS_EXPORT void dbus_address_entries_free (DBusAddressEntry **entries); +DBUS_EXPORT char* dbus_address_escape_value (const char *value); +DBUS_EXPORT char* dbus_address_unescape_value (const char *value, DBusError *error); diff --git a/dbus/dbus-arch-deps.h b/dbus/dbus-arch-deps.h index ee5e96ff..fa8a8278 100644 --- a/dbus/dbus-arch-deps.h +++ b/dbus/dbus-arch-deps.h @@ -55,12 +55,12 @@ typedef unsigned short dbus_uint16_t; * creating an additional generated header just for this */ #define DBUS_MAJOR_VERSION 1 -#define DBUS_MINOR_VERSION 2 -#define DBUS_MICRO_VERSION 24 +#define DBUS_MINOR_VERSION 4 +#define DBUS_MICRO_VERSION 1 -#define DBUS_VERSION_STRING "1.2.24" +#define DBUS_VERSION_STRING "1.4.1" -#define DBUS_VERSION ((1 << 16) | (2 << 8) | (24)) +#define DBUS_VERSION ((1 << 16) | (4 << 8) | (1)) DBUS_END_DECLS diff --git a/dbus/dbus-auth-script.h b/dbus/dbus-auth-script.h index 30cd5642..39e6c7c4 100644 --- a/dbus/dbus-auth-script.h +++ b/dbus/dbus-auth-script.h @@ -24,8 +24,6 @@ #ifndef DBUS_AUTH_SCRIPT_H #define DBUS_AUTH_SCRIPT_H -#include <config.h> - #include <dbus/dbus-memory.h> #include <dbus/dbus-types.h> #include <dbus/dbus-string.h> diff --git a/dbus/dbus-auth-util.c b/dbus/dbus-auth-util.c index 09ecdd47..776e8e27 100644 --- a/dbus/dbus-auth-util.c +++ b/dbus/dbus-auth-util.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-internals.h" #include "dbus-test.h" #include "dbus-auth.h" diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index b81c7f25..3173f34f 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-auth.h" #include "dbus-string.h" #include "dbus-list.h" @@ -122,7 +124,9 @@ typedef enum { DBUS_AUTH_COMMAND_REJECTED, DBUS_AUTH_COMMAND_OK, DBUS_AUTH_COMMAND_ERROR, - DBUS_AUTH_COMMAND_UNKNOWN + DBUS_AUTH_COMMAND_UNKNOWN, + DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD, + DBUS_AUTH_COMMAND_AGREE_UNIX_FD } DBusAuthCommand; /** @@ -184,6 +188,9 @@ struct DBusAuth unsigned int already_got_mechanisms : 1; /**< Client already got mech list */ unsigned int already_asked_for_initial_response : 1; /**< Already sent a blank challenge to get an initial response */ unsigned int buffer_outstanding : 1; /**< Buffer is "checked out" for reading data into */ + + unsigned int unix_fd_possible : 1; /**< This side could do unix fd passing */ + unsigned int unix_fd_negotiated : 1; /**< Unix fd was successfully negotiated */ }; /** @@ -223,9 +230,10 @@ static dbus_bool_t send_rejected (DBusAuth *auth); static dbus_bool_t send_error (DBusAuth *auth, const char *message); static dbus_bool_t send_ok (DBusAuth *auth); -static dbus_bool_t send_begin (DBusAuth *auth, - const DBusString *args_from_ok); +static dbus_bool_t send_begin (DBusAuth *auth); static dbus_bool_t send_cancel (DBusAuth *auth); +static dbus_bool_t send_negotiate_unix_fd (DBusAuth *auth); +static dbus_bool_t send_agree_unix_fd (DBusAuth *auth); /** * Client states @@ -264,6 +272,9 @@ static dbus_bool_t handle_client_state_waiting_for_ok (DBusAuth *aut static dbus_bool_t handle_client_state_waiting_for_reject (DBusAuth *auth, DBusAuthCommand command, const DBusString *args); +static dbus_bool_t handle_client_state_waiting_for_agree_unix_fd (DBusAuth *auth, + DBusAuthCommand command, + const DBusString *args); static const DBusAuthStateData client_state_need_send_auth = { "NeedSendAuth", NULL @@ -277,7 +288,10 @@ static const DBusAuthStateData client_state_waiting_for_ok = { static const DBusAuthStateData client_state_waiting_for_reject = { "WaitingForReject", handle_client_state_waiting_for_reject }; - +static const DBusAuthStateData client_state_waiting_for_agree_unix_fd = { + "WaitingForAgreeUnixFD", handle_client_state_waiting_for_agree_unix_fd +}; + /** * Common terminal states. Terminal states have handler == NULL. */ @@ -1192,7 +1206,7 @@ handle_server_data_anonymous_mech (DBusAuth *auth, { DBusString plaintext; DBusString encoded; - _dbus_string_init_const (&plaintext, "D-Bus " VERSION); + _dbus_string_init_const (&plaintext, "D-Bus " DBUS_VERSION_STRING); _dbus_string_init (&encoded); _dbus_string_hex_encode (&plaintext, 0, &encoded, @@ -1250,7 +1264,7 @@ handle_client_initial_response_anonymous_mech (DBusAuth *auth, return FALSE; if (!_dbus_string_append (&plaintext, - "libdbus " VERSION)) + "libdbus " DBUS_VERSION_STRING)) goto failed; if (!_dbus_string_hex_encode (&plaintext, 0, @@ -1522,9 +1536,21 @@ send_ok (DBusAuth *auth) } static dbus_bool_t -send_begin (DBusAuth *auth, - const DBusString *args_from_ok) +send_begin (DBusAuth *auth) { + + if (!_dbus_string_append (&auth->outgoing, + "BEGIN\r\n")) + return FALSE; + + goto_state (auth, &common_state_authenticated); + return TRUE; +} + +static dbus_bool_t +process_ok(DBusAuth *auth, + const DBusString *args_from_ok) { + int end_of_hex; /* "args_from_ok" should be the GUID, whitespace already pulled off the front */ @@ -1549,20 +1575,19 @@ send_begin (DBusAuth *auth, return TRUE; } - if (_dbus_string_copy (args_from_ok, 0, &DBUS_AUTH_CLIENT (auth)->guid_from_server, 0) && - _dbus_string_append (&auth->outgoing, "BEGIN\r\n")) - { - _dbus_verbose ("Got GUID '%s' from the server\n", - _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server)); - - goto_state (auth, &common_state_authenticated); - return TRUE; - } - else - { + if (!_dbus_string_copy (args_from_ok, 0, &DBUS_AUTH_CLIENT (auth)->guid_from_server, 0)) { _dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0); return FALSE; - } + } + + _dbus_verbose ("Got GUID '%s' from the server\n", + _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server)); + + if (auth->unix_fd_possible) + return send_negotiate_unix_fd(auth); + + _dbus_verbose("Not negotiating unix fd passing, since not possible\n"); + return send_begin (auth); } static dbus_bool_t @@ -1622,6 +1647,33 @@ process_data (DBusAuth *auth, } static dbus_bool_t +send_negotiate_unix_fd (DBusAuth *auth) +{ + if (!_dbus_string_append (&auth->outgoing, + "NEGOTIATE_UNIX_FD\r\n")) + return FALSE; + + goto_state (auth, &client_state_waiting_for_agree_unix_fd); + return TRUE; +} + +static dbus_bool_t +send_agree_unix_fd (DBusAuth *auth) +{ + _dbus_assert(auth->unix_fd_possible); + + auth->unix_fd_negotiated = TRUE; + _dbus_verbose("Agreed to UNIX FD passing\n"); + + if (!_dbus_string_append (&auth->outgoing, + "AGREE_UNIX_FD\r\n")) + return FALSE; + + goto_state (auth, &server_state_waiting_for_begin); + return TRUE; +} + +static dbus_bool_t handle_auth (DBusAuth *auth, const DBusString *args) { if (_dbus_string_get_length (args) == 0) @@ -1712,9 +1764,13 @@ handle_server_state_waiting_for_auth (DBusAuth *auth, case DBUS_AUTH_COMMAND_ERROR: return send_rejected (auth); + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + return send_error (auth, "Need to authenticate first"); + case DBUS_AUTH_COMMAND_REJECTED: case DBUS_AUTH_COMMAND_OK: case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: default: return send_error (auth, "Unknown command"); } @@ -1741,9 +1797,13 @@ handle_server_state_waiting_for_data (DBusAuth *auth, goto_state (auth, &common_state_need_disconnect); return TRUE; + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + return send_error (auth, "Need to authenticate first"); + case DBUS_AUTH_COMMAND_REJECTED: case DBUS_AUTH_COMMAND_OK: case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: default: return send_error (auth, "Unknown command"); } @@ -1766,9 +1826,16 @@ handle_server_state_waiting_for_begin (DBusAuth *auth, goto_state (auth, &common_state_authenticated); return TRUE; + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + if (auth->unix_fd_possible) + return send_agree_unix_fd(auth); + else + return send_error(auth, "Unix FD passing not supported, not authenticated or otherwise not possible"); + case DBUS_AUTH_COMMAND_REJECTED: case DBUS_AUTH_COMMAND_OK: case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: default: return send_error (auth, "Unknown command"); @@ -1933,7 +2000,7 @@ handle_client_state_waiting_for_data (DBusAuth *auth, return process_rejected (auth, args); case DBUS_AUTH_COMMAND_OK: - return send_begin (auth, args); + return process_ok(auth, args); case DBUS_AUTH_COMMAND_ERROR: return send_cancel (auth); @@ -1942,6 +2009,8 @@ handle_client_state_waiting_for_data (DBusAuth *auth, case DBUS_AUTH_COMMAND_CANCEL: case DBUS_AUTH_COMMAND_BEGIN: case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: default: return send_error (auth, "Unknown command"); } @@ -1958,7 +2027,7 @@ handle_client_state_waiting_for_ok (DBusAuth *auth, return process_rejected (auth, args); case DBUS_AUTH_COMMAND_OK: - return send_begin (auth, args); + return process_ok(auth, args); case DBUS_AUTH_COMMAND_DATA: case DBUS_AUTH_COMMAND_ERROR: @@ -1968,6 +2037,8 @@ handle_client_state_waiting_for_ok (DBusAuth *auth, case DBUS_AUTH_COMMAND_CANCEL: case DBUS_AUTH_COMMAND_BEGIN: case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: default: return send_error (auth, "Unknown command"); } @@ -1990,12 +2061,46 @@ handle_client_state_waiting_for_reject (DBusAuth *auth, case DBUS_AUTH_COMMAND_OK: case DBUS_AUTH_COMMAND_ERROR: case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: default: goto_state (auth, &common_state_need_disconnect); return TRUE; } } +static dbus_bool_t +handle_client_state_waiting_for_agree_unix_fd(DBusAuth *auth, + DBusAuthCommand command, + const DBusString *args) +{ + switch (command) + { + case DBUS_AUTH_COMMAND_AGREE_UNIX_FD: + _dbus_assert(auth->unix_fd_possible); + auth->unix_fd_negotiated = TRUE; + _dbus_verbose("Sucessfully negotiated UNIX FD passing\n"); + return send_begin (auth); + + case DBUS_AUTH_COMMAND_ERROR: + _dbus_assert(auth->unix_fd_possible); + auth->unix_fd_negotiated = FALSE; + _dbus_verbose("Failed to negotiate UNIX FD passing\n"); + return send_begin (auth); + + case DBUS_AUTH_COMMAND_OK: + case DBUS_AUTH_COMMAND_DATA: + case DBUS_AUTH_COMMAND_REJECTED: + case DBUS_AUTH_COMMAND_AUTH: + case DBUS_AUTH_COMMAND_CANCEL: + case DBUS_AUTH_COMMAND_BEGIN: + case DBUS_AUTH_COMMAND_UNKNOWN: + case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD: + default: + return send_error (auth, "Unknown command"); + } +} + /** * Mapping from command name to enum */ @@ -2005,13 +2110,15 @@ typedef struct { } DBusAuthCommandName; static const DBusAuthCommandName auth_command_names[] = { - { "AUTH", DBUS_AUTH_COMMAND_AUTH }, - { "CANCEL", DBUS_AUTH_COMMAND_CANCEL }, - { "DATA", DBUS_AUTH_COMMAND_DATA }, - { "BEGIN", DBUS_AUTH_COMMAND_BEGIN }, - { "REJECTED", DBUS_AUTH_COMMAND_REJECTED }, - { "OK", DBUS_AUTH_COMMAND_OK }, - { "ERROR", DBUS_AUTH_COMMAND_ERROR } + { "AUTH", DBUS_AUTH_COMMAND_AUTH }, + { "CANCEL", DBUS_AUTH_COMMAND_CANCEL }, + { "DATA", DBUS_AUTH_COMMAND_DATA }, + { "BEGIN", DBUS_AUTH_COMMAND_BEGIN }, + { "REJECTED", DBUS_AUTH_COMMAND_REJECTED }, + { "OK", DBUS_AUTH_COMMAND_OK }, + { "ERROR", DBUS_AUTH_COMMAND_ERROR }, + { "NEGOTIATE_UNIX_FD", DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD }, + { "AGREE_UNIX_FD", DBUS_AUTH_COMMAND_AGREE_UNIX_FD } }; static DBusAuthCommand @@ -2685,6 +2792,31 @@ _dbus_auth_set_context (DBusAuth *auth, &auth->context, 0, _dbus_string_get_length (context)); } +/** + * Sets whether unix fd passing is potentially on the transport and + * hence shall be negotiated. + * + * @param auth the auth conversation + * @param b TRUE when unix fd passing shall be negotiated, otherwise FALSE + */ +void +_dbus_auth_set_unix_fd_possible(DBusAuth *auth, dbus_bool_t b) +{ + auth->unix_fd_possible = b; +} + +/** + * Queries whether unix fd passing was sucessfully negotiated. + * + * @param auth the auth conversion + * @returns #TRUE when unix fd passing was negotiated. + */ +dbus_bool_t +_dbus_auth_get_unix_fd_negotiated(DBusAuth *auth) +{ + return auth->unix_fd_negotiated; +} + /** @} */ /* tests in dbus-auth-util.c */ diff --git a/dbus/dbus-auth.h b/dbus/dbus-auth.h index 92150ad6..ae3f3647 100644 --- a/dbus/dbus-auth.h +++ b/dbus/dbus-auth.h @@ -75,6 +75,8 @@ dbus_bool_t _dbus_auth_set_context (DBusAuth *auth, const DBusString *context); const char* _dbus_auth_get_guid_from_server(DBusAuth *auth); +void _dbus_auth_set_unix_fd_possible(DBusAuth *auth, dbus_bool_t b); +dbus_bool_t _dbus_auth_get_unix_fd_negotiated(DBusAuth *auth); DBUS_END_DECLS diff --git a/dbus/dbus-bus.h b/dbus/dbus-bus.h index e36449c7..02a95711 100644 --- a/dbus/dbus-bus.h +++ b/dbus/dbus-bus.h @@ -36,41 +36,54 @@ DBUS_BEGIN_DECLS * @{ */ +DBUS_EXPORT DBusConnection *dbus_bus_get (DBusBusType type, DBusError *error); +DBUS_EXPORT DBusConnection *dbus_bus_get_private (DBusBusType type, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_bus_register (DBusConnection *connection, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_bus_set_unique_name (DBusConnection *connection, const char *unique_name); +DBUS_EXPORT const char* dbus_bus_get_unique_name (DBusConnection *connection); +DBUS_EXPORT unsigned long dbus_bus_get_unix_user (DBusConnection *connection, const char *name, DBusError *error); +DBUS_EXPORT char* dbus_bus_get_id (DBusConnection *connection, DBusError *error); +DBUS_EXPORT int dbus_bus_request_name (DBusConnection *connection, const char *name, unsigned int flags, DBusError *error); +DBUS_EXPORT int dbus_bus_release_name (DBusConnection *connection, const char *name, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_bus_name_has_owner (DBusConnection *connection, const char *name, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_bus_start_service_by_name (DBusConnection *connection, const char *name, dbus_uint32_t flags, dbus_uint32_t *reply, DBusError *error); +DBUS_EXPORT void dbus_bus_add_match (DBusConnection *connection, const char *rule, DBusError *error); +DBUS_EXPORT void dbus_bus_remove_match (DBusConnection *connection, const char *rule, DBusError *error); diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h index 721b5d73..cdf3f59d 100644 --- a/dbus/dbus-connection-internal.h +++ b/dbus/dbus-connection-internal.h @@ -75,6 +75,7 @@ void _dbus_connection_toggle_timeout_unlocked (DBusConnection dbus_bool_t enabled); DBusConnection* _dbus_connection_new_for_transport (DBusTransport *transport); void _dbus_connection_do_iteration_unlocked (DBusConnection *connection, + DBusPendingCall *pending, unsigned int flags, int timeout_milliseconds); void _dbus_connection_close_possibly_shared (DBusConnection *connection); diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c index 9526d3cc..5a595d8f 100644 --- a/dbus/dbus-connection.c +++ b/dbus/dbus-connection.c @@ -33,6 +33,7 @@ #include "dbus-list.h" #include "dbus-hash.h" #include "dbus-message-internal.h" +#include "dbus-message-private.h" #include "dbus-threads.h" #include "dbus-protocol.h" #include "dbus-dataslot.h" @@ -41,6 +42,7 @@ #include "dbus-object-tree.h" #include "dbus-threads-internal.h" #include "dbus-bus.h" +#include "dbus-marshal-basic.h" #ifdef DBUS_DISABLE_CHECKS #define TOOK_LOCK_CHECK(connection) @@ -62,17 +64,25 @@ #define TRACE_LOCKS 1 #define CONNECTION_LOCK(connection) do { \ - if (TRACE_LOCKS) { _dbus_verbose (" LOCK: %s\n", _DBUS_FUNCTION_NAME); } \ + if (TRACE_LOCKS) { _dbus_verbose ("LOCK\n"); } \ _dbus_mutex_lock ((connection)->mutex); \ TOOK_LOCK_CHECK (connection); \ } while (0) #define CONNECTION_UNLOCK(connection) do { \ - if (TRACE_LOCKS) { _dbus_verbose (" UNLOCK: %s\n", _DBUS_FUNCTION_NAME); } \ + if (TRACE_LOCKS) { _dbus_verbose ("UNLOCK\n"); } \ RELEASING_LOCK_CHECK (connection); \ _dbus_mutex_unlock ((connection)->mutex); \ } while (0) +#define SLOTS_LOCK(connection) do { \ + _dbus_mutex_lock ((connection)->slot_mutex); \ + } while (0) + +#define SLOTS_UNLOCK(connection) do { \ + _dbus_mutex_unlock ((connection)->slot_mutex); \ + } while (0) + #define DISPATCH_STATUS_NAME(s) \ ((s) == DBUS_DISPATCH_COMPLETE ? "complete" : \ (s) == DBUS_DISPATCH_DATA_REMAINS ? "data remains" : \ @@ -223,7 +233,11 @@ struct DBusPreallocatedSend DBusList *counter_link; /**< Preallocated link in the resource counter */ }; +#ifdef HAVE_DECL_MSG_NOSIGNAL +static dbus_bool_t _dbus_modify_sigpipe = FALSE; +#else static dbus_bool_t _dbus_modify_sigpipe = TRUE; +#endif /** * Implementation details of DBusConnection. All fields are private. @@ -257,6 +271,7 @@ struct DBusConnection DBusList *filter_list; /**< List of filters. */ + DBusMutex *slot_mutex; /**< Lock on slot_list so overall connection lock need not be taken */ DBusDataSlotList slot_list; /**< Data stored by allocated integer ID */ DBusHashTable *pending_replies; /**< Hash of message serials to #DBusPendingCall. */ @@ -320,6 +335,8 @@ static void _dbus_connection_release_dispatch (DB static DBusDispatchStatus _dbus_connection_flush_unlocked (DBusConnection *connection); static void _dbus_connection_close_possibly_shared_and_unlock (DBusConnection *connection); static dbus_bool_t _dbus_connection_get_is_connected_unlocked (DBusConnection *connection); +static dbus_bool_t _dbus_connection_peek_for_reply_unlocked (DBusConnection *connection, + dbus_uint32_t client_serial); static DBusMessageFilter * _dbus_message_filter_ref (DBusMessageFilter *filter) @@ -479,9 +496,9 @@ _dbus_connection_queue_received_message_link (DBusConnection *connection, _dbus_connection_wakeup_mainloop (connection); - _dbus_verbose ("Message %p (%d %s %s %s '%s' reply to %u) added to incoming queue %p, %d incoming\n", + _dbus_verbose ("Message %p (%s %s %s %s '%s' reply to %u) added to incoming queue %p, %d incoming\n", message, - dbus_message_get_type (message), + dbus_message_type_to_string (dbus_message_get_type (message)), dbus_message_get_path (message) ? dbus_message_get_path (message) : "no path", @@ -605,9 +622,9 @@ _dbus_connection_message_sent (DBusConnection *connection, connection->n_outgoing -= 1; - _dbus_verbose ("Message %p (%d %s %s %s '%s') removed from outgoing queue %p, %d left to send\n", + _dbus_verbose ("Message %p (%s %s %s %s '%s') removed from outgoing queue %p, %d left to send\n", message, - dbus_message_get_type (message), + dbus_message_type_to_string (dbus_message_get_type (message)), dbus_message_get_path (message) ? dbus_message_get_path (message) : "no path", @@ -621,8 +638,8 @@ _dbus_connection_message_sent (DBusConnection *connection, connection, connection->n_outgoing); /* Save this link in the link cache also */ - _dbus_message_remove_size_counter (message, connection->outgoing_counter, - &link); + _dbus_message_remove_counter (message, connection->outgoing_counter, + &link); _dbus_list_prepend_link (&connection->link_cache, link); dbus_message_unref (message); @@ -647,39 +664,42 @@ protected_change_watch (DBusConnection *connection, DBusWatchToggleFunction toggle_function, dbus_bool_t enabled) { - DBusWatchList *watches; dbus_bool_t retval; - + HAVE_LOCK_CHECK (connection); - /* This isn't really safe or reasonable; a better pattern is the "do everything, then - * drop lock and call out" one; but it has to be propagated up through all callers + /* The original purpose of protected_change_watch() was to hold a + * ref on the connection while dropping the connection lock, then + * calling out to the app. This was a broken hack that did not + * work, since the connection was in a hosed state (no WatchList + * field) while calling out. + * + * So for now we'll just keep the lock while calling out. This means + * apps are not allowed to call DBusConnection methods inside a + * watch function or they will deadlock. + * + * The "real fix" is to use the _and_unlock() pattern found + * elsewhere in the code, to defer calling out to the app until + * we're about to drop locks and return flow of control to the app + * anyway. + * + * See http://lists.freedesktop.org/archives/dbus/2007-July/thread.html#8144 */ - - watches = connection->watches; - if (watches) - { - connection->watches = NULL; - _dbus_connection_ref_unlocked (connection); - CONNECTION_UNLOCK (connection); + if (connection->watches) + { if (add_function) - retval = (* add_function) (watches, watch); + retval = (* add_function) (connection->watches, watch); else if (remove_function) { retval = TRUE; - (* remove_function) (watches, watch); + (* remove_function) (connection->watches, watch); } else { retval = TRUE; - (* toggle_function) (watches, watch, enabled); + (* toggle_function) (connection->watches, watch, enabled); } - - CONNECTION_LOCK (connection); - connection->watches = watches; - _dbus_connection_unref_unlocked (connection); - return retval; } else @@ -768,39 +788,42 @@ protected_change_timeout (DBusConnection *connection, DBusTimeoutToggleFunction toggle_function, dbus_bool_t enabled) { - DBusTimeoutList *timeouts; dbus_bool_t retval; - + HAVE_LOCK_CHECK (connection); - /* This isn't really safe or reasonable; a better pattern is the "do everything, then - * drop lock and call out" one; but it has to be propagated up through all callers + /* The original purpose of protected_change_timeout() was to hold a + * ref on the connection while dropping the connection lock, then + * calling out to the app. This was a broken hack that did not + * work, since the connection was in a hosed state (no TimeoutList + * field) while calling out. + * + * So for now we'll just keep the lock while calling out. This means + * apps are not allowed to call DBusConnection methods inside a + * timeout function or they will deadlock. + * + * The "real fix" is to use the _and_unlock() pattern found + * elsewhere in the code, to defer calling out to the app until + * we're about to drop locks and return flow of control to the app + * anyway. + * + * See http://lists.freedesktop.org/archives/dbus/2007-July/thread.html#8144 */ - - timeouts = connection->timeouts; - if (timeouts) - { - connection->timeouts = NULL; - _dbus_connection_ref_unlocked (connection); - CONNECTION_UNLOCK (connection); + if (connection->timeouts) + { if (add_function) - retval = (* add_function) (timeouts, timeout); + retval = (* add_function) (connection->timeouts, timeout); else if (remove_function) { retval = TRUE; - (* remove_function) (timeouts, timeout); + (* remove_function) (connection->timeouts, timeout); } else { retval = TRUE; - (* toggle_function) (timeouts, timeout, enabled); + (* toggle_function) (connection->timeouts, timeout, enabled); } - - CONNECTION_LOCK (connection); - connection->timeouts = timeouts; - _dbus_connection_unref_unlocked (connection); - return retval; } else @@ -1027,11 +1050,11 @@ _dbus_connection_acquire_io_path (DBusConnection *connection, /* We will only touch io_path_acquired which is protected by our mutex */ CONNECTION_UNLOCK (connection); - _dbus_verbose ("%s locking io_path_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("locking io_path_mutex\n"); _dbus_mutex_lock (connection->io_path_mutex); - _dbus_verbose ("%s start connection->io_path_acquired = %d timeout = %d\n", - _DBUS_FUNCTION_NAME, connection->io_path_acquired, timeout_milliseconds); + _dbus_verbose ("start connection->io_path_acquired = %d timeout = %d\n", + connection->io_path_acquired, timeout_milliseconds); we_acquired = FALSE; @@ -1039,8 +1062,8 @@ _dbus_connection_acquire_io_path (DBusConnection *connection, { if (timeout_milliseconds != -1) { - _dbus_verbose ("%s waiting %d for IO path to be acquirable\n", - _DBUS_FUNCTION_NAME, timeout_milliseconds); + _dbus_verbose ("waiting %d for IO path to be acquirable\n", + timeout_milliseconds); if (!_dbus_condvar_wait_timeout (connection->io_path_cond, connection->io_path_mutex, @@ -1060,7 +1083,7 @@ _dbus_connection_acquire_io_path (DBusConnection *connection, { while (connection->io_path_acquired) { - _dbus_verbose ("%s waiting for IO path to be acquirable\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("waiting for IO path to be acquirable\n"); _dbus_condvar_wait (connection->io_path_cond, connection->io_path_mutex); } @@ -1073,10 +1096,10 @@ _dbus_connection_acquire_io_path (DBusConnection *connection, connection->io_path_acquired = TRUE; } - _dbus_verbose ("%s end connection->io_path_acquired = %d we_acquired = %d\n", - _DBUS_FUNCTION_NAME, connection->io_path_acquired, we_acquired); + _dbus_verbose ("end connection->io_path_acquired = %d we_acquired = %d\n", + connection->io_path_acquired, we_acquired); - _dbus_verbose ("%s unlocking io_path_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlocking io_path_mutex\n"); _dbus_mutex_unlock (connection->io_path_mutex); CONNECTION_LOCK (connection); @@ -1100,18 +1123,18 @@ _dbus_connection_release_io_path (DBusConnection *connection) { HAVE_LOCK_CHECK (connection); - _dbus_verbose ("%s locking io_path_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("locking io_path_mutex\n"); _dbus_mutex_lock (connection->io_path_mutex); _dbus_assert (connection->io_path_acquired); - _dbus_verbose ("%s start connection->io_path_acquired = %d\n", - _DBUS_FUNCTION_NAME, connection->io_path_acquired); + _dbus_verbose ("start connection->io_path_acquired = %d\n", + connection->io_path_acquired); connection->io_path_acquired = FALSE; _dbus_condvar_wake_one (connection->io_path_cond); - _dbus_verbose ("%s unlocking io_path_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlocking io_path_mutex\n"); _dbus_mutex_unlock (connection->io_path_mutex); } @@ -1137,18 +1160,26 @@ _dbus_connection_release_io_path (DBusConnection *connection) * you specify DBUS_ITERATION_BLOCK; in that case the function * returns immediately. * + * If pending is not NULL then a check is made if the pending call + * is completed after the io path has been required. If the call + * has been completed nothing is done. This must be done since + * the _dbus_connection_acquire_io_path releases the connection + * lock for a while. + * * Called with connection lock held. * * @param connection the connection. + * @param pending the pending call that should be checked or NULL * @param flags iteration flags. * @param timeout_milliseconds maximum blocking time, or -1 for no limit. */ void _dbus_connection_do_iteration_unlocked (DBusConnection *connection, + DBusPendingCall *pending, unsigned int flags, int timeout_milliseconds) { - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); HAVE_LOCK_CHECK (connection); @@ -1160,14 +1191,28 @@ _dbus_connection_do_iteration_unlocked (DBusConnection *connection, { HAVE_LOCK_CHECK (connection); - _dbus_transport_do_iteration (connection->transport, - flags, timeout_milliseconds); + if ( (pending != NULL) && _dbus_pending_call_get_completed_unlocked(pending)) + { + _dbus_verbose ("pending call completed while acquiring I/O path"); + } + else if ( (pending != NULL) && + _dbus_connection_peek_for_reply_unlocked (connection, + _dbus_pending_call_get_reply_serial_unlocked (pending))) + { + _dbus_verbose ("pending call completed while acquiring I/O path (reply found in queue)"); + } + else + { + _dbus_transport_do_iteration (connection->transport, + flags, timeout_milliseconds); + } + _dbus_connection_release_io_path (connection); } HAVE_LOCK_CHECK (connection); - _dbus_verbose ("%s end\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("end\n"); } /** @@ -1239,6 +1284,10 @@ _dbus_connection_new_for_transport (DBusTransport *transport) if (connection->io_path_cond == NULL) goto error; + _dbus_mutex_new_at_location (&connection->slot_mutex); + if (connection->slot_mutex == NULL) + goto error; + disconnect_message = dbus_message_new_signal (DBUS_PATH_LOCAL, DBUS_INTERFACE_LOCAL, "Disconnected"); @@ -1315,6 +1364,7 @@ _dbus_connection_new_for_transport (DBusTransport *transport) _dbus_mutex_free_at_location (&connection->mutex); _dbus_mutex_free_at_location (&connection->io_path_mutex); _dbus_mutex_free_at_location (&connection->dispatch_mutex); + _dbus_mutex_free_at_location (&connection->slot_mutex); dbus_free (connection); } if (pending_replies) @@ -1432,7 +1482,7 @@ _dbus_connection_handle_watch (DBusWatch *watch, connection = data; - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); CONNECTION_LOCK (connection); @@ -1451,14 +1501,14 @@ _dbus_connection_handle_watch (DBusWatch *watch, HAVE_LOCK_CHECK (connection); - _dbus_verbose ("%s middle\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("middle\n"); status = _dbus_connection_get_dispatch_status_unlocked (connection); /* this calls out to user code */ _dbus_connection_update_dispatch_status_and_unlock (connection, status); - _dbus_verbose ("%s end\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("end\n"); return retval; } @@ -1930,14 +1980,13 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con dbus_uint32_t *client_serial) { dbus_uint32_t serial; - const char *sig; preallocated->queue_link->data = message; _dbus_list_prepend_link (&connection->outgoing_messages, preallocated->queue_link); - _dbus_message_add_size_counter_link (message, - preallocated->counter_link); + _dbus_message_add_counter_link (message, + preallocated->counter_link); dbus_free (preallocated); preallocated = NULL; @@ -1946,11 +1995,9 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con connection->n_outgoing += 1; - sig = dbus_message_get_signature (message); - - _dbus_verbose ("Message %p (%d %s %s %s '%s') for %s added to outgoing queue %p, %d pending to send\n", + _dbus_verbose ("Message %p (%s %s %s %s '%s') for %s added to outgoing queue %p, %d pending to send\n", message, - dbus_message_get_type (message), + dbus_message_type_to_string (dbus_message_get_type (message)), dbus_message_get_path (message) ? dbus_message_get_path (message) : "no path", @@ -1960,7 +2007,7 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con dbus_message_get_member (message) ? dbus_message_get_member (message) : "no member", - sig, + dbus_message_get_signature (message), dbus_message_get_destination (message) ? dbus_message_get_destination (message) : "null", @@ -1989,6 +2036,7 @@ _dbus_connection_send_preallocated_unlocked_no_update (DBusConnection *con * out immediately, and otherwise get them queued up */ _dbus_connection_do_iteration_unlocked (connection, + NULL, DBUS_ITERATION_DO_WRITING, -1); @@ -2011,7 +2059,7 @@ _dbus_connection_send_preallocated_and_unlock (DBusConnection *connection, preallocated, message, client_serial); - _dbus_verbose ("%s middle\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("middle\n"); status = _dbus_connection_get_dispatch_status_unlocked (connection); /* this calls out to user code */ @@ -2157,6 +2205,32 @@ generate_local_error_message (dbus_uint32_t serial, return message; } +/* + * Peek the incoming queue to see if we got reply for a specific serial + */ +static dbus_bool_t +_dbus_connection_peek_for_reply_unlocked (DBusConnection *connection, + dbus_uint32_t client_serial) +{ + DBusList *link; + HAVE_LOCK_CHECK (connection); + + link = _dbus_list_get_first_link (&connection->incoming_messages); + + while (link != NULL) + { + DBusMessage *reply = link->data; + + if (dbus_message_get_reply_serial (reply) == client_serial) + { + _dbus_verbose ("%s reply to %d found in queue\n", _DBUS_FUNCTION_NAME, client_serial); + return TRUE; + } + link = _dbus_list_get_next_link (&connection->incoming_messages, link); + } + + return FALSE; +} /* This is slightly strange since we can pop a message here without * the dispatch lock. @@ -2246,7 +2320,7 @@ check_for_reply_and_update_dispatch_unlocked (DBusConnection *connection, _dbus_pending_call_get_reply_serial_unlocked (pending)); if (reply != NULL) { - _dbus_verbose ("%s checked for reply\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("checked for reply\n"); _dbus_verbose ("dbus_connection_send_with_reply_and_block(): got reply\n"); @@ -2308,10 +2382,10 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) * below */ timeout = _dbus_pending_call_get_timeout_unlocked (pending); + _dbus_get_current_time (&start_tv_sec, &start_tv_usec); if (timeout) { timeout_milliseconds = dbus_timeout_get_interval (timeout); - _dbus_get_current_time (&start_tv_sec, &start_tv_usec); _dbus_verbose ("dbus_connection_send_with_reply_and_block(): will block %d milliseconds for reply serial %u from %ld sec %ld usec\n", timeout_milliseconds, @@ -2333,13 +2407,14 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) /* Now we wait... */ /* always block at least once as we know we don't have the reply yet */ _dbus_connection_do_iteration_unlocked (connection, + pending, DBUS_ITERATION_DO_READING | DBUS_ITERATION_BLOCK, timeout_milliseconds); recheck_status: - _dbus_verbose ("%s top of recheck\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("top of recheck\n"); HAVE_LOCK_CHECK (connection); @@ -2352,7 +2427,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) */ if (_dbus_pending_call_get_completed_unlocked (pending)) { - _dbus_verbose ("Pending call completed by dispatch in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("Pending call completed by dispatch\n"); _dbus_connection_update_dispatch_status_and_unlock (connection, status); dbus_pending_call_unref (pending); return; @@ -2399,6 +2474,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) { /* block again, we don't have the reply buffered yet. */ _dbus_connection_do_iteration_unlocked (connection, + pending, DBUS_ITERATION_DO_READING | DBUS_ITERATION_BLOCK, timeout_milliseconds - elapsed_milliseconds); @@ -2426,6 +2502,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending) { /* block again, we don't have the reply buffered yet. */ _dbus_connection_do_iteration_unlocked (connection, + NULL, DBUS_ITERATION_DO_READING | DBUS_ITERATION_BLOCK, timeout_milliseconds - elapsed_milliseconds); @@ -2558,9 +2635,14 @@ dbus_connection_ref (DBusConnection *connection) /* The connection lock is better than the global * lock in the atomic increment fallback + * + * (FIXME but for now we always use the atomic version, + * to avoid taking the connection lock, due to + * the mess with set_timeout_functions()/set_watch_functions() + * calling out to the app without dropping locks) */ -#ifdef DBUS_HAVE_ATOMIC_INT +#if 1 _dbus_atomic_inc (&connection->refcount); #else CONNECTION_LOCK (connection); @@ -2580,9 +2662,9 @@ free_outgoing_message (void *element, DBusMessage *message = element; DBusConnection *connection = data; - _dbus_message_remove_size_counter (message, - connection->outgoing_counter, - NULL); + _dbus_message_remove_counter (message, + connection->outgoing_counter, + NULL); dbus_message_unref (message); } @@ -2672,6 +2754,8 @@ _dbus_connection_last_unref (DBusConnection *connection) _dbus_mutex_free_at_location (&connection->io_path_mutex); _dbus_mutex_free_at_location (&connection->dispatch_mutex); + _dbus_mutex_free_at_location (&connection->slot_mutex); + _dbus_mutex_free_at_location (&connection->mutex); dbus_free (connection); @@ -2706,9 +2790,14 @@ dbus_connection_unref (DBusConnection *connection) /* The connection lock is better than the global * lock in the atomic increment fallback + * + * (FIXME but for now we always use the atomic version, + * to avoid taking the connection lock, due to + * the mess with set_timeout_functions()/set_watch_functions() + * calling out to the app without dropping locks) */ -#ifdef DBUS_HAVE_ATOMIC_INT +#if 1 last_unref = (_dbus_atomic_dec (&connection->refcount) == 1); #else CONNECTION_LOCK (connection); @@ -2975,15 +3064,59 @@ dbus_connection_get_server_id (DBusConnection *connection) char *id; _dbus_return_val_if_fail (connection != NULL, NULL); - + CONNECTION_LOCK (connection); id = _dbus_strdup (_dbus_transport_get_server_id (connection->transport)); CONNECTION_UNLOCK (connection); - + return id; } /** + * Tests whether a certain type can be send via the connection. This + * will always return TRUE for all types, with the exception of + * DBUS_TYPE_UNIX_FD. The function will return TRUE for + * DBUS_TYPE_UNIX_FD only on systems that know Unix file descriptors + * and can send them via the chosen transport and when the remote side + * supports this. + * + * This function can be used to do runtime checking for types that + * might be unknown to the specific D-Bus client implementation + * version, i.e. it will return FALSE for all types this + * implementation does not know. + * + * @param connection the connection + * @param type the type to check + * @returns TRUE if the type may be send via the connection + */ +dbus_bool_t +dbus_connection_can_send_type(DBusConnection *connection, + int type) +{ + _dbus_return_val_if_fail (connection != NULL, FALSE); + + if (!_dbus_type_is_valid(type)) + return FALSE; + + if (type != DBUS_TYPE_UNIX_FD) + return TRUE; + +#ifdef HAVE_UNIX_FD_PASSING + { + dbus_bool_t b; + + CONNECTION_LOCK(connection); + b = _dbus_transport_can_pass_unix_fd(connection->transport); + CONNECTION_UNLOCK(connection); + + return b; + } +#endif + + return FALSE; +} + +/** * Set whether _exit() should be called when the connection receives a * disconnect signal. The call to _exit() comes after any handlers for * the disconnect signal run; handlers can cancel the exit by calling @@ -3083,8 +3216,23 @@ dbus_connection_send_preallocated (DBusConnection *connection, _dbus_return_if_fail (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL || (dbus_message_get_interface (message) != NULL && dbus_message_get_member (message) != NULL)); - + CONNECTION_LOCK (connection); + +#ifdef HAVE_UNIX_FD_PASSING + + if (!_dbus_transport_can_pass_unix_fd(connection->transport) && + message->n_unix_fds > 0) + { + /* Refuse to send fds on a connection that cannot handle + them. Unfortunately we cannot return a proper error here, so + the best we can is just return. */ + CONNECTION_UNLOCK (connection); + return; + } + +#endif + _dbus_connection_send_preallocated_and_unlock (connection, preallocated, message, client_serial); @@ -3148,6 +3296,20 @@ dbus_connection_send (DBusConnection *connection, CONNECTION_LOCK (connection); +#ifdef HAVE_UNIX_FD_PASSING + + if (!_dbus_transport_can_pass_unix_fd(connection->transport) && + message->n_unix_fds > 0) + { + /* Refuse to send fds on a connection that cannot handle + them. Unfortunately we cannot return a proper error here, so + the best we can is just return. */ + CONNECTION_UNLOCK (connection); + return FALSE; + } + +#endif + return _dbus_connection_send_and_unlock (connection, message, serial); @@ -3168,7 +3330,7 @@ reply_handler_timeout (void *data) _dbus_pending_call_get_timeout_unlocked (pending)); _dbus_pending_call_set_timeout_added_unlocked (pending, FALSE); - _dbus_verbose ("%s middle\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("middle\n"); status = _dbus_connection_get_dispatch_status_unlocked (connection); /* Unlocks, and calls out to user code */ @@ -3202,12 +3364,16 @@ reply_handler_timeout (void *data) * you want a very short or very long timeout. If INT_MAX is passed for * the timeout, no timeout will be set and the call will block forever. * - * @warning if the connection is disconnected, the #DBusPendingCall - * will be set to #NULL, so be careful with this. - * + * @warning if the connection is disconnected or you try to send Unix + * file descriptors on a connection that does not support them, the + * #DBusPendingCall will be set to #NULL, so be careful with this. + * * @param connection the connection * @param message the message to send - * @param pending_return return location for a #DBusPendingCall object, or #NULL if connection is disconnected + * @param pending_return return location for a #DBusPendingCall + * object, or #NULL if connection is disconnected or when you try to + * send Unix file descriptors on a connection that does not support + * them. * @param timeout_milliseconds timeout in milliseconds, -1 for default or INT_MAX for no timeout * @returns #FALSE if no memory, #TRUE otherwise. * @@ -3231,6 +3397,21 @@ dbus_connection_send_with_reply (DBusConnection *connection, CONNECTION_LOCK (connection); +#ifdef HAVE_UNIX_FD_PASSING + + if (!_dbus_transport_can_pass_unix_fd(connection->transport) && + message->n_unix_fds > 0) + { + /* Refuse to send fds on a connection that cannot handle + them. Unfortunately we cannot return a proper error here, so + the best we can do is return TRUE but leave *pending_return + as NULL. */ + CONNECTION_UNLOCK (connection); + return TRUE; + } + +#endif + if (!_dbus_connection_get_is_connected_unlocked (connection)) { CONNECTION_UNLOCK (connection); @@ -3339,12 +3520,26 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection, { DBusMessage *reply; DBusPendingCall *pending; - + _dbus_return_val_if_fail (connection != NULL, NULL); _dbus_return_val_if_fail (message != NULL, NULL); _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, NULL); _dbus_return_val_if_error_is_set (error, NULL); - + +#ifdef HAVE_UNIX_FD_PASSING + + CONNECTION_LOCK (connection); + if (!_dbus_transport_can_pass_unix_fd(connection->transport) && + message->n_unix_fds > 0) + { + CONNECTION_UNLOCK (connection); + dbus_set_error(error, DBUS_ERROR_FAILED, "Cannot send file descriptors on this connection."); + return NULL; + } + CONNECTION_UNLOCK (connection); + +#endif + if (!dbus_connection_send_with_reply (connection, message, &pending, timeout_milliseconds)) { @@ -3400,9 +3595,10 @@ _dbus_connection_flush_unlocked (DBusConnection *connection) while (connection->n_outgoing > 0 && _dbus_connection_get_is_connected_unlocked (connection)) { - _dbus_verbose ("doing iteration in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("doing iteration in\n"); HAVE_LOCK_CHECK (connection); _dbus_connection_do_iteration_unlocked (connection, + NULL, DBUS_ITERATION_DO_READING | DBUS_ITERATION_DO_WRITING | DBUS_ITERATION_BLOCK, @@ -3410,7 +3606,7 @@ _dbus_connection_flush_unlocked (DBusConnection *connection) } HAVE_LOCK_CHECK (connection); - _dbus_verbose ("%s middle\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("middle\n"); status = _dbus_connection_get_dispatch_status_unlocked (connection); HAVE_LOCK_CHECK (connection); @@ -3442,7 +3638,7 @@ dbus_connection_flush (DBusConnection *connection) /* Unlocks and calls out to user code */ _dbus_connection_update_dispatch_status_and_unlock (connection, status); - _dbus_verbose ("%s end\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("end\n"); } /** @@ -3472,13 +3668,13 @@ _dbus_connection_read_write_dispatch (DBusConnection *connection, if (dispatch && dstatus == DBUS_DISPATCH_DATA_REMAINS) { - _dbus_verbose ("doing dispatch in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("doing dispatch\n"); dbus_connection_dispatch (connection); CONNECTION_LOCK (connection); } else if (dstatus == DBUS_DISPATCH_NEED_MEMORY) { - _dbus_verbose ("pausing for memory in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("pausing for memory\n"); _dbus_memory_pause_based_on_timeout (timeout_milliseconds); CONNECTION_LOCK (connection); } @@ -3487,8 +3683,9 @@ _dbus_connection_read_write_dispatch (DBusConnection *connection, CONNECTION_LOCK (connection); if (_dbus_connection_get_is_connected_unlocked (connection)) { - _dbus_verbose ("doing iteration in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("doing iteration\n"); _dbus_connection_do_iteration_unlocked (connection, + NULL, DBUS_ITERATION_DO_READING | DBUS_ITERATION_DO_WRITING | DBUS_ITERATION_BLOCK, @@ -3638,7 +3835,7 @@ dbus_connection_borrow_message (DBusConnection *connection) _dbus_return_val_if_fail (connection != NULL, NULL); - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); /* this is called for the side effect that it queues * up any messages from the transport @@ -3760,9 +3957,9 @@ _dbus_connection_pop_message_link_unlocked (DBusConnection *connection) link = _dbus_list_pop_first_link (&connection->incoming_messages); connection->n_incoming -= 1; - _dbus_verbose ("Message %p (%d %s %s %s '%s') removed from incoming queue %p, %d incoming\n", + _dbus_verbose ("Message %p (%s %s %s %s '%s') removed from incoming queue %p, %d incoming\n", link->data, - dbus_message_get_type (link->data), + dbus_message_type_to_string (dbus_message_get_type (link->data)), dbus_message_get_path (link->data) ? dbus_message_get_path (link->data) : "no path", @@ -3825,9 +4022,9 @@ _dbus_connection_putback_message_link_unlocked (DBusConnection *connection, message_link); connection->n_incoming += 1; - _dbus_verbose ("Message %p (%d %s %s '%s') put back into queue %p, %d incoming\n", + _dbus_verbose ("Message %p (%s %s %s '%s') put back into queue %p, %d incoming\n", message_link->data, - dbus_message_get_type (message_link->data), + dbus_message_type_to_string (dbus_message_get_type (message_link->data)), dbus_message_get_interface (message_link->data) ? dbus_message_get_interface (message_link->data) : "no interface", @@ -3863,7 +4060,7 @@ dbus_connection_pop_message (DBusConnection *connection) DBusMessage *message; DBusDispatchStatus status; - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); /* this is called for the side effect that it queues * up any messages from the transport @@ -3903,12 +4100,12 @@ _dbus_connection_acquire_dispatch (DBusConnection *connection) _dbus_connection_ref_unlocked (connection); CONNECTION_UNLOCK (connection); - _dbus_verbose ("%s locking dispatch_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("locking dispatch_mutex\n"); _dbus_mutex_lock (connection->dispatch_mutex); while (connection->dispatch_acquired) { - _dbus_verbose ("%s waiting for dispatch to be acquirable\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("waiting for dispatch to be acquirable\n"); _dbus_condvar_wait (connection->dispatch_cond, connection->dispatch_mutex); } @@ -3917,7 +4114,7 @@ _dbus_connection_acquire_dispatch (DBusConnection *connection) connection->dispatch_acquired = TRUE; - _dbus_verbose ("%s unlocking dispatch_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlocking dispatch_mutex\n"); _dbus_mutex_unlock (connection->dispatch_mutex); CONNECTION_LOCK (connection); @@ -3936,7 +4133,7 @@ _dbus_connection_release_dispatch (DBusConnection *connection) { HAVE_LOCK_CHECK (connection); - _dbus_verbose ("%s locking dispatch_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("locking dispatch_mutex\n"); _dbus_mutex_lock (connection->dispatch_mutex); _dbus_assert (connection->dispatch_acquired); @@ -3944,7 +4141,7 @@ _dbus_connection_release_dispatch (DBusConnection *connection) connection->dispatch_acquired = FALSE; _dbus_condvar_wake_one (connection->dispatch_cond); - _dbus_verbose ("%s unlocking dispatch_mutex\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlocking dispatch_mutex\n"); _dbus_mutex_unlock (connection->dispatch_mutex); } @@ -3997,8 +4194,7 @@ notify_disconnected_and_dispatch_complete_unlocked (DBusConnection *connection) if (connection->disconnect_message_link != NULL) { - _dbus_verbose ("Sending disconnect message from %s\n", - _DBUS_FUNCTION_NAME); + _dbus_verbose ("Sending disconnect message\n"); /* If we have pending calls, queue their timeouts - we want the Disconnected * to be the last message, after these timeouts. @@ -4152,7 +4348,7 @@ dbus_connection_get_dispatch_status (DBusConnection *connection) _dbus_return_val_if_fail (connection != NULL, DBUS_DISPATCH_COMPLETE); - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); CONNECTION_LOCK (connection); @@ -4329,7 +4525,7 @@ dbus_connection_dispatch (DBusConnection *connection) _dbus_return_val_if_fail (connection != NULL, DBUS_DISPATCH_COMPLETE); - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); CONNECTION_LOCK (connection); status = _dbus_connection_get_dispatch_status_unlocked (connection); @@ -4368,9 +4564,9 @@ dbus_connection_dispatch (DBusConnection *connection) message = message_link->data; - _dbus_verbose (" dispatching message %p (%d %s %s '%s')\n", + _dbus_verbose (" dispatching message %p (%s %s %s '%s')\n", message, - dbus_message_get_type (message), + dbus_message_type_to_string (dbus_message_get_type (message)), dbus_message_get_interface (message) ? dbus_message_get_interface (message) : "no interface", @@ -4465,7 +4661,7 @@ dbus_connection_dispatch (DBusConnection *connection) if (result == DBUS_HANDLER_RESULT_NEED_MEMORY) { - _dbus_verbose ("No memory in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("No memory\n"); goto out; } else if (result == DBUS_HANDLER_RESULT_HANDLED) @@ -4477,9 +4673,9 @@ dbus_connection_dispatch (DBusConnection *connection) /* We're still protected from dispatch() reentrancy here * since we acquired the dispatcher */ - _dbus_verbose (" running object path dispatch on message %p (%d %s %s '%s')\n", + _dbus_verbose (" running object path dispatch on message %p (%s %s %s '%s')\n", message, - dbus_message_get_type (message), + dbus_message_type_to_string (dbus_message_get_type (message)), dbus_message_get_interface (message) ? dbus_message_get_interface (message) : "no interface", @@ -4558,8 +4754,8 @@ dbus_connection_dispatch (DBusConnection *connection) result = DBUS_HANDLER_RESULT_HANDLED; } - _dbus_verbose (" done dispatching %p (%d %s %s '%s') on connection %p\n", message, - dbus_message_get_type (message), + _dbus_verbose (" done dispatching %p (%s %s %s '%s') on connection %p\n", message, + dbus_message_type_to_string (dbus_message_get_type (message)), dbus_message_get_interface (message) ? dbus_message_get_interface (message) : "no interface", @@ -4572,7 +4768,7 @@ dbus_connection_dispatch (DBusConnection *connection) out: if (result == DBUS_HANDLER_RESULT_NEED_MEMORY) { - _dbus_verbose ("out of memory in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("out of memory\n"); /* Put message back, and we'll start over. * Yes this means handlers must be idempotent if they @@ -4583,7 +4779,7 @@ dbus_connection_dispatch (DBusConnection *connection) } else { - _dbus_verbose (" ... done dispatching in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose (" ... done dispatching\n"); _dbus_list_free_link (message_link); dbus_message_unref (message); /* don't want the message to count in max message limits @@ -4594,7 +4790,7 @@ dbus_connection_dispatch (DBusConnection *connection) _dbus_connection_release_dispatch (connection); HAVE_LOCK_CHECK (connection); - _dbus_verbose ("%s before final status update\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("before final status update\n"); status = _dbus_connection_get_dispatch_status_unlocked (connection); /* unlocks and calls user code */ @@ -4652,9 +4848,11 @@ dbus_connection_dispatch (DBusConnection *connection) * should be that dbus_connection_set_watch_functions() has no effect, * but the add_function and remove_function may have been called. * - * @todo We need to drop the lock when we call the - * add/remove/toggled functions which can be a side effect - * of setting the watch functions. + * @note The thread lock on DBusConnection is held while + * watch functions are invoked, so inside these functions you + * may not invoke any methods on DBusConnection or it will deadlock. + * See the comments in the code or http://lists.freedesktop.org/archives/dbus/2007-July/tread.html#8144 + * if you encounter this issue and want to attempt writing a patch. * * @param connection the connection. * @param add_function function to begin monitoring a new descriptor. @@ -4673,43 +4871,18 @@ dbus_connection_set_watch_functions (DBusConnection *connection, DBusFreeFunction free_data_function) { dbus_bool_t retval; - DBusWatchList *watches; _dbus_return_val_if_fail (connection != NULL, FALSE); CONNECTION_LOCK (connection); -#ifndef DBUS_DISABLE_CHECKS - if (connection->watches == NULL) - { - _dbus_warn_check_failed ("Re-entrant call to %s is not allowed\n", - _DBUS_FUNCTION_NAME); - return FALSE; - } -#endif - - /* ref connection for slightly better reentrancy */ - _dbus_connection_ref_unlocked (connection); - - /* This can call back into user code, and we need to drop the - * connection lock when it does. This is kind of a lame - * way to do it. - */ - watches = connection->watches; - connection->watches = NULL; - CONNECTION_UNLOCK (connection); - - retval = _dbus_watch_list_set_functions (watches, + retval = _dbus_watch_list_set_functions (connection->watches, add_function, remove_function, toggled_function, data, free_data_function); - CONNECTION_LOCK (connection); - connection->watches = watches; - + CONNECTION_UNLOCK (connection); - /* drop our paranoid refcount */ - dbus_connection_unref (connection); - + return retval; } @@ -4738,6 +4911,12 @@ dbus_connection_set_watch_functions (DBusConnection *connection, * given remove_function. The timer interval may change whenever the * timeout is added, removed, or toggled. * + * @note The thread lock on DBusConnection is held while + * timeout functions are invoked, so inside these functions you + * may not invoke any methods on DBusConnection or it will deadlock. + * See the comments in the code or http://lists.freedesktop.org/archives/dbus/2007-July/thread.html#8144 + * if you encounter this issue and want to attempt writing a patch. + * * @param connection the connection. * @param add_function function to add a timeout. * @param remove_function function to remove a timeout. @@ -4755,38 +4934,17 @@ dbus_connection_set_timeout_functions (DBusConnection *connection, DBusFreeFunction free_data_function) { dbus_bool_t retval; - DBusTimeoutList *timeouts; _dbus_return_val_if_fail (connection != NULL, FALSE); CONNECTION_LOCK (connection); -#ifndef DBUS_DISABLE_CHECKS - if (connection->timeouts == NULL) - { - _dbus_warn_check_failed ("Re-entrant call to %s is not allowed\n", - _DBUS_FUNCTION_NAME); - return FALSE; - } -#endif - - /* ref connection for slightly better reentrancy */ - _dbus_connection_ref_unlocked (connection); - - timeouts = connection->timeouts; - connection->timeouts = NULL; - CONNECTION_UNLOCK (connection); - - retval = _dbus_timeout_list_set_functions (timeouts, + retval = _dbus_timeout_list_set_functions (connection->timeouts, add_function, remove_function, toggled_function, data, free_data_function); - CONNECTION_LOCK (connection); - connection->timeouts = timeouts; - + CONNECTION_UNLOCK (connection); - /* drop our paranoid refcount */ - dbus_connection_unref (connection); return retval; } @@ -5020,10 +5178,7 @@ dbus_connection_get_unix_process_id (DBusConnection *connection, else result = _dbus_transport_get_unix_process_id (connection->transport, pid); -#ifdef DBUS_WIN - _dbus_assert (!result); -#endif - + CONNECTION_UNLOCK (connection); return result; @@ -5749,6 +5904,15 @@ dbus_connection_free_data_slot (dbus_int32_t *slot_p) * the connection is finalized. The slot number * must have been allocated with dbus_connection_allocate_data_slot(). * + * @note This function does not take the + * main thread lock on DBusConnection, which allows it to be + * used from inside watch and timeout functions. (See the + * note in docs for dbus_connection_set_watch_functions().) + * A side effect of this is that you need to know there's + * a reference held on the connection while invoking + * dbus_connection_set_data(), or the connection could be + * finalized during dbus_connection_set_data(). + * * @param connection the connection * @param slot the slot number * @param data the data to store @@ -5768,14 +5932,14 @@ dbus_connection_set_data (DBusConnection *connection, _dbus_return_val_if_fail (connection != NULL, FALSE); _dbus_return_val_if_fail (slot >= 0, FALSE); - CONNECTION_LOCK (connection); + SLOTS_LOCK (connection); retval = _dbus_data_slot_list_set (&slot_allocator, &connection->slot_list, slot, data, free_data_func, &old_free_func, &old_data); - CONNECTION_UNLOCK (connection); + SLOTS_UNLOCK (connection); if (retval) { @@ -5791,6 +5955,15 @@ dbus_connection_set_data (DBusConnection *connection, * Retrieves data previously set with dbus_connection_set_data(). * The slot must still be allocated (must not have been freed). * + * @note This function does not take the + * main thread lock on DBusConnection, which allows it to be + * used from inside watch and timeout functions. (See the + * note in docs for dbus_connection_set_watch_functions().) + * A side effect of this is that you need to know there's + * a reference held on the connection while invoking + * dbus_connection_get_data(), or the connection could be + * finalized during dbus_connection_get_data(). + * * @param connection the connection * @param slot the slot to get data from * @returns the data, or #NULL if not found @@ -5803,13 +5976,13 @@ dbus_connection_get_data (DBusConnection *connection, _dbus_return_val_if_fail (connection != NULL, NULL); - CONNECTION_LOCK (connection); + SLOTS_LOCK (connection); res = _dbus_data_slot_list_get (&slot_allocator, &connection->slot_list, slot); - CONNECTION_UNLOCK (connection); + SLOTS_UNLOCK (connection); return res; } @@ -5866,6 +6039,45 @@ dbus_connection_get_max_message_size (DBusConnection *connection) } /** + * Specifies the maximum number of unix fds a message on this + * connection is allowed to receive. Messages with more unix fds will + * result in disconnecting the connection. + * + * @param connection a #DBusConnection + * @param size maximum message unix fds the connection can receive + */ +void +dbus_connection_set_max_message_unix_fds (DBusConnection *connection, + long n) +{ + _dbus_return_if_fail (connection != NULL); + + CONNECTION_LOCK (connection); + _dbus_transport_set_max_message_unix_fds (connection->transport, + n); + CONNECTION_UNLOCK (connection); +} + +/** + * Gets the value set by dbus_connection_set_max_message_unix_fds(). + * + * @param connection the connection + * @returns the max numer of unix fds of a single message + */ +long +dbus_connection_get_max_message_unix_fds (DBusConnection *connection) +{ + long res; + + _dbus_return_val_if_fail (connection != NULL, 0); + + CONNECTION_LOCK (connection); + res = _dbus_transport_get_max_message_unix_fds (connection->transport); + CONNECTION_UNLOCK (connection); + return res; +} + +/** * Sets the maximum total number of bytes that can be used for all messages * received on this connection. Messages count toward the maximum until * they are finalized. When the maximum is reached, the connection will @@ -5922,6 +6134,48 @@ dbus_connection_get_max_received_size (DBusConnection *connection) } /** + * Sets the maximum total number of unix fds that can be used for all messages + * received on this connection. Messages count toward the maximum until + * they are finalized. When the maximum is reached, the connection will + * not read more data until some messages are finalized. + * + * The semantics are analogous to those of dbus_connection_set_max_received_size(). + * + * @param connection the connection + * @param size the maximum size in bytes of all outstanding messages + */ +void +dbus_connection_set_max_received_unix_fds (DBusConnection *connection, + long n) +{ + _dbus_return_if_fail (connection != NULL); + + CONNECTION_LOCK (connection); + _dbus_transport_set_max_received_unix_fds (connection->transport, + n); + CONNECTION_UNLOCK (connection); +} + +/** + * Gets the value set by dbus_connection_set_max_received_unix_fds(). + * + * @param connection the connection + * @returns the max unix fds of all live messages + */ +long +dbus_connection_get_max_received_unix_fds (DBusConnection *connection) +{ + long res; + + _dbus_return_val_if_fail (connection != NULL, 0); + + CONNECTION_LOCK (connection); + res = _dbus_transport_get_max_received_unix_fds (connection->transport); + CONNECTION_UNLOCK (connection); + return res; +} + +/** * Gets the approximate size in bytes of all messages in the outgoing * message queue. The size is approximate in that you shouldn't use * it to decide how many bytes to read off the network or anything @@ -5937,9 +6191,29 @@ dbus_connection_get_outgoing_size (DBusConnection *connection) long res; _dbus_return_val_if_fail (connection != NULL, 0); - + + CONNECTION_LOCK (connection); + res = _dbus_counter_get_size_value (connection->outgoing_counter); + CONNECTION_UNLOCK (connection); + return res; +} + +/** + * Gets the approximate number of uni fds of all messages in the + * outgoing message queue. + * + * @param connection the connection + * @returns the number of unix fds that have been queued up but not sent + */ +long +dbus_connection_get_outgoing_unix_fds (DBusConnection *connection) +{ + long res; + + _dbus_return_val_if_fail (connection != NULL, 0); + CONNECTION_LOCK (connection); - res = _dbus_counter_get_value (connection->outgoing_counter); + res = _dbus_counter_get_unix_fd_value (connection->outgoing_counter); CONNECTION_UNLOCK (connection); return res; } diff --git a/dbus/dbus-connection.h b/dbus/dbus-connection.h index 29a2f5e2..3e2a7d8d 100644 --- a/dbus/dbus-connection.h +++ b/dbus/dbus-connection.h @@ -168,122 +168,189 @@ typedef void (* DBusPendingCallNotifyFunction) (DBusPendingCall *pending, typedef DBusHandlerResult (* DBusHandleMessageFunction) (DBusConnection *connection, DBusMessage *message, void *user_data); - +DBUS_EXPORT DBusConnection* dbus_connection_open (const char *address, DBusError *error); +DBUS_EXPORT DBusConnection* dbus_connection_open_private (const char *address, DBusError *error); +DBUS_EXPORT DBusConnection* dbus_connection_ref (DBusConnection *connection); +DBUS_EXPORT void dbus_connection_unref (DBusConnection *connection); +DBUS_EXPORT void dbus_connection_close (DBusConnection *connection); +DBUS_EXPORT dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection); +DBUS_EXPORT dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection); +DBUS_EXPORT dbus_bool_t dbus_connection_get_is_anonymous (DBusConnection *connection); +DBUS_EXPORT char* dbus_connection_get_server_id (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_can_send_type (DBusConnection *connection, + int type); + +DBUS_EXPORT void dbus_connection_set_exit_on_disconnect (DBusConnection *connection, dbus_bool_t exit_on_disconnect); +DBUS_EXPORT void dbus_connection_flush (DBusConnection *connection); +DBUS_EXPORT dbus_bool_t dbus_connection_read_write_dispatch (DBusConnection *connection, int timeout_milliseconds); +DBUS_EXPORT dbus_bool_t dbus_connection_read_write (DBusConnection *connection, int timeout_milliseconds); +DBUS_EXPORT DBusMessage* dbus_connection_borrow_message (DBusConnection *connection); +DBUS_EXPORT void dbus_connection_return_message (DBusConnection *connection, DBusMessage *message); +DBUS_EXPORT void dbus_connection_steal_borrowed_message (DBusConnection *connection, DBusMessage *message); +DBUS_EXPORT DBusMessage* dbus_connection_pop_message (DBusConnection *connection); +DBUS_EXPORT DBusDispatchStatus dbus_connection_get_dispatch_status (DBusConnection *connection); +DBUS_EXPORT DBusDispatchStatus dbus_connection_dispatch (DBusConnection *connection); +DBUS_EXPORT dbus_bool_t dbus_connection_has_messages_to_send (DBusConnection *connection); +DBUS_EXPORT dbus_bool_t dbus_connection_send (DBusConnection *connection, DBusMessage *message, dbus_uint32_t *client_serial); +DBUS_EXPORT dbus_bool_t dbus_connection_send_with_reply (DBusConnection *connection, DBusMessage *message, DBusPendingCall **pending_return, int timeout_milliseconds); +DBUS_EXPORT DBusMessage * dbus_connection_send_with_reply_and_block (DBusConnection *connection, DBusMessage *message, int timeout_milliseconds, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_connection_set_watch_functions (DBusConnection *connection, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection *connection, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT void dbus_connection_set_wakeup_main_function (DBusConnection *connection, DBusWakeupMainFunction wakeup_main_function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT void dbus_connection_set_dispatch_status_function (DBusConnection *connection, DBusDispatchStatusFunction function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_connection_get_unix_user (DBusConnection *connection, unsigned long *uid); +DBUS_EXPORT dbus_bool_t dbus_connection_get_unix_process_id (DBusConnection *connection, unsigned long *pid); +DBUS_EXPORT dbus_bool_t dbus_connection_get_adt_audit_session_data (DBusConnection *connection, void **data, dbus_int32_t *data_size); +DBUS_EXPORT void dbus_connection_set_unix_user_function (DBusConnection *connection, DBusAllowUnixUserFunction function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_connection_get_windows_user (DBusConnection *connection, char **windows_sid_p); +DBUS_EXPORT void dbus_connection_set_windows_user_function (DBusConnection *connection, DBusAllowWindowsUserFunction function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT void dbus_connection_set_allow_anonymous (DBusConnection *connection, dbus_bool_t value); +DBUS_EXPORT void dbus_connection_set_route_peer_messages (DBusConnection *connection, dbus_bool_t value); /* Filters */ +DBUS_EXPORT dbus_bool_t dbus_connection_add_filter (DBusConnection *connection, DBusHandleMessageFunction function, void *user_data, DBusFreeFunction free_data_function); +DBUS_EXPORT void dbus_connection_remove_filter (DBusConnection *connection, DBusHandleMessageFunction function, void *user_data); /* Other */ +DBUS_EXPORT dbus_bool_t dbus_connection_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT void dbus_connection_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT dbus_bool_t dbus_connection_set_data (DBusConnection *connection, dbus_int32_t slot, void *data, DBusFreeFunction free_data_func); +DBUS_EXPORT void* dbus_connection_get_data (DBusConnection *connection, dbus_int32_t slot); +DBUS_EXPORT void dbus_connection_set_change_sigpipe (dbus_bool_t will_modify_sigpipe); +DBUS_EXPORT void dbus_connection_set_max_message_size (DBusConnection *connection, long size); +DBUS_EXPORT long dbus_connection_get_max_message_size (DBusConnection *connection); +DBUS_EXPORT void dbus_connection_set_max_received_size (DBusConnection *connection, long size); +DBUS_EXPORT long dbus_connection_get_max_received_size (DBusConnection *connection); + +DBUS_EXPORT +void dbus_connection_set_max_message_unix_fds (DBusConnection *connection, + long n); +DBUS_EXPORT +long dbus_connection_get_max_message_unix_fds (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_set_max_received_unix_fds(DBusConnection *connection, + long n); +DBUS_EXPORT +long dbus_connection_get_max_received_unix_fds(DBusConnection *connection); + +DBUS_EXPORT long dbus_connection_get_outgoing_size (DBusConnection *connection); +DBUS_EXPORT +long dbus_connection_get_outgoing_unix_fds (DBusConnection *connection); +DBUS_EXPORT DBusPreallocatedSend* dbus_connection_preallocate_send (DBusConnection *connection); +DBUS_EXPORT void dbus_connection_free_preallocated_send (DBusConnection *connection, DBusPreallocatedSend *preallocated); +DBUS_EXPORT void dbus_connection_send_preallocated (DBusConnection *connection, DBusPreallocatedSend *preallocated, DBusMessage *message, @@ -324,40 +391,49 @@ struct DBusObjectPathVTable void (* dbus_internal_pad4) (void *); /**< Reserved for future expansion */ }; +DBUS_EXPORT dbus_bool_t dbus_connection_try_register_object_path (DBusConnection *connection, const char *path, const DBusObjectPathVTable *vtable, void *user_data, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_connection_register_object_path (DBusConnection *connection, const char *path, const DBusObjectPathVTable *vtable, void *user_data); +DBUS_EXPORT dbus_bool_t dbus_connection_try_register_fallback (DBusConnection *connection, const char *path, const DBusObjectPathVTable *vtable, void *user_data, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_connection_register_fallback (DBusConnection *connection, const char *path, const DBusObjectPathVTable *vtable, void *user_data); +DBUS_EXPORT dbus_bool_t dbus_connection_unregister_object_path (DBusConnection *connection, const char *path); +DBUS_EXPORT dbus_bool_t dbus_connection_get_object_path_data (DBusConnection *connection, const char *path, void **data_p); +DBUS_EXPORT dbus_bool_t dbus_connection_list_registered (DBusConnection *connection, const char *parent_path, char ***child_entries); +DBUS_EXPORT dbus_bool_t dbus_connection_get_unix_fd (DBusConnection *connection, int *fd); +DBUS_EXPORT dbus_bool_t dbus_connection_get_socket (DBusConnection *connection, int *fd); @@ -370,18 +446,26 @@ dbus_bool_t dbus_connection_get_socket (DBusConnection */ #ifndef DBUS_DISABLE_DEPRECATED +DBUS_EXPORT DBUS_DEPRECATED int dbus_watch_get_fd (DBusWatch *watch); #endif +DBUS_EXPORT int dbus_watch_get_unix_fd (DBusWatch *watch); +DBUS_EXPORT int dbus_watch_get_socket (DBusWatch *watch); +DBUS_EXPORT unsigned int dbus_watch_get_flags (DBusWatch *watch); +DBUS_EXPORT void* dbus_watch_get_data (DBusWatch *watch); +DBUS_EXPORT void dbus_watch_set_data (DBusWatch *watch, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_watch_handle (DBusWatch *watch, unsigned int flags); +DBUS_EXPORT dbus_bool_t dbus_watch_get_enabled (DBusWatch *watch); /** @} */ @@ -391,12 +475,17 @@ dbus_bool_t dbus_watch_get_enabled (DBusWatch *watch); * @{ */ +DBUS_EXPORT int dbus_timeout_get_interval (DBusTimeout *timeout); +DBUS_EXPORT void* dbus_timeout_get_data (DBusTimeout *timeout); +DBUS_EXPORT void dbus_timeout_set_data (DBusTimeout *timeout, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_timeout_handle (DBusTimeout *timeout); +DBUS_EXPORT dbus_bool_t dbus_timeout_get_enabled (DBusTimeout *timeout); /** @} */ diff --git a/dbus/dbus-credentials-util.c b/dbus/dbus-credentials-util.c index dae6080d..02771966 100644 --- a/dbus/dbus-credentials-util.c +++ b/dbus/dbus-credentials-util.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-internals.h" #include "dbus-test.h" #include "dbus-credentials.h" diff --git a/dbus/dbus-dataslot.c b/dbus/dbus-dataslot.c index 8fab7bbc..fd25c416 100644 --- a/dbus/dbus-dataslot.c +++ b/dbus/dbus-dataslot.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-dataslot.h" #include "dbus-threads-internal.h" diff --git a/dbus/dbus-errors.c b/dbus/dbus-errors.c index e8154ccc..5f27501c 100644 --- a/dbus/dbus-errors.c +++ b/dbus/dbus-errors.c @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-errors.h" #include "dbus-internals.h" #include "dbus-string.h" diff --git a/dbus/dbus-errors.h b/dbus/dbus-errors.h index 0ddf2477..e63139a0 100644 --- a/dbus/dbus-errors.h +++ b/dbus/dbus-errors.h @@ -30,6 +30,7 @@ #include <dbus/dbus-macros.h> #include <dbus/dbus-types.h> +#include <dbus/dbus-protocol.h> DBUS_BEGIN_DECLS @@ -60,19 +61,26 @@ struct DBusError #define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL } +DBUS_EXPORT void dbus_error_init (DBusError *error); +DBUS_EXPORT void dbus_error_free (DBusError *error); +DBUS_EXPORT void dbus_set_error (DBusError *error, const char *name, const char *message, ...); +DBUS_EXPORT void dbus_set_error_const (DBusError *error, const char *name, const char *message); +DBUS_EXPORT void dbus_move_error (DBusError *src, DBusError *dest); +DBUS_EXPORT dbus_bool_t dbus_error_has_name (const DBusError *error, const char *name); +DBUS_EXPORT dbus_bool_t dbus_error_is_set (const DBusError *error); /** @} */ diff --git a/dbus/dbus-file-unix.c b/dbus/dbus-file-unix.c new file mode 100644 index 00000000..19759336 --- /dev/null +++ b/dbus/dbus-file-unix.c @@ -0,0 +1,417 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-file-unix.c unix related file implementation (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> + +#include "dbus-protocol.h" +#include "dbus-errors.h" +#include "dbus-file.h" +#include "dbus-internals.h" +#include "dbus-sysdeps.h" +#include "dbus-sysdeps-unix.h" + +#include <sys/stat.h> +#include <stdio.h> +#include <fcntl.h> +#include <unistd.h> +#include <errno.h> + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +/** + * Appends the contents of the given file to the string, + * returning error code. At the moment, won't open a file + * more than a megabyte in size. + * + * @param str the string to append to + * @param filename filename to load + * @param error place to set an error + * @returns #FALSE if error was set + */ +dbus_bool_t +_dbus_file_get_contents (DBusString *str, + const DBusString *filename, + DBusError *error) +{ + int fd; + struct stat sb; + int orig_len; + int total; + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + /* O_BINARY useful on Cygwin */ + fd = open (filename_c, O_RDONLY | O_BINARY); + if (fd < 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to open \"%s\": %s", + filename_c, + _dbus_strerror (errno)); + return FALSE; + } + + _dbus_verbose ("file fd %d opened\n", fd); + + if (fstat (fd, &sb) < 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to stat \"%s\": %s", + filename_c, + _dbus_strerror (errno)); + + _dbus_verbose ("fstat() failed: %s", + _dbus_strerror (errno)); + + _dbus_close (fd, NULL); + + return FALSE; + } + + if (sb.st_size > _DBUS_ONE_MEGABYTE) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "File size %lu of \"%s\" is too large.", + (unsigned long) sb.st_size, filename_c); + _dbus_close (fd, NULL); + return FALSE; + } + + total = 0; + orig_len = _dbus_string_get_length (str); + if (sb.st_size > 0 && S_ISREG (sb.st_mode)) + { + int bytes_read; + + while (total < (int) sb.st_size) + { + bytes_read = _dbus_read (fd, str, + sb.st_size - total); + if (bytes_read <= 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Error reading \"%s\": %s", + filename_c, + _dbus_strerror (errno)); + + _dbus_verbose ("read() failed: %s", + _dbus_strerror (errno)); + + _dbus_close (fd, NULL); + _dbus_string_set_length (str, orig_len); + return FALSE; + } + else + total += bytes_read; + } + + _dbus_close (fd, NULL); + return TRUE; + } + else if (sb.st_size != 0) + { + _dbus_verbose ("Can only open regular files at the moment.\n"); + dbus_set_error (error, DBUS_ERROR_FAILED, + "\"%s\" is not a regular file", + filename_c); + _dbus_close (fd, NULL); + return FALSE; + } + else + { + _dbus_close (fd, NULL); + return TRUE; + } +} + +/** + * Writes a string out to a file. If the file exists, + * it will be atomically overwritten by the new data. + * + * @param str the string to write out + * @param filename the file to save string to + * @param world_readable If set, ensure the file is world readable + * @param error error to be filled in on failure + * @returns #FALSE on failure + */ +dbus_bool_t +_dbus_string_save_to_file (const DBusString *str, + const DBusString *filename, + dbus_bool_t world_readable, + DBusError *error) +{ + int fd; + int bytes_to_write; + const char *filename_c; + DBusString tmp_filename; + const char *tmp_filename_c; + int total; + dbus_bool_t need_unlink; + dbus_bool_t retval; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + fd = -1; + retval = FALSE; + need_unlink = FALSE; + + if (!_dbus_string_init (&tmp_filename)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return FALSE; + } + + if (!_dbus_string_copy (filename, 0, &tmp_filename, 0)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&tmp_filename); + return FALSE; + } + + if (!_dbus_string_append (&tmp_filename, ".")) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&tmp_filename); + return FALSE; + } + +#define N_TMP_FILENAME_RANDOM_BYTES 8 + if (!_dbus_generate_random_ascii (&tmp_filename, N_TMP_FILENAME_RANDOM_BYTES)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&tmp_filename); + return FALSE; + } + + filename_c = _dbus_string_get_const_data (filename); + tmp_filename_c = _dbus_string_get_const_data (&tmp_filename); + + fd = open (tmp_filename_c, O_WRONLY | O_BINARY | O_EXCL | O_CREAT, + world_readable ? 0644 : 0600); + if (fd < 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not create %s: %s", tmp_filename_c, + _dbus_strerror (errno)); + goto out; + } + if (world_readable) + { + /* Ensure the file is world readable even in the presence of + * possibly restrictive umasks; + * see http://lists.freedesktop.org/archives/dbus/2010-September/013367.html + */ + if (fchmod (fd, 0644) < 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not chmod %s: %s", tmp_filename_c, + _dbus_strerror (errno)); + goto out; + } + } + + _dbus_verbose ("tmp file fd %d opened\n", fd); + + need_unlink = TRUE; + + total = 0; + bytes_to_write = _dbus_string_get_length (str); + + while (total < bytes_to_write) + { + int bytes_written; + + bytes_written = _dbus_write (fd, str, total, + bytes_to_write - total); + + if (bytes_written <= 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not write to %s: %s", tmp_filename_c, + _dbus_strerror (errno)); + + goto out; + } + + total += bytes_written; + } + + if (fsync(fd)) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not synchronize file %s: %s", + tmp_filename_c, _dbus_strerror (errno)); + + goto out; + } + + if (!_dbus_close (fd, NULL)) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not close file %s: %s", + tmp_filename_c, _dbus_strerror (errno)); + + goto out; + } + + fd = -1; + + if (rename (tmp_filename_c, filename_c) < 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not rename %s to %s: %s", + tmp_filename_c, filename_c, + _dbus_strerror (errno)); + + goto out; + } + + need_unlink = FALSE; + + retval = TRUE; + + out: + /* close first, then unlink, to prevent ".nfs34234235" garbage + * files + */ + + if (fd >= 0) + _dbus_close (fd, NULL); + + if (need_unlink && unlink (tmp_filename_c) < 0) + _dbus_verbose ("Failed to unlink temp file %s: %s\n", + tmp_filename_c, _dbus_strerror (errno)); + + _dbus_string_free (&tmp_filename); + + if (!retval) + _DBUS_ASSERT_ERROR_IS_SET (error); + + return retval; +} + +/** Makes the file readable by every user in the system. + * + * @param filename the filename + * @param error error location + * @returns #TRUE if the file's permissions could be changed. + */ +dbus_bool_t +_dbus_make_file_world_readable(const DBusString *filename, + DBusError *error) +{ + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + if (chmod (filename_c, 0644) == -1) + { + dbus_set_error (error, + DBUS_ERROR_FAILED, + "Could not change permissions of file %s: %s\n", + filename_c, + _dbus_strerror (errno)); + return FALSE; + } + return TRUE; +} + +/** Creates the given file, failing if the file already exists. + * + * @param filename the filename + * @param error error location + * @returns #TRUE if we created the file and it didn't exist + */ +dbus_bool_t +_dbus_create_file_exclusively (const DBusString *filename, + DBusError *error) +{ + int fd; + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + fd = open (filename_c, O_WRONLY | O_BINARY | O_EXCL | O_CREAT, + 0600); + if (fd < 0) + { + dbus_set_error (error, + DBUS_ERROR_FAILED, + "Could not create file %s: %s\n", + filename_c, + _dbus_strerror (errno)); + return FALSE; + } + + _dbus_verbose ("exclusive file fd %d opened\n", fd); + + if (!_dbus_close (fd, NULL)) + { + dbus_set_error (error, + DBUS_ERROR_FAILED, + "Could not close file %s: %s\n", + filename_c, + _dbus_strerror (errno)); + return FALSE; + } + + return TRUE; +} + +/** + * Deletes the given file. + * + * @param filename the filename + * @param error error location + * + * @returns #TRUE if unlink() succeeded + */ +dbus_bool_t +_dbus_delete_file (const DBusString *filename, + DBusError *error) +{ + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + if (unlink (filename_c) < 0) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Failed to delete file %s: %s\n", + filename_c, _dbus_strerror (errno)); + return FALSE; + } + else + return TRUE; +} diff --git a/dbus/dbus-file-win.c b/dbus/dbus-file-win.c new file mode 100644 index 00000000..06a8ea1c --- /dev/null +++ b/dbus/dbus-file-win.c @@ -0,0 +1,407 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-file-win.c windows related file implementation (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-protocol.h" +#include "dbus-string.h" +#include "dbus-internals.h" +#include "dbus-sysdeps-win.h" +#include "dbus-pipe.h" + +#include <windows.h> + + +/** + * Thin wrapper around the read() system call that appends + * the data it reads to the DBusString buffer. It appends + * up to the given count. + * + * @param hnd the HANDLE to read from + * @param buffer the buffer to append data to + * @param count the amount of data to read + * @param error place to set an error + * @returns the number of bytes read or -1 + */ +static int +_dbus_file_read (HANDLE hnd, + DBusString *buffer, + int count, + DBusError *error) +{ + BOOL result; + DWORD bytes_read; + int start; + char *data; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_assert (count >= 0); + + start = _dbus_string_get_length (buffer); + + if (!_dbus_string_lengthen (buffer, count)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return -1; + } + + data = _dbus_string_get_data_len (buffer, start, count); + + result = ReadFile (hnd, data, count, &bytes_read, NULL); + if (result == 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to read from 0x%x: %s", hnd, emsg); + _dbus_win_free_error_string (emsg); + return -1; + } + + if (bytes_read) + { + /* put length back (doesn't actually realloc) */ + _dbus_string_set_length (buffer, start + bytes_read); + +#if 0 + if (bytes_read > 0) + _dbus_verbose_bytes_of_string (buffer, start, bytes_read); +#endif + } + + return bytes_read; +} + + +/** + * Appends the contents of the given file to the string, + * returning error code. At the moment, won't open a file + * more than a megabyte in size. + * + * @param str the string to append to + * @param filename filename to load + * @param error place to set an error + * @returns #FALSE if error was set + */ +dbus_bool_t +_dbus_file_get_contents (DBusString *str, + const DBusString *filename, + DBusError *error) +{ + HANDLE hnd; + DWORD fsize; + DWORD fsize_hi; + int orig_len; + unsigned int total; + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + hnd = CreateFileA (filename_c, GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (hnd == INVALID_HANDLE_VALUE) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to open \"%s\": %s", filename_c, emsg); + _dbus_win_free_error_string (emsg); + return FALSE; + } + + _dbus_verbose ("file %s hnd %p opened\n", filename_c, hnd); + + fsize = GetFileSize (hnd, &fsize_hi); + if (fsize == 0xFFFFFFFF && GetLastError() != NO_ERROR) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to get file size for \"%s\": %s", + filename_c, emsg); + _dbus_win_free_error_string (emsg); + + _dbus_verbose ("GetFileSize() failed: %s", emsg); + + CloseHandle (hnd); + + return FALSE; + } + + if (fsize_hi != 0 || fsize > _DBUS_ONE_MEGABYTE) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "File size %lu/%lu of \"%s\" is too large.", + (unsigned long) fsize_hi, + (unsigned long) fsize, filename_c); + CloseHandle (hnd); + return FALSE; + } + + total = 0; + orig_len = _dbus_string_get_length (str); + if (fsize > 0) + { + int bytes_read; + + while (total < fsize) + { + bytes_read = _dbus_file_read (hnd, str, fsize - total, error); + if (bytes_read <= 0) + { + if (bytes_read == 0) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Premature EOF reading \"%s\"", + filename_c); + } + else + _DBUS_ASSERT_ERROR_IS_SET (error); + + CloseHandle (hnd); + _dbus_string_set_length (str, orig_len); + return FALSE; + } + else + total += bytes_read; + } + + CloseHandle (hnd); + return TRUE; + } + else + { + CloseHandle (hnd); + return TRUE; + } +} + + +/** + * Writes a string out to a file. If the file exists, + * it will be atomically overwritten by the new data. + * + * @param str the string to write out + * @param filename the file to save string to + * @param world_readable if true, ensure file is world readable + * @param error error to be filled in on failure + * @returns #FALSE on failure + */ +dbus_bool_t +_dbus_string_save_to_file (const DBusString *str, + const DBusString *filename, + dbus_bool_t world_readable, + DBusError *error) +{ + HANDLE hnd; + int bytes_to_write; + const char *filename_c; + DBusString tmp_filename; + const char *tmp_filename_c; + int total; + const char *str_c; + dbus_bool_t need_unlink; + dbus_bool_t retval; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + hnd = INVALID_HANDLE_VALUE; + retval = FALSE; + need_unlink = FALSE; + + if (!_dbus_string_init (&tmp_filename)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return FALSE; + } + + if (!_dbus_string_copy (filename, 0, &tmp_filename, 0)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&tmp_filename); + return FALSE; + } + + if (!_dbus_string_append (&tmp_filename, ".")) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&tmp_filename); + return FALSE; + } + +#define N_TMP_FILENAME_RANDOM_BYTES 8 + if (!_dbus_generate_random_ascii (&tmp_filename, N_TMP_FILENAME_RANDOM_BYTES)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&tmp_filename); + return FALSE; + } + + filename_c = _dbus_string_get_const_data (filename); + tmp_filename_c = _dbus_string_get_const_data (&tmp_filename); + + /* TODO - support world-readable in an atomic fashion */ + hnd = CreateFileA (tmp_filename_c, GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, + INVALID_HANDLE_VALUE); + if (hnd == INVALID_HANDLE_VALUE) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not create \"%s\": %s", filename_c, emsg); + _dbus_win_free_error_string (emsg); + goto out; + } + if (world_readable) + { + if (! _dbus_make_file_world_readable (&tmp_filename, error)) + goto out; + } + + _dbus_verbose ("tmp file %s hnd %p opened\n", tmp_filename_c, hnd); + + need_unlink = TRUE; + + total = 0; + bytes_to_write = _dbus_string_get_length (str); + str_c = _dbus_string_get_const_data (str); + + while (total < bytes_to_write) + { + DWORD bytes_written; + BOOL res; + + res = WriteFile (hnd, str_c + total, bytes_to_write - total, + &bytes_written, NULL); + + if (res == 0 || bytes_written <= 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not write to %s: %s", tmp_filename_c, emsg); + _dbus_win_free_error_string (emsg); + goto out; + } + + total += bytes_written; + } + + if (CloseHandle (hnd) == 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not close file %s: %s", tmp_filename_c, emsg); + _dbus_win_free_error_string (emsg); + goto out; + } + + hnd = INVALID_HANDLE_VALUE; + + /* Unlike rename(), MoveFileEx() can replace existing files */ + if (!MoveFileExA (tmp_filename_c, filename_c, MOVEFILE_REPLACE_EXISTING)) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not rename %s to %s: %s", + tmp_filename_c, filename_c, emsg); + _dbus_win_free_error_string (emsg); + + goto out; + } + + need_unlink = FALSE; + + retval = TRUE; + + out: + /* close first, then unlink */ + + if (hnd != INVALID_HANDLE_VALUE) + CloseHandle (hnd); + + if (need_unlink && DeleteFileA (tmp_filename_c) == 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + _dbus_verbose ("Failed to unlink temp file %s: %s", tmp_filename_c, + emsg); + _dbus_win_free_error_string (emsg); + } + + _dbus_string_free (&tmp_filename); + + if (!retval) + _DBUS_ASSERT_ERROR_IS_SET (error); + + return retval; +} + + +/** Creates the given file, failing if the file already exists. + * + * @param filename the filename + * @param error error location + * @returns #TRUE if we created the file and it didn't exist + */ +dbus_bool_t +_dbus_create_file_exclusively (const DBusString *filename, + DBusError *error) +{ + HANDLE hnd; + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + hnd = CreateFileA (filename_c, GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, + INVALID_HANDLE_VALUE); + if (hnd == INVALID_HANDLE_VALUE) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not create file %s: %s", + filename_c, emsg); + _dbus_win_free_error_string (emsg); + return FALSE; + } + + _dbus_verbose ("exclusive file %s hnd %p opened\n", filename_c, hnd); + + if (CloseHandle (hnd) == 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not close file %s: %s", + filename_c, emsg); + _dbus_win_free_error_string (emsg); + + return FALSE; + } + + return TRUE; +} + diff --git a/dbus/dbus-file.c b/dbus/dbus-file.c new file mode 100644 index 00000000..350fbd9a --- /dev/null +++ b/dbus/dbus-file.c @@ -0,0 +1,28 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps-unix.c Wrappers around UNIX system/libc features (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> + +#include "dbus-file.h" + diff --git a/dbus/dbus-file.h b/dbus/dbus-file.h new file mode 100644 index 00000000..24837f47 --- /dev/null +++ b/dbus/dbus-file.h @@ -0,0 +1,63 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-file.h dbus file related stuff (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_FILE_H +#define DBUS_FILE_H + +//#include <dbus/dbus-types.h> +#include <dbus/dbus-string.h> +#include <dbus/dbus-errors.h> + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusFile + * @{ + */ + +/** + * File interface + */ +dbus_bool_t _dbus_file_exists (const char *file); +dbus_bool_t _dbus_file_get_contents (DBusString *str, + const DBusString *filename, + DBusError *error); +dbus_bool_t _dbus_string_save_to_file (const DBusString *str, + const DBusString *filename, + dbus_bool_t world_readable, + DBusError *error); + +dbus_bool_t _dbus_make_file_world_readable (const DBusString *filename, + DBusError *error); + +dbus_bool_t _dbus_create_file_exclusively (const DBusString *filename, + DBusError *error); +dbus_bool_t _dbus_delete_file (const DBusString *filename, + DBusError *error); + +/** @} */ + +DBUS_END_DECLS + +#endif diff --git a/dbus/dbus-hash.c b/dbus/dbus-hash.c index e9eba6e5..67ef4ced 100644 --- a/dbus/dbus-hash.c +++ b/dbus/dbus-hash.c @@ -74,6 +74,7 @@ * accordance with the terms specified in this license. */ +#include <config.h> #include "dbus-hash.h" #include "dbus-internals.h" #include "dbus-mempool.h" @@ -119,7 +120,7 @@ * */ #define RANDOM_INDEX(table, i) \ - (((((long) (i))*1103515245) >> (table)->down_shift) & (table)->mask) + (((((intptr_t) (i))*1103515245) >> (table)->down_shift) & (table)->mask) /** * Initial number of buckets in hash table (hash table statically @@ -327,7 +328,7 @@ _dbus_hash_table_new (DBusHashType type, { case DBUS_HASH_INT: case DBUS_HASH_POINTER: - case DBUS_HASH_ULONG: + case DBUS_HASH_UINTPTR: table->find_function = find_direct_function; break; case DBUS_HASH_STRING: @@ -683,12 +684,12 @@ _dbus_hash_iter_get_int_key (DBusHashIter *iter) /** * Gets the key for the current entry. - * Only works for hash tables of type #DBUS_HASH_ULONG. + * Only works for hash tables of type #DBUS_HASH_UINTPTR. * * @param iter the hash table iterator. */ -unsigned long -_dbus_hash_iter_get_ulong_key (DBusHashIter *iter) +uintptr_t +_dbus_hash_iter_get_uintptr_key (DBusHashIter *iter) { DBusRealHashIter *real; @@ -697,7 +698,7 @@ _dbus_hash_iter_get_ulong_key (DBusHashIter *iter) _dbus_assert (real->table != NULL); _dbus_assert (real->entry != NULL); - return (unsigned long) real->entry->key; + return (uintptr_t) real->entry->key; } /** @@ -1115,7 +1116,7 @@ rebuild_table (DBusHashTable *table) #endif break; case DBUS_HASH_INT: - case DBUS_HASH_ULONG: + case DBUS_HASH_UINTPTR: case DBUS_HASH_POINTER: idx = RANDOM_INDEX (table, entry->key); break; @@ -1244,7 +1245,7 @@ _dbus_hash_table_lookup_pointer (DBusHashTable *table, /** * Looks up the value for a given integer in a hash table - * of type #DBUS_HASH_ULONG. Returns %NULL if the value + * of type #DBUS_HASH_UINTPTR. Returns %NULL if the value * is not present. (A not-present entry is indistinguishable * from an entry with a value of %NULL.) * @param table the hash table. @@ -1252,12 +1253,12 @@ _dbus_hash_table_lookup_pointer (DBusHashTable *table, * @returns the value of the hash entry. */ void* -_dbus_hash_table_lookup_ulong (DBusHashTable *table, - unsigned long key) +_dbus_hash_table_lookup_uintptr (DBusHashTable *table, + uintptr_t key) { DBusHashEntry *entry; - _dbus_assert (table->key_type == DBUS_HASH_ULONG); + _dbus_assert (table->key_type == DBUS_HASH_UINTPTR); entry = (* table->find_function) (table, (void*) key, FALSE, NULL, NULL); @@ -1393,13 +1394,13 @@ _dbus_hash_table_remove_pointer (DBusHashTable *table, * @returns #TRUE if the entry existed */ dbus_bool_t -_dbus_hash_table_remove_ulong (DBusHashTable *table, - unsigned long key) +_dbus_hash_table_remove_uintptr (DBusHashTable *table, + uintptr_t key) { DBusHashEntry *entry; DBusHashEntry **bucket; - _dbus_assert (table->key_type == DBUS_HASH_ULONG); + _dbus_assert (table->key_type == DBUS_HASH_UINTPTR); entry = (* table->find_function) (table, (void*) key, FALSE, &bucket, NULL); @@ -1590,13 +1591,13 @@ _dbus_hash_table_insert_pointer (DBusHashTable *table, * @param value the hash entry value. */ dbus_bool_t -_dbus_hash_table_insert_ulong (DBusHashTable *table, - unsigned long key, - void *value) +_dbus_hash_table_insert_uintptr (DBusHashTable *table, + uintptr_t key, + void *value) { DBusHashEntry *entry; - _dbus_assert (table->key_type == DBUS_HASH_ULONG); + _dbus_assert (table->key_type == DBUS_HASH_UINTPTR); entry = (* table->find_function) (table, (void*) key, TRUE, NULL, NULL); @@ -1809,7 +1810,7 @@ _dbus_hash_test (void) if (table2 == NULL) goto out; - table3 = _dbus_hash_table_new (DBUS_HASH_ULONG, + table3 = _dbus_hash_table_new (DBUS_HASH_UINTPTR, NULL, dbus_free); if (table3 == NULL) goto out; @@ -1852,7 +1853,7 @@ _dbus_hash_test (void) if (value == NULL) goto out; - if (!_dbus_hash_table_insert_ulong (table3, + if (!_dbus_hash_table_insert_uintptr (table3, i, value)) goto out; @@ -1880,7 +1881,7 @@ _dbus_hash_test (void) _dbus_assert (value != NULL); _dbus_assert (strcmp (value, keys[i]) == 0); - value = _dbus_hash_table_lookup_ulong (table3, i); + value = _dbus_hash_table_lookup_uintptr (table3, i); _dbus_assert (value != NULL); _dbus_assert (strcmp (value, keys[i]) == 0); @@ -1899,7 +1900,7 @@ _dbus_hash_test (void) _dbus_hash_table_remove_int (table2, i); - _dbus_hash_table_remove_ulong (table3, i); + _dbus_hash_table_remove_uintptr (table3, i); _dbus_hash_table_remove_two_strings (table4, keys[i]); diff --git a/dbus/dbus-hash.h b/dbus/dbus-hash.h index 78f69ddf..d1ca246c 100644 --- a/dbus/dbus-hash.h +++ b/dbus/dbus-hash.h @@ -24,8 +24,17 @@ #ifndef DBUS_HASH_H #define DBUS_HASH_H +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif + +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#endif + #include <dbus/dbus-memory.h> #include <dbus/dbus-types.h> +#include <dbus/dbus-sysdeps.h> DBUS_BEGIN_DECLS @@ -61,7 +70,7 @@ typedef enum DBUS_HASH_TWO_STRINGS, /**< Hash key is two strings in one memory block, i.e. foo\\0bar\\0 */ DBUS_HASH_INT, /**< Hash keys are integers. */ DBUS_HASH_POINTER, /**< Hash keys are pointers. */ - DBUS_HASH_ULONG /**< Hash keys are unsigned long. */ + DBUS_HASH_UINTPTR /**< Hash keys are integer capable to hold a pointer. */ } DBusHashType; DBusHashTable* _dbus_hash_table_new (DBusHashType type, @@ -80,7 +89,7 @@ void _dbus_hash_iter_set_value (DBusHashIter *iter, int _dbus_hash_iter_get_int_key (DBusHashIter *iter); const char* _dbus_hash_iter_get_string_key (DBusHashIter *iter); const char* _dbus_hash_iter_get_two_strings_key (DBusHashIter *iter); -unsigned long _dbus_hash_iter_get_ulong_key (DBusHashIter *iter); +uintptr_t _dbus_hash_iter_get_uintptr_key (DBusHashIter *iter); dbus_bool_t _dbus_hash_iter_lookup (DBusHashTable *table, void *key, dbus_bool_t create_if_not_found, @@ -93,8 +102,8 @@ void* _dbus_hash_table_lookup_int (DBusHashTable *table, int key); void* _dbus_hash_table_lookup_pointer (DBusHashTable *table, void *key); -void* _dbus_hash_table_lookup_ulong (DBusHashTable *table, - unsigned long key); +void* _dbus_hash_table_lookup_uintptr (DBusHashTable *table, + uintptr_t key); dbus_bool_t _dbus_hash_table_remove_string (DBusHashTable *table, const char *key); dbus_bool_t _dbus_hash_table_remove_two_strings (DBusHashTable *table, @@ -103,8 +112,8 @@ dbus_bool_t _dbus_hash_table_remove_int (DBusHashTable *table, int key); dbus_bool_t _dbus_hash_table_remove_pointer (DBusHashTable *table, void *key); -dbus_bool_t _dbus_hash_table_remove_ulong (DBusHashTable *table, - unsigned long key); +dbus_bool_t _dbus_hash_table_remove_uintptr (DBusHashTable *table, + uintptr_t key); dbus_bool_t _dbus_hash_table_insert_string (DBusHashTable *table, char *key, void *value); @@ -117,8 +126,8 @@ dbus_bool_t _dbus_hash_table_insert_int (DBusHashTable *table, dbus_bool_t _dbus_hash_table_insert_pointer (DBusHashTable *table, void *key, void *value); -dbus_bool_t _dbus_hash_table_insert_ulong (DBusHashTable *table, - unsigned long key, +dbus_bool_t _dbus_hash_table_insert_uintptr (DBusHashTable *table, + uintptr_t key, void *value); int _dbus_hash_table_get_n_entries (DBusHashTable *table); diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index c5885eae..5e864ce3 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-internals.h" #include "dbus-protocol.h" #include "dbus-marshal-basic.h" @@ -28,6 +30,10 @@ #include <stdarg.h> #include <string.h> #include <stdlib.h> +#ifdef DBUS_USE_OUTPUT_DEBUG_STRING +#include <windows.h> +#include <mbstring.h> +#endif /** * @defgroup DBusInternals D-Bus secret internal implementation details @@ -189,7 +195,7 @@ * making up a different string every time and wasting * space. */ -const char _dbus_no_memory_message[] = "Not enough memory"; +const char *_dbus_no_memory_message = "Not enough memory"; static dbus_bool_t warn_initted = FALSE; static dbus_bool_t fatal_warnings = FALSE; @@ -295,19 +301,75 @@ static dbus_bool_t verbose = TRUE; #include <pthread.h> #endif -#ifdef DBUS_WIN +#ifdef _MSC_VER #define inline #endif +#ifdef DBUS_USE_OUTPUT_DEBUG_STRING +static char module_name[1024]; +#endif static inline void _dbus_verbose_init (void) { if (!verbose_initted) { - const char *p = _dbus_getenv ("DBUS_VERBOSE"); + const char *p = _dbus_getenv ("DBUS_VERBOSE"); verbose = p != NULL && *p == '1'; verbose_initted = TRUE; +#ifdef DBUS_USE_OUTPUT_DEBUG_STRING + { + char *last_period, *last_slash; + GetModuleFileName(0,module_name,sizeof(module_name)-1); + last_period = _mbsrchr(module_name,'.'); + if (last_period) + *last_period ='\0'; + last_slash = _mbsrchr(module_name,'\\'); + if (last_slash) + strcpy(module_name,last_slash+1); + strcat(module_name,": "); + } +#endif + } +} + +/** @def DBUS_IS_DIR_SEPARATOR(c) + * macro for checking if character c is a patch separator + * + * @todo move to a header file so that others can use this too + */ +#ifdef DBUS_WIN +#define DBUS_IS_DIR_SEPARATOR(c) (c == '\\' || c == '/') +#else +#define DBUS_IS_DIR_SEPARATOR(c) (c == '/') +#endif + +/** + remove source root from file path + the source root is determined by +*/ +static char *_dbus_file_path_extract_elements_from_tail(const char *file,int level) +{ + static int prefix = -1; + char *p; + + if (prefix == -1) + { + char *p = (char *)file + strlen(file); + int i = 0; + prefix = 0; + for (;p >= file;p--) + { + if (DBUS_IS_DIR_SEPARATOR(*p)) + { + if (++i >= level) + { + prefix = p-file+1; + break; + } + } + } } + return (char *)file+prefix; } /** @@ -331,7 +393,14 @@ _dbus_is_verbose_real (void) * @param format printf-style format string. */ void +#ifdef DBUS_CPP_SUPPORTS_VARIABLE_MACRO_ARGUMENTS +_dbus_verbose_real (const char *file, + const int line, + const char *function, + const char *format, +#else _dbus_verbose_real (const char *format, +#endif ...) { va_list args; @@ -345,6 +414,7 @@ _dbus_verbose_real (const char *format, if (!_dbus_is_verbose_real()) return; +#ifndef DBUS_USE_OUTPUT_DEBUG_STRING /* Print out pid before the line */ if (need_pid) { @@ -354,7 +424,7 @@ _dbus_verbose_real (const char *format, fprintf (stderr, "%lu: ", _dbus_pid_for_log ()); #endif } - +#endif /* Only print pid again if the next line is a new line */ len = strlen (format); @@ -362,12 +432,29 @@ _dbus_verbose_real (const char *format, need_pid = TRUE; else need_pid = FALSE; - + va_start (args, format); +#ifdef DBUS_USE_OUTPUT_DEBUG_STRING + { + char buf[1024]; + strcpy(buf,module_name); +#ifdef DBUS_CPP_SUPPORTS_VARIABLE_MACRO_ARGUMENTS + sprintf (buf+strlen(buf), "[%s(%d):%s] ",_dbus_file_path_extract_elements_from_tail(file,2),line,function); +#endif + vsprintf (buf+strlen(buf),format, args); + va_end (args); + OutputDebugStringA(buf); + } +#else +#ifdef DBUS_CPP_SUPPORTS_VARIABLE_MACRO_ARGUMENTS + fprintf (stderr, "[%s(%d):%s] ",_dbus_file_path_extract_elements_from_tail(file,2),line,function); +#endif + vfprintf (stderr, format, args); va_end (args); fflush (stderr); +#endif } /** @@ -632,27 +719,13 @@ _dbus_create_uuid_file_exclusively (const DBusString *filename, goto error; } - /* FIXME this is racy; we need a save_file_exclusively - * function. But in practice this should be fine for now. - * - * - first be sure we can create the file and it - * doesn't exist by creating it empty with O_EXCL - * - then create it by creating a temporary file and - * overwriting atomically with rename() - */ - if (!_dbus_create_file_exclusively (filename, error)) - goto error; - if (!_dbus_string_append_byte (&encoded, '\n')) { _DBUS_SET_OOM (error); goto error; } - if (!_dbus_string_save_to_file (&encoded, filename, error)) - goto error; - - if (!_dbus_make_file_world_readable (filename, error)) + if (!_dbus_string_save_to_file (&encoded, filename, TRUE, error)) goto error; _dbus_string_free (&encoded); @@ -797,7 +870,7 @@ _dbus_header_field_to_string (int header_field) #ifndef DBUS_DISABLE_CHECKS /** String used in _dbus_return_if_fail macro */ -const char _dbus_return_if_fail_warning_format[] = +const char *_dbus_return_if_fail_warning_format = "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\n" "This is normally a bug in some application using the D-Bus library.\n"; #endif diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 54c73fca..dcef7d7f 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -27,8 +27,6 @@ #ifndef DBUS_INTERNALS_H #define DBUS_INTERNALS_H -#include <config.h> - #include <dbus/dbus-memory.h> #include <dbus/dbus-types.h> #include <dbus/dbus-errors.h> @@ -37,7 +35,9 @@ DBUS_BEGIN_DECLS +#ifndef DBUS_SESSION_BUS_DEFAULT_ADDRESS #define DBUS_SESSION_BUS_DEFAULT_ADDRESS "autolaunch:" +#endif void _dbus_warn (const char *format, ...) _DBUS_GNUC_PRINTF (1, 2); @@ -83,12 +83,27 @@ void _dbus_warn_check_failed (const char *format, #ifdef DBUS_ENABLE_VERBOSE_MODE +/* + at least gnu cc and msvc compiler are known to + have support for variable macro argument lists + add other compilers is required +*/ +#if defined(__GNUC__) || defined(_MSC_VER) +#define DBUS_CPP_SUPPORTS_VARIABLE_MACRO_ARGUMENTS +#endif + +#ifdef DBUS_CPP_SUPPORTS_VARIABLE_MACRO_ARGUMENTS +void _dbus_verbose_real (const char *file, const int line, const char *function, + const char *format,...) _DBUS_GNUC_PRINTF (4, 5); +# define _dbus_verbose(fmt,...) _dbus_verbose_real( __FILE__,__LINE__,__FUNCTION__,fmt, ## __VA_ARGS__) +#else void _dbus_verbose_real (const char *format, ...) _DBUS_GNUC_PRINTF (1, 2); +# define _dbus_verbose _dbus_verbose_real +#endif void _dbus_verbose_reset_real (void); dbus_bool_t _dbus_is_verbose_real (void); -# define _dbus_verbose _dbus_verbose_real # define _dbus_verbose_reset _dbus_verbose_reset_real # define _dbus_is_verbose _dbus_is_verbose_real #else @@ -131,7 +146,8 @@ void _dbus_real_assert_not_reached (const char *explanation, #define _dbus_return_if_fail(condition) #define _dbus_return_val_if_fail(condition, val) #else -extern const char _dbus_return_if_fail_warning_format[]; + +extern const char *_dbus_return_if_fail_warning_format; #define _dbus_return_if_fail(condition) do { \ _dbus_assert ((*(const char*)_DBUS_FUNCTION_NAME) != '_'); \ @@ -153,13 +169,13 @@ extern const char _dbus_return_if_fail_warning_format[]; #define _DBUS_N_ELEMENTS(array) ((int) (sizeof ((array)) / sizeof ((array)[0]))) -#define _DBUS_POINTER_TO_INT(pointer) ((long)(pointer)) -#define _DBUS_INT_TO_POINTER(integer) ((void*)((long)(integer))) +#define _DBUS_POINTER_TO_INT(pointer) ((intptr_t)(pointer)) +#define _DBUS_INT_TO_POINTER(integer) ((void*)((intptr_t)(integer))) #define _DBUS_ZERO(object) (memset (&(object), '\0', sizeof ((object)))) #define _DBUS_STRUCT_OFFSET(struct_type, member) \ - ((long) ((unsigned char*) &((struct_type*) 0)->member)) + ((intptr_t) ((unsigned char*) &((struct_type*) 0)->member)) #ifdef DBUS_DISABLE_CHECKS /* this is an assert and not an error, but in the typical --disable-checks case (you're trying @@ -187,7 +203,7 @@ extern const char _dbus_return_if_fail_warning_format[]; */ #define _DBUS_ALIGN_VALUE(this, boundary) \ - (( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1))) + (( ((uintptr_t)(this)) + (((uintptr_t)(boundary)) -1)) & (~(((uintptr_t)(boundary))-1))) #define _DBUS_ALIGN_ADDRESS(this, boundary) \ ((void*)_DBUS_ALIGN_VALUE(this, boundary)) @@ -245,7 +261,7 @@ void _dbus_verbose_bytes_of_string (const DBusString *str, const char* _dbus_header_field_to_string (int header_field); -extern const char _dbus_no_memory_message[]; +extern const char *_dbus_no_memory_message; #define _DBUS_SET_OOM(error) dbus_set_error_const ((error), DBUS_ERROR_NO_MEMORY, _dbus_no_memory_message) #ifdef DBUS_BUILD_TESTS @@ -294,18 +310,23 @@ _DBUS_DECLARE_GLOBAL_LOCK (pending_call_slots); _DBUS_DECLARE_GLOBAL_LOCK (server_slots); _DBUS_DECLARE_GLOBAL_LOCK (message_slots); /* 5-10 */ -_DBUS_DECLARE_GLOBAL_LOCK (atomic); _DBUS_DECLARE_GLOBAL_LOCK (bus); _DBUS_DECLARE_GLOBAL_LOCK (bus_datas); _DBUS_DECLARE_GLOBAL_LOCK (shutdown_funcs); _DBUS_DECLARE_GLOBAL_LOCK (system_users); -/* 10-15 */ _DBUS_DECLARE_GLOBAL_LOCK (message_cache); +/* 10-14 */ _DBUS_DECLARE_GLOBAL_LOCK (shared_connections); _DBUS_DECLARE_GLOBAL_LOCK (win_fds); _DBUS_DECLARE_GLOBAL_LOCK (sid_atom_cache); _DBUS_DECLARE_GLOBAL_LOCK (machine_uuid); + +#if !DBUS_USE_SYNC +_DBUS_DECLARE_GLOBAL_LOCK (atomic); #define _DBUS_N_GLOBAL_LOCKS (15) +#else +#define _DBUS_N_GLOBAL_LOCKS (14) +#endif dbus_bool_t _dbus_threads_init_debug (void); diff --git a/dbus/dbus-keyring.c b/dbus/dbus-keyring.c index 6dc1e129..35e8d74e 100644 --- a/dbus/dbus-keyring.c +++ b/dbus/dbus-keyring.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-keyring.h" #include "dbus-protocol.h" #include <dbus/dbus-string.h> @@ -142,8 +143,6 @@ _dbus_keyring_new (void) return keyring; - /* out_4: */ - _dbus_string_free (&keyring->filename_lock); out_3: _dbus_string_free (&keyring->filename); out_2: @@ -604,7 +603,7 @@ _dbus_keyring_reload (DBusKeyring *keyring, } if (!_dbus_string_save_to_file (&contents, &keyring->filename, - error)) + FALSE, error)) goto out; } diff --git a/dbus/dbus-list.c b/dbus/dbus-list.c index e075ffe1..6a16ed60 100644 --- a/dbus/dbus-list.c +++ b/dbus/dbus-list.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-list.h" #include "dbus-mempool.h" diff --git a/dbus/dbus-macros.h b/dbus/dbus-macros.h index 497dd450..d1e40ecb 100644 --- a/dbus/dbus-macros.h +++ b/dbus/dbus-macros.h @@ -64,6 +64,24 @@ # define _DBUS_GNUC_EXTENSION #endif +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((__format__ (__printf__, format_idx, arg_idx))) +#define _DBUS_GNUC_NORETURN \ + __attribute__((__noreturn__)) +#else /* !__GNUC__ */ +#define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) +#define _DBUS_GNUC_NORETURN +#endif /* !__GNUC__ */ + +/** @def _DBUS_GNUC_PRINTF + * used to tell gcc about printf format strings + */ +/** @def _DBUS_GNUC_NORETURN + * used to tell gcc about functions that never return, such as _dbus_abort() + */ + + /* Normally docs are in .c files, but there isn't a .c file for this. */ /** * @defgroup DBusMacros Utility macros @@ -132,6 +150,25 @@ * this macro in your own code; please consider it to be internal to libdbus. */ +/* + * @def DBUS_EXPORT + * + * Declare the following symbol as public. This is currently a noop on + * platforms other than Windows. + */ + +#if defined(_WIN32) +# if defined(DBUS_STATIC_BUILD) +# define DBUS_EXPORT +# elif defined(dbus_1_EXPORTS) +# define DBUS_EXPORT __declspec(dllexport) +# else +# define DBUS_EXPORT __declspec(dllimport) +# endif +#else +#define DBUS_EXPORT +#endif + /** @} */ #endif /* DBUS_MACROS_H */ diff --git a/dbus/dbus-mainloop.c b/dbus/dbus-mainloop.c index a3833588..96ba599b 100644 --- a/dbus/dbus-mainloop.c +++ b/dbus/dbus-mainloop.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-mainloop.h" #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/dbus/dbus-marshal-basic.c b/dbus/dbus-marshal-basic.c index 3d0d3d0b..ea18dbf3 100644 --- a/dbus/dbus-marshal-basic.c +++ b/dbus/dbus-marshal-basic.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-marshal-basic.h" #include "dbus-signature.h" @@ -414,6 +415,7 @@ _dbus_marshal_set_basic (DBusString *str, case DBUS_TYPE_BOOLEAN: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: pos = _DBUS_ALIGN_VALUE (pos, 4); set_4_octets (str, pos, vp->u32, byte_order); if (old_end_pos) @@ -540,6 +542,7 @@ _dbus_marshal_read_basic (const DBusString *str, case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: case DBUS_TYPE_BOOLEAN: + case DBUS_TYPE_UNIX_FD: { volatile dbus_uint32_t *vp = value; pos = _DBUS_ALIGN_VALUE (pos, 4); @@ -839,6 +842,7 @@ _dbus_marshal_write_basic (DBusString *str, break; case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: return marshal_4_octets (str, insert_at, vp->u32, byte_order, pos_after); break; @@ -1066,6 +1070,7 @@ _dbus_marshal_write_fixed_multi (DBusString *str, case DBUS_TYPE_BOOLEAN: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: return marshal_fixed_multi (str, insert_at, vp, n_elements, byte_order, 4, pos_after); break; case DBUS_TYPE_INT64: @@ -1114,6 +1119,7 @@ _dbus_marshal_skip_basic (const DBusString *str, case DBUS_TYPE_BOOLEAN: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: *pos = _DBUS_ALIGN_VALUE (*pos, 4); *pos += 4; break; @@ -1202,6 +1208,7 @@ _dbus_type_get_alignment (int typecode) case DBUS_TYPE_BOOLEAN: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: /* this stuff is 4 since it starts with a length */ case DBUS_TYPE_STRING: case DBUS_TYPE_OBJECT_PATH: @@ -1256,6 +1263,7 @@ _dbus_type_is_valid (int typecode) case DBUS_TYPE_STRUCT: case DBUS_TYPE_DICT_ENTRY: case DBUS_TYPE_VARIANT: + case DBUS_TYPE_UNIX_FD: return TRUE; default: @@ -1316,6 +1324,8 @@ _dbus_type_to_string (int typecode) return "begin_dict_entry"; case DBUS_DICT_ENTRY_END_CHAR: return "end_dict_entry"; + case DBUS_TYPE_UNIX_FD: + return "unix_fd"; default: return "unknown"; } diff --git a/dbus/dbus-marshal-basic.h b/dbus/dbus-marshal-basic.h index 68ced4d2..0c27fc9e 100644 --- a/dbus/dbus-marshal-basic.h +++ b/dbus/dbus-marshal-basic.h @@ -25,22 +25,26 @@ #ifndef DBUS_MARSHAL_BASIC_H #define DBUS_MARSHAL_BASIC_H -#include <config.h> +#ifdef HAVE_BYTESWAP_H +#include <byteswap.h> +#endif + #include <dbus/dbus-protocol.h> #include <dbus/dbus-types.h> #include <dbus/dbus-arch-deps.h> #include <dbus/dbus-string.h> -#ifndef PACKAGE -#error "config.h not included here" -#endif - #ifdef WORDS_BIGENDIAN #define DBUS_COMPILER_BYTE_ORDER DBUS_BIG_ENDIAN #else #define DBUS_COMPILER_BYTE_ORDER DBUS_LITTLE_ENDIAN #endif +#ifdef HAVE_BYTESWAP_H +#define DBUS_UINT16_SWAP_LE_BE_CONSTANT(val) bswap_16(val) +#define DBUS_UINT32_SWAP_LE_BE_CONSTANT(val) bswap_32(val) +#else /* HAVE_BYTESWAP_H */ + #define DBUS_UINT16_SWAP_LE_BE_CONSTANT(val) ((dbus_uint16_t) ( \ (dbus_uint16_t) ((dbus_uint16_t) (val) >> 8) | \ (dbus_uint16_t) ((dbus_uint16_t) (val) << 8))) @@ -51,8 +55,14 @@ (((dbus_uint32_t) (val) & (dbus_uint32_t) 0x00ff0000U) >> 8) | \ (((dbus_uint32_t) (val) & (dbus_uint32_t) 0xff000000U) >> 24))) +#endif /* HAVE_BYTESWAP_H */ + #ifdef DBUS_HAVE_INT64 +#ifdef HAVE_BYTESWAP_H +#define DBUS_UINT64_SWAP_LE_BE_CONSTANT(val) bswap_64(val) +#else /* HAVE_BYTESWAP_H */ + #define DBUS_UINT64_SWAP_LE_BE_CONSTANT(val) ((dbus_uint64_t) ( \ (((dbus_uint64_t) (val) & \ (dbus_uint64_t) DBUS_UINT64_CONSTANT (0x00000000000000ff)) << 56) | \ @@ -72,6 +82,8 @@ (dbus_uint64_t) DBUS_UINT64_CONSTANT (0xff00000000000000)) >> 56))) #endif /* DBUS_HAVE_INT64 */ +#endif /* HAVE_BYTESWAP_H */ + #define DBUS_UINT16_SWAP_LE_BE(val) (DBUS_UINT16_SWAP_LE_BE_CONSTANT (val)) #define DBUS_INT16_SWAP_LE_BE(val) ((dbus_int16_t)DBUS_UINT16_SWAP_LE_BE_CONSTANT (val)) diff --git a/dbus/dbus-marshal-byteswap.c b/dbus/dbus-marshal-byteswap.c index 6af5e5e4..22d7e22b 100644 --- a/dbus/dbus-marshal-byteswap.c +++ b/dbus/dbus-marshal-byteswap.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-marshal-byteswap.h" #include "dbus-marshal-basic.h" #include "dbus-signature.h" @@ -191,6 +192,11 @@ byteswap_body_helper (DBusTypeReader *reader, } break; + case DBUS_TYPE_UNIX_FD: + /* fds can only be passed on a local machine, so byte order must always match */ + _dbus_assert_not_reached("attempted to byteswap unix fds which makes no sense"); + break; + default: _dbus_assert_not_reached ("invalid typecode in supposedly-validated signature"); break; diff --git a/dbus/dbus-marshal-byteswap.h b/dbus/dbus-marshal-byteswap.h index 764e353d..be2dd758 100644 --- a/dbus/dbus-marshal-byteswap.h +++ b/dbus/dbus-marshal-byteswap.h @@ -24,14 +24,9 @@ #ifndef DBUS_MARSHAL_BYTESWAP_H #define DBUS_MARSHAL_BYTESWAP_H -#include <config.h> #include <dbus/dbus-protocol.h> #include <dbus/dbus-marshal-recursive.h> -#ifndef PACKAGE -#error "config.h not included here" -#endif - void _dbus_marshal_byteswap (const DBusString *signature, int signature_start, int old_byte_order, diff --git a/dbus/dbus-marshal-header.c b/dbus/dbus-marshal-header.c index ec98a5ee..3f31d7a0 100644 --- a/dbus/dbus-marshal-header.c +++ b/dbus/dbus-marshal-header.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus/dbus-shared.h" #include "dbus-marshal-header.h" #include "dbus-marshal-recursive.h" @@ -81,7 +82,8 @@ _dbus_header_field_types[DBUS_HEADER_FIELD_LAST+1] = { { DBUS_HEADER_FIELD_REPLY_SERIAL, DBUS_TYPE_UINT32 }, { DBUS_HEADER_FIELD_DESTINATION, DBUS_TYPE_STRING }, { DBUS_HEADER_FIELD_SENDER, DBUS_TYPE_STRING }, - { DBUS_HEADER_FIELD_SIGNATURE, DBUS_TYPE_SIGNATURE } + { DBUS_HEADER_FIELD_SIGNATURE, DBUS_TYPE_SIGNATURE }, + { DBUS_HEADER_FIELD_UNIX_FDS, DBUS_TYPE_UINT32 } }; /** Macro to look up the correct type for a field */ @@ -888,6 +890,10 @@ load_and_validate_field (DBusHeader *header, } break; + case DBUS_HEADER_FIELD_UNIX_FDS: + /* Every value makes sense */ + break; + case DBUS_HEADER_FIELD_SIGNATURE: /* SIGNATURE validated generically due to its type */ string_validation_func = NULL; diff --git a/dbus/dbus-marshal-header.h b/dbus/dbus-marshal-header.h index f4038630..fd16c5f0 100644 --- a/dbus/dbus-marshal-header.h +++ b/dbus/dbus-marshal-header.h @@ -24,14 +24,9 @@ #ifndef DBUS_MARSHAL_HEADER_H #define DBUS_MARSHAL_HEADER_H -#include <config.h> #include <dbus/dbus-marshal-basic.h> #include <dbus/dbus-marshal-validate.h> -#ifndef PACKAGE -#error "config.h not included here" -#endif - typedef struct DBusHeader DBusHeader; typedef struct DBusHeaderField DBusHeaderField; diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c index f4d59f3f..3508bb0d 100644 --- a/dbus/dbus-marshal-recursive-util.c +++ b/dbus/dbus-marshal-recursive-util.c @@ -1090,7 +1090,7 @@ run_test_copy (NodeIterationData *nid) DBusTypeReader reader; DBusTypeWriter writer; - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); src = nid->block; @@ -1153,7 +1153,7 @@ run_test_values_only_write (NodeIterationData *nid) dbus_bool_t retval; int sig_len; - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); retval = FALSE; @@ -1221,7 +1221,7 @@ run_test_set_values (NodeIterationData *nid) dbus_bool_t retval; int i; - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); retval = FALSE; @@ -1278,7 +1278,7 @@ run_test_delete_values (NodeIterationData *nid) dbus_bool_t retval; int t; - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); retval = FALSE; diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index ccf0d22b..cb10854b 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-marshal-recursive.h" #include "dbus-marshal-basic.h" #include "dbus-signature.h" diff --git a/dbus/dbus-marshal-recursive.h b/dbus/dbus-marshal-recursive.h index cea35350..97e5466b 100644 --- a/dbus/dbus-marshal-recursive.h +++ b/dbus/dbus-marshal-recursive.h @@ -24,14 +24,9 @@ #ifndef DBUS_MARSHAL_RECURSIVE_H #define DBUS_MARSHAL_RECURSIVE_H -#include <config.h> #include <dbus/dbus-protocol.h> #include <dbus/dbus-list.h> -#ifndef PACKAGE -#error "config.h not included here" -#endif - typedef struct DBusTypeReader DBusTypeReader; typedef struct DBusTypeWriter DBusTypeWriter; typedef struct DBusTypeReaderClass DBusTypeReaderClass; diff --git a/dbus/dbus-marshal-validate.c b/dbus/dbus-marshal-validate.c index 61fad4de..b4579978 100644 --- a/dbus/dbus-marshal-validate.c +++ b/dbus/dbus-marshal-validate.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-marshal-validate.h" #include "dbus-marshal-recursive.h" @@ -100,6 +101,7 @@ _dbus_validate_signature_with_reason (const DBusString *type_str, case DBUS_TYPE_UINT16: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: case DBUS_TYPE_INT64: case DBUS_TYPE_UINT64: case DBUS_TYPE_DOUBLE: @@ -289,16 +291,30 @@ out: return result; } +/* note: this function is also used to validate the header's values, + * since the header is a valid body with a particular signature. + */ static DBusValidity validate_body_helper (DBusTypeReader *reader, int byte_order, dbus_bool_t walk_reader_to_end, + int total_depth, const unsigned char *p, const unsigned char *end, const unsigned char **new_p) { int current_type; + /* The spec allows arrays and structs to each nest 32, for total + * nesting of 2*32. We want to impose the same limit on "dynamic" + * value nesting (not visible in the signature) which is introduced + * by DBUS_TYPE_VARIANT. + */ + if (total_depth > (DBUS_MAXIMUM_TYPE_RECURSION_DEPTH * 2)) + { + return DBUS_INVALID_NESTED_TOO_DEEPLY; + } + while ((current_type = _dbus_type_reader_get_current_type (reader)) != DBUS_TYPE_INVALID) { const unsigned char *a; @@ -319,12 +335,13 @@ validate_body_helper (DBusTypeReader *reader, case DBUS_TYPE_BYTE: ++p; break; - + case DBUS_TYPE_BOOLEAN: case DBUS_TYPE_INT16: case DBUS_TYPE_UINT16: case DBUS_TYPE_INT32: case DBUS_TYPE_UINT32: + case DBUS_TYPE_UNIX_FD: case DBUS_TYPE_INT64: case DBUS_TYPE_UINT64: case DBUS_TYPE_DOUBLE: @@ -474,7 +491,9 @@ validate_body_helper (DBusTypeReader *reader, { while (p < array_end) { - validity = validate_body_helper (&sub, byte_order, FALSE, p, end, &p); + validity = validate_body_helper (&sub, byte_order, FALSE, + total_depth + 1, + p, end, &p); if (validity != DBUS_VALID) return validity; } @@ -591,7 +610,9 @@ validate_body_helper (DBusTypeReader *reader, _dbus_assert (_dbus_type_reader_get_current_type (&sub) != DBUS_TYPE_INVALID); - validity = validate_body_helper (&sub, byte_order, FALSE, p, end, &p); + validity = validate_body_helper (&sub, byte_order, FALSE, + total_depth + 1, + p, end, &p); if (validity != DBUS_VALID) return validity; @@ -620,7 +641,9 @@ validate_body_helper (DBusTypeReader *reader, _dbus_type_reader_recurse (reader, &sub); - validity = validate_body_helper (&sub, byte_order, TRUE, p, end, &p); + validity = validate_body_helper (&sub, byte_order, TRUE, + total_depth + 1, + p, end, &p); if (validity != DBUS_VALID) return validity; } @@ -705,7 +728,7 @@ _dbus_validate_body_with_reason (const DBusString *expected_signature, p = _dbus_string_get_const_data_len (value_str, value_pos, len); end = p + len; - validity = validate_body_helper (&reader, byte_order, TRUE, p, end, &p); + validity = validate_body_helper (&reader, byte_order, TRUE, 0, p, end, &p); if (validity != DBUS_VALID) return validity; @@ -875,7 +898,7 @@ _dbus_validity_to_error_message (DBusValidity validity) case DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS: return "Dict entry has too many fields"; case DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY: return "Dict entry not inside array"; case DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE: return "Dict key must be basic type"; - + case DBUS_INVALID_NESTED_TOO_DEEPLY: return "Variants cannot be used to create a hugely recursive tree of values"; default: return "Invalid"; } diff --git a/dbus/dbus-marshal-validate.h b/dbus/dbus-marshal-validate.h index a7d904b2..8947a2af 100644 --- a/dbus/dbus-marshal-validate.h +++ b/dbus/dbus-marshal-validate.h @@ -24,12 +24,6 @@ #ifndef DBUS_MARSHAL_VALIDATE_H #define DBUS_MARSHAL_VALIDATE_H -#include <config.h> - -#ifndef PACKAGE -#error "config.h not included here" -#endif - /** * @addtogroup DBusMarshal * @@ -117,6 +111,8 @@ typedef enum DBUS_INVALID_DICT_ENTRY_HAS_TOO_MANY_FIELDS = 53, DBUS_INVALID_DICT_ENTRY_NOT_INSIDE_ARRAY = 54, DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE = 55, + DBUS_INVALID_MISSING_UNIX_FDS = 56, + DBUS_INVALID_NESTED_TOO_DEEPLY = 57, DBUS_VALIDITY_LAST } DBusValidity; diff --git a/dbus/dbus-memory.c b/dbus/dbus-memory.c index 5e93c047..a37759c0 100644 --- a/dbus/dbus-memory.c +++ b/dbus/dbus-memory.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-memory.h" #include "dbus-internals.h" #include "dbus-sysdeps.h" @@ -232,6 +233,7 @@ _dbus_get_fail_alloc_failures (void) } #ifdef DBUS_BUILD_TESTS +static dbus_bool_t called = 0; /** * Called when about to alloc some memory; if * it returns #TRUE, then the allocation should @@ -244,7 +246,17 @@ dbus_bool_t _dbus_decrement_fail_alloc_counter (void) { _dbus_initialize_malloc_debug (); - +#ifdef DBUS_WIN_FIXME + { + if (!called) + { + _dbus_verbose("TODO: memory allocation testing errors disabled for now\n"); + called = 1; + } + return FALSE; + } +#endif + if (fail_alloc_counter <= 0) { if (backtrace_on_fail_alloc) diff --git a/dbus/dbus-memory.h b/dbus/dbus-memory.h index d0e92d1a..ea28423c 100644 --- a/dbus/dbus-memory.h +++ b/dbus/dbus-memory.h @@ -37,19 +37,25 @@ DBUS_BEGIN_DECLS * @{ */ +DBUS_EXPORT void* dbus_malloc (size_t bytes); +DBUS_EXPORT void* dbus_malloc0 (size_t bytes); +DBUS_EXPORT void* dbus_realloc (void *memory, size_t bytes); +DBUS_EXPORT void dbus_free (void *memory); -#define dbus_new(type, count) ((type*)dbus_malloc (sizeof (type) * (count))); -#define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count))); +#define dbus_new(type, count) ((type*)dbus_malloc (sizeof (type) * (count))) +#define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count))) +DBUS_EXPORT void dbus_free_string_array (char **str_array); typedef void (* DBusFreeFunction) (void *memory); +DBUS_EXPORT void dbus_shutdown (void); /** @} */ diff --git a/dbus/dbus-mempool.c b/dbus/dbus-mempool.c index 2a41cb16..680586b7 100644 --- a/dbus/dbus-mempool.c +++ b/dbus/dbus-mempool.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-mempool.h" #include "dbus-internals.h" diff --git a/dbus/dbus-message-factory.c b/dbus/dbus-message-factory.c index 7bc539b5..7ecf8270 100644 --- a/dbus/dbus-message-factory.c +++ b/dbus/dbus-message-factory.c @@ -333,6 +333,53 @@ simple_error (void) return message; } +static DBusMessage* +message_with_nesting_levels (int levels) +{ + DBusMessage *message; + dbus_int32_t v_INT32; + DBusMessageIter *parents; + DBusMessageIter *children; + int i; + + /* If levels is higher it breaks sig_refcount in DBusMessageRealIter + * in dbus-message.c, this assert is just to help you know you need + * to fix that if you hit it + */ + _dbus_assert (levels < 256); + + parents = dbus_new(DBusMessageIter, levels + 1); + children = dbus_new(DBusMessageIter, levels + 1); + + v_INT32 = 42; + message = simple_method_call (); + + i = 0; + dbus_message_iter_init_append (message, &parents[i]); + while (i < levels) + { + dbus_message_iter_open_container (&parents[i], DBUS_TYPE_VARIANT, + i == (levels - 1) ? + DBUS_TYPE_INT32_AS_STRING : + DBUS_TYPE_VARIANT_AS_STRING, + &children[i]); + ++i; + parents[i] = children[i-1]; + } + --i; + dbus_message_iter_append_basic (&children[i], DBUS_TYPE_INT32, &v_INT32); + while (i >= 0) + { + dbus_message_iter_close_container (&parents[i], &children[i]); + --i; + } + + dbus_free(parents); + dbus_free(children); + + return message; +} + static dbus_bool_t generate_special (DBusMessageDataIter *iter, DBusString *data, @@ -735,6 +782,24 @@ generate_special (DBusMessageDataIter *iter, *expected_validity = DBUS_INVALID_DICT_ENTRY_HAS_NO_FIELDS; } + else if (item_seq == 20) + { + /* 64 levels of nesting is OK */ + message = message_with_nesting_levels(64); + + generate_from_message (data, expected_validity, message); + + *expected_validity = DBUS_VALID; + } + else if (item_seq == 21) + { + /* 65 levels of nesting is not OK */ + message = message_with_nesting_levels(65); + + generate_from_message (data, expected_validity, message); + + *expected_validity = DBUS_INVALID_NESTED_TOO_DEEPLY; + } else { return FALSE; @@ -949,6 +1014,7 @@ static const int typecodes[] = { DBUS_STRUCT_END_CHAR, DBUS_DICT_ENTRY_BEGIN_CHAR, DBUS_DICT_ENTRY_END_CHAR, + DBUS_TYPE_UNIX_FD, 255 /* random invalid typecode */ }; diff --git a/dbus/dbus-message-internal.h b/dbus/dbus-message-internal.h index 0134f8db..870934b9 100644 --- a/dbus/dbus-message-internal.h +++ b/dbus/dbus-message-internal.h @@ -35,14 +35,17 @@ typedef struct DBusMessageLoader DBusMessageLoader; void _dbus_message_get_network_data (DBusMessage *message, const DBusString **header, const DBusString **body); +void _dbus_message_get_unix_fds (DBusMessage *message, + const int **fds, + unsigned *n_fds); void _dbus_message_lock (DBusMessage *message); void _dbus_message_unlock (DBusMessage *message); -dbus_bool_t _dbus_message_add_size_counter (DBusMessage *message, +dbus_bool_t _dbus_message_add_counter (DBusMessage *message, DBusCounter *counter); -void _dbus_message_add_size_counter_link (DBusMessage *message, +void _dbus_message_add_counter_link (DBusMessage *message, DBusList *link); -void _dbus_message_remove_size_counter (DBusMessage *message, +void _dbus_message_remove_counter (DBusMessage *message, DBusCounter *counter, DBusList **link_return); @@ -55,6 +58,14 @@ void _dbus_message_loader_get_buffer (DBusMessageLoader void _dbus_message_loader_return_buffer (DBusMessageLoader *loader, DBusString *buffer, int bytes_read); + +dbus_bool_t _dbus_message_loader_get_unix_fds (DBusMessageLoader *loader, + int **fds, + unsigned *max_n_fds); +void _dbus_message_loader_return_unix_fds (DBusMessageLoader *loader, + int *fds, + unsigned n_fds); + dbus_bool_t _dbus_message_loader_queue_messages (DBusMessageLoader *loader); DBusMessage* _dbus_message_loader_peek_message (DBusMessageLoader *loader); DBusMessage* _dbus_message_loader_pop_message (DBusMessageLoader *loader); @@ -69,6 +80,10 @@ void _dbus_message_loader_set_max_message_size (DBusMessageLoader long size); long _dbus_message_loader_get_max_message_size (DBusMessageLoader *loader); +void _dbus_message_loader_set_max_message_unix_fds(DBusMessageLoader *loader, + long n); +long _dbus_message_loader_get_max_message_unix_fds(DBusMessageLoader *loader); + DBUS_END_DECLS #endif /* DBUS_MESSAGE_INTERNAL_H */ diff --git a/dbus/dbus-message-private.h b/dbus/dbus-message-private.h index c8b2ba63..57888fa5 100644 --- a/dbus/dbus-message-private.h +++ b/dbus/dbus-message-private.h @@ -66,12 +66,21 @@ struct DBusMessageLoader DBusList *messages; /**< Complete messages. */ long max_message_size; /**< Maximum size of a message */ + long max_message_unix_fds; /**< Maximum unix fds in a message */ - unsigned int buffer_outstanding : 1; /**< Someone is using the buffer to read */ + DBusValidity corruption_reason; /**< why we were corrupted */ unsigned int corrupted : 1; /**< We got broken data, and are no longer working */ - DBusValidity corruption_reason; /**< why we were corrupted */ + unsigned int buffer_outstanding : 1; /**< Someone is using the buffer to read */ + +#ifdef HAVE_UNIX_FD_PASSING + unsigned int unix_fds_outstanding : 1; /**< Someone is using the unix fd array to read */ + + int *unix_fds; /**< File descriptors that have been read from the transport but not yet been handed to any message. Array will be allocated at first use. */ + unsigned n_unix_fds_allocated; /**< Number of file descriptors this array has space for */ + unsigned n_unix_fds; /**< Number of valid file descriptors in array */ +#endif }; @@ -100,8 +109,8 @@ struct DBusMessage #ifndef DBUS_DISABLE_CHECKS unsigned int in_cache : 1; /**< Has been "freed" since it's in the cache (this is a debug feature) */ #endif - - DBusList *size_counters; /**< 0-N DBusCounter used to track message size. */ + + DBusList *counters; /**< 0-N DBusCounter used to track message size/unix fds. */ long size_counter_delta; /**< Size we incremented the size counters by. */ dbus_uint32_t changed_stamp : CHANGED_STAMP_BITS; /**< Incremented when iterators are invalidated. */ @@ -111,6 +120,17 @@ struct DBusMessage #ifndef DBUS_DISABLE_CHECKS int generation; /**< _dbus_current_generation when message was created */ #endif + +#ifdef HAVE_UNIX_FD_PASSING + int *unix_fds; + /**< Unix file descriptors associated with this message. These are + closed when the message is destroyed, hence make sure to dup() + them when adding or removing them here. */ + unsigned n_unix_fds; /**< Number of valid fds in the array */ + unsigned n_unix_fds_allocated; /**< Allocated size of the array */ + + long unix_fd_counter_delta; /**< Size we incremented the unix fd counter by */ +#endif }; dbus_bool_t _dbus_message_iter_get_args_valist (DBusMessageIter *iter, @@ -118,6 +138,9 @@ dbus_bool_t _dbus_message_iter_get_args_valist (DBusMessageIter *iter, int first_arg_type, va_list var_args); + +void _dbus_check_fdleaks(void); + /** @} */ DBUS_END_DECLS diff --git a/dbus/dbus-message-util.c b/dbus/dbus-message-util.c index 84471a50..f972c8a6 100644 --- a/dbus/dbus-message-util.c +++ b/dbus/dbus-message-util.c @@ -22,11 +22,23 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-test.h" #include "dbus-message-private.h" #include "dbus-marshal-recursive.h" #include "dbus-string.h" +#ifdef HAVE_UNIX_FD_PASSING +#include "dbus-sysdeps-unix.h" +#endif + +#ifdef __linux__ +/* Necessary for the Linux-specific fd leak checking code only */ +#include <sys/types.h> +#include <dirent.h> +#include <stdlib.h> +#include <errno.h> +#endif /** * @addtogroup DBusMessage @@ -126,6 +138,50 @@ check_memleaks (void) } } +void +_dbus_check_fdleaks(void) +{ + +#ifdef __linux__ + + DIR *d; + + /* This works on Linux only */ + + if ((d = opendir("/proc/self/fd"))) + { + struct dirent *de; + + while ((de = readdir(d))) + { + long l; + char *e = NULL; + int fd; + + if (de->d_name[0] == '.') + continue; + + errno = 0; + l = strtol(de->d_name, &e, 10); + _dbus_assert(errno == 0 && e && !*e); + + fd = (int) l; + + if (fd < 3) + continue; + + if (fd == dirfd(d)) + continue; + + _dbus_warn("file descriptor %i leaked in %s.\n", fd, __FILE__); + _dbus_assert_not_reached("fdleaks"); + } + + closedir(d); + } +#endif +} + static dbus_bool_t check_have_valid_message (DBusMessageLoader *loader) { @@ -895,7 +951,7 @@ verify_test_message (DBusMessage *message) dbus_bool_t _dbus_message_test (const char *test_data_dir) { - DBusMessage *message; + DBusMessage *message, *message_without_unix_fds; DBusMessageLoader *loader; int i; const char *data; @@ -940,6 +996,10 @@ _dbus_message_test (const char *test_data_dir) unsigned char v2_BYTE; dbus_bool_t v_BOOLEAN; DBusMessageIter iter, array_iter, struct_iter; +#ifdef HAVE_UNIX_FD_PASSING + int v_UNIX_FD; +#endif + char **decomposed; message = dbus_message_new_method_call ("org.freedesktop.DBus.TestService", "/org/freedesktop/TestPath", @@ -1035,6 +1095,34 @@ _dbus_message_test (const char *test_data_dir) _dbus_assert (strcmp (dbus_message_get_member (message), "Bar") == 0); + /* Path decomposing */ + dbus_message_set_path (message, NULL); + dbus_message_get_path_decomposed (message, &decomposed); + _dbus_assert (decomposed == NULL); + dbus_free_string_array (decomposed); + + dbus_message_set_path (message, "/"); + dbus_message_get_path_decomposed (message, &decomposed); + _dbus_assert (decomposed != NULL); + _dbus_assert (decomposed[0] == NULL); + dbus_free_string_array (decomposed); + + dbus_message_set_path (message, "/a/b"); + dbus_message_get_path_decomposed (message, &decomposed); + _dbus_assert (decomposed != NULL); + _dbus_assert (strcmp (decomposed[0], "a") == 0); + _dbus_assert (strcmp (decomposed[1], "b") == 0); + _dbus_assert (decomposed[2] == NULL); + dbus_free_string_array (decomposed); + + dbus_message_set_path (message, "/spam/eggs"); + dbus_message_get_path_decomposed (message, &decomposed); + _dbus_assert (decomposed != NULL); + _dbus_assert (strcmp (decomposed[0], "spam") == 0); + _dbus_assert (strcmp (decomposed[1], "eggs") == 0); + _dbus_assert (decomposed[2] == NULL); + dbus_free_string_array (decomposed); + dbus_message_unref (message); /* Test the vararg functions */ @@ -1058,6 +1146,9 @@ _dbus_message_test (const char *test_data_dir) v_BOOLEAN = TRUE; v_BYTE = 42; v2_BYTE = 24; +#ifdef HAVE_UNIX_FD_PASSING + v_UNIX_FD = 1; +#endif dbus_message_append_args (message, DBUS_TYPE_INT16, &v_INT16, @@ -1091,6 +1182,7 @@ _dbus_message_test (const char *test_data_dir) _DBUS_N_ELEMENTS (our_boolean_array), DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &v_ARRAY_STRING, _DBUS_N_ELEMENTS (our_string_array), + DBUS_TYPE_INVALID); i = 0; @@ -1125,7 +1217,16 @@ _dbus_message_test (const char *test_data_dir) sig[i++] = DBUS_TYPE_BOOLEAN; sig[i++] = DBUS_TYPE_ARRAY; sig[i++] = DBUS_TYPE_STRING; - sig[i++] = DBUS_TYPE_INVALID; + + message_without_unix_fds = dbus_message_copy(message); + _dbus_assert(message_without_unix_fds); +#ifdef HAVE_UNIX_FD_PASSING + dbus_message_append_args (message, + DBUS_TYPE_UNIX_FD, &v_UNIX_FD, + DBUS_TYPE_INVALID); + sig[i++] = DBUS_TYPE_UNIX_FD; +#endif + sig[i++] = DBUS_TYPE_INVALID; _dbus_assert (i < (int) _DBUS_N_ELEMENTS (sig)); @@ -1202,6 +1303,20 @@ _dbus_message_test (const char *test_data_dir) _dbus_message_loader_return_buffer (loader, buffer, 1); } +#ifdef HAVE_UNIX_FD_PASSING + { + int *unix_fds; + unsigned n_unix_fds; + /* Write unix fd */ + _dbus_message_loader_get_unix_fds(loader, &unix_fds, &n_unix_fds); + _dbus_assert(n_unix_fds > 0); + _dbus_assert(message->n_unix_fds == 1); + unix_fds[0] = _dbus_dup(message->unix_fds[0], NULL); + _dbus_assert(unix_fds[0] >= 0); + _dbus_message_loader_return_unix_fds(loader, unix_fds, 1); + } +#endif + dbus_message_unref (message); /* Now pop back the message */ @@ -1218,7 +1333,14 @@ _dbus_message_test (const char *test_data_dir) if (dbus_message_get_reply_serial (message) != 5678) _dbus_assert_not_reached ("reply serial fields differ"); - verify_test_message (message); + dbus_message_unref (message); + + /* ovveride the serial, since it was reset by dbus_message_copy() */ + dbus_message_set_serial(message_without_unix_fds, 8901); + + dbus_message_lock (message_without_unix_fds); + + verify_test_message (message_without_unix_fds); { /* Marshal and demarshal the message. */ @@ -1229,7 +1351,7 @@ _dbus_message_test (const char *test_data_dir) int len = 0; char garbage_header[DBUS_MINIMUM_HEADER_SIZE] = "xxx"; - if (!dbus_message_marshal (message, &marshalled, &len)) + if (!dbus_message_marshal (message_without_unix_fds, &marshalled, &len)) _dbus_assert_not_reached ("failed to marshal message"); _dbus_assert (len != 0); @@ -1268,10 +1390,11 @@ _dbus_message_test (const char *test_data_dir) _dbus_assert (dbus_message_demarshal_bytes_needed (garbage_header, DBUS_MINIMUM_HEADER_SIZE) == -1); } - dbus_message_unref (message); + dbus_message_unref (message_without_unix_fds); _dbus_message_loader_unref (loader); check_memleaks (); + _dbus_check_fdleaks(); /* Check that we can abandon a container */ message = dbus_message_new_method_call ("org.freedesktop.DBus.TestService", @@ -1333,9 +1456,10 @@ _dbus_message_test (const char *test_data_dir) print_validities_seen (FALSE); print_validities_seen (TRUE); } - + check_memleaks (); - + _dbus_check_fdleaks(); + /* Now load every message in test_data_dir if we have one */ if (test_data_dir == NULL) return TRUE; diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 272592e8..b19697ee 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-marshal-recursive.h" #include "dbus-marshal-validate.h" @@ -33,6 +34,10 @@ #include "dbus-memory.h" #include "dbus-list.h" #include "dbus-threads-internal.h" +#ifdef HAVE_UNIX_FD_PASSING +#include "dbus-sysdeps-unix.h" +#endif + #include <string.h> static void dbus_message_finalize (DBusMessage *message); @@ -160,6 +165,30 @@ _dbus_message_get_network_data (DBusMessage *message, } /** + * Gets the unix fds to be sent over the network for this message. + * This function is guaranteed to always return the same data once a + * message is locked (with dbus_message_lock()). + * + * @param message the message. + * @param fds return location of unix fd array + * @param n_fds return number of entries in array + */ +void _dbus_message_get_unix_fds(DBusMessage *message, + const int **fds, + unsigned *n_fds) +{ + _dbus_assert (message->locked); + +#ifdef HAVE_UNIX_FD_PASSING + *fds = message->unix_fds; + *n_fds = message->n_unix_fds; +#else + *fds = NULL; + *n_fds = 0; +#endif +} + +/** * Sets the serial number of a message. * This can only be done once on a message. * @@ -181,20 +210,19 @@ dbus_message_set_serial (DBusMessage *message, } /** - * Adds a counter to be incremented immediately with the - * size of this message, and decremented by the size - * of this message when this message if finalized. - * The link contains a counter with its refcount already - * incremented, but the counter itself not incremented. - * Ownership of link and counter refcount is passed to - * the message. + * Adds a counter to be incremented immediately with the size/unix fds + * of this message, and decremented by the size/unix fds of this + * message when this message if finalized. The link contains a + * counter with its refcount already incremented, but the counter + * itself not incremented. Ownership of link and counter refcount is + * passed to the message. * * @param message the message * @param link link with counter as data */ void -_dbus_message_add_size_counter_link (DBusMessage *message, - DBusList *link) +_dbus_message_add_counter_link (DBusMessage *message, + DBusList *link) { /* right now we don't recompute the delta when message * size changes, and that's OK for current purposes @@ -202,35 +230,43 @@ _dbus_message_add_size_counter_link (DBusMessage *message, * Do recompute it whenever there are no outstanding counters, * since it's basically free. */ - if (message->size_counters == NULL) + if (message->counters == NULL) { message->size_counter_delta = _dbus_string_get_length (&message->header.data) + _dbus_string_get_length (&message->body); +#ifdef HAVE_UNIX_FD_PASSING + message->unix_fd_counter_delta = message->n_unix_fds; +#endif + #if 0 _dbus_verbose ("message has size %ld\n", message->size_counter_delta); #endif } - _dbus_list_append_link (&message->size_counters, link); + _dbus_list_append_link (&message->counters, link); + + _dbus_counter_adjust_size (link->data, message->size_counter_delta); - _dbus_counter_adjust (link->data, message->size_counter_delta); +#ifdef HAVE_UNIX_FD_PASSING + _dbus_counter_adjust_unix_fd (link->data, message->unix_fd_counter_delta); +#endif } /** - * Adds a counter to be incremented immediately with the - * size of this message, and decremented by the size - * of this message when this message if finalized. + * Adds a counter to be incremented immediately with the size/unix fds + * of this message, and decremented by the size/unix fds of this + * message when this message if finalized. * * @param message the message * @param counter the counter * @returns #FALSE if no memory */ dbus_bool_t -_dbus_message_add_size_counter (DBusMessage *message, - DBusCounter *counter) +_dbus_message_add_counter (DBusMessage *message, + DBusCounter *counter) { DBusList *link; @@ -239,38 +275,42 @@ _dbus_message_add_size_counter (DBusMessage *message, return FALSE; _dbus_counter_ref (counter); - _dbus_message_add_size_counter_link (message, link); + _dbus_message_add_counter_link (message, link); return TRUE; } /** - * Removes a counter tracking the size of this message, and decrements - * the counter by the size of this message. + * Removes a counter tracking the size/unix fds of this message, and + * decrements the counter by the size/unix fds of this message. * * @param message the message * @param link_return return the link used * @param counter the counter */ void -_dbus_message_remove_size_counter (DBusMessage *message, - DBusCounter *counter, - DBusList **link_return) +_dbus_message_remove_counter (DBusMessage *message, + DBusCounter *counter, + DBusList **link_return) { DBusList *link; - link = _dbus_list_find_last (&message->size_counters, + link = _dbus_list_find_last (&message->counters, counter); _dbus_assert (link != NULL); - _dbus_list_unlink (&message->size_counters, + _dbus_list_unlink (&message->counters, link); if (link_return) *link_return = link; else _dbus_list_free_link (link); - _dbus_counter_adjust (counter, - message->size_counter_delta); + _dbus_counter_adjust_size (counter, - message->size_counter_delta); + +#ifdef HAVE_UNIX_FD_PASSING + _dbus_counter_adjust_unix_fd (counter, - message->unix_fd_counter_delta); +#endif _dbus_counter_unref (counter); } @@ -487,21 +527,51 @@ dbus_message_get_cached (void) _dbus_assert (message != NULL); _dbus_assert (message->refcount.value == 0); - _dbus_assert (message->size_counters == NULL); + _dbus_assert (message->counters == NULL); _DBUS_UNLOCK (message_cache); return message; } +#ifdef HAVE_UNIX_FD_PASSING +static void +close_unix_fds(int *fds, unsigned *n_fds) +{ + DBusError e; + int i; + + if (*n_fds <= 0) + return; + + dbus_error_init(&e); + + for (i = 0; i < *n_fds; i++) + { + if (!_dbus_close(fds[i], &e)) + { + _dbus_warn("Failed to close file descriptor: %s\n", e.message); + dbus_error_free(&e); + } + } + + *n_fds = 0; + + /* We don't free the array here, in case we can recycle it later */ +} +#endif + static void -free_size_counter (void *element, - void *data) +free_counter (void *element, + void *data) { DBusCounter *counter = element; DBusMessage *message = data; - _dbus_counter_adjust (counter, - message->size_counter_delta); + _dbus_counter_adjust_size (counter, - message->size_counter_delta); +#ifdef HAVE_UNIX_FD_PASSING + _dbus_counter_adjust_unix_fd (counter, - message->unix_fd_counter_delta); +#endif _dbus_counter_unref (counter); } @@ -524,9 +594,13 @@ dbus_message_cache_or_finalize (DBusMessage *message) */ _dbus_data_slot_list_clear (&message->slot_list); - _dbus_list_foreach (&message->size_counters, - free_size_counter, message); - _dbus_list_clear (&message->size_counters); + _dbus_list_foreach (&message->counters, + free_counter, message); + _dbus_list_clear (&message->counters); + +#ifdef HAVE_UNIX_FD_PASSING + close_unix_fds(message->unix_fds, &message->n_unix_fds); +#endif was_cached = FALSE; @@ -634,6 +708,8 @@ _dbus_message_iter_check (DBusMessageRealIter *iter) * dbus_message_get_args() is the place to go for complete * documentation. * + * @todo This may leak memory and file descriptors if parsing fails. See #21259 + * * @see dbus_message_get_args * @param iter the message iter * @param error error to be filled in @@ -673,7 +749,38 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter, goto out; } - if (dbus_type_is_basic (spec_type)) + if (spec_type == DBUS_TYPE_UNIX_FD) + { +#ifdef HAVE_UNIX_FD_PASSING + DBusBasicValue idx; + int *pfd, nfd; + + pfd = va_arg (var_args, int*); + _dbus_assert(pfd); + + _dbus_type_reader_read_basic(&real->u.reader, &idx); + + if (idx.u32 >= real->message->n_unix_fds) + { + dbus_set_error (error, DBUS_ERROR_INCONSISTENT_MESSAGE, + "Message refers to file descriptor at index %i," + "but has only %i descriptors attached.\n", + idx.u32, + real->message->n_unix_fds); + goto out; + } + + if ((nfd = _dbus_dup(real->message->unix_fds[idx.u32], error)) < 0) + goto out; + + *pfd = nfd; +#else + dbus_set_error (error, DBUS_ERROR_NOT_SUPPORTED, + "Platform does not support file desciptor passing.\n"); + goto out; +#endif + } + else if (dbus_type_is_basic (spec_type)) { DBusBasicValue *ptr; @@ -707,7 +814,8 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter, goto out; } - if (dbus_type_is_fixed (spec_element_type)) + if (dbus_type_is_fixed (spec_element_type) && + element_type != DBUS_TYPE_UNIX_FD) { ptr = va_arg (var_args, const DBusBasicValue**); n_elements_p = va_arg (var_args, int*); @@ -718,7 +826,7 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter, _dbus_type_reader_recurse (&real->u.reader, &array); _dbus_type_reader_read_fixed_multi (&array, - ptr, n_elements_p); + (void *) ptr, n_elements_p); } else if (spec_element_type == DBUS_TYPE_STRING || spec_element_type == DBUS_TYPE_SIGNATURE || @@ -759,7 +867,7 @@ _dbus_message_iter_get_args_valist (DBusMessageIter *iter, { const char *s; _dbus_type_reader_read_basic (&array, - &s); + (void *) &s); str_array[i] = _dbus_strdup (s); if (str_array[i] == NULL) @@ -936,13 +1044,18 @@ dbus_message_finalize (DBusMessage *message) /* This calls application callbacks! */ _dbus_data_slot_list_free (&message->slot_list); - _dbus_list_foreach (&message->size_counters, - free_size_counter, message); - _dbus_list_clear (&message->size_counters); + _dbus_list_foreach (&message->counters, + free_counter, message); + _dbus_list_clear (&message->counters); _dbus_header_free (&message->header); _dbus_string_free (&message->body); +#ifdef HAVE_UNIX_FD_PASSING + close_unix_fds(message->unix_fds, &message->n_unix_fds); + dbus_free(message->unix_fds); +#endif + _dbus_assert (message->refcount.value == 0); dbus_free (message); @@ -969,6 +1082,11 @@ dbus_message_new_empty_header (void) #ifndef DBUS_DISABLE_CHECKS message->generation = _dbus_current_generation; #endif + +#ifdef HAVE_UNIX_FD_PASSING + message->unix_fds = NULL; + message->n_unix_fds_allocated = 0; +#endif } message->refcount.value = 1; @@ -977,10 +1095,16 @@ dbus_message_new_empty_header (void) #ifndef DBUS_DISABLE_CHECKS message->in_cache = FALSE; #endif - message->size_counters = NULL; + message->counters = NULL; message->size_counter_delta = 0; message->changed_stamp = 0; +#ifdef HAVE_UNIX_FD_PASSING + message->n_unix_fds = 0; + message->n_unix_fds_allocated = 0; + message->unix_fd_counter_delta = 0; +#endif + if (!from_cache) _dbus_data_slot_list_init (&message->slot_list); @@ -1308,8 +1432,10 @@ dbus_message_new_error_printf (DBusMessage *reply_to, * outgoing message queue and thus not modifiable) the new message * will not be locked. * + * @todo This function can't be used in programs that try to recover from OOM errors. + * * @param message the message - * @returns the new message.or #NULL if not enough memory + * @returns the new message.or #NULL if not enough memory or Unix file descriptors (in case the message to copy includes Unix file descriptors) can be allocated. */ DBusMessage * dbus_message_copy (const DBusMessage *message) @@ -1347,11 +1473,36 @@ dbus_message_copy (const DBusMessage *message) &retval->body, 0)) goto failed_copy; +#ifdef HAVE_UNIX_FD_PASSING + retval->unix_fds = dbus_new(int, message->n_unix_fds); + if (retval->unix_fds == NULL && message->n_unix_fds > 0) + goto failed_copy; + + retval->n_unix_fds_allocated = message->n_unix_fds; + + for (retval->n_unix_fds = 0; + retval->n_unix_fds < message->n_unix_fds; + retval->n_unix_fds++) + { + retval->unix_fds[retval->n_unix_fds] = _dbus_dup(message->unix_fds[retval->n_unix_fds], NULL); + + if (retval->unix_fds[retval->n_unix_fds] < 0) + goto failed_copy; + } + +#endif + return retval; failed_copy: _dbus_header_free (&retval->header); _dbus_string_free (&retval->body); + +#ifdef HAVE_UNIX_FD_PASSING + close_unix_fds(retval->unix_fds, &retval->n_unix_fds); + dbus_free(retval->unix_fds); +#endif + dbus_free (retval); return NULL; @@ -1429,9 +1580,10 @@ dbus_message_get_type (DBusMessage *message) * Appends fields to a message given a variable argument list. The * variable argument list should contain the type of each argument * followed by the value to append. Appendable types are basic types, - * and arrays of fixed-length basic types. To append variable-length - * basic types, or any more complex value, you have to use an iterator - * rather than this function. + * and arrays of fixed-length basic types (except arrays of Unix file + * descriptors). To append variable-length basic types, or any more + * complex value, you have to use an iterator rather than this + * function. * * To append a basic type, specify its type code followed by the * address of the value. For example: @@ -1446,18 +1598,22 @@ dbus_message_get_type (DBusMessage *message) * DBUS_TYPE_INVALID); * @endcode * - * To append an array of fixed-length basic types, pass in the - * DBUS_TYPE_ARRAY typecode, the element typecode, the address of - * the array pointer, and a 32-bit integer giving the number of - * elements in the array. So for example: - * @code - * const dbus_int32_t array[] = { 1, 2, 3 }; - * const dbus_int32_t *v_ARRAY = array; - * dbus_message_append_args (message, - * DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, &v_ARRAY, 3, - * DBUS_TYPE_INVALID); + * To append an array of fixed-length basic types (except Unix file + * descriptors), pass in the DBUS_TYPE_ARRAY typecode, the element + * typecode, the address of the array pointer, and a 32-bit integer + * giving the number of elements in the array. So for example: @code + * const dbus_int32_t array[] = { 1, 2, 3 }; const dbus_int32_t + * *v_ARRAY = array; dbus_message_append_args (message, + * DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, &v_ARRAY, 3, DBUS_TYPE_INVALID); * @endcode * + * This function does not support arrays of Unix file descriptors. If + * you need those you need to manually recurse into the array. + * + * For Unix file descriptors this function will internally duplicate + * the descriptor you passed in. Hence you may close the descriptor + * immediately after this call. + * * @warning in C, given "int array[]", "&array == array" (the * comp.lang.c FAQ says otherwise, but gcc and the FAQ don't agree). * So if you're using an array instead of a pointer you have to create @@ -1555,8 +1711,9 @@ dbus_message_append_args_valist (DBusMessage *message, buf, &array)) goto failed; - - if (dbus_type_is_fixed (element_type)) + + if (dbus_type_is_fixed (element_type) && + element_type != DBUS_TYPE_UNIX_FD) { const DBusBasicValue **value; int n_elements; @@ -1639,7 +1796,16 @@ dbus_message_append_args_valist (DBusMessage *message, * signature are supported; but these are returned as allocated memory * and must be freed with dbus_free_string_array(), while the other * types are returned as const references. To get a string array - * pass in "char ***array_location" and "int *n_elements" + * pass in "char ***array_location" and "int *n_elements". + * + * Similar to dbus_message_get_fixed_array() this function does not + * support arrays of type DBUS_TYPE_UNIX_FD. If you need to parse + * messages with arrays of Unix file descriptors you need to recurse + * into the array manually. + * + * Unix file descriptors that are read with this function will have + * the FD_CLOEXEC flag set. If you need them without this flag set, + * make sure to unset it with fcntl(). * * The variable argument list should contain the type of the argument * followed by a pointer to where the value should be stored. The list @@ -1864,10 +2030,10 @@ dbus_message_iter_get_element_type (DBusMessageIter *iter) * you won't be able to recurse further. There's no array of int32 to * recurse into. * - * If a container is an array of fixed-length types, it is much more - * efficient to use dbus_message_iter_get_fixed_array() to get the - * whole array in one shot, rather than individually walking over the - * array elements. + * If a container is an array of fixed-length types (except Unix file + * descriptors), it is much more efficient to use + * dbus_message_iter_get_fixed_array() to get the whole array in one + * shot, rather than individually walking over the array elements. * * Be sure you have somehow checked that * dbus_message_iter_get_arg_type() matches the type you are expecting @@ -1937,17 +2103,24 @@ dbus_message_iter_get_signature (DBusMessageIter *iter) * and for string a "const char**". The returned value is * by reference and should not be freed. * + * This call duplicates Unix file descriptors when reading them. It is + * your job to close them when you don't need them anymore. + * + * Unix file descriptors that are read with this function will have + * the FD_CLOEXEC flag set. If you need them without this flag set, + * make sure to unset it with fcntl(). + * * Be sure you have somehow checked that * dbus_message_iter_get_arg_type() matches the type you are * expecting, or you'll crash when you try to use an integer as a * string or something. * - * To read any container type (array, struct, dict) you will need - * to recurse into the container with dbus_message_iter_recurse(). - * If the container is an array of fixed-length values, you can - * get all the array elements at once with - * dbus_message_iter_get_fixed_array(). Otherwise, you have to - * iterate over the container's contents one value at a time. + * To read any container type (array, struct, dict) you will need to + * recurse into the container with dbus_message_iter_recurse(). If + * the container is an array of fixed-length values (except Unix file + * descriptors), you can get all the array elements at once with + * dbus_message_iter_get_fixed_array(). Otherwise, you have to iterate + * over the container's contents one value at a time. * * All basic-typed values are guaranteed to fit in 8 bytes. So you can * write code like this: @@ -1977,8 +2150,30 @@ dbus_message_iter_get_basic (DBusMessageIter *iter, _dbus_return_if_fail (_dbus_message_iter_check (real)); _dbus_return_if_fail (value != NULL); - _dbus_type_reader_read_basic (&real->u.reader, - value); + if (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_UNIX_FD) + { +#ifdef HAVE_UNIX_FD_PASSING + DBusBasicValue idx; + + _dbus_type_reader_read_basic(&real->u.reader, &idx); + + if (idx.u32 >= real->message->n_unix_fds) { + /* Hmm, we cannot really signal an error here, so let's make + sure to return an invalid fd. */ + *((int*) value) = -1; + return; + } + + *((int*) value) = _dbus_dup(real->message->unix_fds[idx.u32], NULL); +#else + *((int*) value) = -1; +#endif + } + else + { + _dbus_type_reader_read_basic (&real->u.reader, + value); + } } /** @@ -2015,6 +2210,10 @@ dbus_message_iter_get_array_len (DBusMessageIter *iter) * such as integers, bool, double. The returned block will be from the * current position in the array until the end of the array. * + * There is one exception here: although DBUS_TYPE_UNIX_FD is + * considered a 'fixed' type arrays of this type may not be read with + * this function. + * * The message iter should be "in" the array (that is, you recurse into the * array, and then you call dbus_message_iter_get_fixed_array() on the * "sub-iterator" created by dbus_message_iter_recurse()). @@ -2051,7 +2250,7 @@ dbus_message_iter_get_fixed_array (DBusMessageIter *iter, _dbus_return_if_fail (_dbus_message_iter_check (real)); _dbus_return_if_fail (value != NULL); _dbus_return_if_fail ((subtype == DBUS_TYPE_INVALID) || - dbus_type_is_fixed (subtype)); + (dbus_type_is_fixed (subtype) && subtype != DBUS_TYPE_UNIX_FD)); _dbus_type_reader_read_fixed_multi (&real->u.reader, value, n_elements); @@ -2250,6 +2449,40 @@ _dbus_message_iter_append_check (DBusMessageRealIter *iter) } #endif /* DBUS_DISABLE_CHECKS */ +#ifdef HAVE_UNIX_FD_PASSING +static int * +expand_fd_array(DBusMessage *m, + unsigned n) +{ + _dbus_assert(m); + + /* This makes space for adding n new fds to the array and returns a + pointer to the place were the first fd should be put. */ + + if (m->n_unix_fds + n > m->n_unix_fds_allocated) + { + unsigned k; + int *p; + + /* Make twice as much space as necessary */ + k = (m->n_unix_fds + n) * 2; + + /* Allocate at least four */ + if (k < 4) + k = 4; + + p = dbus_realloc(m->unix_fds, k * sizeof(int)); + if (p == NULL) + return NULL; + + m->unix_fds = p; + m->n_unix_fds_allocated = k; + } + + return m->unix_fds + m->n_unix_fds; +} +#endif + /** * Appends a basic-typed value to the message. The basic types are the * non-container types such as integer and string. @@ -2257,6 +2490,10 @@ _dbus_message_iter_append_check (DBusMessageRealIter *iter) * The "value" argument should be the address of a basic-typed value. * So for string, const char**. For integer, dbus_int32_t*. * + * For Unix file descriptors this function will internally duplicate + * the descriptor you passed in. Hence you may close the descriptor + * immediately after this call. + * * @todo If this fails due to lack of memory, the message is hosed and * you have to start over building the whole message. * @@ -2281,7 +2518,50 @@ dbus_message_iter_append_basic (DBusMessageIter *iter, if (!_dbus_message_iter_open_signature (real)) return FALSE; - ret = _dbus_type_writer_write_basic (&real->u.writer, type, value); + if (type == DBUS_TYPE_UNIX_FD) + { +#ifdef HAVE_UNIX_FD_PASSING + int *fds; + dbus_uint32_t u; + + /* First step, include the fd in the fd list of this message */ + if (!(fds = expand_fd_array(real->message, 1))) + return FALSE; + + *fds = _dbus_dup(*(int*) value, NULL); + if (*fds < 0) + return FALSE; + + u = real->message->n_unix_fds; + + /* Second step, write the index to the fd */ + if (!(ret = _dbus_type_writer_write_basic (&real->u.writer, DBUS_TYPE_UNIX_FD, &u))) { + _dbus_close(*fds, NULL); + return FALSE; + } + + real->message->n_unix_fds += 1; + u += 1; + + /* Final step, update the header accordingly */ + ret = _dbus_header_set_field_basic (&real->message->header, + DBUS_HEADER_FIELD_UNIX_FDS, + DBUS_TYPE_UINT32, + &u); + + /* If any of these operations fail the message is + hosed. However, no memory or fds should be leaked since what + has been added to message has been added to the message, and + can hence be accounted for when the message is being + freed. */ +#else + ret = FALSE; +#endif + } + else + { + ret = _dbus_type_writer_write_basic (&real->u.writer, type, value); + } if (!_dbus_message_iter_close_signature (real)) ret = FALSE; @@ -2292,10 +2572,10 @@ dbus_message_iter_append_basic (DBusMessageIter *iter, /** * Appends a block of fixed-length values to an array. The * fixed-length types are all basic types that are not string-like. So - * int32, double, bool, etc. You must call - * dbus_message_iter_open_container() to open an array of values - * before calling this function. You may call this function multiple - * times (and intermixed with calls to + * int32, double, bool, etc. (Unix file descriptors however are not + * supported.) You must call dbus_message_iter_open_container() to + * open an array of values before calling this function. You may call + * this function multiple times (and intermixed with calls to * dbus_message_iter_append_basic()) for the same array. * * The "value" argument should be the address of the array. So for @@ -2318,6 +2598,10 @@ dbus_message_iter_append_basic (DBusMessageIter *iter, * @todo If this fails due to lack of memory, the message is hosed and * you have to start over building the whole message. * + * For Unix file descriptors this function will internally duplicate + * the descriptor you passed in. Hence you may close the descriptor + * immediately after this call. + * * @param iter the append iterator * @param element_type the type of the array elements * @param value the address of the array @@ -2335,7 +2619,7 @@ dbus_message_iter_append_fixed_array (DBusMessageIter *iter, _dbus_return_val_if_fail (_dbus_message_iter_append_check (real), FALSE); _dbus_return_val_if_fail (real->iter_type == DBUS_MESSAGE_ITER_TYPE_WRITER, FALSE); - _dbus_return_val_if_fail (dbus_type_is_fixed (element_type), FALSE); + _dbus_return_val_if_fail (dbus_type_is_fixed (element_type) && element_type != DBUS_TYPE_UNIX_FD, FALSE); _dbus_return_val_if_fail (real->u.writer.container_type == DBUS_TYPE_ARRAY, FALSE); _dbus_return_val_if_fail (value != NULL, FALSE); _dbus_return_val_if_fail (n_elements >= 0, FALSE); @@ -2625,7 +2909,7 @@ dbus_message_get_path (DBusMessage *message) _dbus_header_get_field_basic (&message->header, DBUS_HEADER_FIELD_PATH, DBUS_TYPE_OBJECT_PATH, - &v); + (void *) &v); return v; } @@ -2756,7 +3040,7 @@ dbus_message_get_interface (DBusMessage *message) _dbus_header_get_field_basic (&message->header, DBUS_HEADER_FIELD_INTERFACE, DBUS_TYPE_STRING, - &v); + (void *) &v); return v; } @@ -2842,7 +3126,7 @@ dbus_message_get_member (DBusMessage *message) _dbus_header_get_field_basic (&message->header, DBUS_HEADER_FIELD_MEMBER, DBUS_TYPE_STRING, - &v); + (void *) &v); return v; } @@ -2926,7 +3210,7 @@ dbus_message_get_error_name (DBusMessage *message) _dbus_header_get_field_basic (&message->header, DBUS_HEADER_FIELD_ERROR_NAME, DBUS_TYPE_STRING, - &v); + (void *) &v); return v; } @@ -2979,7 +3263,7 @@ dbus_message_get_destination (DBusMessage *message) _dbus_header_get_field_basic (&message->header, DBUS_HEADER_FIELD_DESTINATION, DBUS_TYPE_STRING, - &v); + (void *) &v); return v; } @@ -3039,7 +3323,7 @@ dbus_message_get_sender (DBusMessage *message) _dbus_header_get_field_basic (&message->header, DBUS_HEADER_FIELD_SENDER, DBUS_TYPE_STRING, - &v); + (void *) &v); return v; } @@ -3337,6 +3621,24 @@ dbus_set_error_from_message (DBusError *error, return TRUE; } +/** + * Checks whether a message contains unix fds + * + * @param message the message + * @returns #TRUE if the message contains unix fds + */ +dbus_bool_t +dbus_message_contains_unix_fds(DBusMessage *message) +{ +#ifdef HAVE_UNIX_FD_PASSING + _dbus_assert(message); + + return message->n_unix_fds > 0; +#else + return FALSE; +#endif +} + /** @} */ /** @@ -3380,6 +3682,12 @@ _dbus_message_loader_new (void) /* this can be configured by the app, but defaults to the protocol max */ loader->max_message_size = DBUS_MAXIMUM_MESSAGE_LENGTH; + /* We set a very relatively conservative default here since due to how + SCM_RIGHTS works we need to preallocate an fd array of the maximum + number of unix fds we want to receive in advance. A + try-and-reallocate loop is not possible. */ + loader->max_message_unix_fds = 1024; + if (!_dbus_string_init (&loader->data)) { dbus_free (loader); @@ -3390,6 +3698,12 @@ _dbus_message_loader_new (void) _dbus_string_set_length (&loader->data, INITIAL_LOADER_DATA_LEN); _dbus_string_set_length (&loader->data, 0); +#ifdef HAVE_UNIX_FD_PASSING + loader->unix_fds = NULL; + loader->n_unix_fds = loader->n_unix_fds_allocated = 0; + loader->unix_fds_outstanding = FALSE; +#endif + return loader; } @@ -3419,6 +3733,10 @@ _dbus_message_loader_unref (DBusMessageLoader *loader) loader->refcount -= 1; if (loader->refcount == 0) { +#ifdef HAVE_UNIX_FD_PASSING + close_unix_fds(loader->unix_fds, &loader->n_unix_fds); + dbus_free(loader->unix_fds); +#endif _dbus_list_foreach (&loader->messages, (DBusForeachFunction) dbus_message_unref, NULL); @@ -3478,6 +3796,82 @@ _dbus_message_loader_return_buffer (DBusMessageLoader *loader, loader->buffer_outstanding = FALSE; } +/** + * Gets the buffer to use for reading unix fds from the network. + * + * This works similar to _dbus_message_loader_get_buffer() + * + * @param loader the message loader. + * @param fds the array to read fds into + * @param max_n_fds how many fds to read at most + * @return TRUE on success, FALSE on OOM + */ +dbus_bool_t +_dbus_message_loader_get_unix_fds(DBusMessageLoader *loader, + int **fds, + unsigned *max_n_fds) +{ +#ifdef HAVE_UNIX_FD_PASSING + _dbus_assert (!loader->unix_fds_outstanding); + + /* Allocate space where we can put the fds we read. We allocate + space for max_message_unix_fds since this is an + upper limit how many fds can be received within a single + message. Since SCM_RIGHTS doesn't allow a reallocate+retry logic + we are allocating the maximum possible array size right from the + beginning. This sucks a bit, however unless SCM_RIGHTS is fixed + there is no better way. */ + + if (loader->n_unix_fds_allocated < loader->max_message_unix_fds) + { + int *a = dbus_realloc(loader->unix_fds, + loader->max_message_unix_fds * sizeof(loader->unix_fds[0])); + + if (!a) + return FALSE; + + loader->unix_fds = a; + loader->n_unix_fds_allocated = loader->max_message_unix_fds; + } + + *fds = loader->unix_fds + loader->n_unix_fds; + *max_n_fds = loader->n_unix_fds_allocated - loader->n_unix_fds; + + loader->unix_fds_outstanding = TRUE; + return TRUE; +#else + _dbus_assert_not_reached("Platform doesn't support unix fd passing"); + return FALSE; +#endif +} + +/** + * Returns a buffer obtained from _dbus_message_loader_get_unix_fds(). + * + * This works similar to _dbus_message_loader_return_buffer() + * + * @param loader the message loader. + * @param fds the array fds were read into + * @param max_n_fds how many fds were read + */ + +void +_dbus_message_loader_return_unix_fds(DBusMessageLoader *loader, + int *fds, + unsigned n_fds) +{ +#ifdef HAVE_UNIX_FD_PASSING + _dbus_assert(loader->unix_fds_outstanding); + _dbus_assert(loader->unix_fds + loader->n_unix_fds == fds); + _dbus_assert(loader->n_unix_fds + n_fds <= loader->n_unix_fds_allocated); + + loader->n_unix_fds += n_fds; + loader->unix_fds_outstanding = FALSE; +#else + _dbus_assert_not_reached("Platform doesn't support unix fd passing"); +#endif +} + /* * FIXME when we move the header out of the buffer, that memmoves all * buffered messages. Kind of crappy. @@ -3517,6 +3911,7 @@ load_message (DBusMessageLoader *loader, const DBusString *type_str; int type_pos; DBusValidationMode mode; + dbus_uint32_t n_unix_fds = 0; mode = DBUS_VALIDATION_MODE_DATA_IS_UNTRUSTED; @@ -3586,6 +3981,59 @@ load_message (DBusMessageLoader *loader, } } + /* 3. COPY OVER UNIX FDS */ + _dbus_header_get_field_basic(&message->header, + DBUS_HEADER_FIELD_UNIX_FDS, + DBUS_TYPE_UINT32, + &n_unix_fds); + +#ifdef HAVE_UNIX_FD_PASSING + + if (n_unix_fds > loader->n_unix_fds) + { + _dbus_verbose("Message contains references to more unix fds than were sent %u != %u\n", + n_unix_fds, loader->n_unix_fds); + + loader->corrupted = TRUE; + loader->corruption_reason = DBUS_INVALID_MISSING_UNIX_FDS; + goto failed; + } + + /* If this was a recycled message there might still be + some memory allocated for the fds */ + dbus_free(message->unix_fds); + + if (n_unix_fds > 0) + { + message->unix_fds = _dbus_memdup(loader->unix_fds, n_unix_fds * sizeof(message->unix_fds[0])); + if (message->unix_fds == NULL) + { + _dbus_verbose ("Failed to allocate file descriptor array\n"); + oom = TRUE; + goto failed; + } + + message->n_unix_fds_allocated = message->n_unix_fds = n_unix_fds; + loader->n_unix_fds -= n_unix_fds; + memmove(loader->unix_fds + n_unix_fds, loader->unix_fds, loader->n_unix_fds); + } + else + message->unix_fds = NULL; + +#else + + if (n_unix_fds > 0) + { + _dbus_verbose ("Hmm, message claims to come with file descriptors " + "but that's not supported on our platform, disconnecting.\n"); + + loader->corrupted = TRUE; + loader->corruption_reason = DBUS_INVALID_MISSING_UNIX_FDS; + goto failed; + } + +#endif + /* 3. COPY OVER BODY AND QUEUE MESSAGE */ if (!_dbus_list_append (&loader->messages, message)) @@ -3830,6 +4278,37 @@ _dbus_message_loader_get_max_message_size (DBusMessageLoader *loader) return loader->max_message_size; } +/** + * Sets the maximum unix fds per message we allow. + * + * @param loader the loader + * @param size the max number of unix fds in a message + */ +void +_dbus_message_loader_set_max_message_unix_fds (DBusMessageLoader *loader, + long n) +{ + if (n > DBUS_MAXIMUM_MESSAGE_UNIX_FDS) + { + _dbus_verbose ("clamping requested max message unix_fds %ld to %d\n", + n, DBUS_MAXIMUM_MESSAGE_UNIX_FDS); + n = DBUS_MAXIMUM_MESSAGE_UNIX_FDS; + } + loader->max_message_unix_fds = n; +} + +/** + * Gets the maximum allowed number of unix fds per message + * + * @param loader the loader + * @returns max unix fds + */ +long +_dbus_message_loader_get_max_message_unix_fds (DBusMessageLoader *loader) +{ + return loader->max_message_unix_fds; +} + static DBusDataSlotAllocator slot_allocator; _DBUS_DEFINE_GLOBAL_LOCK (message_slots); diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h index 682e5a05..5500492d 100644 --- a/dbus/dbus-message.h +++ b/dbus/dbus-message.h @@ -66,165 +66,239 @@ struct DBusMessageIter void *pad3; /**< Don't use this */ }; +DBUS_EXPORT DBusMessage* dbus_message_new (int message_type); +DBUS_EXPORT DBusMessage* dbus_message_new_method_call (const char *bus_name, const char *path, const char *interface, const char *method); +DBUS_EXPORT DBusMessage* dbus_message_new_method_return (DBusMessage *method_call); +DBUS_EXPORT DBusMessage* dbus_message_new_signal (const char *path, const char *interface, const char *name); +DBUS_EXPORT DBusMessage* dbus_message_new_error (DBusMessage *reply_to, const char *error_name, const char *error_message); +DBUS_EXPORT DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to, const char *error_name, const char *error_format, ...); +DBUS_EXPORT DBusMessage* dbus_message_copy (const DBusMessage *message); +DBUS_EXPORT DBusMessage* dbus_message_ref (DBusMessage *message); +DBUS_EXPORT void dbus_message_unref (DBusMessage *message); +DBUS_EXPORT int dbus_message_get_type (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_set_path (DBusMessage *message, const char *object_path); +DBUS_EXPORT const char* dbus_message_get_path (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_has_path (DBusMessage *message, const char *object_path); +DBUS_EXPORT dbus_bool_t dbus_message_set_interface (DBusMessage *message, const char *interface); +DBUS_EXPORT const char* dbus_message_get_interface (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_has_interface (DBusMessage *message, const char *interface); +DBUS_EXPORT dbus_bool_t dbus_message_set_member (DBusMessage *message, const char *member); +DBUS_EXPORT const char* dbus_message_get_member (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_has_member (DBusMessage *message, const char *member); +DBUS_EXPORT dbus_bool_t dbus_message_set_error_name (DBusMessage *message, const char *name); +DBUS_EXPORT const char* dbus_message_get_error_name (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_set_destination (DBusMessage *message, const char *destination); +DBUS_EXPORT const char* dbus_message_get_destination (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_set_sender (DBusMessage *message, const char *sender); +DBUS_EXPORT const char* dbus_message_get_sender (DBusMessage *message); +DBUS_EXPORT const char* dbus_message_get_signature (DBusMessage *message); +DBUS_EXPORT void dbus_message_set_no_reply (DBusMessage *message, dbus_bool_t no_reply); +DBUS_EXPORT dbus_bool_t dbus_message_get_no_reply (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_is_method_call (DBusMessage *message, const char *interface, const char *method); +DBUS_EXPORT dbus_bool_t dbus_message_is_signal (DBusMessage *message, const char *interface, const char *signal_name); +DBUS_EXPORT dbus_bool_t dbus_message_is_error (DBusMessage *message, const char *error_name); +DBUS_EXPORT dbus_bool_t dbus_message_has_destination (DBusMessage *message, const char *bus_name); +DBUS_EXPORT dbus_bool_t dbus_message_has_sender (DBusMessage *message, const char *unique_bus_name); +DBUS_EXPORT dbus_bool_t dbus_message_has_signature (DBusMessage *message, const char *signature); +DBUS_EXPORT dbus_uint32_t dbus_message_get_serial (DBusMessage *message); +DBUS_EXPORT void dbus_message_set_serial (DBusMessage *message, dbus_uint32_t serial); +DBUS_EXPORT dbus_bool_t dbus_message_set_reply_serial (DBusMessage *message, dbus_uint32_t reply_serial); +DBUS_EXPORT dbus_uint32_t dbus_message_get_reply_serial (DBusMessage *message); +DBUS_EXPORT void dbus_message_set_auto_start (DBusMessage *message, dbus_bool_t auto_start); +DBUS_EXPORT dbus_bool_t dbus_message_get_auto_start (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_get_path_decomposed (DBusMessage *message, char ***path); +DBUS_EXPORT dbus_bool_t dbus_message_append_args (DBusMessage *message, int first_arg_type, ...); +DBUS_EXPORT dbus_bool_t dbus_message_append_args_valist (DBusMessage *message, int first_arg_type, va_list var_args); +DBUS_EXPORT dbus_bool_t dbus_message_get_args (DBusMessage *message, DBusError *error, int first_arg_type, ...); +DBUS_EXPORT dbus_bool_t dbus_message_get_args_valist (DBusMessage *message, DBusError *error, int first_arg_type, va_list var_args); +DBUS_EXPORT +dbus_bool_t dbus_message_contains_unix_fds (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_iter_init (DBusMessage *message, DBusMessageIter *iter); +DBUS_EXPORT dbus_bool_t dbus_message_iter_has_next (DBusMessageIter *iter); +DBUS_EXPORT dbus_bool_t dbus_message_iter_next (DBusMessageIter *iter); +DBUS_EXPORT char* dbus_message_iter_get_signature (DBusMessageIter *iter); +DBUS_EXPORT int dbus_message_iter_get_arg_type (DBusMessageIter *iter); +DBUS_EXPORT int dbus_message_iter_get_element_type (DBusMessageIter *iter); +DBUS_EXPORT void dbus_message_iter_recurse (DBusMessageIter *iter, DBusMessageIter *sub); +DBUS_EXPORT void dbus_message_iter_get_basic (DBusMessageIter *iter, void *value); #ifndef DBUS_DISABLE_DEPRECATED /* This function returns the wire protocol size of the array in bytes, * you do not want to know that probably */ +DBUS_EXPORT DBUS_DEPRECATED int dbus_message_iter_get_array_len (DBusMessageIter *iter); #endif +DBUS_EXPORT void dbus_message_iter_get_fixed_array (DBusMessageIter *iter, void *value, int *n_elements); +DBUS_EXPORT void dbus_message_iter_init_append (DBusMessage *message, DBusMessageIter *iter); +DBUS_EXPORT dbus_bool_t dbus_message_iter_append_basic (DBusMessageIter *iter, int type, const void *value); +DBUS_EXPORT dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter *iter, int element_type, const void *value, int n_elements); +DBUS_EXPORT dbus_bool_t dbus_message_iter_open_container (DBusMessageIter *iter, int type, const char *contained_signature, DBusMessageIter *sub); +DBUS_EXPORT dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter, DBusMessageIter *sub); +DBUS_EXPORT void dbus_message_iter_abandon_container (DBusMessageIter *iter, DBusMessageIter *sub); +DBUS_EXPORT void dbus_message_lock (DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_set_error_from_message (DBusError *error, DBusMessage *message); +DBUS_EXPORT dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT void dbus_message_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT dbus_bool_t dbus_message_set_data (DBusMessage *message, dbus_int32_t slot, void *data, DBusFreeFunction free_data_func); +DBUS_EXPORT void* dbus_message_get_data (DBusMessage *message, dbus_int32_t slot); +DBUS_EXPORT int dbus_message_type_from_string (const char *type_str); +DBUS_EXPORT const char* dbus_message_type_to_string (int type); +DBUS_EXPORT dbus_bool_t dbus_message_marshal (DBusMessage *msg, char **marshalled_data_p, int *len_p); +DBUS_EXPORT DBusMessage* dbus_message_demarshal (const char *str, int len, DBusError *error); +DBUS_EXPORT int dbus_message_demarshal_bytes_needed (const char *str, int len); diff --git a/dbus/dbus-misc.h b/dbus/dbus-misc.h index f8cb12ff..3504bcaa 100644 --- a/dbus/dbus-misc.h +++ b/dbus/dbus-misc.h @@ -36,9 +36,10 @@ DBUS_BEGIN_DECLS * @addtogroup DBusMisc * @{ */ - +DBUS_EXPORT char* dbus_get_local_machine_id (void); +DBUS_EXPORT void dbus_get_version (int *major_version_p, int *minor_version_p, int *micro_version_p); diff --git a/dbus/dbus-nonce.c b/dbus/dbus-nonce.c new file mode 100644 index 00000000..a7a82f12 --- /dev/null +++ b/dbus/dbus-nonce.c @@ -0,0 +1,423 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-nonce.c Nonce handling functions used by nonce-tcp (internal to D-Bus implementation) + * + * Copyright (C) 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.net + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include <config.h> +// major sections of this file are modified code from libassuan, (C) FSF +#include "dbus-nonce.h" +#include "dbus-internals.h" +#include "dbus-protocol.h" +#include "dbus-sysdeps.h" + +#include <stdio.h> + +static dbus_bool_t +do_check_nonce (int fd, const DBusString *nonce, DBusError *error) +{ + DBusString buffer; + DBusString p; + size_t nleft; + dbus_bool_t result; + int n; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + nleft = 16; + + if ( !_dbus_string_init (&buffer) + || !_dbus_string_init (&p) ) { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&p); + _dbus_string_free (&buffer); + return FALSE; + } + + while (nleft) + { + n = _dbus_read_socket (fd, &p, nleft); + if (n == -1 && _dbus_get_is_errno_eintr()) + ; + else if (n == -1 && _dbus_get_is_errno_eagain_or_ewouldblock()) + _dbus_sleep_milliseconds (100); + else if (n==-1) + { + dbus_set_error (error, DBUS_ERROR_IO_ERROR, "Could not read nonce from socket (fd=%d)", fd ); + _dbus_string_free (&p); + _dbus_string_free (&buffer); + return FALSE; + } + else if (!n) + { + _dbus_string_free (&p); + _dbus_string_free (&buffer); + dbus_set_error (error, DBUS_ERROR_IO_ERROR, "Could not read nonce from socket (fd=%d)", fd ); + return FALSE; + } + else + { + _dbus_string_append_len(&buffer, _dbus_string_get_const_data (&p), n); + nleft -= n; + } + } + + result = _dbus_string_equal_len (&buffer, nonce, 16); + if (!result) + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, "Nonces do not match, access denied (fd=%d)", fd ); + + _dbus_string_free (&p); + _dbus_string_free (&buffer); + + return result; +} + +/** + * reads the nonce from the nonce file and stores it in a string + * + * @param fname the file to read the nonce from + * @param nonce returns the nonce. Must be an initialized string, the nonce will be appended. + * @param error error object to report possible errors + * @return FALSE iff reading the nonce fails (error is set then) + */ +dbus_bool_t +_dbus_read_nonce (const DBusString *fname, DBusString *nonce, DBusError* error) +{ + FILE *fp; + char buffer[17]; + size_t nread; + + buffer[sizeof buffer - 1] = '\0'; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_verbose ("reading nonce from file: %s\n", _dbus_string_get_const_data (fname)); + + + fp = fopen (_dbus_string_get_const_data (fname), "rb"); + if (!fp) + return FALSE; + nread = fread (buffer, 1, sizeof buffer - 1, fp); + fclose (fp); + if (!nread) + { + dbus_set_error (error, DBUS_ERROR_FILE_NOT_FOUND, "Could not read nonce from file %s", _dbus_string_get_const_data (fname)); + return FALSE; + } + + if (!_dbus_string_append_len (nonce, buffer, sizeof buffer - 1 )) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return FALSE; + } + return TRUE; +} + +int +_dbus_accept_with_noncefile (int listen_fd, const DBusNonceFile *noncefile) +{ + int fd; + DBusString nonce; + + _dbus_assert (noncefile != NULL); + _dbus_string_init (&nonce); + //PENDING(kdab): set better errors + if (_dbus_read_nonce (_dbus_noncefile_get_path(noncefile), &nonce, NULL) != TRUE) + return -1; + fd = _dbus_accept (listen_fd); + if (_dbus_socket_is_invalid (fd)) + return fd; + if (do_check_nonce(fd, &nonce, NULL) != TRUE) { + _dbus_verbose ("nonce check failed. Closing socket.\n"); + _dbus_close_socket(fd, NULL); + return -1; + } + + return fd; +} + +static dbus_bool_t +generate_and_write_nonce (const DBusString *filename, DBusError *error) +{ + DBusString nonce; + dbus_bool_t ret; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_string_init (&nonce); + + if (!_dbus_generate_random_bytes (&nonce, 16)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&nonce); + return FALSE; + } + + ret = _dbus_string_save_to_file (&nonce, filename, FALSE, error); + + _dbus_string_free (&nonce); + + return ret; +} + +/** + * sends the nonce over a given socket. Blocks while doing so. + * + * @param fd the file descriptor to write the nonce data to (usually a socket) + * @param noncefile the noncefile location to read the nonce from + * @param error contains error details if FALSE is returned + * @return TRUE iff the nonce was successfully sent. Note that this does not + * indicate whether the server accepted the nonce. + */ +dbus_bool_t +_dbus_send_nonce (int fd, const DBusString *noncefile, DBusError *error) +{ + dbus_bool_t read_result; + int send_result; + size_t sendLen; + DBusString nonce; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + if (_dbus_string_get_length (noncefile) == 0) + return FALSE; + + if (!_dbus_string_init (&nonce)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return FALSE; + } + + read_result = _dbus_read_nonce (noncefile, &nonce, error); + if (!read_result) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + _dbus_string_free (&nonce); + return FALSE; + } + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + send_result = _dbus_write_socket (fd, &nonce, 0, _dbus_string_get_length (&nonce)); + + _dbus_string_free (&nonce); + + if (send_result == -1) + { + dbus_set_error (error, + _dbus_error_from_system_errno (), + "Failed to send nonce (fd=%d): %s", + fd, _dbus_strerror_from_errno ()); + return FALSE; + } + + return TRUE; +} + +static dbus_bool_t +do_noncefile_create (DBusNonceFile *noncefile, + DBusError *error, + dbus_bool_t use_subdir) +{ + dbus_bool_t ret; + DBusString randomStr; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_assert (noncefile); + + if (!_dbus_string_init (&randomStr)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto on_error; + } + + if (!_dbus_generate_random_ascii (&randomStr, 8)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto on_error; + } + + if (!_dbus_string_init (&noncefile->dir) + || !_dbus_string_append (&noncefile->dir, _dbus_get_tmpdir())) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto on_error; + } + if (use_subdir) + { + if (!_dbus_string_append (&noncefile->dir, "/dbus_nonce-") + || !_dbus_string_append (&noncefile->dir, _dbus_string_get_const_data (&randomStr)) ) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto on_error; + } + if (!_dbus_string_init (&noncefile->path) + || !_dbus_string_copy (&noncefile->dir, 0, &noncefile->path, 0) + || !_dbus_string_append (&noncefile->dir, "/nonce")) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto on_error; + } + if (!_dbus_create_directory (&noncefile->dir, error)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto on_error; + } + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + } + else + { + if (!_dbus_string_init (&noncefile->path) + || !_dbus_string_copy (&noncefile->dir, 0, &noncefile->path, 0) + || !_dbus_string_append (&noncefile->path, "/dbus_nonce-") + || !_dbus_string_append (&noncefile->path, _dbus_string_get_const_data (&randomStr))) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto on_error; + } + + } + + if (!generate_and_write_nonce (&noncefile->path, error)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + if (use_subdir) + _dbus_delete_directory (&noncefile->dir, NULL); //we ignore possible errors deleting the dir and return the write error instead + goto on_error; + } + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_string_free (&randomStr); + + return TRUE; + on_error: + if (use_subdir) + _dbus_delete_directory (&noncefile->dir, NULL); + _dbus_string_free (&noncefile->dir); + _dbus_string_free (&noncefile->path); + _dbus_string_free (&randomStr); + return FALSE; +} + +#ifdef DBUS_WIN +/** + * creates a nonce file in a user-readable location and writes a generated nonce to it + * + * @param noncefile returns the nonce file location + * @param error error details if creating the nonce file fails + * @return TRUE iff the nonce file was successfully created + */ +dbus_bool_t +_dbus_noncefile_create (DBusNonceFile *noncefile, + DBusError *error) +{ + return do_noncefile_create (noncefile, error, /*use_subdir=*/FALSE); +} + +/** + * deletes the noncefile and frees the DBusNonceFile object. + * + * @param noncefile the nonce file to delete. Contents will be freed. + * @param error error details if the nonce file could not be deleted + * @return TRUE + */ +dbus_bool_t +_dbus_noncefile_delete (DBusNonceFile *noncefile, + DBusError *error) +{ + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_delete_file (&noncefile->path, error); + _dbus_string_free (&noncefile->dir); + _dbus_string_free (&noncefile->path); + return TRUE; +} + +#else +/** + * creates a nonce file in a user-readable location and writes a generated nonce to it. + * Initializes the noncefile object. + * + * @param noncefile returns the nonce file location + * @param error error details if creating the nonce file fails + * @return TRUE iff the nonce file was successfully created + */ +dbus_bool_t +_dbus_noncefile_create (DBusNonceFile *noncefile, + DBusError *error) +{ + return do_noncefile_create (noncefile, error, /*use_subdir=*/TRUE); +} + +/** + * deletes the noncefile and frees the DBusNonceFile object. + * + * @param noncefile the nonce file to delete. Contents will be freed. + * @param error error details if the nonce file could not be deleted + * @return TRUE + */ +dbus_bool_t +_dbus_noncefile_delete (DBusNonceFile *noncefile, + DBusError *error) +{ + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_delete_directory (&noncefile->dir, error); + _dbus_string_free (&noncefile->dir); + _dbus_string_free (&noncefile->path); + return TRUE; +} +#endif + + +/** + * returns the absolute file path of the nonce file + * + * @param noncefile an initialized noncefile object + * @return the absolute path of the nonce file + */ +const DBusString* +_dbus_noncefile_get_path (const DBusNonceFile *noncefile) +{ + _dbus_assert (noncefile); + return &noncefile->path; +} + +/** + * reads data from a file descriptor and checks if the received data matches + * the data in the given noncefile. + * + * @param fd the file descriptor to read the nonce from + * @param noncefile the nonce file to check the received data against + * @param error error details on fail + * @return TRUE iff a nonce could be successfully read from the file descriptor + * and matches the nonce from the given nonce file + */ +dbus_bool_t +_dbus_noncefile_check_nonce (int fd, + const DBusNonceFile *noncefile, + DBusError* error) +{ + return do_check_nonce (fd, _dbus_noncefile_get_path (noncefile), error); +} + + +/** @} end of nonce */ diff --git a/dbus/dbus-nonce.h b/dbus/dbus-nonce.h new file mode 100644 index 00000000..474ea728 --- /dev/null +++ b/dbus/dbus-nonce.h @@ -0,0 +1,72 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-nonce.h Nonce handling functions used by nonce-tcp (internal to D-Bus implementation) + * + * Copyright (C) 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.net + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef DBUS_NONCE_H +#define DBUS_NONCE_H + +#include <dbus/dbus-macros.h> +#include <dbus/dbus-types.h> +#include <dbus/dbus-errors.h> +#include <dbus/dbus-string.h> + +DBUS_BEGIN_DECLS + +typedef struct DBusNonceFile DBusNonceFile; + +struct DBusNonceFile +{ + DBusString path; + DBusString dir; +}; + +// server + +dbus_bool_t _dbus_noncefile_create (DBusNonceFile *noncefile, + DBusError *error); + +dbus_bool_t _dbus_noncefile_delete (DBusNonceFile *noncefile, + DBusError *error); + +dbus_bool_t _dbus_noncefile_check_nonce (int fd, + const DBusNonceFile *noncefile, + DBusError *error); + +const DBusString* _dbus_noncefile_get_path (const DBusNonceFile *noncefile); + +int _dbus_accept_with_noncefile (int listen_fd, + const DBusNonceFile *noncefile); + +// shared + +dbus_bool_t _dbus_read_nonce (const DBusString *fname, + DBusString *nonce, + DBusError *error); + +// client + +dbus_bool_t _dbus_send_nonce (int fd, + const DBusString *noncefile, + DBusError *error); + +DBUS_END_DECLS + +#endif /* DBUS_NONCE_H */ diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c index 4309d154..28cfc8b4 100644 --- a/dbus/dbus-object-tree.c +++ b/dbus/dbus-object-tree.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-object-tree.h" #include "dbus-connection-internal.h" #include "dbus-internals.h" @@ -506,7 +508,7 @@ unlock: #endif { _dbus_connection_ref_unlocked (connection); - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (connection); } @@ -640,7 +642,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } @@ -655,7 +657,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } @@ -715,7 +717,7 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree, { if (!already_unlocked) { - _dbus_verbose ("unlock %s %d\n", _DBUS_FUNCTION_NAME, __LINE__); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } } @@ -763,7 +765,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } @@ -778,7 +780,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } @@ -844,7 +846,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } @@ -884,7 +886,7 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } } @@ -924,8 +926,7 @@ _dbus_object_tree_get_user_data_unlocked (DBusObjectTree *tree, if ((subtree == NULL) || !exact_match) { - _dbus_verbose ("%s: No object at specified path found\n", - _DBUS_FUNCTION_NAME); + _dbus_verbose ("No object at specified path found\n"); return NULL; } @@ -1047,7 +1048,7 @@ _dbus_object_tree_list_registered_and_unlock (DBusObjectTree *tree, if (tree->connection) #endif { - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (tree->connection); } @@ -1079,6 +1080,7 @@ _dbus_decompose_path (const char* data, int i, j, comp; _dbus_assert (data != NULL); + _dbus_assert (path != NULL); #if VERBOSE_DECOMPOSE _dbus_verbose ("Decomposing path \"%s\"\n", @@ -1091,6 +1093,7 @@ _dbus_decompose_path (const char* data, i = 0; while (i < len) { + _dbus_assert (data[i] != '\0'); if (data[i] == '/') n_components += 1; ++i; diff --git a/dbus/dbus-pending-call.c b/dbus/dbus-pending-call.c index 43fad052..e1de656a 100644 --- a/dbus/dbus-pending-call.c +++ b/dbus/dbus-pending-call.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-connection-internal.h" #include "dbus-pending-call-internal.h" diff --git a/dbus/dbus-pending-call.h b/dbus/dbus-pending-call.h index b1b4e235..8f64b8be 100644 --- a/dbus/dbus-pending-call.h +++ b/dbus/dbus-pending-call.h @@ -38,23 +38,34 @@ DBUS_BEGIN_DECLS * @{ */ +DBUS_EXPORT DBusPendingCall* dbus_pending_call_ref (DBusPendingCall *pending); +DBUS_EXPORT void dbus_pending_call_unref (DBusPendingCall *pending); +DBUS_EXPORT dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall *pending, DBusPendingCallNotifyFunction function, void *user_data, DBusFreeFunction free_user_data); +DBUS_EXPORT void dbus_pending_call_cancel (DBusPendingCall *pending); +DBUS_EXPORT dbus_bool_t dbus_pending_call_get_completed (DBusPendingCall *pending); +DBUS_EXPORT DBusMessage* dbus_pending_call_steal_reply (DBusPendingCall *pending); +DBUS_EXPORT void dbus_pending_call_block (DBusPendingCall *pending); +DBUS_EXPORT dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT void dbus_pending_call_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT dbus_bool_t dbus_pending_call_set_data (DBusPendingCall *pending, dbus_int32_t slot, void *data, DBusFreeFunction free_data_func); +DBUS_EXPORT void* dbus_pending_call_get_data (DBusPendingCall *pending, dbus_int32_t slot); diff --git a/dbus/dbus-pipe-unix.c b/dbus/dbus-pipe-unix.c new file mode 100644 index 00000000..f35024b5 --- /dev/null +++ b/dbus/dbus-pipe-unix.c @@ -0,0 +1,83 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-pipe-unix.c unix related pipe implementation + * + * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-protocol.h" +#include "dbus-string.h" +#include "dbus-internals.h" +#include "dbus-pipe.h" +#include "dbus-sysdeps-unix.h" + +#include <errno.h> + +/** + * write data to a pipe. + * + * @param pipe the pipe instance + * @param buffer the buffer to write data from + * @param start the first byte in the buffer to write + * @param len the number of bytes to try to write + * @param error error return + * @returns the number of bytes written or -1 on error + */ +int +_dbus_pipe_write (DBusPipe *pipe, + const DBusString *buffer, + int start, + int len, + DBusError *error) +{ + int written; + + written = _dbus_write (pipe->fd_or_handle, buffer, start, len); + if (written < 0) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Writing to pipe: %s\n", + _dbus_strerror (errno)); + } + return written; +} + +/** + * close a pipe. + * + * @param pipe the pipe instance + * @param error return location for an error + * @returns #FALSE if error is set + */ +int +_dbus_pipe_close (DBusPipe *pipe, + DBusError *error) +{ + if (_dbus_close (pipe->fd_or_handle, error) < 0) + { + return -1; + } + else + { + _dbus_pipe_invalidate (pipe); + return 0; + } +} diff --git a/dbus/dbus-pipe-win.c b/dbus/dbus-pipe-win.c new file mode 100644 index 00000000..f734518c --- /dev/null +++ b/dbus/dbus-pipe-win.c @@ -0,0 +1,90 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-pipe-win.c windows related pipe implementation + * + * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-protocol.h" +#include "dbus-string.h" +#include "dbus-internals.h" +#include "dbus-pipe.h" + +#include <windows.h> + +/** + * write data to a pipe. + * + * @param pipe the pipe instance + * @param buffer the buffer to write data from + * @param start the first byte in the buffer to write + * @param len the number of bytes to try to write + * @param error error return + * @returns the number of bytes written or -1 on error + */ +int +_dbus_pipe_write (DBusPipe *pipe, + const DBusString *buffer, + int start, + int len, + DBusError *error) +{ + DWORD written; + BOOL res; + + const char *buffer_c = _dbus_string_get_const_data (buffer); + + res = WriteFile ((HANDLE) pipe->fd_or_handle, buffer_c + start, len, &written, NULL); + if (res == 0 || written < 0) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Writing to pipe: %s\n", + _dbus_strerror_from_errno ()); + } + return written; +} + +/** + * close a pipe. + * + * @param pipe the pipe instance + * @param error return location for an error + * @returns #FALSE if error is set + */ +int +_dbus_pipe_close (DBusPipe *pipe, + DBusError *error) +{ + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + if (CloseHandle ((HANDLE) pipe->fd_or_handle) == 0) + { + dbus_set_error (error, _dbus_error_from_system_errno (), + "Could not close pipe %d: %s", pipe->fd_or_handle, + _dbus_strerror_from_errno ()); + return -1; + } + else + { + _dbus_pipe_invalidate (pipe); + return 0; + } +} diff --git a/dbus/dbus-pipe.c b/dbus/dbus-pipe.c new file mode 100644 index 00000000..06560f16 --- /dev/null +++ b/dbus/dbus-pipe.c @@ -0,0 +1,85 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-pipe.c pipe implementation (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-pipe.h" + +/* + * init a pipe instance. + * + * @param pipe the pipe + * @param fd the file descriptor to init from + */ +void +_dbus_pipe_init (DBusPipe *pipe, + intptr_t fd) +{ + pipe->fd_or_handle = fd; +} + +/** + * init a pipe with stdout + * + * @param pipe the pipe + */ +void +_dbus_pipe_init_stdout (DBusPipe *pipe) +{ + _dbus_pipe_init (pipe, 1); +} + +/** + * check if a pipe is valid; pipes can be set invalid, similar to + * a -1 file descriptor. + * + * @param pipe the pipe instance + * @returns #FALSE if pipe is not valid + */ +dbus_bool_t +_dbus_pipe_is_valid(DBusPipe *pipe) +{ + return pipe->fd_or_handle >= 0; +} + +/** + * Check if a pipe is stdout or stderr. + * + * @param pipe the pipe instance + * @returns #TRUE if pipe is one of the standard out/err channels + */ +dbus_bool_t +_dbus_pipe_is_stdout_or_stderr (DBusPipe *pipe) +{ + return pipe->fd_or_handle == 1 || pipe->fd_or_handle == 2; +} + +/** + * Initializes a pipe to an invalid value. + * @param pipe the pipe + */ +void +_dbus_pipe_invalidate (DBusPipe *pipe) +{ + pipe->fd_or_handle = -1; +} diff --git a/dbus/dbus-pipe.h b/dbus/dbus-pipe.h new file mode 100644 index 00000000..f6eac5f9 --- /dev/null +++ b/dbus/dbus-pipe.h @@ -0,0 +1,59 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps.h Wrappers around system/libc features (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_PIPE_H +#define DBUS_PIPE_H + +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif + +#ifdef HAVE_INTTYPES_H +#include <inttypes.h> +#endif + +#include <dbus/dbus-types.h> +#include <dbus/dbus-errors.h> +#include <dbus/dbus-string.h> +#include <dbus/dbus-sysdeps.h> + +struct DBusPipe { + intptr_t fd_or_handle; +}; + +void _dbus_pipe_init (DBusPipe *pipe, + intptr_t fd); +void _dbus_pipe_init_stdout (DBusPipe *pipe); +int _dbus_pipe_write (DBusPipe *pipe, + const DBusString *buffer, + int start, + int len, + DBusError *error); +int _dbus_pipe_close (DBusPipe *pipe, + DBusError *error); +dbus_bool_t _dbus_pipe_is_valid (DBusPipe *pipe); +void _dbus_pipe_invalidate (DBusPipe *pipe); +dbus_bool_t _dbus_pipe_is_stdout_or_stderr (DBusPipe *pipe); + +#endif diff --git a/dbus/dbus-protocol.h b/dbus/dbus-protocol.h index ed718fec..17798e94 100644 --- a/dbus/dbus-protocol.h +++ b/dbus/dbus-protocol.h @@ -110,6 +110,10 @@ extern "C" { #define DBUS_TYPE_SIGNATURE ((int) 'g') /** #DBUS_TYPE_SIGNATURE as a string literal instead of a int literal */ #define DBUS_TYPE_SIGNATURE_AS_STRING "g" +/** Type code marking a unix file descriptor */ +#define DBUS_TYPE_UNIX_FD ((int) 'h') +/** #DBUS_TYPE_UNIX_FD as a string literal instead of a int literal */ +#define DBUS_TYPE_UNIX_FD_AS_STRING "h" /* Compound types */ /** Type code marking a D-Bus array type */ @@ -207,6 +211,14 @@ extern "C" { /** Number of bits you need in an unsigned to store the max message size */ #define DBUS_MAXIMUM_MESSAGE_LENGTH_BITS 27 +/** The maximum total number of unix fds in a message. Similar + * rationale as DBUS_MAXIMUM_MESSAGE_LENGTH. However we divide by four + * given that one fd is an int and hence at least 32 bits. + */ +#define DBUS_MAXIMUM_MESSAGE_UNIX_FDS (DBUS_MAXIMUM_MESSAGE_LENGTH/4) +/** Number of bits you need in an unsigned to store the max message unix fds */ +#define DBUS_MAXIMUM_MESSAGE_UNIX_FDS_BITS (DBUS_MAXIMUM_MESSAGE_LENGTH_BITS-2) + /** Depth of recursion in the type tree. This is automatically limited * to DBUS_MAXIMUM_SIGNATURE_LENGTH since you could only have an array * of array of array of ... that fit in the max signature. But that's @@ -227,6 +239,8 @@ extern "C" { /** Message type of a signal message, see dbus_message_get_type() */ #define DBUS_MESSAGE_TYPE_SIGNAL 4 +#define DBUS_NUM_MESSAGE_TYPES 5 + /* Header flags */ /** If set, this flag means that the sender of a message does not care about getting @@ -276,6 +290,12 @@ extern "C" { * Header field code for the type signature of a message. */ #define DBUS_HEADER_FIELD_SIGNATURE 8 +/** + * Header field code for the number of unix file descriptors associated + * with this message. + */ +#define DBUS_HEADER_FIELD_UNIX_FDS 9 + /** * Value of the highest-numbered header field code, can be used to determine @@ -283,7 +303,7 @@ extern "C" { * that unknown codes must be ignored, so check for that before * indexing the array. */ -#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SIGNATURE +#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_UNIX_FDS /** Header format is defined as a signature: * byte byte order @@ -415,6 +435,9 @@ extern "C" { #define DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN "org.freedesktop.DBus.Error.AdtAuditDataUnknown" /** There's already an object with the requested object path. */ #define DBUS_ERROR_OBJECT_PATH_IN_USE "org.freedesktop.DBus.Error.ObjectPathInUse" +/** The message meta data does not match the payload. e.g. expected + number of file descriptors were not sent over the socket this message was received on. */ +#define DBUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage" /* XML introspection format */ diff --git a/dbus/dbus-resources.c b/dbus/dbus-resources.c index bfe8a089..5f7001cc 100644 --- a/dbus/dbus-resources.c +++ b/dbus/dbus-resources.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include <dbus/dbus-resources.h> #include <dbus/dbus-internals.h> @@ -29,7 +31,7 @@ * @brief DBusCounter and other stuff related to resource limits * * Types and functions related to tracking resource limits, - * such as the maximum amount of memory a connection can use + * such as the maximum amount of memory/unix fds a connection can use * for messages, etc. */ @@ -53,9 +55,12 @@ struct DBusCounter { int refcount; /**< reference count */ - long value; /**< current counter value */ + long size_value; /**< current size counter value */ + long unix_fd_value; /**< current unix fd counter value */ + + long notify_size_guard_value; /**< call notify function when crossing this size value */ + long notify_unix_fd_guard_value; /**< call notify function when crossing this unix fd value */ - long notify_guard_value; /**< call notify function when crossing this value */ DBusCounterNotifyFunction notify_function; /**< notify function */ void *notify_data; /**< data for notify function */ }; @@ -83,9 +88,11 @@ _dbus_counter_new (void) return NULL; counter->refcount = 1; - counter->value = 0; + counter->size_value = 0; + counter->unix_fd_value = 0; - counter->notify_guard_value = 0; + counter->notify_size_guard_value = 0; + counter->notify_unix_fd_guard_value = 0; counter->notify_function = NULL; counter->notify_data = NULL; @@ -129,64 +136,109 @@ _dbus_counter_unref (DBusCounter *counter) } /** - * Adjusts the value of the counter by the given + * Adjusts the value of the size counter by the given * delta which may be positive or negative. * Calls the notify function from _dbus_counter_set_notify() * if that function has been specified. * * @param counter the counter - * @param delta value to add to the counter's current value + * @param delta value to add to the size counter's current value */ void -_dbus_counter_adjust (DBusCounter *counter, - long delta) +_dbus_counter_adjust_size (DBusCounter *counter, + long delta) { - long old = counter->value; + long old = counter->size_value; + + counter->size_value += delta; + +#if 0 + _dbus_verbose ("Adjusting counter %ld by %ld = %ld\n", + old, delta, counter->size_value); +#endif + + if (counter->notify_function != NULL && + ((old < counter->notify_size_guard_value && + counter->size_value >= counter->notify_size_guard_value) || + (old >= counter->notify_size_guard_value && + counter->size_value < counter->notify_size_guard_value))) + (* counter->notify_function) (counter, counter->notify_data); +} + +/** + * Adjusts the value of the unix fd counter by the given + * delta which may be positive or negative. + * Calls the notify function from _dbus_counter_set_notify() + * if that function has been specified. + * + * @param counter the counter + * @param delta value to add to the unix fds counter's current value + */ +void +_dbus_counter_adjust_unix_fd (DBusCounter *counter, + long delta) +{ + long old = counter->unix_fd_value; - counter->value += delta; + counter->unix_fd_value += delta; #if 0 _dbus_verbose ("Adjusting counter %ld by %ld = %ld\n", - old, delta, counter->value); + old, delta, counter->unix_fd_value); #endif if (counter->notify_function != NULL && - ((old < counter->notify_guard_value && - counter->value >= counter->notify_guard_value) || - (old >= counter->notify_guard_value && - counter->value < counter->notify_guard_value))) + ((old < counter->notify_unix_fd_guard_value && + counter->unix_fd_value >= counter->notify_unix_fd_guard_value) || + (old >= counter->notify_unix_fd_guard_value && + counter->unix_fd_value < counter->notify_unix_fd_guard_value))) (* counter->notify_function) (counter, counter->notify_data); } /** - * Gets the current value of the counter. + * Gets the current value of the size counter. + * + * @param counter the counter + * @returns its current size value + */ +long +_dbus_counter_get_size_value (DBusCounter *counter) +{ + return counter->size_value; +} + +/** + * Gets the current value of the unix fd counter. * * @param counter the counter - * @returns its current value + * @returns its current unix fd value */ long -_dbus_counter_get_value (DBusCounter *counter) +_dbus_counter_get_unix_fd_value (DBusCounter *counter) { - return counter->value; + return counter->unix_fd_value; } /** * Sets the notify function for this counter; the notify function is - * called whenever the counter's value crosses the guard value in + * called whenever the counter's values cross the guard values in * either direction (moving up, or moving down). * * @param counter the counter - * @param guard_value the value we're notified if the counter crosses + * @param size_guard_value the value we're notified if the size counter crosses + * @param unix_fd_guard_value the value we're notified if the unix fd counter crosses * @param function function to call in order to notify * @param user_data data to pass to the function */ void _dbus_counter_set_notify (DBusCounter *counter, - long guard_value, + long size_guard_value, + long unix_fd_guard_value, DBusCounterNotifyFunction function, void *user_data) { - counter->notify_guard_value = guard_value; + counter->notify_size_guard_value = size_guard_value; + counter->notify_unix_fd_guard_value = unix_fd_guard_value; counter->notify_function = function; counter->notify_data = user_data; } diff --git a/dbus/dbus-resources.h b/dbus/dbus-resources.h index f87a56a3..4763a97f 100644 --- a/dbus/dbus-resources.h +++ b/dbus/dbus-resources.h @@ -37,14 +37,19 @@ typedef void (* DBusCounterNotifyFunction) (DBusCounter *counter, DBusCounter* _dbus_counter_new (void); DBusCounter* _dbus_counter_ref (DBusCounter *counter); void _dbus_counter_unref (DBusCounter *counter); -void _dbus_counter_adjust (DBusCounter *counter, - long delta); -long _dbus_counter_get_value (DBusCounter *counter); - -void _dbus_counter_set_notify (DBusCounter *counter, - long guard_value, - DBusCounterNotifyFunction function, - void *user_data); + +void _dbus_counter_adjust_size (DBusCounter *counter, + long delta); +void _dbus_counter_adjust_unix_fd (DBusCounter *counter, + long delta); +long _dbus_counter_get_size_value (DBusCounter *counter); +long _dbus_counter_get_unix_fd_value (DBusCounter *counter); + +void _dbus_counter_set_notify (DBusCounter *counter, + long size_guard_value, + long unix_fd_guard_value, + DBusCounterNotifyFunction function, + void *user_data); DBUS_END_DECLS diff --git a/dbus/dbus-server-debug-pipe.c b/dbus/dbus-server-debug-pipe.c index fe7c970b..e18cad71 100644 --- a/dbus/dbus-server-debug-pipe.c +++ b/dbus/dbus-server-debug-pipe.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-server-debug-pipe.h" #include "dbus-transport-socket.h" @@ -253,9 +254,6 @@ _dbus_transport_debug_pipe_new (const char *server_name, return NULL; } - _dbus_fd_set_close_on_exec (client_fd); - _dbus_fd_set_close_on_exec (server_fd); - client_transport = _dbus_transport_new_for_socket (client_fd, NULL, &address); if (client_transport == NULL) diff --git a/dbus/dbus-server-launchd.c b/dbus/dbus-server-launchd.c new file mode 100644 index 00000000..db4673c5 --- /dev/null +++ b/dbus/dbus-server-launchd.c @@ -0,0 +1,209 @@ +/* dbus-server-launchd.c Server methods for interacting with launchd. + * Copyright (C) 2007, Tanner Lovelace <lovelace@wayfarer.org> + * Copyright (C) 2008, Colin Walters <walters@verbum.org> + * Copyright (C) 2008-2009, Benjamin Reed <rangerrick@befunk.com> + * Copyright (C) 2009, Jonas Bähr <jonas.baehr@web.de> + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include <config.h> +#include "dbus-server-launchd.h" + +/** + * @defgroup DBusServerLaunchd DBusServer implementations for Launchd + * @ingroup DBusInternals + * @brief Implementation details of DBusServer with Launchd support + * + * @{ + */ + +#ifdef DBUS_ENABLE_LAUNCHD +#include <launch.h> +#include <errno.h> + +#include "dbus-server-socket.h" + +/* put other private launchd functions here */ + +#endif /* DBUS_ENABLE_LAUNCHD */ + +/** + * @brief Creates a new server from launchd. + * + * launchd has allocaed a socket for us. We now query launchd for the + * file descriptor of this socket and create a server on it. + * In addition we inherit launchd's environment which holds a variable + * containing the path to the socket. This is used to init the server's + * address which is passed to autolaunched services. + * + * @param launchd_env_var the environment variable which holds the unix path to the socket + * @param error location to store reason for failure. + * @returns the new server, or #NULL on failure. + */ + +DBusServer * +_dbus_server_new_for_launchd (const char *launchd_env_var, DBusError * error) + { +#ifdef DBUS_ENABLE_LAUNCHD + DBusServer *server; + DBusString address; + int launchd_fd; + launch_data_t sockets_dict, checkin_response; + launch_data_t checkin_request; + launch_data_t listening_fd_array, listening_fd; + launch_data_t environment_dict, environment_param; + const char *launchd_socket_path, *display; + + launchd_socket_path = _dbus_getenv (launchd_env_var); + display = _dbus_getenv ("DISPLAY"); + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + if (launchd_socket_path == NULL || *launchd_socket_path == '\0') + { + dbus_set_error (error, DBUS_ERROR_BAD_ADDRESS, + "launchd's environment variable %s is empty, but should contain a socket path.\n", launchd_env_var); + return NULL; + } + + if (!_dbus_string_init (&address)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return NULL; + } + if (!_dbus_string_append (&address, "unix:path=")) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto l_failed_0; + } + if (!_dbus_string_append (&address, launchd_socket_path)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto l_failed_0; + } + + if ((checkin_request = launch_data_new_string (LAUNCH_KEY_CHECKIN)) == NULL) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "launch_data_new_string(\"%s\") Unable to create string.\n", + LAUNCH_KEY_CHECKIN); + goto l_failed_0; + } + + if ((checkin_response = launch_msg (checkin_request)) == NULL) + { + dbus_set_error (error, DBUS_ERROR_IO_ERROR, + "launch_msg(\"%s\") IPC failure: %s\n", + LAUNCH_KEY_CHECKIN, strerror (errno)); + goto l_failed_0; + } + + if (LAUNCH_DATA_ERRNO == launch_data_get_type (checkin_response)) + { + dbus_set_error (error, DBUS_ERROR_FAILED, "Check-in failed: %s\n", + strerror (launch_data_get_errno (checkin_response))); + goto l_failed_0; + } + + sockets_dict = + launch_data_dict_lookup (checkin_response, LAUNCH_JOBKEY_SOCKETS); + if (NULL == sockets_dict) + { + dbus_set_error (error, DBUS_ERROR_IO_ERROR, + "No sockets found to answer requests on!\n"); + goto l_failed_0; + } + + listening_fd_array = + launch_data_dict_lookup (sockets_dict, "unix_domain_listener"); + if (NULL == listening_fd_array) + { + dbus_set_error (error, DBUS_ERROR_IO_ERROR, + "No known sockets found to answer requests on!\n"); + goto l_failed_0; + } + + if (launch_data_array_get_count (listening_fd_array) != 1) + { + dbus_set_error (error, DBUS_ERROR_LIMITS_EXCEEDED, + "Expected 1 socket from launchd, got %d.\n", + launch_data_array_get_count (listening_fd_array)); + goto l_failed_0; + } + + listening_fd = launch_data_array_get_index (listening_fd_array, 0); + launchd_fd = launch_data_get_fd (listening_fd); + + _dbus_fd_set_close_on_exec (launchd_fd); + + if (launchd_fd < 0) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto l_failed_0; + if (display == NULL || *display == '\0') + { + environment_dict = launch_data_dict_lookup (checkin_response, LAUNCH_JOBKEY_USERENVIRONMENTVARIABLES); + if (NULL == environment_dict) + { + _dbus_warn ("Unable to retrieve user environment from launchd."); + } + else + { + environment_param = launch_data_dict_lookup (environment_dict, "DISPLAY"); + if (NULL == environment_param) + { + _dbus_warn ("Unable to retrieve DISPLAY from launchd."); + } + else + { + display = launch_data_get_string(environment_param); + _dbus_setenv ("DISPLAY", display); + } + } + } + + } + + server = _dbus_server_new_for_socket (&launchd_fd, 1, &address, 0); + if (server == NULL) + { + dbus_set_error (error, DBUS_ERROR_NO_SERVER, + "Unable to listen on launchd fd %d.", launchd_fd); + goto l_failed_0; + } + + _dbus_string_free (&address); + + return server; + + l_failed_0: + _dbus_string_free (&address); + + return NULL; +#else /* DBUS_ENABLE_LAUNCHD */ + dbus_set_error (error, DBUS_ERROR_BAD_ADDRESS, + "address type 'launchd' requested, but launchd support not compiled in"); + return NULL; +#endif + } + +/** @} */ diff --git a/dbus/dbus-server-launchd.h b/dbus/dbus-server-launchd.h new file mode 100644 index 00000000..269b9143 --- /dev/null +++ b/dbus/dbus-server-launchd.h @@ -0,0 +1,36 @@ +/* dbus-server-launchd.h Server methods for interacting with launchd. +* Copyright (C) 2008, Benjamin Reed <rangerrick@befunk.com> +* +* Permission is hereby granted, free of charge, to any person +* obtaining a copy of this software and associated documentation +* files (the "Software"), to deal in the Software without +* restriction, including without limitation the rights to use, copy, +* modify, merge, publish, distribute, sublicense, and/or sell copies +* of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be +* included in all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +* DEALINGS IN THE SOFTWARE. +*/ + +#ifndef DBUS_SERVER_LAUNCHD_H +#define DBUS_SERVER_LAUNCHD_H + +#include <dbus/dbus-internals.h> +#include <dbus/dbus-server-protected.h> + +DBUS_BEGIN_DECLS + +DBusServer * _dbus_server_new_for_launchd (const char *launchd_env_var, DBusError * error); + +DBUS_END_DECLS +#endif /* DBUS_SERVER_LAUNCHD_H */ diff --git a/dbus/dbus-server-protected.h b/dbus/dbus-server-protected.h index c05d2779..31976e31 100644 --- a/dbus/dbus-server-protected.h +++ b/dbus/dbus-server-protected.h @@ -23,7 +23,6 @@ #ifndef DBUS_SERVER_PROTECTED_H #define DBUS_SERVER_PROTECTED_H -#include <config.h> #include <dbus/dbus-internals.h> #include <dbus/dbus-threads-internal.h> #include <dbus/dbus-server.h> @@ -51,6 +50,7 @@ struct DBusServerVTable }; /** + * @ingroup DBusServerInternals * Internals of DBusServer object */ struct DBusServer @@ -67,7 +67,8 @@ struct DBusServer DBusTimeoutList *timeouts; /**< Our timeouts */ char *address; /**< Address this server is listening on. */ - + dbus_bool_t published_address; /**< flag which indicates that server has published its bus address. */ + int max_connections; /**< Max number of connections allowed at once. */ DBusDataSlotList slot_list; /**< Data stored by allocated integer ID */ @@ -117,7 +118,8 @@ typedef enum DBUS_SERVER_LISTEN_NOT_HANDLED, /**< we aren't in charge of this address type */ DBUS_SERVER_LISTEN_OK, /**< we set up the listen */ DBUS_SERVER_LISTEN_BAD_ADDRESS, /**< malformed address */ - DBUS_SERVER_LISTEN_DID_NOT_CONNECT /**< well-formed address but failed to set it up */ + DBUS_SERVER_LISTEN_DID_NOT_CONNECT, /**< well-formed address but failed to set it up */ + DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED /**< address is already used */ } DBusServerListenResult; DBusServerListenResult _dbus_server_listen_platform_specific (DBusAddressEntry *entry, @@ -144,13 +146,13 @@ DBusServerListenResult _dbus_server_listen_platform_specific (DBusAddressEntry #define TRACE_LOCKS 0 #define SERVER_LOCK(server) do { \ - if (TRACE_LOCKS) { _dbus_verbose (" LOCK: %s\n", _DBUS_FUNCTION_NAME); } \ + if (TRACE_LOCKS) { _dbus_verbose ("LOCK\n"); } \ _dbus_mutex_lock ((server)->mutex); \ TOOK_LOCK_CHECK (server); \ } while (0) #define SERVER_UNLOCK(server) do { \ - if (TRACE_LOCKS) { _dbus_verbose (" UNLOCK: %s\n", _DBUS_FUNCTION_NAME); } \ + if (TRACE_LOCKS) { _dbus_verbose ("UNLOCK\n"); } \ RELEASING_LOCK_CHECK (server); \ _dbus_mutex_unlock ((server)->mutex); \ } while (0) diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c index bd38ce6a..758742dd 100644 --- a/dbus/dbus-server-socket.c +++ b/dbus/dbus-server-socket.c @@ -4,7 +4,7 @@ * Copyright (C) 2002, 2003, 2004, 2006 Red Hat Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,17 +14,20 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-server-socket.h" #include "dbus-transport-socket.h" #include "dbus-connection-internal.h" +#include "dbus-memory.h" +#include "dbus-nonce.h" #include "dbus-string.h" /** @@ -35,7 +38,7 @@ * @{ */ /** - * + * * Opaque object representing a Socket server implementation. */ typedef struct DBusServerSocket DBusServerSocket; @@ -51,6 +54,7 @@ struct DBusServerSocket int *fds; /**< File descriptor or -1 if disconnected. */ DBusWatch **watch; /**< File descriptor watch. */ char *socket_name; /**< Name of domain socket, to unlink if appropriate */ + DBusNonceFile *noncefile; /**< Nonce file used to authenticate clients */ }; static void @@ -58,7 +62,7 @@ socket_finalize (DBusServer *server) { DBusServerSocket *socket_server = (DBusServerSocket*) server; int i; - + _dbus_server_finalize_base (server); for (i = 0 ; i < socket_server->n_fds ; i++) @@ -67,10 +71,13 @@ socket_finalize (DBusServer *server) _dbus_watch_unref (socket_server->watch[i]); socket_server->watch[i] = NULL; } - + dbus_free (socket_server->fds); dbus_free (socket_server->watch); dbus_free (socket_server->socket_name); + if (socket_server->noncefile) + _dbus_noncefile_delete (socket_server->noncefile, NULL); + dbus_free (socket_server->noncefile); dbus_free (server); } @@ -82,19 +89,21 @@ handle_new_client_fd_and_unlock (DBusServer *server, DBusConnection *connection; DBusTransport *transport; DBusNewConnectionFunction new_connection_function; + DBusServerSocket* socket_server; void *new_connection_data; - + + socket_server = (DBusServerSocket*)server; _dbus_verbose ("Creating new client connection with fd %d\n", client_fd); HAVE_LOCK_CHECK (server); - + if (!_dbus_set_fd_nonblocking (client_fd, NULL)) { SERVER_UNLOCK (server); return TRUE; } - - transport = _dbus_transport_new_for_socket (client_fd, &server->guid_hex, NULL); + + transport = _dbus_transport_new_for_socket (client_fd, &server->guid_hex, FALSE); if (transport == NULL) { _dbus_close_socket (client_fd, NULL); @@ -109,21 +118,21 @@ handle_new_client_fd_and_unlock (DBusServer *server, SERVER_UNLOCK (server); return FALSE; } - + /* note that client_fd is now owned by the transport, and will be * closed on transport disconnection/finalization */ - + connection = _dbus_connection_new_for_transport (transport); _dbus_transport_unref (transport); transport = NULL; /* now under the connection lock */ - + if (connection == NULL) { SERVER_UNLOCK (server); return FALSE; } - + /* See if someone wants to handle this new connection, self-referencing * for paranoia. */ @@ -132,14 +141,14 @@ handle_new_client_fd_and_unlock (DBusServer *server, _dbus_server_ref_unlocked (server); SERVER_UNLOCK (server); - + if (new_connection_function) { (* new_connection_function) (server, connection, new_connection_data); } dbus_server_unref (server); - + /* If no one grabbed a reference, the connection will die. */ _dbus_connection_close_if_only_one_ref (connection); dbus_connection_unref (connection); @@ -153,14 +162,15 @@ socket_handle_watch (DBusWatch *watch, void *data) { DBusServer *server = data; -#ifndef DBUS_DISABLE_ASSERT DBusServerSocket *socket_server = data; + +#ifndef DBUS_DISABLE_ASSERT int i; dbus_bool_t found = FALSE; #endif SERVER_LOCK (server); - + #ifndef DBUS_DISABLE_ASSERT for (i = 0 ; i < socket_server->n_fds ; i++) { @@ -171,20 +181,23 @@ socket_handle_watch (DBusWatch *watch, #endif _dbus_verbose ("Handling client connection, flags 0x%x\n", flags); - + if (flags & DBUS_WATCH_READABLE) { int client_fd; int listen_fd; - + listen_fd = dbus_watch_get_socket (watch); - client_fd = _dbus_accept (listen_fd); - + if (socket_server->noncefile) + client_fd = _dbus_accept_with_noncefile (listen_fd, socket_server->noncefile); + else + client_fd = _dbus_accept (listen_fd); + if (client_fd < 0) { /* EINTR handled for us */ - + if (_dbus_get_is_errno_eagain_or_ewouldblock ()) _dbus_verbose ("No client available to accept after all\n"); else @@ -195,8 +208,6 @@ socket_handle_watch (DBusWatch *watch, } else { - _dbus_fd_set_close_on_exec (client_fd); - if (!handle_new_client_fd_and_unlock (server, client_fd)) _dbus_verbose ("Rejected client connection due to lack of memory\n"); } @@ -210,7 +221,7 @@ socket_handle_watch (DBusWatch *watch, return TRUE; } - + static void socket_disconnect (DBusServer *server) { @@ -218,7 +229,7 @@ socket_disconnect (DBusServer *server) int i; HAVE_LOCK_CHECK (server); - + for (i = 0 ; i < socket_server->n_fds ; i++) { if (socket_server->watch[i]) @@ -240,6 +251,9 @@ socket_disconnect (DBusServer *server) _dbus_delete_file (&tmp, NULL); } + if (server->published_address) + _dbus_daemon_unpublish_session_bus_address(); + HAVE_LOCK_CHECK (server); } @@ -259,22 +273,26 @@ static const DBusServerVTable socket_vtable = { * @param fds list of file descriptors. * @param n_fds number of file descriptors * @param address the server's address + * @param use_nonce whether to create and use a nonce for authentication * @returns the new server, or #NULL if no memory. - * + * */ DBusServer* _dbus_server_new_for_socket (int *fds, int n_fds, - const DBusString *address) + const DBusString *address, + DBusNonceFile *noncefile) { DBusServerSocket *socket_server; DBusServer *server; int i; - + socket_server = dbus_new0 (DBusServerSocket, 1); if (socket_server == NULL) return NULL; + socket_server->noncefile = noncefile; + socket_server->fds = dbus_new (int, n_fds); if (!socket_server->fds) goto failed_0; @@ -307,7 +325,7 @@ _dbus_server_new_for_socket (int *fds, server = (DBusServer*)socket_server; SERVER_LOCK (server); - + for (i = 0 ; i < n_fds ; i++) { if (!_dbus_server_add_watch (&socket_server->base, @@ -325,9 +343,15 @@ _dbus_server_new_for_socket (int *fds, } SERVER_UNLOCK (server); - + return (DBusServer*) socket_server; + failed_3: + if (socket_server->noncefile) + { + _dbus_noncefile_delete (socket_server->noncefile, NULL); + dbus_free (socket_server->noncefile ); + } failed_2: for (i = 0 ; i < n_fds ; i++) { @@ -361,8 +385,9 @@ _dbus_server_new_for_socket (int *fds, * @param host the hostname to report for the listen address * @param bind the hostname to listen on * @param port the port to listen on or 0 to let the OS choose - * @param family + * @param family * @param error location to store reason for failure. + * @param use_nonce whether to use a nonce for low-level authentication (nonce-tcp transport) or not (tcp transport) * @returns the new server, or #NULL on failure. */ DBusServer* @@ -370,7 +395,8 @@ _dbus_server_new_for_tcp_socket (const char *host, const char *bind, const char *port, const char *family, - DBusError *error) + DBusError *error, + dbus_bool_t use_nonce) { DBusServer *server; int *listen_fds = NULL; @@ -378,9 +404,12 @@ _dbus_server_new_for_tcp_socket (const char *host, DBusString address; DBusString host_str; DBusString port_str; + DBusNonceFile *noncefile; _DBUS_ASSERT_ERROR_IS_CLEAR (error); + noncefile = NULL; + if (!_dbus_string_init (&address)) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); @@ -413,11 +442,8 @@ _dbus_server_new_for_tcp_socket (const char *host, goto failed_1; } - for (i = 0 ; i < nlisten_fds ; i++) - _dbus_fd_set_close_on_exec (listen_fds[i]); - _dbus_string_init_const (&host_str, host); - if (!_dbus_string_append (&address, "tcp:host=") || + if (!_dbus_string_append (&address, use_nonce ? "nonce-tcp:host=" : "tcp:host=") || !_dbus_address_append_escaped (&address, &host_str) || !_dbus_string_append (&address, ",port=") || !_dbus_string_append (&address, _dbus_string_get_const_data(&port_str))) @@ -432,8 +458,27 @@ _dbus_server_new_for_tcp_socket (const char *host, dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); goto failed_2; } - - server = _dbus_server_new_for_socket (listen_fds, nlisten_fds, &address); + + if (use_nonce) + { + noncefile = dbus_new0 (DBusNonceFile, 1); + if (noncefile == NULL) + { + goto failed_2; + } + + if (!_dbus_noncefile_create (noncefile, NULL)) + goto failed_2; + + if (!_dbus_string_append (&address, ",noncefile=") || + !_dbus_address_append_escaped (&address, _dbus_noncefile_get_path (noncefile))) + { + goto failed_2; + } + + } + + server = _dbus_server_new_for_socket (listen_fds, nlisten_fds, &address, noncefile); if (server == NULL) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); @@ -462,15 +507,15 @@ _dbus_server_new_for_tcp_socket (const char *host, /** * Tries to interpret the address entry for various socket-related - * addresses (well, currently only tcp). - * + * addresses (well, currently only tcp and nonce-tcp). + * * Sets error if the result is not OK. - * + * * @param entry an address entry * @param server_p a new DBusServer, or #NULL on failure. * @param error location to store rationale for failure on bad address * @returns the outcome - * + * */ DBusServerListenResult _dbus_server_listen_socket (DBusAddressEntry *entry, @@ -480,10 +525,10 @@ _dbus_server_listen_socket (DBusAddressEntry *entry, const char *method; *server_p = NULL; - + method = dbus_address_entry_get_method (entry); - - if (strcmp (method, "tcp") == 0) + + if (strcmp (method, "tcp") == 0 || strcmp (method, "nonce-tcp") == 0) { const char *host; const char *port; @@ -496,7 +541,7 @@ _dbus_server_listen_socket (DBusAddressEntry *entry, family = dbus_address_entry_get_value (entry, "family"); *server_p = _dbus_server_new_for_tcp_socket (host, bind, port, - family, error); + family, error, strcmp (method, "nonce-tcp") == 0 ? TRUE : FALSE); if (*server_p) { @@ -520,10 +565,10 @@ _dbus_server_listen_socket (DBusAddressEntry *entry, * This is a bad hack since it's really unix domain socket * specific. Also, the function weirdly adopts ownership * of the passed-in string. - * + * * @param server a socket server * @param filename socket filename to report/delete - * + * */ void _dbus_server_socket_own_filename (DBusServer *server, diff --git a/dbus/dbus-server-socket.h b/dbus/dbus-server-socket.h index 5918658e..3aec7129 100644 --- a/dbus/dbus-server-socket.h +++ b/dbus/dbus-server-socket.h @@ -25,17 +25,22 @@ #include <dbus/dbus-internals.h> #include <dbus/dbus-server-protected.h> +#include <dbus/dbus-nonce.h> DBUS_BEGIN_DECLS DBusServer* _dbus_server_new_for_socket (int *fds, int n_fds, - const DBusString *address); + const DBusString *address, + DBusNonceFile *noncefile); +DBusServer* _dbus_server_new_for_autolaunch (const DBusString *address, + DBusError *error); DBusServer* _dbus_server_new_for_tcp_socket (const char *host, const char *bind, const char *port, const char *family, - DBusError *error); + DBusError *error, + dbus_bool_t use_nonce); DBusServerListenResult _dbus_server_listen_socket (DBusAddressEntry *entry, DBusServer **server_p, DBusError *error); diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c index fba9e9d2..70ad9654 100644 --- a/dbus/dbus-server-unix.c +++ b/dbus/dbus-server-unix.c @@ -4,7 +4,7 @@ * Copyright (C) 2002, 2003, 2004 Red Hat Inc. * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -14,16 +14,18 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-server-unix.h" #include "dbus-server-socket.h" +#include "dbus-server-launchd.h" #include "dbus-transport-unix.h" #include "dbus-connection-internal.h" #include "dbus-sysdeps-unix.h" @@ -41,12 +43,12 @@ * Tries to interpret the address entry in a platform-specific * way, creating a platform-specific server type if appropriate. * Sets error if the result is not OK. - * + * * @param entry an address entry * @param server_p location to store a new DBusServer, or #NULL on failure. * @param error location to store rationale for failure on bad address * @returns the outcome - * + * */ DBusServerListenResult _dbus_server_listen_platform_specific (DBusAddressEntry *entry, @@ -56,7 +58,7 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, const char *method; *server_p = NULL; - + method = dbus_address_entry_get_method (entry); if (strcmp (method, "unix") == 0) @@ -64,7 +66,7 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, const char *path = dbus_address_entry_get_value (entry, "path"); const char *tmpdir = dbus_address_entry_get_value (entry, "tmpdir"); const char *abstract = dbus_address_entry_get_value (entry, "abstract"); - + if (path == NULL && tmpdir == NULL && abstract == NULL) { _dbus_set_bad_address(error, "unix", @@ -86,20 +88,20 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, { DBusString full_path; DBusString filename; - + if (!_dbus_string_init (&full_path)) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; } - + if (!_dbus_string_init (&filename)) { _dbus_string_free (&full_path); dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; } - + if (!_dbus_string_append (&filename, "dbus-") || !_dbus_generate_random_ascii (&filename, 10) || @@ -111,9 +113,9 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; } - + /* Always use abstract namespace if possible with tmpdir */ - + *server_p = _dbus_server_new_for_domain_socket (_dbus_string_get_const_data (&full_path), #ifdef HAVE_ABSTRACT_SOCKETS @@ -145,6 +147,62 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; } } + else if (strcmp (method, "systemd") == 0) + { + int n, *fds; + DBusString address; + + n = _dbus_listen_systemd_sockets (&fds, error); + if (n < 0) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; + } + + _dbus_string_init_const (&address, "systemd:"); + + *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL); + if (*server_p == NULL) + { + int i; + + for (i = 0; i < n; i++) + { + _dbus_close_socket (fds[i], NULL); + } + dbus_free (fds); + + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; + } + + dbus_free (fds); + + return DBUS_SERVER_LISTEN_OK; + } +#ifdef DBUS_ENABLE_LAUNCHD + else if (strcmp (method, "launchd") == 0) + { + const char *launchd_env_var = dbus_address_entry_get_value (entry, "env"); + if (launchd_env_var == NULL) + { + _dbus_set_bad_address (error, "launchd", "env", NULL); + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; + } + *server_p = _dbus_server_new_for_launchd (launchd_env_var, error); + + if (*server_p != NULL) + { + _DBUS_ASSERT_ERROR_IS_CLEAR(error); + return DBUS_SERVER_LISTEN_OK; + } + else + { + _DBUS_ASSERT_ERROR_IS_SET(error); + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; + } + } +#endif else { /* If we don't handle the method, we return NULL with the @@ -173,7 +231,7 @@ _dbus_server_new_for_domain_socket (const char *path, DBusString address; char *path_copy; DBusString path_str; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); if (!_dbus_string_init (&address)) @@ -199,17 +257,16 @@ _dbus_server_new_for_domain_socket (const char *path, dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); goto failed_0; } - + listen_fd = _dbus_listen_unix_socket (path, abstract, error); - _dbus_fd_set_close_on_exec (listen_fd); - + if (listen_fd < 0) { _DBUS_ASSERT_ERROR_IS_SET (error); goto failed_1; } - - server = _dbus_server_new_for_socket (&listen_fd, 1, &address); + + server = _dbus_server_new_for_socket (&listen_fd, 1, &address, 0); if (server == NULL) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); @@ -217,9 +274,9 @@ _dbus_server_new_for_domain_socket (const char *path, } _dbus_server_socket_own_filename(server, path_copy); - + _dbus_string_free (&address); - + return server; failed_2: @@ -233,4 +290,3 @@ _dbus_server_new_for_domain_socket (const char *path, } /** @} */ - diff --git a/dbus/dbus-server-win.c b/dbus/dbus-server-win.c new file mode 100644 index 00000000..bf1c896c --- /dev/null +++ b/dbus/dbus-server-win.c @@ -0,0 +1,122 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-server-win.c Server implementation for WIN network protocols. + * + * Copyright (C) 2002, 2003, 2004 Red Hat Inc. + * Copyright (C) 2007 Ralf Habacker <ralf.habacker@freenet.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-internals.h" +#include "dbus-server-win.h" +#include "dbus-server-socket.h" + +/** + * @defgroup DBusServerWin DBusServer implementations for Windows + * @ingroup DBusInternals + * @brief Implementation details of DBusServer on Windows + * + * @{ + */ + +/** + * Tries to interpret the address entry in a platform-specific + * way, creating a platform-specific server type if appropriate. + * Sets error if the result is not OK. + * + * @param entry an address entry + * @param server_p location to store a new DBusServer, or #NULL on failure. + * @param error location to store rationale for failure on bad address + * @returns the outcome + * + */ +DBusServerListenResult +_dbus_server_listen_platform_specific (DBusAddressEntry *entry, + DBusServer **server_p, + DBusError *error) +{ + const char *method; + + *server_p = NULL; + + method = dbus_address_entry_get_method (entry); + + if (strcmp (method, "nonce-tcp") == 0) + { + const char *host; + const char *port; + const char *bind; + const char *family; + + host = dbus_address_entry_get_value (entry, "host"); + bind = dbus_address_entry_get_value (entry, "bind"); + port = dbus_address_entry_get_value (entry, "port"); + family = dbus_address_entry_get_value (entry, "family"); + + *server_p = _dbus_server_new_for_tcp_socket (host, bind, port, + family, error, TRUE); + + if (*server_p) + { + _DBUS_ASSERT_ERROR_IS_CLEAR(error); + return DBUS_SERVER_LISTEN_OK; + } + else + { + _DBUS_ASSERT_ERROR_IS_SET(error); + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; + } + } + else if (strcmp (method, "autolaunch") == 0) + { + const char *host = "localhost"; + const char *bind = "localhost"; + const char *port = "0"; + const char *family = "ipv4"; + const char *scope = dbus_address_entry_get_value (entry, "scope"); + + if (_dbus_daemon_is_session_bus_address_published (scope)) + return DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED; + + *server_p = _dbus_server_new_for_tcp_socket (host, bind, port, + family, error, FALSE); + if (*server_p) + { + _DBUS_ASSERT_ERROR_IS_CLEAR(error); + (*server_p)->published_address = + _dbus_daemon_publish_session_bus_address ((*server_p)->address, scope); + return DBUS_SERVER_LISTEN_OK; + } + else + { + // make sure no handle is open + _dbus_daemon_unpublish_session_bus_address (); + _DBUS_ASSERT_ERROR_IS_SET(error); + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; + } + } + else + { + _DBUS_ASSERT_ERROR_IS_CLEAR(error); + return DBUS_SERVER_LISTEN_NOT_HANDLED; + } +} + +/** @} */ + diff --git a/dbus/dbus-server-win.h b/dbus/dbus-server-win.h new file mode 100644 index 00000000..65c27568 --- /dev/null +++ b/dbus/dbus-server-win.h @@ -0,0 +1,36 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-server-win.h Server implementation for windows network protocols. + * + * Copyright (C) 2002 Red Hat Inc. + * Copyright (C) 2007 Ralf Habacker <ralf.habacker@freenet.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#ifndef DBUS_SERVER_WIN_H +#define DBUS_SERVER_WIN_H + +#include <dbus/dbus-internals.h> +#include <dbus/dbus-server-protected.h> + +DBUS_BEGIN_DECLS + +/* add definitions here */ + +DBUS_END_DECLS + +#endif /* DBUS_SERVER_WIN_H */ diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index 974503bb..60d14b33 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-server.h" #include "dbus-server-unix.h" #include "dbus-server-socket.h" @@ -103,6 +104,7 @@ _dbus_server_init_base (DBusServer *server, server->address = NULL; server->watches = NULL; server->timeouts = NULL; + server->published_address = FALSE; if (!_dbus_string_init (&server->guid_hex)) return FALSE; @@ -575,6 +577,16 @@ dbus_server_listen (const char *address, handled_once = TRUE; goto out; } + else if (result == DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED) + { + _dbus_assert (server == NULL); + dbus_set_error (error, + DBUS_ERROR_ADDRESS_IN_USE, + "Address '%s' already used", + dbus_address_entry_get_method (entries[0])); + handled_once = TRUE; + goto out; + } else if (result == DBUS_SERVER_LISTEN_BAD_ADDRESS) { _dbus_assert (server == NULL); diff --git a/dbus/dbus-server.h b/dbus/dbus-server.h index 6d7d2fa2..bdbefa0f 100644 --- a/dbus/dbus-server.h +++ b/dbus/dbus-server.h @@ -48,39 +48,54 @@ typedef void (* DBusNewConnectionFunction) (DBusServer *server, DBusConnection *new_connection, void *data); +DBUS_EXPORT DBusServer* dbus_server_listen (const char *address, DBusError *error); +DBUS_EXPORT DBusServer* dbus_server_ref (DBusServer *server); +DBUS_EXPORT void dbus_server_unref (DBusServer *server); +DBUS_EXPORT void dbus_server_disconnect (DBusServer *server); +DBUS_EXPORT dbus_bool_t dbus_server_get_is_connected (DBusServer *server); +DBUS_EXPORT char* dbus_server_get_address (DBusServer *server); +DBUS_EXPORT char* dbus_server_get_id (DBusServer *server); +DBUS_EXPORT void dbus_server_set_new_connection_function (DBusServer *server, DBusNewConnectionFunction function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_server_set_watch_functions (DBusServer *server, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function); +DBUS_EXPORT dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server, const char **mechanisms); +DBUS_EXPORT dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT void dbus_server_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT dbus_bool_t dbus_server_set_data (DBusServer *server, int slot, void *data, DBusFreeFunction free_data_func); +DBUS_EXPORT void* dbus_server_get_data (DBusServer *server, int slot); diff --git a/dbus/dbus-sha.c b/dbus/dbus-sha.c index df34cc8c..d1827522 100644 --- a/dbus/dbus-sha.c +++ b/dbus/dbus-sha.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-sha.h" #include "dbus-marshal-basic.h" /* for byteswap routines */ @@ -465,7 +466,7 @@ _dbus_sha_final (DBusSHAContext *context, /* some kind of security paranoia, though it seems pointless * to me given the nonzeroed stuff flying around */ - memset ((void*)context, '\0', sizeof (DBusSHAContext)); + _DBUS_ZERO(*context); return TRUE; } diff --git a/dbus/dbus-shell.c b/dbus/dbus-shell.c index 57900d88..111d39df 100644 --- a/dbus/dbus-shell.c +++ b/dbus/dbus-shell.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include <string.h> #include "dbus-internals.h" #include "dbus-list.h" diff --git a/dbus/dbus-signature.c b/dbus/dbus-signature.c index 5c152580..ddc0bcc3 100644 --- a/dbus/dbus-signature.c +++ b/dbus/dbus-signature.c @@ -21,6 +21,8 @@ * */ +#include <config.h> + #include "dbus-signature.h" #include "dbus-marshal-recursive.h" #include "dbus-marshal-basic.h" @@ -355,6 +357,7 @@ dbus_type_is_fixed (int typecode) case DBUS_TYPE_INT64: case DBUS_TYPE_UINT64: case DBUS_TYPE_DOUBLE: + case DBUS_TYPE_UNIX_FD: return TRUE; default: return FALSE; diff --git a/dbus/dbus-signature.h b/dbus/dbus-signature.h index ef3c6f99..ebf00c1e 100644 --- a/dbus/dbus-signature.h +++ b/dbus/dbus-signature.h @@ -50,28 +50,39 @@ typedef struct int dummy17; /**< Don't use this */ } DBusSignatureIter; +DBUS_EXPORT void dbus_signature_iter_init (DBusSignatureIter *iter, const char *signature); +DBUS_EXPORT int dbus_signature_iter_get_current_type (const DBusSignatureIter *iter); +DBUS_EXPORT char * dbus_signature_iter_get_signature (const DBusSignatureIter *iter); +DBUS_EXPORT int dbus_signature_iter_get_element_type (const DBusSignatureIter *iter); +DBUS_EXPORT dbus_bool_t dbus_signature_iter_next (DBusSignatureIter *iter); +DBUS_EXPORT void dbus_signature_iter_recurse (const DBusSignatureIter *iter, DBusSignatureIter *subiter); +DBUS_EXPORT dbus_bool_t dbus_signature_validate (const char *signature, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_signature_validate_single (const char *signature, DBusError *error); +DBUS_EXPORT dbus_bool_t dbus_type_is_basic (int typecode); +DBUS_EXPORT dbus_bool_t dbus_type_is_container (int typecode); +DBUS_EXPORT dbus_bool_t dbus_type_is_fixed (int typecode); /** @} */ diff --git a/dbus/dbus-sockets-win.h b/dbus/dbus-sockets-win.h new file mode 100644 index 00000000..5dead058 --- /dev/null +++ b/dbus/dbus-sockets-win.h @@ -0,0 +1,76 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sockets.h Wrappers around socket features (internal to D-BUS implementation) + * + * Copyright (C) 2005 Novell, Inc. + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_SOCKETS_H +#define DBUS_SOCKETS_H + +#if defined(DBUS_WIN) || defined(DBUS_WINCE) + + + +#ifndef STRICT +#define STRICT +#include <winsock2.h> +#undef STRICT +#endif +#include <winsock2.h> + +#undef interface + +#if HAVE_ERRNO_H +#include <errno.h> +#endif + +/* Make use of the fact that the WSAE* error codes don't + * overlap with errno E* codes. Wrapper functions store + * the return value from WSAGetLastError() in errno. + */ +#if defined(EPROTONOSUPPORT) || \ + defined(EAFNOSUPPORT) || \ + defined(EWOULDBLOCK) +#error This does not look like Win32 and the Microsoft C library +#endif + +#define DBUS_SOCKET_IS_INVALID(s) ((SOCKET)(s) == INVALID_SOCKET) +#define DBUS_SOCKET_API_RETURNS_ERROR(n) ((n) == SOCKET_ERROR) +#define DBUS_SOCKET_SET_ERRNO() (_dbus_win_set_errno (WSAGetLastError())) + +#define DBUS_CLOSE_SOCKET(s) closesocket(s) + +#else + +#include <sys/socket.h> +#include <sys/un.h> +#include <netinet/in.h> +#include <netdb.h> +#include <errno.h> + +#define DBUS_SOCKET_IS_INVALID(s) ((s) < 0) +#define DBUS_SOCKET_API_RETURNS_ERROR(n) ((n) < 0) +#define DBUS_SOCKET_SET_ERRNO() /* empty */ + +#define DBUS_CLOSE_SOCKET(s) close(s) + +#endif /* !Win32 */ + +#endif /* DBUS_SOCKETS_H */ diff --git a/dbus/dbus-spawn-win.c b/dbus/dbus-spawn-win.c new file mode 100644 index 00000000..8ac837ed --- /dev/null +++ b/dbus/dbus-spawn-win.c @@ -0,0 +1,941 @@ +#include <config.h> + +//#define SPAWN_DEBUG + +#if !defined(SPAWN_DEBUG) || defined(_MSC_VER) +#define PING() +#else +#define PING() fprintf (stderr, "%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__); fflush (stderr) +#endif + +#include <stdio.h> + +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-spawn-win32.c Wrapper around g_spawn + * + * Copyright (C) 2002, 2003, 2004 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * Copyright (C) 2005 Novell, Inc. + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#include "dbus-spawn.h" +#include "dbus-sysdeps.h" +#include "dbus-sysdeps-win.h" +#include "dbus-internals.h" +#include "dbus-test.h" +#include "dbus-protocol.h" + +#define WIN32_LEAN_AND_MEAN +//#define STRICT +//#include <windows.h> +//#undef STRICT +#include <winsock2.h> +#undef interface + +#include <stdlib.h> + +#ifndef DBUS_WINCE +#include <process.h> +#endif + +/** + * Babysitter implementation details + */ +struct DBusBabysitter + { + int refcount; + + HANDLE start_sync_event; +#ifdef DBUS_BUILD_TESTS + + HANDLE end_sync_event; +#endif + + char *executable; + DBusSpawnChildSetupFunc child_setup; + void *user_data; + + int argc; + char **argv; + char **envp; + + HANDLE child_handle; + int socket_to_babysitter; /* Connection to the babysitter thread */ + int socket_to_main; + + DBusWatchList *watches; + DBusWatch *sitter_watch; + + dbus_bool_t have_spawn_errno; + int spawn_errno; + dbus_bool_t have_child_status; + int child_status; + }; + +static DBusBabysitter* +_dbus_babysitter_new (void) +{ + DBusBabysitter *sitter; + + sitter = dbus_new0 (DBusBabysitter, 1); + if (sitter == NULL) + return NULL; + + sitter->refcount = 1; + + sitter->start_sync_event = CreateEvent (NULL, FALSE, FALSE, NULL); + if (sitter->start_sync_event == NULL) + { + _dbus_babysitter_unref (sitter); + return NULL; + } + +#ifdef DBUS_BUILD_TESTS + sitter->end_sync_event = CreateEvent (NULL, FALSE, FALSE, NULL); + if (sitter->end_sync_event == NULL) + { + _dbus_babysitter_unref (sitter); + return NULL; + } +#endif + + sitter->child_handle = NULL; + + sitter->socket_to_babysitter = sitter->socket_to_main = -1; + + sitter->argc = 0; + sitter->argv = NULL; + sitter->envp = NULL; + + sitter->watches = _dbus_watch_list_new (); + if (sitter->watches == NULL) + { + _dbus_babysitter_unref (sitter); + return NULL; + } + + sitter->have_spawn_errno = FALSE; + sitter->have_child_status = FALSE; + + return sitter; +} + +/** + * Increment the reference count on the babysitter object. + * + * @param sitter the babysitter + * @returns the babysitter + */ +DBusBabysitter * +_dbus_babysitter_ref (DBusBabysitter *sitter) +{ + PING(); + _dbus_assert (sitter != NULL); + _dbus_assert (sitter->refcount > 0); + + sitter->refcount += 1; + + return sitter; +} + +/** + * Decrement the reference count on the babysitter object. + * + * @param sitter the babysitter + */ +void +_dbus_babysitter_unref (DBusBabysitter *sitter) +{ + int i; + + PING(); + _dbus_assert (sitter != NULL); + _dbus_assert (sitter->refcount > 0); + + sitter->refcount -= 1; + + if (sitter->refcount == 0) + { + if (sitter->socket_to_babysitter != -1) + { + _dbus_close_socket (sitter->socket_to_babysitter, NULL); + sitter->socket_to_babysitter = -1; + } + + if (sitter->socket_to_main != -1) + { + _dbus_close_socket (sitter->socket_to_main, NULL); + sitter->socket_to_main = -1; + } + + PING(); + if (sitter->argv != NULL) + { + for (i = 0; i < sitter->argc; i++) + if (sitter->argv[i] != NULL) + { + dbus_free (sitter->argv[i]); + sitter->argv[i] = NULL; + } + dbus_free (sitter->argv); + sitter->argv = NULL; + } + + if (sitter->envp != NULL) + { + char **e = sitter->envp; + + while (*e) + dbus_free (*e++); + dbus_free (sitter->envp); + sitter->envp = NULL; + } + + if (sitter->child_handle != NULL) + { + CloseHandle (sitter->child_handle); + sitter->child_handle = NULL; + } + + if (sitter->sitter_watch) + { + _dbus_watch_invalidate (sitter->sitter_watch); + _dbus_watch_unref (sitter->sitter_watch); + sitter->sitter_watch = NULL; + } + + if (sitter->watches) + _dbus_watch_list_free (sitter->watches); + + if (sitter->start_sync_event != NULL) + { + PING(); + CloseHandle (sitter->start_sync_event); + sitter->start_sync_event = NULL; + } + +#ifdef DBUS_BUILD_TESTS + if (sitter->end_sync_event != NULL) + { + CloseHandle (sitter->end_sync_event); + sitter->end_sync_event = NULL; + } +#endif + + dbus_free (sitter->executable); + + dbus_free (sitter); + } +} + +void +_dbus_babysitter_kill_child (DBusBabysitter *sitter) +{ + PING(); + if (sitter->child_handle == NULL) + return; /* child is already dead, or we're so hosed we'll never recover */ + + PING(); + TerminateProcess (sitter->child_handle, 12345); +} + +/** + * Checks whether the child has exited, without blocking. + * + * @param sitter the babysitter + */ +dbus_bool_t +_dbus_babysitter_get_child_exited (DBusBabysitter *sitter) +{ + PING(); + return (sitter->child_handle == NULL); +} + +/** + * Gets the exit status of the child. We do this so implementation specific + * detail is not cluttering up dbus, for example the system launcher code. + * This can only be called if the child has exited, i.e. call + * _dbus_babysitter_get_child_exited(). It returns FALSE if the child + * did not return a status code, e.g. because the child was signaled + * or we failed to ever launch the child in the first place. + * + * @param sitter the babysitter + * @param status the returned status code + * @returns #FALSE on failure + */ +dbus_bool_t +_dbus_babysitter_get_child_exit_status (DBusBabysitter *sitter, + int *status) +{ + if (!_dbus_babysitter_get_child_exited (sitter)) + _dbus_assert_not_reached ("Child has not exited"); + + if (!sitter->have_child_status || + sitter->child_status == STILL_ACTIVE) + return FALSE; + + *status = sitter->child_status; + return TRUE; +} + +/** + * Sets the #DBusError with an explanation of why the spawned + * child process exited (on a signal, or whatever). If + * the child process has not exited, does nothing (error + * will remain unset). + * + * @param sitter the babysitter + * @param error an error to fill in + */ +void +_dbus_babysitter_set_child_exit_error (DBusBabysitter *sitter, + DBusError *error) +{ + PING(); + if (!_dbus_babysitter_get_child_exited (sitter)) + return; + + PING(); + if (sitter->have_spawn_errno) + { + char *emsg = _dbus_win_error_string (sitter->spawn_errno); + dbus_set_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED, + "Failed to execute program %s: %s", + sitter->executable, emsg); + _dbus_win_free_error_string (emsg); + } + else if (sitter->have_child_status) + { + PING(); + dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_EXITED, + "Process %s exited with status %d", + sitter->executable, sitter->child_status); + } + else + { + PING(); + dbus_set_error (error, DBUS_ERROR_FAILED, + "Process %s exited, status unknown", + sitter->executable); + } + PING(); +} + +dbus_bool_t +_dbus_babysitter_set_watch_functions (DBusBabysitter *sitter, + DBusAddWatchFunction add_function, + DBusRemoveWatchFunction remove_function, + DBusWatchToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function) +{ + PING(); + return _dbus_watch_list_set_functions (sitter->watches, + add_function, + remove_function, + toggled_function, + data, + free_data_function); +} + +static dbus_bool_t +handle_watch (DBusWatch *watch, + unsigned int condition, + void *data) +{ + DBusBabysitter *sitter = data; + + /* On Unix dbus-spawn uses a babysitter *process*, thus it has to + * actually send the exit statuses, error codes and whatnot through + * sockets and/or pipes. On Win32, the babysitter is jus a thread, + * so it can set the status fields directly in the babysitter struct + * just fine. The socket pipe is used just so we can watch it with + * select(), as soon as anything is written to it we know that the + * babysitter thread has recorded the status in the babysitter + * struct. + */ + + PING(); + _dbus_close_socket (sitter->socket_to_babysitter, NULL); + PING(); + sitter->socket_to_babysitter = -1; + + return TRUE; +} + +/* protect_argv lifted from GLib, relicensed by author, Tor Lillqvist */ +static int +protect_argv (char **argv, + char ***new_argv) +{ + int i; + int argc = 0; + + while (argv[argc]) + ++argc; + *new_argv = dbus_malloc ((argc + 1) * sizeof (char *)); + if (*new_argv == NULL) + return -1; + + for (i = 0; i < argc; i++) + (*new_argv)[i] = NULL; + + /* Quote each argv element if necessary, so that it will get + * reconstructed correctly in the C runtime startup code. Note that + * the unquoting algorithm in the C runtime is really weird, and + * rather different than what Unix shells do. See stdargv.c in the C + * runtime sources (in the Platform SDK, in src/crt). + * + * Note that an new_argv[0] constructed by this function should + * *not* be passed as the filename argument to a spawn* or exec* + * family function. That argument should be the real file name + * without any quoting. + */ + for (i = 0; i < argc; i++) + { + char *p = argv[i]; + char *q; + int len = 0; + int need_dblquotes = FALSE; + while (*p) + { + if (*p == ' ' || *p == '\t') + need_dblquotes = TRUE; + else if (*p == '"') + len++; + else if (*p == '\\') + { + char *pp = p; + while (*pp && *pp == '\\') + pp++; + if (*pp == '"') + len++; + } + len++; + p++; + } + + q = (*new_argv)[i] = dbus_malloc (len + need_dblquotes*2 + 1); + + if (q == NULL) + return -1; + + + p = argv[i]; + + if (need_dblquotes) + *q++ = '"'; + + while (*p) + { + if (*p == '"') + *q++ = '\\'; + else if (*p == '\\') + { + char *pp = p; + while (*pp && *pp == '\\') + pp++; + if (*pp == '"') + *q++ = '\\'; + } + *q++ = *p; + p++; + } + + if (need_dblquotes) + *q++ = '"'; + *q++ = '\0'; + /* printf ("argv[%d]:%s, need_dblquotes:%s len:%d => %s\n", i, argv[i], need_dblquotes?"TRUE":"FALSE", len, (*new_argv)[i]); */ + } + (*new_argv)[argc] = NULL; + + return argc; +} + + +/* From GPGME, relicensed by g10 Code GmbH. */ +static char * +compose_string (char **strings, char separator) +{ + int i; + int n = 0; + char *buf; + char *p; + const char *ptr; + + if (!strings || !strings[0]) + return 0; + for (i = 0; strings[i]; i++) + n += strlen (strings[i]) + 1; + n++; + + buf = p = malloc (n); + if (!buf) + return NULL; + for (i = 0; strings[i]; i++) + { + strcpy (p, strings[i]); + p += strlen (strings[i]); + *(p++) = separator; + } + p--; + *(p++) = '\0'; + *p = '\0'; + + return buf; +} + +static char * +build_commandline (char **argv) +{ + return compose_string (argv, ' '); +} + +static char * +build_env_string (char** envp) +{ + return compose_string (envp, '\0'); +} + +static HANDLE +spawn_program (char* name, char** argv, char** envp) +{ + PROCESS_INFORMATION pi = { NULL, 0, 0, 0 }; + STARTUPINFOA si; + char *arg_string, *env_string; + BOOL result; + +#ifdef DBUS_WINCE + if (argv && argv[0]) + arg_string = build_commandline (argv + 1); + else + arg_string = NULL; +#else + arg_string = build_commandline (argv); +#endif + if (!arg_string) + return INVALID_HANDLE_VALUE; + + env_string = build_env_string(envp); + + memset (&si, 0, sizeof (si)); + si.cb = sizeof (si); +#ifdef DBUS_WINCE + result = CreateProcessA (name, arg_string, NULL, NULL, FALSE, 0, +#else + result = CreateProcessA (NULL, arg_string, NULL, NULL, FALSE, 0, +#endif + (LPVOID)env_string, NULL, &si, &pi); + free (arg_string); + if (env_string) + free (env_string); + + if (!result) + return INVALID_HANDLE_VALUE; + + CloseHandle (pi.hThread); + return pi.hProcess; +} + + +static DWORD __stdcall +babysitter (void *parameter) +{ + DBusBabysitter *sitter = (DBusBabysitter *) parameter; + int fd; + PING(); + _dbus_babysitter_ref (sitter); + + if (sitter->child_setup) + { + PING(); + (*sitter->child_setup) (sitter->user_data); + } + + _dbus_verbose ("babysitter: spawning %s\n", sitter->executable); + + PING(); + sitter->child_handle = spawn_program (sitter->executable, + sitter->argv, sitter->envp); + + PING(); + if (sitter->child_handle == (HANDLE) -1) + { + sitter->child_handle = NULL; + sitter->have_spawn_errno = TRUE; + sitter->spawn_errno = GetLastError(); + } + + PING(); + SetEvent (sitter->start_sync_event); + + if (sitter->child_handle != NULL) + { + int ret; + DWORD status; + + PING(); + WaitForSingleObject (sitter->child_handle, INFINITE); + + PING(); + ret = GetExitCodeProcess (sitter->child_handle, &status); + + sitter->child_status = status; + sitter->have_child_status = TRUE; + + CloseHandle (sitter->child_handle); + sitter->child_handle = NULL; + } + +#ifdef DBUS_BUILD_TESTS + SetEvent (sitter->end_sync_event); +#endif + + PING(); + send (sitter->socket_to_main, " ", 1, 0); + + _dbus_babysitter_unref (sitter); + + return 0; +} + +dbus_bool_t +_dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, + char **argv, + char **envp, + DBusSpawnChildSetupFunc child_setup, + void *user_data, + DBusError *error) +{ + DBusBabysitter *sitter; + HANDLE sitter_thread; + DWORD sitter_thread_id; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + *sitter_p = NULL; + + PING(); + sitter = _dbus_babysitter_new (); + if (sitter == NULL) + { + _DBUS_SET_OOM (error); + return FALSE; + } + + sitter->child_setup = child_setup; + sitter->user_data = user_data; + + sitter->executable = _dbus_strdup (argv[0]); + if (sitter->executable == NULL) + { + _DBUS_SET_OOM (error); + goto out0; + } + + PING(); + if (!_dbus_full_duplex_pipe (&sitter->socket_to_babysitter, + &sitter->socket_to_main, + FALSE, error)) + goto out0; + + sitter->sitter_watch = _dbus_watch_new (sitter->socket_to_babysitter, + DBUS_WATCH_READABLE, + TRUE, handle_watch, sitter, NULL); + PING(); + if (sitter->sitter_watch == NULL) + { + _DBUS_SET_OOM (error); + goto out0; + } + + PING(); + if (!_dbus_watch_list_add_watch (sitter->watches, sitter->sitter_watch)) + { + _DBUS_SET_OOM (error); + goto out0; + } + + sitter->argc = protect_argv (argv, &sitter->argv); + if (sitter->argc == -1) + { + _DBUS_SET_OOM (error); + goto out0; + } + sitter->envp = envp; + + PING(); + sitter_thread = (HANDLE) CreateThread (NULL, 0, babysitter, + sitter, 0, &sitter_thread_id); + + if (sitter_thread == 0) + { + PING(); + dbus_set_error_const (error, DBUS_ERROR_SPAWN_FORK_FAILED, + "Failed to create new thread"); + goto out0; + } + CloseHandle (sitter_thread); + + PING(); + WaitForSingleObject (sitter->start_sync_event, INFINITE); + + PING(); + if (sitter_p != NULL) + *sitter_p = sitter; + else + _dbus_babysitter_unref (sitter); + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + PING(); + return TRUE; + +out0: + _dbus_babysitter_unref (sitter); + + return FALSE; +} + +#ifdef DBUS_BUILD_TESTS + +#define LIVE_CHILDREN(sitter) ((sitter)->child_handle != NULL) + +static void +_dbus_babysitter_block_for_child_exit (DBusBabysitter *sitter) +{ + if (sitter->child_handle == NULL) + return; + + WaitForSingleObject (sitter->end_sync_event, INFINITE); +} + +static dbus_bool_t +check_spawn_nonexistent (void *data) +{ + char *argv[4] = { NULL, NULL, NULL, NULL }; + DBusBabysitter *sitter; + DBusError error; + + sitter = NULL; + + dbus_error_init (&error); + + /*** Test launching nonexistent binary */ + + argv[0] = "/this/does/not/exist/32542sdgafgafdg"; + if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + NULL, NULL, + &error)) + { + _dbus_babysitter_block_for_child_exit (sitter); + _dbus_babysitter_set_child_exit_error (sitter, &error); + } + + if (sitter) + _dbus_babysitter_unref (sitter); + + if (!dbus_error_is_set (&error)) + { + _dbus_warn ("Did not get an error launching nonexistent executable\n"); + return FALSE; + } + + if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) || + dbus_error_has_name (&error, DBUS_ERROR_SPAWN_EXEC_FAILED))) + { + _dbus_warn ("Not expecting error when launching nonexistent executable: %s: %s\n", + error.name, error.message); + dbus_error_free (&error); + return FALSE; + } + + dbus_error_free (&error); + + return TRUE; +} + +static dbus_bool_t +check_spawn_segfault (void *data) +{ + char *argv[4] = { NULL, NULL, NULL, NULL }; + DBusBabysitter *sitter; + DBusError error; + + sitter = NULL; + + dbus_error_init (&error); + + /*** Test launching segfault binary */ + + argv[0] = TEST_SEGFAULT_BINARY; + if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + NULL, NULL, + &error)) + { + _dbus_babysitter_block_for_child_exit (sitter); + _dbus_babysitter_set_child_exit_error (sitter, &error); + } + + if (sitter) + _dbus_babysitter_unref (sitter); + + if (!dbus_error_is_set (&error)) + { + _dbus_warn ("Did not get an error launching segfaulting binary\n"); + return FALSE; + } + + if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) || + dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_EXITED))) + { + _dbus_warn ("Not expecting error when launching segfaulting executable: %s: %s\n", + error.name, error.message); + dbus_error_free (&error); + return FALSE; + } + + dbus_error_free (&error); + + return TRUE; +} + +static dbus_bool_t +check_spawn_exit (void *data) +{ + char *argv[4] = { NULL, NULL, NULL, NULL }; + DBusBabysitter *sitter; + DBusError error; + + sitter = NULL; + + dbus_error_init (&error); + + /*** Test launching exit failure binary */ + + argv[0] = TEST_EXIT_BINARY; + if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + NULL, NULL, + &error)) + { + _dbus_babysitter_block_for_child_exit (sitter); + _dbus_babysitter_set_child_exit_error (sitter, &error); + } + + if (sitter) + _dbus_babysitter_unref (sitter); + + if (!dbus_error_is_set (&error)) + { + _dbus_warn ("Did not get an error launching binary that exited with failure code\n"); + return FALSE; + } + + if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) || + dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_EXITED))) + { + _dbus_warn ("Not expecting error when launching exiting executable: %s: %s\n", + error.name, error.message); + dbus_error_free (&error); + return FALSE; + } + + dbus_error_free (&error); + + return TRUE; +} + +static dbus_bool_t +check_spawn_and_kill (void *data) +{ + char *argv[4] = { NULL, NULL, NULL, NULL }; + DBusBabysitter *sitter; + DBusError error; + + sitter = NULL; + + dbus_error_init (&error); + + /*** Test launching sleeping binary then killing it */ + + argv[0] = TEST_SLEEP_FOREVER_BINARY; + if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + NULL, NULL, + &error)) + { + _dbus_babysitter_kill_child (sitter); + + _dbus_babysitter_block_for_child_exit (sitter); + + _dbus_babysitter_set_child_exit_error (sitter, &error); + } + + if (sitter) + _dbus_babysitter_unref (sitter); + + if (!dbus_error_is_set (&error)) + { + _dbus_warn ("Did not get an error after killing spawned binary\n"); + return FALSE; + } + + if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) || + dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_EXITED))) + { + _dbus_warn ("Not expecting error when killing executable: %s: %s\n", + error.name, error.message); + dbus_error_free (&error); + return FALSE; + } + + dbus_error_free (&error); + + return TRUE; +} + +dbus_bool_t +_dbus_spawn_test (const char *test_data_dir) +{ + if (!_dbus_test_oom_handling ("spawn_nonexistent", + check_spawn_nonexistent, + NULL)) + return FALSE; + + /* Don't run the obnoxious segfault test by default, + * it's a pain to have to click all those error boxes. + */ + if (getenv ("DO_SEGFAULT_TEST")) + if (!_dbus_test_oom_handling ("spawn_segfault", + check_spawn_segfault, + NULL)) + return FALSE; + + if (!_dbus_test_oom_handling ("spawn_exit", + check_spawn_exit, + NULL)) + return FALSE; + + if (!_dbus_test_oom_handling ("spawn_and_kill", + check_spawn_and_kill, + NULL)) + return FALSE; + + return TRUE; +} +#endif diff --git a/dbus/dbus-spawn.c b/dbus/dbus-spawn.c index 91054154..dcd111d9 100644 --- a/dbus/dbus-spawn.c +++ b/dbus/dbus-spawn.c @@ -21,6 +21,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> + #include "dbus-spawn.h" #include "dbus-sysdeps-unix.h" #include "dbus-internals.h" @@ -805,9 +808,25 @@ static dbus_bool_t make_pipe (int p[2], DBusError *error) { + int retval; + +#ifdef HAVE_PIPE2 + dbus_bool_t cloexec_done; + + retval = pipe2 (p, O_CLOEXEC); + cloexec_done = retval >= 0; + + /* Check if kernel seems to be too old to know pipe2(). We assume + that if pipe2 is available, O_CLOEXEC is too. */ + if (retval < 0 && errno == ENOSYS) +#endif + { + retval = pipe(p); + } + _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - if (pipe (p) < 0) + + if (retval < 0) { dbus_set_error (error, DBUS_ERROR_SPAWN_FAILED, @@ -816,6 +835,14 @@ make_pipe (int p[2], return FALSE; } +#ifdef HAVE_PIPE2 + if (!cloexec_done) +#endif + { + _dbus_fd_set_close_on_exec (p[0]); + _dbus_fd_set_close_on_exec (p[1]); + } + return TRUE; } @@ -1052,7 +1079,8 @@ babysit (pid_t grandchild_pid, else if (pfds[1].revents & _DBUS_POLLIN) { char b; - read (sigchld_pipe[READ_END], &b, 1); + if (read (sigchld_pipe[READ_END], &b, 1) == -1) + /* ignore */; /* do waitpid check */ check_babysit_events (grandchild_pid, parent_pipe, 0); } @@ -1117,15 +1145,9 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, if (!make_pipe (child_err_report_pipe, error)) goto cleanup_and_fail; - _dbus_fd_set_close_on_exec (child_err_report_pipe[READ_END]); - _dbus_fd_set_close_on_exec (child_err_report_pipe[WRITE_END]); - if (!_dbus_full_duplex_pipe (&babysitter_pipe[0], &babysitter_pipe[1], TRUE, error)) goto cleanup_and_fail; - _dbus_fd_set_close_on_exec (babysitter_pipe[0]); - _dbus_fd_set_close_on_exec (babysitter_pipe[1]); - /* Setting up the babysitter is only useful in the parent, * but we don't want to run out of memory and fail * after we've already forked, since then we'd leak diff --git a/dbus/dbus-string-private.h b/dbus/dbus-string-private.h index 6687a76f..365d89a3 100644 --- a/dbus/dbus-string-private.h +++ b/dbus/dbus-string-private.h @@ -24,8 +24,6 @@ #ifndef DBUS_STRING_PRIVATE_H #define DBUS_STRING_PRIVATE_H -#include <config.h> - #include <dbus/dbus-memory.h> #include <dbus/dbus-types.h> diff --git a/dbus/dbus-string-util.c b/dbus/dbus-string-util.c index a3e5213e..4d42bb0b 100644 --- a/dbus/dbus-string-util.c +++ b/dbus/dbus-string-util.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-string.h" #define DBUS_CAN_USE_DBUS_STRING_PRIVATE 1 @@ -871,7 +872,71 @@ _dbus_string_test (void) _dbus_string_free (&str); _dbus_string_free (&other); } - + + { + const char upper_string[] = "TOUPPERSTRING"; + const char lower_string[] = "toupperstring"; + const char lower2_string[] = "toupperSTRING"; + + if (!_dbus_string_init (&str)) + _dbus_assert_not_reached ("no memory"); + + if (!_dbus_string_append (&str, upper_string)) + _dbus_assert_not_reached ("no memory"); + + _dbus_string_tolower_ascii (&str, 0, _dbus_string_get_length(&str)); + + if (!_dbus_string_equal_c_str (&str, lower_string)) + _dbus_assert_not_reached ("_dbus_string_tolower_ascii failed"); + + _dbus_string_free (&str); + + if (!_dbus_string_init (&str)) + _dbus_assert_not_reached ("no memory"); + + if (!_dbus_string_append (&str, upper_string)) + _dbus_assert_not_reached ("no memory"); + + _dbus_string_tolower_ascii (&str, 0, 7); + + if (!_dbus_string_equal_c_str (&str, lower2_string)) + _dbus_assert_not_reached ("_dbus_string_tolower_ascii failed in partial conversion"); + + _dbus_string_free (&str); + } + + { + const char lower_string[] = "toupperstring"; + const char upper_string[] = "TOUPPERSTRING"; + const char upper2_string[] = "TOUPPERstring"; + + if (!_dbus_string_init (&str)) + _dbus_assert_not_reached ("no memory"); + + if (!_dbus_string_append (&str, lower_string)) + _dbus_assert_not_reached ("no memory"); + + _dbus_string_toupper_ascii (&str, 0, _dbus_string_get_length(&str)); + + if (!_dbus_string_equal_c_str (&str, upper_string)) + _dbus_assert_not_reached ("_dbus_string_toupper_ascii failed"); + + _dbus_string_free (&str); + + if (!_dbus_string_init (&str)) + _dbus_assert_not_reached ("no memory"); + + if (!_dbus_string_append (&str, lower_string)) + _dbus_assert_not_reached ("no memory"); + + _dbus_string_toupper_ascii (&str, 0, 7); + + if (!_dbus_string_equal_c_str (&str, upper2_string)) + _dbus_assert_not_reached ("_dbus_string_toupper_ascii failed in partial conversion"); + + _dbus_string_free (&str); + } + return TRUE; } diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index 6da46d1a..e2eb93b9 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-string.h" /* we allow a system header here, for speed/convenience */ @@ -2322,7 +2323,6 @@ _dbus_string_equal (const DBusString *a, return TRUE; } -#ifdef DBUS_BUILD_TESTS /** * Tests two DBusString for equality up to the given length. * The strings may be shorter than the given length. @@ -2367,7 +2367,6 @@ _dbus_string_equal_len (const DBusString *a, return TRUE; } -#endif /* DBUS_BUILD_TESTS */ /** * Tests two sub-parts of two DBusString for equality. The specified @@ -2762,6 +2761,68 @@ _dbus_string_validate_ascii (const DBusString *str, } /** + * Converts the given range of the string to lower case. + * + * @param str the string + * @param start first byte index to convert + * @param len number of bytes to convert + */ +void +_dbus_string_tolower_ascii (const DBusString *str, + int start, + int len) +{ + unsigned char *s; + unsigned char *end; + DBUS_STRING_PREAMBLE (str); + _dbus_assert (start >= 0); + _dbus_assert (start <= real->len); + _dbus_assert (len >= 0); + _dbus_assert (len <= real->len - start); + + s = real->str + start; + end = s + len; + + while (s != end) + { + if (*s >= 'A' && *s <= 'Z') + *s += 'a' - 'A'; + ++s; + } +} + +/** + * Converts the given range of the string to upper case. + * + * @param str the string + * @param start first byte index to convert + * @param len number of bytes to convert + */ +void +_dbus_string_toupper_ascii (const DBusString *str, + int start, + int len) +{ + unsigned char *s; + unsigned char *end; + DBUS_STRING_PREAMBLE (str); + _dbus_assert (start >= 0); + _dbus_assert (start <= real->len); + _dbus_assert (len >= 0); + _dbus_assert (len <= real->len - start); + + s = real->str + start; + end = s + len; + + while (s != end) + { + if (*s >= 'a' && *s <= 'z') + *s += 'A' - 'a'; + ++s; + } +} + +/** * Checks that the given range of the string is valid UTF-8. If the * given range is not entirely contained in the string, returns * #FALSE. If the string contains any nul bytes in the given range, diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h index b1850274..2f1ed31c 100644 --- a/dbus/dbus-string.h +++ b/dbus/dbus-string.h @@ -25,11 +25,9 @@ #ifndef DBUS_STRING_H #define DBUS_STRING_H -#include <config.h> - -#include <dbus/dbus-memory.h> +#include <dbus/dbus-macros.h> #include <dbus/dbus-types.h> -#include <dbus/dbus-sysdeps.h> +#include <dbus/dbus-memory.h> #include <stdarg.h> @@ -38,9 +36,16 @@ DBUS_BEGIN_DECLS /** * DBusString object */ + +typedef struct DBusString DBusString; + struct DBusString { +#if defined(DBUS_WIN) && defined(_DEBUG) + const char *dummy1; /**< placeholder */ +#else const void *dummy1; /**< placeholder */ +#endif int dummy2; /**< placeholder */ int dummy3; /**< placeholder */ int dummy4; /**< placeholder */ @@ -281,6 +286,12 @@ dbus_bool_t _dbus_string_hex_decode (const DBusString *source, int *end_return, DBusString *dest, int insert_at); +void _dbus_string_tolower_ascii (const DBusString *str, + int start, + int len); +void _dbus_string_toupper_ascii (const DBusString *str, + int start, + int len); dbus_bool_t _dbus_string_validate_ascii (const DBusString *str, int start, int len); diff --git a/dbus/dbus-sysdeps-pthread.c b/dbus/dbus-sysdeps-pthread.c index 46e4204d..70737512 100644 --- a/dbus/dbus-sysdeps-pthread.c +++ b/dbus/dbus-sysdeps-pthread.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-sysdeps.h" #include "dbus-threads.h" diff --git a/dbus/dbus-sysdeps-thread-win.c b/dbus/dbus-sysdeps-thread-win.c new file mode 100644 index 00000000..ab02950e --- /dev/null +++ b/dbus/dbus-sysdeps-thread-win.c @@ -0,0 +1,277 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps-pthread.c Implements threads using Windows threads (internal to libdbus) + * + * Copyright (C) 2006 Red Hat, Inc. + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-internals.h" +#include "dbus-sysdeps.h" +#include "dbus-sysdeps-win.h" +#include "dbus-threads.h" +#include "dbus-list.h" + +#include <windows.h> + +struct DBusCondVar { + DBusList *list; /**< list thread-local-stored events waiting on the cond variable */ + CRITICAL_SECTION lock; /**< lock protecting the list */ +}; + +static DWORD dbus_cond_event_tls = TLS_OUT_OF_INDEXES; + + +static HMODULE dbus_dll_hmodule; + +void * +_dbus_win_get_dll_hmodule (void) +{ + return dbus_dll_hmodule; +} + +#ifdef DBUS_WINCE +#define hinst_t HANDLE +#else +#define hinst_t HINSTANCE +#endif + +BOOL WINAPI DllMain (hinst_t, DWORD, LPVOID); + +/* We need this to free the TLS events on thread exit */ +BOOL WINAPI +DllMain (hinst_t hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) +{ + HANDLE event; + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + dbus_dll_hmodule = hinstDLL; + break; + case DLL_THREAD_DETACH: + if (dbus_cond_event_tls != TLS_OUT_OF_INDEXES) + { + event = TlsGetValue(dbus_cond_event_tls); + CloseHandle (event); + TlsSetValue(dbus_cond_event_tls, NULL); + } + break; + case DLL_PROCESS_DETACH: + if (dbus_cond_event_tls != TLS_OUT_OF_INDEXES) + { + event = TlsGetValue(dbus_cond_event_tls); + CloseHandle (event); + TlsSetValue(dbus_cond_event_tls, NULL); + + TlsFree(dbus_cond_event_tls); + } + break; + default: + break; + } + return TRUE; +} + +static DBusMutex* +_dbus_windows_mutex_new (void) +{ + HANDLE handle; + handle = CreateMutex (NULL, FALSE, NULL); + return (DBusMutex *) handle; +} + +static void +_dbus_windows_mutex_free (DBusMutex *mutex) +{ + CloseHandle ((HANDLE *) mutex); +} + +static dbus_bool_t +_dbus_windows_mutex_lock (DBusMutex *mutex) +{ + return WaitForSingleObject ((HANDLE *) mutex, INFINITE) != WAIT_FAILED; +} + +static dbus_bool_t +_dbus_windows_mutex_unlock (DBusMutex *mutex) +{ + return ReleaseMutex ((HANDLE *) mutex) != 0; +} + +static DBusCondVar * +_dbus_windows_condvar_new (void) +{ + DBusCondVar *cond; + + cond = dbus_new (DBusCondVar, 1); + if (cond == NULL) + return NULL; + + cond->list = NULL; + + InitializeCriticalSection (&cond->lock); + return (DBusCondVar *) cond; +} + +static void +_dbus_windows_condvar_free (DBusCondVar *cond) +{ + DeleteCriticalSection (&cond->lock); + _dbus_list_clear (&cond->list); + dbus_free (cond); +} + +static dbus_bool_t +_dbus_condvar_wait_win32 (DBusCondVar *cond, + DBusMutex *mutex, + int milliseconds) +{ + DWORD retval; + dbus_bool_t ret; + HANDLE event = TlsGetValue (dbus_cond_event_tls); + + if (!event) + { + event = CreateEvent (0, FALSE, FALSE, NULL); + if (event == 0) + return FALSE; + TlsSetValue (dbus_cond_event_tls, event); + } + + EnterCriticalSection (&cond->lock); + + /* The event must not be signaled. Check this */ + _dbus_assert (WaitForSingleObject (event, 0) == WAIT_TIMEOUT); + + ret = _dbus_list_append (&cond->list, event); + + LeaveCriticalSection (&cond->lock); + + if (!ret) + return FALSE; /* Prepend failed */ + + _dbus_mutex_unlock (mutex); + retval = WaitForSingleObject (event, milliseconds); + _dbus_mutex_lock (mutex); + + if (retval == WAIT_TIMEOUT) + { + EnterCriticalSection (&cond->lock); + _dbus_list_remove (&cond->list, event); + + /* In the meantime we could have been signaled, so we must again + * wait for the signal, this time with no timeout, to reset + * it. retval is set again to honour the late arrival of the + * signal */ + retval = WaitForSingleObject (event, 0); + + LeaveCriticalSection (&cond->lock); + } + +#ifndef DBUS_DISABLE_ASSERT + EnterCriticalSection (&cond->lock); + + /* Now event must not be inside the array, check this */ + _dbus_assert (_dbus_list_remove (&cond->list, event) == FALSE); + + LeaveCriticalSection (&cond->lock); +#endif /* !G_DISABLE_ASSERT */ + + return retval != WAIT_TIMEOUT; +} + +static void +_dbus_windows_condvar_wait (DBusCondVar *cond, + DBusMutex *mutex) +{ + _dbus_condvar_wait_win32 (cond, mutex, INFINITE); +} + +static dbus_bool_t +_dbus_windows_condvar_wait_timeout (DBusCondVar *cond, + DBusMutex *mutex, + int timeout_milliseconds) +{ + return _dbus_condvar_wait_win32 (cond, mutex, timeout_milliseconds); +} + +static void +_dbus_windows_condvar_wake_one (DBusCondVar *cond) +{ + EnterCriticalSection (&cond->lock); + + if (cond->list != NULL) + SetEvent (_dbus_list_pop_first (&cond->list)); + + LeaveCriticalSection (&cond->lock); +} + +static void +_dbus_windows_condvar_wake_all (DBusCondVar *cond) +{ + EnterCriticalSection (&cond->lock); + + while (cond->list != NULL) + SetEvent (_dbus_list_pop_first (&cond->list)); + + LeaveCriticalSection (&cond->lock); +} + +static const DBusThreadFunctions windows_functions = +{ + DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK | + DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK | + DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK | + DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK | + DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK | + DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK | + DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK | + DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK | + DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK| + DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK, + _dbus_windows_mutex_new, + _dbus_windows_mutex_free, + _dbus_windows_mutex_lock, + _dbus_windows_mutex_unlock, + _dbus_windows_condvar_new, + _dbus_windows_condvar_free, + _dbus_windows_condvar_wait, + _dbus_windows_condvar_wait_timeout, + _dbus_windows_condvar_wake_one, + _dbus_windows_condvar_wake_all +}; + +dbus_bool_t +_dbus_threads_init_platform_specific (void) +{ + /* We reuse this over several generations, because we can't + * free the events once they are in use + */ + if (dbus_cond_event_tls == TLS_OUT_OF_INDEXES) + { + dbus_cond_event_tls = TlsAlloc (); + if (dbus_cond_event_tls == TLS_OUT_OF_INDEXES) + return FALSE; + } + + return dbus_threads_init (&windows_functions); +} + diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index ce3475a6..1287f730 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -1,11 +1,11 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* dbus-sysdeps-unix.c Wrappers around UNIX system/libc features (internal to D-Bus implementation) - * + * * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. * Copyright (C) 2003 CodeFactory AB * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,14 +15,14 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ -#define _GNU_SOURCE +#include <config.h> #include "dbus-internals.h" #include "dbus-sysdeps.h" @@ -34,6 +34,7 @@ #include "dbus-userdb.h" #include "dbus-list.h" #include "dbus-credentials.h" +#include "dbus-nonce.h" #include <sys/types.h> #include <stdlib.h> @@ -75,6 +76,8 @@ #include <bsm/adt.h> #endif +#include "sd-daemon.h" + #ifndef O_BINARY #define O_BINARY 0 #endif @@ -94,9 +97,28 @@ _dbus_open_socket (int *fd_p, int protocol, DBusError *error) { - *fd_p = socket (domain, type, protocol); +#ifdef SOCK_CLOEXEC + dbus_bool_t cloexec_done; + + *fd_p = socket (domain, type | SOCK_CLOEXEC, protocol); + cloexec_done = *fd_p >= 0; + + /* Check if kernel seems to be too old to know SOCK_CLOEXEC */ + if (*fd_p < 0 && errno == EINVAL) +#endif + { + *fd_p = socket (domain, type, protocol); + } + if (*fd_p >= 0) { +#ifdef SOCK_CLOEXEC + if (!cloexec_done) +#endif + { + _dbus_fd_set_close_on_exec(*fd_p); + } + _dbus_verbose ("socket fd %d opened\n", *fd_p); return TRUE; } @@ -120,6 +142,9 @@ _dbus_open_tcp_socket (int *fd, /** * Opens a UNIX domain socket (as in the socket() call). * Does not bind the socket. + * + * This will set FD_CLOEXEC for the socket returned + * * @param fd return location for socket descriptor * @param error return location for an error * @returns #FALSE if error is set @@ -139,7 +164,7 @@ _dbus_open_unix_socket (int *fd, * @param error return location for an error * @returns #FALSE if error is set */ -dbus_bool_t +dbus_bool_t _dbus_close_socket (int fd, DBusError *error) { @@ -179,64 +204,265 @@ _dbus_write_socket (int fd, int start, int len) { +#ifdef HAVE_DECL_MSG_NOSIGNAL + const char *data; + int bytes_written; + + data = _dbus_string_get_const_data_len (buffer, start, len); + + again: + + bytes_written = send (fd, data, len, MSG_NOSIGNAL); + + if (bytes_written < 0 && errno == EINTR) + goto again; + + return bytes_written; + +#else return _dbus_write (fd, buffer, start, len); +#endif } /** - * write data to a pipe. + * Like _dbus_read_socket() but also tries to read unix fds from the + * socket. When there are more fds to read than space in the array + * passed this function will fail with ENOSPC. * - * @param pipe the pipe instance - * @param buffer the buffer to write data from - * @param start the first byte in the buffer to write - * @param len the number of bytes to try to write - * @param error error return - * @returns the number of bytes written or -1 on error + * @param fd the socket + * @param buffer string to append data to + * @param count max amount of data to read + * @param fds array to place read file descriptors in + * @param n_fds on input space in fds array, on output how many fds actually got read + * @returns number of bytes appended to string */ int -_dbus_pipe_write (DBusPipe *pipe, - const DBusString *buffer, - int start, - int len, - DBusError *error) -{ - int written; - - written = _dbus_write (pipe->fd_or_handle, buffer, start, len); - if (written < 0) +_dbus_read_socket_with_unix_fds (int fd, + DBusString *buffer, + int count, + int *fds, + int *n_fds) { +#ifndef HAVE_UNIX_FD_PASSING + int r; + + if ((r = _dbus_read_socket(fd, buffer, count)) < 0) + return r; + + *n_fds = 0; + return r; + +#else + int bytes_read; + int start; + struct msghdr m; + struct iovec iov; + + _dbus_assert (count >= 0); + _dbus_assert (*n_fds >= 0); + + start = _dbus_string_get_length (buffer); + + if (!_dbus_string_lengthen (buffer, count)) { - dbus_set_error (error, DBUS_ERROR_FAILED, - "Writing to pipe: %s\n", - _dbus_strerror (errno)); + errno = ENOMEM; + return -1; + } + + _DBUS_ZERO(iov); + iov.iov_base = _dbus_string_get_data_len (buffer, start, count); + iov.iov_len = count; + + _DBUS_ZERO(m); + m.msg_iov = &iov; + m.msg_iovlen = 1; + + /* Hmm, we have no clue how long the control data will actually be + that is queued for us. The least we can do is assume that the + caller knows. Hence let's make space for the number of fds that + we shall read at max plus the cmsg header. */ + m.msg_controllen = CMSG_SPACE(*n_fds * sizeof(int)); + + /* It's probably safe to assume that systems with SCM_RIGHTS also + know alloca() */ + m.msg_control = alloca(m.msg_controllen); + memset(m.msg_control, 0, m.msg_controllen); + + again: + + bytes_read = recvmsg(fd, &m, 0 +#ifdef MSG_CMSG_CLOEXEC + |MSG_CMSG_CLOEXEC +#endif + ); + + if (bytes_read < 0) + { + if (errno == EINTR) + goto again; + else + { + /* put length back (note that this doesn't actually realloc anything) */ + _dbus_string_set_length (buffer, start); + return -1; + } } - return written; + else + { + struct cmsghdr *cm; + dbus_bool_t found = FALSE; + + if (m.msg_flags & MSG_CTRUNC) + { + /* Hmm, apparently the control data was truncated. The bad + thing is that we might have completely lost a couple of fds + without chance to recover them. Hence let's treat this as a + serious error. */ + + errno = ENOSPC; + _dbus_string_set_length (buffer, start); + return -1; + } + + for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) + if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS) + { + unsigned i; + + _dbus_assert(cm->cmsg_len <= CMSG_LEN(*n_fds * sizeof(int))); + *n_fds = (cm->cmsg_len - CMSG_LEN(0)) / sizeof(int); + + memcpy(fds, CMSG_DATA(cm), *n_fds * sizeof(int)); + found = TRUE; + + /* Linux doesn't tell us whether MSG_CMSG_CLOEXEC actually + worked, hence we need to go through this list and set + CLOEXEC everywhere in any case */ + for (i = 0; i < *n_fds; i++) + _dbus_fd_set_close_on_exec(fds[i]); + + break; + } + + if (!found) + *n_fds = 0; + + /* put length back (doesn't actually realloc) */ + _dbus_string_set_length (buffer, start + bytes_read); + +#if 0 + if (bytes_read > 0) + _dbus_verbose_bytes_of_string (buffer, start, bytes_read); +#endif + + return bytes_read; + } +#endif } -/** - * close a pipe. - * - * @param pipe the pipe instance - * @param error return location for an error - * @returns #FALSE if error is set - */ int -_dbus_pipe_close (DBusPipe *pipe, - DBusError *error) -{ - if (_dbus_close (pipe->fd_or_handle, error) < 0) +_dbus_write_socket_with_unix_fds(int fd, + const DBusString *buffer, + int start, + int len, + const int *fds, + int n_fds) { + +#ifndef HAVE_UNIX_FD_PASSING + + if (n_fds > 0) { + errno = ENOTSUP; + return -1; + } + + return _dbus_write_socket(fd, buffer, start, len); +#else + return _dbus_write_socket_with_unix_fds_two(fd, buffer, start, len, NULL, 0, 0, fds, n_fds); +#endif +} + +int +_dbus_write_socket_with_unix_fds_two(int fd, + const DBusString *buffer1, + int start1, + int len1, + const DBusString *buffer2, + int start2, + int len2, + const int *fds, + int n_fds) { + +#ifndef HAVE_UNIX_FD_PASSING + + if (n_fds > 0) { + errno = ENOTSUP; + return -1; + } + + return _dbus_write_socket_two(fd, + buffer1, start1, len1, + buffer2, start2, len2); +#else + + struct msghdr m; + struct cmsghdr *cm; + struct iovec iov[2]; + int bytes_written; + + _dbus_assert (len1 >= 0); + _dbus_assert (len2 >= 0); + _dbus_assert (n_fds >= 0); + + _DBUS_ZERO(iov); + iov[0].iov_base = (char*) _dbus_string_get_const_data_len (buffer1, start1, len1); + iov[0].iov_len = len1; + + if (buffer2) { - return -1; + iov[1].iov_base = (char*) _dbus_string_get_const_data_len (buffer2, start2, len2); + iov[1].iov_len = len2; } - else + + _DBUS_ZERO(m); + m.msg_iov = iov; + m.msg_iovlen = buffer2 ? 2 : 1; + + if (n_fds > 0) { - _dbus_pipe_invalidate (pipe); - return 0; + m.msg_controllen = CMSG_SPACE(n_fds * sizeof(int)); + m.msg_control = alloca(m.msg_controllen); + memset(m.msg_control, 0, m.msg_controllen); + + cm = CMSG_FIRSTHDR(&m); + cm->cmsg_level = SOL_SOCKET; + cm->cmsg_type = SCM_RIGHTS; + cm->cmsg_len = CMSG_LEN(n_fds * sizeof(int)); + memcpy(CMSG_DATA(cm), fds, n_fds * sizeof(int)); } + + again: + + bytes_written = sendmsg (fd, &m, 0 +#ifdef HAVE_DECL_MSG_NOSIGNAL + |MSG_NOSIGNAL +#endif + ); + + if (bytes_written < 0 && errno == EINTR) + goto again; + +#if 0 + if (bytes_written > 0) + _dbus_verbose_bytes_of_string (buffer, start, bytes_written); +#endif + + return bytes_written; +#endif } /** * Like _dbus_write_two() but only works on sockets and is thus * available on Windows. - * + * * @param fd the file descriptor * @param buffer1 first buffer * @param start1 first byte to write in first buffer @@ -255,10 +481,59 @@ _dbus_write_socket_two (int fd, int start2, int len2) { +#ifdef HAVE_DECL_MSG_NOSIGNAL + struct iovec vectors[2]; + const char *data1; + const char *data2; + int bytes_written; + struct msghdr m; + + _dbus_assert (buffer1 != NULL); + _dbus_assert (start1 >= 0); + _dbus_assert (start2 >= 0); + _dbus_assert (len1 >= 0); + _dbus_assert (len2 >= 0); + + data1 = _dbus_string_get_const_data_len (buffer1, start1, len1); + + if (buffer2 != NULL) + data2 = _dbus_string_get_const_data_len (buffer2, start2, len2); + else + { + data2 = NULL; + start2 = 0; + len2 = 0; + } + + vectors[0].iov_base = (char*) data1; + vectors[0].iov_len = len1; + vectors[1].iov_base = (char*) data2; + vectors[1].iov_len = len2; + + _DBUS_ZERO(m); + m.msg_iov = vectors; + m.msg_iovlen = data2 ? 2 : 1; + + again: + + bytes_written = sendmsg (fd, &m, MSG_NOSIGNAL); + + if (bytes_written < 0 && errno == EINTR) + goto again; + + return bytes_written; + +#else return _dbus_write_two (fd, buffer1, start1, len1, buffer2, start2, len2); +#endif } +dbus_bool_t +_dbus_socket_is_invalid (int fd) +{ + return fd < 0 ? TRUE : FALSE; +} /** * Thin wrapper around the read() system call that appends @@ -270,7 +545,7 @@ _dbus_write_socket_two (int fd, * * Unlike _dbus_read_socket(), _dbus_read() is not available * on Windows. - * + * * @param fd the file descriptor to read from * @param buffer the buffer to append data to * @param count the amount of data to read @@ -286,7 +561,7 @@ _dbus_read (int fd, char *data; _dbus_assert (count >= 0); - + start = _dbus_string_get_length (buffer); if (!_dbus_string_lengthen (buffer, count)) @@ -298,7 +573,7 @@ _dbus_read (int fd, data = _dbus_string_get_data_len (buffer, start, count); again: - + bytes_read = read (fd, data, count); if (bytes_read < 0) @@ -321,7 +596,7 @@ _dbus_read (int fd, if (bytes_read > 0) _dbus_verbose_bytes_of_string (buffer, start, bytes_read); #endif - + return bytes_read; } } @@ -329,7 +604,7 @@ _dbus_read (int fd, /** * Thin wrapper around the write() system call that writes a part of a * DBusString and handles EINTR for you. - * + * * @param fd the file descriptor to write * @param buffer the buffer to write data from * @param start the first byte in the buffer to write @@ -344,9 +619,9 @@ _dbus_write (int fd, { const char *data; int bytes_written; - + data = _dbus_string_get_const_data_len (buffer, start, len); - + again: bytes_written = write (fd, data, len); @@ -358,7 +633,7 @@ _dbus_write (int fd, if (bytes_written > 0) _dbus_verbose_bytes_of_string (buffer, start, bytes_written); #endif - + return bytes_written; } @@ -396,7 +671,7 @@ _dbus_write_two (int fd, _dbus_assert (start2 >= 0); _dbus_assert (len1 >= 0); _dbus_assert (len2 >= 0); - + #ifdef HAVE_WRITEV { struct iovec vectors[2]; @@ -414,40 +689,40 @@ _dbus_write_two (int fd, start2 = 0; len2 = 0; } - + vectors[0].iov_base = (char*) data1; vectors[0].iov_len = len1; vectors[1].iov_base = (char*) data2; vectors[1].iov_len = len2; again: - + bytes_written = writev (fd, vectors, data2 ? 2 : 1); if (bytes_written < 0 && errno == EINTR) goto again; - + return bytes_written; } #else /* HAVE_WRITEV */ { int ret1; - + ret1 = _dbus_write (fd, buffer1, start1, len1); if (ret1 == len1 && buffer2 != NULL) { ret2 = _dbus_write (fd, buffer2, start2, len2); if (ret2 < 0) ret2 = 0; /* we can't report an error as the first write was OK */ - + return ret1 + ret2; } else return ret1; } -#endif /* !HAVE_WRITEV */ +#endif /* !HAVE_WRITEV */ } #define _DBUS_MAX_SUN_PATH_LENGTH 99 @@ -469,11 +744,13 @@ _dbus_write_two (int fd, * Creates a socket and connects it to the UNIX domain socket at the * given path. The connection fd is returned, and is set up as * nonblocking. - * + * * Uses abstract sockets instead of filesystem-linked sockets if * requested (it's possible only on Linux; see "man 7 unix" on Linux). * On non-Linux abstract socket usage always fails. * + * This will set FD_CLOEXEC for the socket returned. + * * @param path the path to UNIX domain socket * @param abstract #TRUE to use abstract namespace * @param error return location for error code @@ -486,14 +763,14 @@ _dbus_connect_unix_socket (const char *path, { int fd; size_t path_len; - struct sockaddr_un addr; + struct sockaddr_un addr; _DBUS_ASSERT_ERROR_IS_CLEAR (error); _dbus_verbose ("connecting to unix socket %s abstract=%d\n", path, abstract); - - + + if (!_dbus_open_unix_socket (&fd, error)) { _DBUS_ASSERT_ERROR_IS_SET(error); @@ -518,7 +795,7 @@ _dbus_connect_unix_socket (const char *path, _dbus_close (fd, NULL); return -1; } - + strncpy (&addr.sun_path[1], path, path_len); /* _dbus_verbose_bytes (addr.sun_path, sizeof (addr.sun_path)); */ #else /* HAVE_ABSTRACT_SOCKETS */ @@ -540,9 +817,9 @@ _dbus_connect_unix_socket (const char *path, strncpy (addr.sun_path, path, path_len); } - + if (connect (fd, (struct sockaddr*) &addr, _DBUS_STRUCT_OFFSET (struct sockaddr_un, sun_path) + path_len) < 0) - { + { dbus_set_error (error, _dbus_error_from_errno (errno), "Failed to connect to socket %s: %s", @@ -550,14 +827,14 @@ _dbus_connect_unix_socket (const char *path, _dbus_close (fd, NULL); fd = -1; - + return -1; } if (!_dbus_set_fd_nonblocking (fd, error)) { _DBUS_ASSERT_ERROR_IS_SET (error); - + _dbus_close (fd, NULL); fd = -1; @@ -582,10 +859,10 @@ _dbus_set_local_creds (int fd, dbus_bool_t on) dbus_bool_t retval = TRUE; #if defined(HAVE_CMSGCRED) - /* NOOP just to make sure only one codepath is used + /* NOOP just to make sure only one codepath is used * and to prefer CMSGCRED */ -#elif defined(LOCAL_CREDS) +#elif defined(LOCAL_CREDS) int val = on ? 1 : 0; if (setsockopt (fd, 0, LOCAL_CREDS, &val, sizeof (val)) < 0) { @@ -610,6 +887,8 @@ _dbus_set_local_creds (int fd, dbus_bool_t on) * see "man 7 unix" on Linux). * On non-Linux abstract socket usage always fails. * + * This will set FD_CLOEXEC for the socket returned + * * @param path the socket name * @param abstract #TRUE to use abstract namespace * @param error return location for errors @@ -623,12 +902,13 @@ _dbus_listen_unix_socket (const char *path, int listen_fd; struct sockaddr_un addr; size_t path_len; + unsigned int reuseaddr; _DBUS_ASSERT_ERROR_IS_CLEAR (error); _dbus_verbose ("listening on unix socket %s abstract=%d\n", path, abstract); - + if (!_dbus_open_unix_socket (&listen_fd, error)) { _DBUS_ASSERT_ERROR_IS_SET(error); @@ -639,7 +919,7 @@ _dbus_listen_unix_socket (const char *path, _DBUS_ZERO (addr); addr.sun_family = AF_UNIX; path_len = strlen (path); - + if (abstract) { #ifdef HAVE_ABSTRACT_SOCKETS @@ -656,7 +936,7 @@ _dbus_listen_unix_socket (const char *path, _dbus_close (listen_fd, NULL); return -1; } - + strncpy (&addr.sun_path[1], path, path_len); /* _dbus_verbose_bytes (addr.sun_path, sizeof (addr.sun_path)); */ #else /* HAVE_ABSTRACT_SOCKETS */ @@ -693,10 +973,17 @@ _dbus_listen_unix_socket (const char *path, _dbus_close (listen_fd, NULL); return -1; } - + strncpy (addr.sun_path, path, path_len); } - + + reuseaddr = 1; + if (setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1) + { + _dbus_warn ("Failed to set socket option\"%s\": %s", + path, _dbus_strerror (errno)); + } + if (bind (listen_fd, (struct sockaddr*) &addr, _DBUS_STRUCT_OFFSET (struct sockaddr_un, sun_path) + path_len) < 0) { dbus_set_error (error, _dbus_error_from_errno (errno), @@ -730,22 +1017,123 @@ _dbus_listen_unix_socket (const char *path, _dbus_close (listen_fd, NULL); return -1; } - + /* Try opening up the permissions, but if we can't, just go ahead * and continue, maybe it will be good enough. */ if (!abstract && chmod (path, 0777) < 0) _dbus_warn ("Could not set mode 0777 on socket %s\n", path); - + return listen_fd; } /** - * Creates a socket and connects to a socket at the given host + * Acquires one or more sockets passed in from systemd. The sockets + * are set to be nonblocking. + * + * This will set FD_CLOEXEC for the sockets returned. + * + * @oaram fds the file descriptors + * @param error return location for errors + * @returns the number of file descriptors + */ +int +_dbus_listen_systemd_sockets (int **fds, + DBusError *error) +{ + int r, n; + unsigned fd; + int *new_fds; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + n = sd_listen_fds (TRUE); + if (n < 0) + { + dbus_set_error (error, _dbus_error_from_errno (-n), + "Failed to acquire systemd socket: %s", + _dbus_strerror (-n)); + return -1; + } + + if (n <= 0) + { + dbus_set_error (error, DBUS_ERROR_BAD_ADDRESS, + "No socket received."); + return -1; + } + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) + { + r = sd_is_socket (fd, AF_UNSPEC, SOCK_STREAM, 1); + if (r < 0) + { + dbus_set_error (error, _dbus_error_from_errno (-r), + "Failed to verify systemd socket type: %s", + _dbus_strerror (-r)); + return -1; + } + + if (!r) + { + dbus_set_error (error, DBUS_ERROR_BAD_ADDRESS, + "Passed socket has wrong type."); + return -1; + } + } + + /* OK, the file descriptors are all good, so let's take posession of + them then. */ + + new_fds = dbus_new (int, n); + if (!new_fds) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Failed to allocate file handle array."); + goto fail; + } + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) + { + if (!_dbus_set_local_creds (fd, TRUE)) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to enable LOCAL_CREDS on systemd socket: %s", + _dbus_strerror (errno)); + goto fail; + } + + if (!_dbus_set_fd_nonblocking (fd, error)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + goto fail; + } + + new_fds[fd - SD_LISTEN_FDS_START] = fd; + } + + *fds = new_fds; + return n; + + fail: + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) + { + _dbus_close (fd, NULL); + } + + dbus_free (new_fds); + return -1; +} + +/** + * Creates a socket and connects to a socket at the given host * and port. The connection fd is returned, and is set up as * nonblocking. * + * This will set FD_CLOEXEC for the socket returned + * * @param host the host name to connect to * @param port the port to connect to * @param family the address family to listen on, NULL for all @@ -758,6 +1146,17 @@ _dbus_connect_tcp_socket (const char *host, const char *family, DBusError *error) { + return _dbus_connect_tcp_socket_with_nonce (host, port, family, (const char*)NULL, error); +} + +int +_dbus_connect_tcp_socket_with_nonce (const char *host, + const char *port, + const char *family, + const char *noncefile, + DBusError *error) +{ + int saved_errno = 0; int fd = -1, res; struct addrinfo hints; struct addrinfo *ai, *tmp; @@ -783,7 +1182,7 @@ _dbus_connect_tcp_socket (const char *host, else { dbus_set_error (error, - _dbus_error_from_errno (errno), + DBUS_ERROR_BAD_ADDRESS, "Unknown address family %s", family); return -1; } @@ -814,6 +1213,7 @@ _dbus_connect_tcp_socket (const char *host, if (connect (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) < 0) { + saved_errno = errno; _dbus_close(fd, NULL); fd = -1; tmp = tmp->ai_next; @@ -827,18 +1227,30 @@ _dbus_connect_tcp_socket (const char *host, if (fd == -1) { dbus_set_error (error, - _dbus_error_from_errno (errno), + _dbus_error_from_errno (saved_errno), "Failed to connect to socket \"%s:%s\" %s", - host, port, _dbus_strerror(errno)); + host, port, _dbus_strerror(saved_errno)); return -1; } + if (noncefile != NULL) + { + DBusString noncefileStr; + dbus_bool_t ret; + _dbus_string_init_const (&noncefileStr, noncefile); + ret = _dbus_send_nonce (fd, &noncefileStr, error); + _dbus_string_free (&noncefileStr); - if (!_dbus_set_fd_nonblocking (fd, error)) + if (!ret) { _dbus_close (fd, NULL); - fd = -1; + return -1; + } + } + if (!_dbus_set_fd_nonblocking (fd, error)) + { + _dbus_close (fd, NULL); return -1; } @@ -851,6 +1263,8 @@ _dbus_connect_tcp_socket (const char *host, * a random free port is used and returned in the port parameter. * If inaddr_any is specified, the hostname is ignored. * + * This will set FD_CLOEXEC for the socket returned + * * @param host the host name to listen on * @param port the port to listen on, if zero a free port will be used * @param family the address family to listen on, NULL for all @@ -867,9 +1281,11 @@ _dbus_listen_tcp_socket (const char *host, int **fds_p, DBusError *error) { + int saved_errno; int nlisten_fd = 0, *listen_fd = NULL, res, i; struct addrinfo hints; struct addrinfo *ai, *tmp; + unsigned int reuseaddr; *fds_p = NULL; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -885,7 +1301,7 @@ _dbus_listen_tcp_socket (const char *host, else { dbus_set_error (error, - _dbus_error_from_errno (errno), + DBUS_ERROR_BAD_ADDRESS, "Unknown address family %s", family); return -1; } @@ -915,10 +1331,18 @@ _dbus_listen_tcp_socket (const char *host, } _DBUS_ASSERT_ERROR_IS_CLEAR(error); + reuseaddr = 1; + if (setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(reuseaddr))==-1) + { + _dbus_warn ("Failed to set socket option \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror (errno)); + } + if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) < 0) { + saved_errno = errno; _dbus_close(fd, NULL); - if (errno == EADDRINUSE) + if (saved_errno == EADDRINUSE) { /* Depending on kernel policy, it may or may not be neccessary to bind to both IPv4 & 6 addresses @@ -926,28 +1350,30 @@ _dbus_listen_tcp_socket (const char *host, tmp = tmp->ai_next; continue; } - dbus_set_error (error, _dbus_error_from_errno (errno), + dbus_set_error (error, _dbus_error_from_errno (saved_errno), "Failed to bind socket \"%s:%s\": %s", - host ? host : "*", port, _dbus_strerror (errno)); + host ? host : "*", port, _dbus_strerror (saved_errno)); goto failed; } if (listen (fd, 30 /* backlog */) < 0) { + saved_errno = errno; _dbus_close (fd, NULL); - dbus_set_error (error, _dbus_error_from_errno (errno), + dbus_set_error (error, _dbus_error_from_errno (saved_errno), "Failed to listen on socket \"%s:%s\": %s", - host ? host : "*", port, _dbus_strerror (errno)); + host ? host : "*", port, _dbus_strerror (saved_errno)); goto failed; } newlisten_fd = dbus_realloc(listen_fd, sizeof(int)*(nlisten_fd+1)); if (!newlisten_fd) { + saved_errno = errno; _dbus_close (fd, NULL); - dbus_set_error (error, _dbus_error_from_errno (errno), + dbus_set_error (error, _dbus_error_from_errno (saved_errno), "Failed to allocate file handle array: %s", - _dbus_strerror (errno)); + _dbus_strerror (saved_errno)); goto failed; } listen_fd = newlisten_fd; @@ -1040,7 +1466,7 @@ write_credentials_byte (int server_fd, { int bytes_written; char buf[1] = { '\0' }; -#if defined(HAVE_CMSGCRED) +#if defined(HAVE_CMSGCRED) union { struct cmsghdr hdr; char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; @@ -1050,26 +1476,34 @@ write_credentials_byte (int server_fd, iov.iov_base = buf; iov.iov_len = 1; - memset (&msg, 0, sizeof (msg)); + _DBUS_ZERO(msg); msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = (caddr_t) &cmsg; msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); - memset (&cmsg, 0, sizeof (cmsg)); + _DBUS_ZERO(cmsg); cmsg.hdr.cmsg_len = CMSG_LEN (sizeof (struct cmsgcred)); cmsg.hdr.cmsg_level = SOL_SOCKET; cmsg.hdr.cmsg_type = SCM_CREDS; #endif _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + again: -#if defined(HAVE_CMSGCRED) - bytes_written = sendmsg (server_fd, &msg, 0); +#if defined(HAVE_CMSGCRED) + bytes_written = sendmsg (server_fd, &msg, 0 +#ifdef HAVE_DECL_MSG_NOSIGNAL + |MSG_NOSIGNAL +#endif + ); #else - bytes_written = write (server_fd, buf, 1); + bytes_written = send (server_fd, buf, 1, 0 +#ifdef HAVE_DECL_MSG_NOSIGNAL + |MSG_NOSIGNAL +#endif + ); #endif if (bytes_written < 0 && errno == EINTR) @@ -1106,7 +1540,7 @@ write_credentials_byte (int server_fd, * we got valid credentials. On some systems, such as Linux, * reading/writing the byte isn't actually required, but we do it * anyway just to avoid multiple codepaths. - * + * * Fails if no byte is available, so you must select() first. * * The point of the byte is that on some systems we have to @@ -1128,8 +1562,8 @@ _dbus_read_credentials_socket (int client_fd, dbus_uid_t uid_read; dbus_pid_t pid_read; int bytes_read; - -#ifdef HAVE_CMSGCRED + +#ifdef HAVE_CMSGCRED union { struct cmsghdr hdr; char cred[CMSG_SPACE (sizeof (struct cmsgcred))]; @@ -1146,7 +1580,7 @@ _dbus_read_credentials_socket (int client_fd, pid_read = DBUS_PID_UNSET; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + /* The POSIX spec certainly doesn't promise this, but * we need these assertions to fail as soon as we're wrong about * it so we can do the porting fixups @@ -1166,12 +1600,12 @@ _dbus_read_credentials_socket (int client_fd, iov.iov_base = &buf; iov.iov_len = 1; - memset (&msg, 0, sizeof (msg)); + _DBUS_ZERO(msg); msg.msg_iov = &iov; msg.msg_iovlen = 1; #if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS) - memset (&cmsg, 0, sizeof (cmsg)); + _DBUS_ZERO(cmsg); msg.msg_control = (caddr_t) &cmsg; msg.msg_controllen = CMSG_SPACE (sizeof (struct cmsgcred)); #endif @@ -1188,7 +1622,7 @@ _dbus_read_credentials_socket (int client_fd, * normally only call read_credentials if the socket was ready * for reading */ - + dbus_set_error (error, _dbus_error_from_errno (errno), "Failed to read credentials byte: %s", _dbus_strerror (errno)); @@ -1224,9 +1658,9 @@ _dbus_read_credentials_socket (int client_fd, { #ifdef SO_PEERCRED - struct ucred cr; + struct ucred cr; int cr_len = sizeof (cr); - + if (getsockopt (client_fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) == 0 && cr_len == sizeof (cr)) { @@ -1276,9 +1710,9 @@ _dbus_read_credentials_socket (int client_fd, { _dbus_verbose ("Failed to adt_start_session(): %s\n", _dbus_strerror (errno)); } - else + else { - if (adt_set_from_ucred (adth, ucred, ADT_NEW)) + if (adt_set_from_ucred (adth, ucred, ADT_NEW)) { _dbus_verbose ("Failed to adt_set_from_ucred(): %s\n", _dbus_strerror (errno)); } @@ -1334,7 +1768,7 @@ _dbus_read_credentials_socket (int client_fd, return FALSE; } } - + return TRUE; } @@ -1360,7 +1794,7 @@ _dbus_send_credentials_socket (int server_fd, DBusError *error) { _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + if (write_credentials_byte (server_fd, error)) return TRUE; else @@ -1371,6 +1805,8 @@ _dbus_send_credentials_socket (int server_fd, * Accepts a connection on a listening socket. * Handles EINTR for you. * + * This will enable FD_CLOEXEC for the returned socket. + * * @param listen_fd the listen file descriptor * @returns the connection fd of the client, or -1 on error */ @@ -1380,12 +1816,25 @@ _dbus_accept (int listen_fd) int client_fd; struct sockaddr addr; socklen_t addrlen; +#ifdef HAVE_ACCEPT4 + dbus_bool_t cloexec_done; +#endif addrlen = sizeof (addr); - + retry: - client_fd = accept (listen_fd, &addr, &addrlen); - + +#ifdef HAVE_ACCEPT4 + /* We assume that if accept4 is available SOCK_CLOEXEC is too */ + client_fd = accept4 (listen_fd, &addr, &addrlen, SOCK_CLOEXEC); + cloexec_done = client_fd >= 0; + + if (client_fd < 0 && errno == ENOSYS) +#endif + { + client_fd = accept (listen_fd, &addr, &addrlen); + } + if (client_fd < 0) { if (errno == EINTR) @@ -1393,13 +1842,20 @@ _dbus_accept (int listen_fd) } _dbus_verbose ("client fd %d accepted\n", client_fd); - + +#ifdef HAVE_ACCEPT4 + if (!cloexec_done) +#endif + { + _dbus_fd_set_close_on_exec(client_fd); + } + return client_fd; } /** - * Checks to make sure the given directory is - * private to the user + * Checks to make sure the given directory is + * private to the user * * @param dir the name of the directory * @param error error return @@ -1410,19 +1866,19 @@ _dbus_check_dir_is_private_to_user (DBusString *dir, DBusError *error) { const char *directory; struct stat sb; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + directory = _dbus_string_get_const_data (dir); - + if (stat (directory, &sb) < 0) { dbus_set_error (error, _dbus_error_from_errno (errno), "%s", _dbus_strerror (errno)); - + return FALSE; } - + if ((S_IROTH & sb.st_mode) || (S_IWOTH & sb.st_mode) || (S_IRGRP & sb.st_mode) || (S_IWGRP & sb.st_mode)) { @@ -1430,7 +1886,7 @@ _dbus_check_dir_is_private_to_user (DBusString *dir, DBusError *error) "%s directory is not private to the user", directory); return FALSE; } - + return TRUE; } @@ -1441,12 +1897,12 @@ fill_user_info_from_passwd (struct passwd *p, { _dbus_assert (p->pw_name != NULL); _dbus_assert (p->pw_dir != NULL); - + info->uid = p->pw_uid; info->primary_gid = p->pw_gid; info->username = _dbus_strdup (p->pw_name); info->homedir = _dbus_strdup (p->pw_dir); - + if (info->username == NULL || info->homedir == NULL) { @@ -1464,7 +1920,7 @@ fill_user_info (DBusUserInfo *info, DBusError *error) { const char *username_c; - + /* exactly one of username/uid provided */ _dbus_assert (username != NULL || uid != DBUS_UID_UNSET); _dbus_assert (username == NULL || uid == DBUS_UID_UNSET); @@ -1475,7 +1931,7 @@ fill_user_info (DBusUserInfo *info, info->n_group_ids = 0; info->username = NULL; info->homedir = NULL; - + if (username != NULL) username_c = _dbus_string_get_const_data (username); else @@ -1485,7 +1941,7 @@ fill_user_info (DBusUserInfo *info, * are always symmetrical, if not we have to add more configure * checks */ - + #if defined (HAVE_POSIX_GETPWNAM_R) || defined (HAVE_NONPOSIX_GETPWNAM_R) { struct passwd *p; @@ -1589,7 +2045,7 @@ fill_user_info (DBusUserInfo *info, /* Fill this in so we can use it to get groups */ username_c = info->username; - + #ifdef HAVE_GETGROUPLIST { gid_t *buf; @@ -1605,7 +2061,7 @@ fill_user_info (DBusUserInfo *info, dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); goto failed; } - + if (getgrouplist (username_c, info->primary_gid, buf, &buf_count) < 0) @@ -1622,10 +2078,10 @@ fill_user_info (DBusUserInfo *info, for the "id" command, and it turns out that they use an undocumented library function getgrouplist_2 (!) which is not declared in any header in /usr/include (!!). That did not seem - like the way to go here. + like the way to go here. */ - if (buf_count == initial_buf_count) - { + if (buf_count == initial_buf_count) + { buf_count *= 16; /* Retry with an arbitrarily scaled-up array */ } new = dbus_realloc (buf, buf_count * sizeof (buf[0])); @@ -1635,7 +2091,7 @@ fill_user_info (DBusUserInfo *info, dbus_free (buf); goto failed; } - + buf = new; errno = 0; @@ -1645,7 +2101,7 @@ fill_user_info (DBusUserInfo *info, { _dbus_warn ("It appears that username \"%s\" is in more than %d groups.\nProceeding with just the first %d groups.", username_c, buf_count, buf_count); - } + } else { dbus_set_error (error, @@ -1667,12 +2123,12 @@ fill_user_info (DBusUserInfo *info, dbus_free (buf); goto failed; } - + for (i = 0; i < buf_count; ++i) info->group_ids[i] = buf[i]; info->n_group_ids = buf_count; - + dbus_free (buf); } #else /* HAVE_GETGROUPLIST */ @@ -1692,9 +2148,9 @@ fill_user_info (DBusUserInfo *info, #endif /* HAVE_GETGROUPLIST */ _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + return TRUE; - + failed: _DBUS_ASSERT_ERROR_IS_SET (error); return FALSE; @@ -1767,7 +2223,7 @@ _dbus_credentials_add_from_current_process (DBusCredentials *credentials) * is required, that is done in dbus-auth.c. The username here * need not be anything human-readable, it can be the machine-readable * form i.e. a user id. - * + * * @param str the string to append to * @returns #FALSE on no memory */ @@ -1809,7 +2265,7 @@ _dbus_geteuid (void) /** * The only reason this is separate from _dbus_getpid() is to allow it * on Windows for logging but not for other purposes. - * + * * @returns process ID to put in log messages */ unsigned long @@ -1831,7 +2287,7 @@ _dbus_parse_uid (const DBusString *uid_str, { int end; long val; - + if (_dbus_string_get_length (uid_str) == 0) { _dbus_verbose ("UID string was zero length\n"); @@ -1846,7 +2302,7 @@ _dbus_parse_uid (const DBusString *uid_str, _dbus_verbose ("could not parse string as a UID\n"); return FALSE; } - + if (end != _dbus_string_get_length (uid_str)) { _dbus_verbose ("string contained trailing stuff after UID\n"); @@ -1858,23 +2314,8 @@ _dbus_parse_uid (const DBusString *uid_str, return TRUE; } - +#if !DBUS_USE_SYNC _DBUS_DEFINE_GLOBAL_LOCK (atomic); - -#if DBUS_USE_ATOMIC_INT_486_COND -/* Taken from CVS version 1.7 of glibc's sysdeps/i386/i486/atomicity.h */ -/* Since the asm stuff here is gcc-specific we go ahead and use "inline" also */ -static inline dbus_int32_t -atomic_exchange_and_add (DBusAtomic *atomic, - volatile dbus_int32_t val) -{ - register dbus_int32_t result; - - __asm__ __volatile__ ("lock; xaddl %0,%1" - : "=r" (result), "=m" (atomic->value) - : "0" (val), "m" (atomic->value)); - return result; -} #endif /** @@ -1882,14 +2323,12 @@ atomic_exchange_and_add (DBusAtomic *atomic, * * @param atomic pointer to the integer to increment * @returns the value before incrementing - * - * @todo implement arch-specific faster atomic ops */ dbus_int32_t _dbus_atomic_inc (DBusAtomic *atomic) { -#if DBUS_USE_ATOMIC_INT_486_COND - return atomic_exchange_and_add (atomic, 1); +#if DBUS_USE_SYNC + return __sync_add_and_fetch(&atomic->value, 1)-1; #else dbus_int32_t res; _DBUS_LOCK (atomic); @@ -1905,17 +2344,15 @@ _dbus_atomic_inc (DBusAtomic *atomic) * * @param atomic pointer to the integer to decrement * @returns the value before decrementing - * - * @todo implement arch-specific faster atomic ops */ dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic) { -#if DBUS_USE_ATOMIC_INT_486_COND - return atomic_exchange_and_add (atomic, -1); +#if DBUS_USE_SYNC + return __sync_sub_and_fetch(&atomic->value, 1)+1; #else dbus_int32_t res; - + _DBUS_LOCK (atomic); res = atomic->value; atomic->value -= 1; @@ -1968,7 +2405,7 @@ _dbus_poll (DBusPollFD *fds, _DBUS_STRUCT_OFFSET (struct pollfd, revents)) { return poll ((struct pollfd*) fds, - n_fds, + n_fds, timeout_milliseconds); } else @@ -1986,7 +2423,7 @@ _dbus_poll (DBusPollFD *fds, int i; struct timeval tv; int ready; - + FD_ZERO (&read_set); FD_ZERO (&write_set); FD_ZERO (&err_set); @@ -2005,7 +2442,7 @@ _dbus_poll (DBusPollFD *fds, max_fd = MAX (max_fd, fdp->fd); } - + tv.tv_sec = timeout_milliseconds / 1000; tv.tv_usec = (timeout_milliseconds % 1000) * 1000; @@ -2067,365 +2504,6 @@ _dbus_get_current_time (long *tv_sec, } /** - * Appends the contents of the given file to the string, - * returning error code. At the moment, won't open a file - * more than a megabyte in size. - * - * @param str the string to append to - * @param filename filename to load - * @param error place to set an error - * @returns #FALSE if error was set - */ -dbus_bool_t -_dbus_file_get_contents (DBusString *str, - const DBusString *filename, - DBusError *error) -{ - int fd; - struct stat sb; - int orig_len; - int total; - const char *filename_c; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - filename_c = _dbus_string_get_const_data (filename); - - /* O_BINARY useful on Cygwin */ - fd = open (filename_c, O_RDONLY | O_BINARY); - if (fd < 0) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Failed to open \"%s\": %s", - filename_c, - _dbus_strerror (errno)); - return FALSE; - } - - _dbus_verbose ("file fd %d opened\n", fd); - - if (fstat (fd, &sb) < 0) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Failed to stat \"%s\": %s", - filename_c, - _dbus_strerror (errno)); - - _dbus_verbose ("fstat() failed: %s", - _dbus_strerror (errno)); - - _dbus_close (fd, NULL); - - return FALSE; - } - - if (sb.st_size > _DBUS_ONE_MEGABYTE) - { - dbus_set_error (error, DBUS_ERROR_FAILED, - "File size %lu of \"%s\" is too large.", - (unsigned long) sb.st_size, filename_c); - _dbus_close (fd, NULL); - return FALSE; - } - - total = 0; - orig_len = _dbus_string_get_length (str); - if (sb.st_size > 0 && S_ISREG (sb.st_mode)) - { - int bytes_read; - - while (total < (int) sb.st_size) - { - bytes_read = _dbus_read (fd, str, - sb.st_size - total); - if (bytes_read <= 0) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Error reading \"%s\": %s", - filename_c, - _dbus_strerror (errno)); - - _dbus_verbose ("read() failed: %s", - _dbus_strerror (errno)); - - _dbus_close (fd, NULL); - _dbus_string_set_length (str, orig_len); - return FALSE; - } - else - total += bytes_read; - } - - _dbus_close (fd, NULL); - return TRUE; - } - else if (sb.st_size != 0) - { - _dbus_verbose ("Can only open regular files at the moment.\n"); - dbus_set_error (error, DBUS_ERROR_FAILED, - "\"%s\" is not a regular file", - filename_c); - _dbus_close (fd, NULL); - return FALSE; - } - else - { - _dbus_close (fd, NULL); - return TRUE; - } -} - -/** - * Writes a string out to a file. If the file exists, - * it will be atomically overwritten by the new data. - * - * @param str the string to write out - * @param filename the file to save string to - * @param error error to be filled in on failure - * @returns #FALSE on failure - */ -dbus_bool_t -_dbus_string_save_to_file (const DBusString *str, - const DBusString *filename, - DBusError *error) -{ - int fd; - int bytes_to_write; - const char *filename_c; - DBusString tmp_filename; - const char *tmp_filename_c; - int total; - dbus_bool_t need_unlink; - dbus_bool_t retval; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - fd = -1; - retval = FALSE; - need_unlink = FALSE; - - if (!_dbus_string_init (&tmp_filename)) - { - dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); - return FALSE; - } - - if (!_dbus_string_copy (filename, 0, &tmp_filename, 0)) - { - dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); - _dbus_string_free (&tmp_filename); - return FALSE; - } - - if (!_dbus_string_append (&tmp_filename, ".")) - { - dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); - _dbus_string_free (&tmp_filename); - return FALSE; - } - -#define N_TMP_FILENAME_RANDOM_BYTES 8 - if (!_dbus_generate_random_ascii (&tmp_filename, N_TMP_FILENAME_RANDOM_BYTES)) - { - dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); - _dbus_string_free (&tmp_filename); - return FALSE; - } - - filename_c = _dbus_string_get_const_data (filename); - tmp_filename_c = _dbus_string_get_const_data (&tmp_filename); - - fd = open (tmp_filename_c, O_WRONLY | O_BINARY | O_EXCL | O_CREAT, - 0600); - if (fd < 0) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Could not create %s: %s", tmp_filename_c, - _dbus_strerror (errno)); - goto out; - } - - _dbus_verbose ("tmp file fd %d opened\n", fd); - - need_unlink = TRUE; - - total = 0; - bytes_to_write = _dbus_string_get_length (str); - - while (total < bytes_to_write) - { - int bytes_written; - - bytes_written = _dbus_write (fd, str, total, - bytes_to_write - total); - - if (bytes_written <= 0) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Could not write to %s: %s", tmp_filename_c, - _dbus_strerror (errno)); - - goto out; - } - - total += bytes_written; - } - - if (fsync(fd)) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Could not synchronize file %s: %s", - tmp_filename_c, _dbus_strerror (errno)); - - goto out; - } - - if (!_dbus_close (fd, NULL)) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Could not close file %s: %s", - tmp_filename_c, _dbus_strerror (errno)); - - goto out; - } - - fd = -1; - - if (rename (tmp_filename_c, filename_c) < 0) - { - dbus_set_error (error, _dbus_error_from_errno (errno), - "Could not rename %s to %s: %s", - tmp_filename_c, filename_c, - _dbus_strerror (errno)); - - goto out; - } - - need_unlink = FALSE; - - retval = TRUE; - - out: - /* close first, then unlink, to prevent ".nfs34234235" garbage - * files - */ - - if (fd >= 0) - _dbus_close (fd, NULL); - - if (need_unlink && unlink (tmp_filename_c) < 0) - _dbus_verbose ("Failed to unlink temp file %s: %s\n", - tmp_filename_c, _dbus_strerror (errno)); - - _dbus_string_free (&tmp_filename); - - if (!retval) - _DBUS_ASSERT_ERROR_IS_SET (error); - - return retval; -} - -/** Makes the file readable by every user in the system. - * - * @param filename the filename - * @param error error location - * @returns #TRUE if the file's permissions could be changed. - */ -dbus_bool_t -_dbus_make_file_world_readable(const DBusString *filename, - DBusError *error) -{ - const char *filename_c; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - filename_c = _dbus_string_get_const_data (filename); - if (chmod (filename_c, 0644) == -1) - { - dbus_set_error (error, - DBUS_ERROR_FAILED, - "Could not change permissions of file %s: %s\n", - filename_c, - _dbus_strerror (errno)); - return FALSE; - } - return TRUE; -} - -/** Creates the given file, failing if the file already exists. - * - * @param filename the filename - * @param error error location - * @returns #TRUE if we created the file and it didn't exist - */ -dbus_bool_t -_dbus_create_file_exclusively (const DBusString *filename, - DBusError *error) -{ - int fd; - const char *filename_c; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - filename_c = _dbus_string_get_const_data (filename); - - fd = open (filename_c, O_WRONLY | O_BINARY | O_EXCL | O_CREAT, - 0600); - if (fd < 0) - { - dbus_set_error (error, - DBUS_ERROR_FAILED, - "Could not create file %s: %s\n", - filename_c, - _dbus_strerror (errno)); - return FALSE; - } - - _dbus_verbose ("exclusive file fd %d opened\n", fd); - - if (!_dbus_close (fd, NULL)) - { - dbus_set_error (error, - DBUS_ERROR_FAILED, - "Could not close file %s: %s\n", - filename_c, - _dbus_strerror (errno)); - return FALSE; - } - - return TRUE; -} - -/** - * Deletes the given file. - * - * @param filename the filename - * @param error error location - * - * @returns #TRUE if unlink() succeeded - */ -dbus_bool_t -_dbus_delete_file (const DBusString *filename, - DBusError *error) -{ - const char *filename_c; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - filename_c = _dbus_string_get_const_data (filename); - - if (unlink (filename_c) < 0) - { - dbus_set_error (error, DBUS_ERROR_FAILED, - "Failed to delete file %s: %s\n", - filename_c, _dbus_strerror (errno)); - return FALSE; - } - else - return TRUE; -} - -/** * Creates a directory; succeeds if the directory * is created or already existed. * @@ -2440,14 +2518,14 @@ _dbus_create_directory (const DBusString *filename, const char *filename_c; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + filename_c = _dbus_string_get_const_data (filename); if (mkdir (filename_c, 0700) < 0) { if (errno == EEXIST) return TRUE; - + dbus_set_error (error, DBUS_ERROR_FAILED, "Failed to create directory %s: %s\n", filename_c, _dbus_strerror (errno)); @@ -2477,7 +2555,7 @@ _dbus_concat_dir_and_file (DBusString *dir, if (_dbus_string_get_length (dir) == 0 || _dbus_string_get_length (next_component) == 0) return TRUE; - + dir_ends_in_slash = '/' == _dbus_string_get_byte (dir, _dbus_string_get_length (dir) - 1); @@ -2539,7 +2617,7 @@ _dbus_generate_pseudorandom_bytes (DBusString *str, { int old_len; char *p; - + old_len = _dbus_string_get_length (str); if (!_dbus_string_lengthen (str, n_bytes)) @@ -2572,7 +2650,7 @@ _dbus_generate_random_bytes (DBusString *str, * a DBusError. So we always fall back to pseudorandom * if the I/O fails. */ - + old_len = _dbus_string_get_length (str); fd = -1; @@ -2582,7 +2660,7 @@ _dbus_generate_random_bytes (DBusString *str, return _dbus_generate_pseudorandom_bytes (str, n_bytes); _dbus_verbose ("/dev/urandom fd %d opened\n", fd); - + if (_dbus_read (fd, str, n_bytes) != n_bytes) { _dbus_close (fd, NULL); @@ -2592,9 +2670,9 @@ _dbus_generate_random_bytes (DBusString *str, _dbus_verbose ("Read %d bytes from /dev/urandom\n", n_bytes); - + _dbus_close (fd, NULL); - + return TRUE; } @@ -2621,7 +2699,7 @@ const char* _dbus_strerror (int error_number) { const char *msg; - + msg = strerror (error_number); if (msg == NULL) msg = "unknown"; @@ -2646,17 +2724,17 @@ _dbus_disable_sigpipe (void) * @param fd the file descriptor */ void -_dbus_fd_set_close_on_exec (int fd) +_dbus_fd_set_close_on_exec (intptr_t fd) { int val; - + val = fcntl (fd, F_GETFD, 0); - + if (val < 0) return; val |= FD_CLOEXEC; - + fcntl (fd, F_SETFD, val); } @@ -2672,7 +2750,7 @@ _dbus_close (int fd, DBusError *error) { _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + again: if (close (fd) < 0) { @@ -2688,6 +2766,48 @@ _dbus_close (int fd, } /** + * Duplicates a file descriptor. Makes sure the fd returned is >= 3 + * (i.e. avoids stdin/stdout/stderr). Sets O_CLOEXEC. + * + * @param fd the file descriptor to duplicate + * @returns duplicated file descriptor + * */ +int +_dbus_dup(int fd, + DBusError *error) +{ + int new_fd; + +#ifdef F_DUPFD_CLOEXEC + dbus_bool_t cloexec_done; + + new_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3); + cloexec_done = new_fd >= 0; + + if (new_fd < 0 && errno == EINVAL) +#endif + { + new_fd = fcntl(fd, F_DUPFD, 3); + } + + if (new_fd < 0) { + + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not duplicate fd %d", fd); + return -1; + } + +#ifdef F_DUPFD_CLOEXEC + if (!cloexec_done) +#endif + { + _dbus_fd_set_close_on_exec(new_fd); + } + + return new_fd; +} + +/** * Sets a file descriptor to be nonblocking. * * @param fd the file descriptor. @@ -2701,7 +2821,7 @@ _dbus_set_fd_nonblocking (int fd, int val; _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + val = fcntl (fd, F_GETFL, 0); if (val < 0) { @@ -2734,17 +2854,17 @@ _dbus_set_fd_nonblocking (int fd, */ void _dbus_print_backtrace (void) -{ +{ #if defined (HAVE_BACKTRACE) && defined (DBUS_BUILT_R_DYNAMIC) void *bt[500]; int bt_size; int i; char **syms; - + bt_size = backtrace (bt, 500); syms = backtrace_symbols (bt, bt_size); - + i = 0; while (i < bt_size) { @@ -2766,11 +2886,13 @@ _dbus_print_backtrace (void) * Creates a full-duplex pipe (as in socketpair()). * Sets both ends of the pipe nonblocking. * + * Marks both file descriptors as close-on-exec + * * @todo libdbus only uses this for the debug-pipe server, so in * principle it could be in dbus-sysdeps-util.c, except that * dbus-sysdeps-util.c isn't in libdbus when tests are enabled and the * debug-pipe server is used. - * + * * @param fd1 return location for one end * @param fd2 return location for the other end * @param blocking #TRUE if pipe should be blocking @@ -2785,36 +2907,57 @@ _dbus_full_duplex_pipe (int *fd1, { #ifdef HAVE_SOCKETPAIR int fds[2]; + int retval; - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - if (socketpair (AF_UNIX, SOCK_STREAM, 0, fds) < 0) +#ifdef SOCK_CLOEXEC + dbus_bool_t cloexec_done; + + retval = socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds); + cloexec_done = retval >= 0; + + if (retval < 0 && errno == EINVAL) +#endif + { + retval = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); + } + + if (retval < 0) { dbus_set_error (error, _dbus_error_from_errno (errno), "Could not create full-duplex pipe"); return FALSE; } + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + +#ifdef SOCK_CLOEXEC + if (!cloexec_done) +#endif + { + _dbus_fd_set_close_on_exec (fds[0]); + _dbus_fd_set_close_on_exec (fds[1]); + } + if (!blocking && (!_dbus_set_fd_nonblocking (fds[0], NULL) || !_dbus_set_fd_nonblocking (fds[1], NULL))) { dbus_set_error (error, _dbus_error_from_errno (errno), "Could not set full-duplex pipe nonblocking"); - + _dbus_close (fds[0], NULL); _dbus_close (fds[1], NULL); - + return FALSE; } - + *fd1 = fds[0]; *fd2 = fds[1]; _dbus_verbose ("full-duplex pipe %d <-> %d\n", *fd1, *fd2); - - return TRUE; + + return TRUE; #else _dbus_warn ("_dbus_full_duplex_pipe() not implemented on this OS\n"); dbus_set_error (error, DBUS_ERROR_FAILED, @@ -2840,7 +2983,7 @@ _dbus_printf_string_upper_bound (const char *format, } /** - * Gets the temporary files directory by inspecting the environment variables + * Gets the temporary files directory by inspecting the environment variables * TMPDIR, TMP, and TEMP in that order. If none of those are set "/tmp" is returned * * @returns location of temp directory @@ -2871,9 +3014,9 @@ _dbus_get_tmpdir(void) if (tmpdir == NULL) tmpdir = "/tmp"; } - + _dbus_assert(tmpdir != NULL); - + return tmpdir; } @@ -2913,7 +3056,7 @@ _read_subprocess_line_argv (const char *progpath, dbus_bool_t retval; sigset_t new_set, old_set; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); retval = FALSE; @@ -2924,9 +3067,9 @@ _read_subprocess_line_argv (const char *progpath, sigemptyset (&new_set); sigaddset (&new_set, SIGCHLD); sigprocmask (SIG_BLOCK, &new_set, &old_set); - + orig_len = _dbus_string_get_length (result); - + #define READ_END 0 #define WRITE_END 1 if (pipe (result_pipe) < 0) @@ -2971,7 +3114,7 @@ _read_subprocess_line_argv (const char *progpath, _exit (1); _dbus_verbose ("/dev/null fd %d opened\n", fd); - + /* set-up stdXXX */ close (result_pipe[READ_END]); close (errors_pipe[READ_END]); @@ -3026,7 +3169,7 @@ _read_subprocess_line_argv (const char *progpath, errors_pipe[WRITE_END] = -1; ret = 0; - do + do { ret = _dbus_read (result_pipe[READ_END], result, 1024); } @@ -3066,7 +3209,7 @@ _read_subprocess_line_argv (const char *progpath, } retval = TRUE; - + out: sigprocmask (SIG_SETMASK, &old_set, NULL); @@ -3084,7 +3227,7 @@ _read_subprocess_line_argv (const char *progpath, if (errors_pipe[1] != -1) close (errors_pipe[1]); - return retval; + return retval; } /** @@ -3099,14 +3242,15 @@ _read_subprocess_line_argv (const char *progpath, * @returns #TRUE on success, #FALSE if an error happened */ dbus_bool_t -_dbus_get_autolaunch_address (DBusString *address, +_dbus_get_autolaunch_address (const char *scope, + DBusString *address, DBusError *error) { static char *argv[6]; int i; DBusString uuid; dbus_bool_t retval; - + _DBUS_ASSERT_ERROR_IS_CLEAR (error); retval = FALSE; @@ -3115,13 +3259,13 @@ _dbus_get_autolaunch_address (DBusString *address, _DBUS_SET_OOM (error); return FALSE; } - + if (!_dbus_get_local_machine_uuid_encoded (&uuid)) { _DBUS_SET_OOM (error); goto out; } - + i = 0; argv[i] = "dbus-launch"; ++i; @@ -3179,15 +3323,117 @@ _dbus_read_local_machine_uuid (DBusGUID *machine_id, #define DBUS_UNIX_STANDARD_SYSTEM_SERVICEDIR "/dbus-1/system-services" /** + * quries launchd for a specific env var which holds the socket path. + * @param launchd_env_var the env var to look up + * @param error a DBusError to store the error in case of failure + * @return the value of the env var + */ +dbus_bool_t +_dbus_lookup_launchd_socket (DBusString *socket_path, + const char *launchd_env_var, + DBusError *error) +{ +#ifdef DBUS_ENABLE_LAUNCHD + char *argv[4]; + int i; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + i = 0; + argv[i] = "launchctl"; + ++i; + argv[i] = "getenv"; + ++i; + argv[i] = (char*)launchd_env_var; + ++i; + argv[i] = NULL; + ++i; + + _dbus_assert (i == _DBUS_N_ELEMENTS (argv)); + + if (!_read_subprocess_line_argv(argv[0], TRUE, argv, socket_path, error)) + { + return FALSE; + } + + /* no error, but no result either */ + if (_dbus_string_get_length(socket_path) == 0) + { + return FALSE; + } + + /* strip the carriage-return */ + _dbus_string_shorten(socket_path, 1); + return TRUE; +#else /* DBUS_ENABLE_LAUNCHD */ + dbus_set_error(error, DBUS_ERROR_NOT_SUPPORTED, + "can't lookup socket from launchd; launchd support not compiled in"); + return FALSE; +#endif +} + +static dbus_bool_t +_dbus_lookup_session_address_launchd (DBusString *address, DBusError *error) +{ +#ifdef DBUS_ENABLE_LAUNCHD + dbus_bool_t valid_socket; + DBusString socket_path; + + if (!_dbus_string_init (&socket_path)) + { + _DBUS_SET_OOM (error); + return FALSE; + } + + valid_socket = _dbus_lookup_launchd_socket (&socket_path, "DBUS_LAUNCHD_SESSION_BUS_SOCKET", error); + + if (dbus_error_is_set(error)) + { + _dbus_string_free(&socket_path); + return FALSE; + } + + if (!valid_socket) + { + dbus_set_error(error, "no socket path", + "launchd did not provide a socket path, " + "verify that org.freedesktop.dbus-session.plist is loaded!"); + _dbus_string_free(&socket_path); + return FALSE; + } + if (!_dbus_string_append (address, "unix:path=")) + { + _DBUS_SET_OOM (error); + _dbus_string_free(&socket_path); + return FALSE; + } + if (!_dbus_string_copy (&socket_path, 0, address, + _dbus_string_get_length (address))) + { + _DBUS_SET_OOM (error); + _dbus_string_free(&socket_path); + return FALSE; + } + + _dbus_string_free(&socket_path); + return TRUE; +#else + dbus_set_error(error, DBUS_ERROR_NOT_SUPPORTED, + "can't lookup session address from launchd; launchd support not compiled in"); + return FALSE; +#endif +} + +/** * Determines the address of the session bus by querying a - * platform-specific method. + * platform-specific method. * * The first parameter will be a boolean specifying whether * or not a dynamic session lookup is supported on this platform. - * + * * If supported is TRUE and the return value is #TRUE, the * address will be appended to @p address. - * If a failure happens, returns #FALSE and sets an error in + * If a failure happens, returns #FALSE and sets an error in * @p error. * * If supported is FALSE, ignore the return value. @@ -3202,17 +3448,22 @@ _dbus_lookup_session_address (dbus_bool_t *supported, DBusString *address, DBusError *error) { +#ifdef DBUS_ENABLE_LAUNCHD + *supported = TRUE; + return _dbus_lookup_session_address_launchd (address, error); +#else /* On non-Mac Unix platforms, if the session address isn't already * set in DBUS_SESSION_BUS_ADDRESS environment variable, we punt and - * fall back to the autolaunch: global default; see + * fall back to the autolaunch: global default; see * init_session_address in dbus/dbus-bus.c. */ *supported = FALSE; return TRUE; +#endif } /** - * Returns the standard directories for a session bus to look for service - * activation files + * Returns the standard directories for a session bus to look for service + * activation files * * On UNIX this should be the standard xdg freedesktop.org data directories: * @@ -3224,10 +3475,10 @@ _dbus_lookup_session_address (dbus_bool_t *supported, * DBUS_DATADIR * * @param dirs the directory list we are returning - * @returns #FALSE on OOM + * @returns #FALSE on OOM */ -dbus_bool_t +dbus_bool_t _dbus_get_standard_session_servicedirs (DBusList **dirs) { const char *xdg_data_home; @@ -3254,11 +3505,11 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs) goto oom; } - /* + /* * add configured datadir to defaults * this may be the same as an xdg dir - * however the config parser should take - * care of duplicates + * however the config parser should take + * care of duplicates */ if (!_dbus_string_append (&servicedir_path, DBUS_DATADIR":")) goto oom; @@ -3275,7 +3526,7 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs) if (!_dbus_homedir_from_current_process (&homedir)) goto oom; - + if (!_dbus_string_append (&servicedir_path, _dbus_string_get_const_data (homedir))) goto oom; @@ -3284,12 +3535,12 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs) goto oom; } - if (!_dbus_split_paths_and_append (&servicedir_path, - DBUS_UNIX_STANDARD_SESSION_SERVICEDIR, + if (!_dbus_split_paths_and_append (&servicedir_path, + DBUS_UNIX_STANDARD_SESSION_SERVICEDIR, dirs)) goto oom; - _dbus_string_free (&servicedir_path); + _dbus_string_free (&servicedir_path); return TRUE; oom: @@ -3299,8 +3550,8 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs) /** - * Returns the standard directories for a system bus to look for service - * activation files + * Returns the standard directories for a system bus to look for service + * activation files * * On UNIX this should be the standard xdg freedesktop.org data directories: * @@ -3313,10 +3564,10 @@ _dbus_get_standard_session_servicedirs (DBusList **dirs) * On Windows there is no system bus and this function can return nothing. * * @param dirs the directory list we are returning - * @returns #FALSE on OOM + * @returns #FALSE on OOM */ -dbus_bool_t +dbus_bool_t _dbus_get_standard_system_servicedirs (DBusList **dirs) { const char *xdg_data_dirs; @@ -3341,21 +3592,21 @@ _dbus_get_standard_system_servicedirs (DBusList **dirs) goto oom; } - /* + /* * add configured datadir to defaults * this may be the same as an xdg dir - * however the config parser should take - * care of duplicates + * however the config parser should take + * care of duplicates */ if (!_dbus_string_append (&servicedir_path, DBUS_DATADIR":")) goto oom; - if (!_dbus_split_paths_and_append (&servicedir_path, - DBUS_UNIX_STANDARD_SYSTEM_SERVICEDIR, + if (!_dbus_split_paths_and_append (&servicedir_path, + DBUS_UNIX_STANDARD_SYSTEM_SERVICEDIR, dirs)) goto oom; - _dbus_string_free (&servicedir_path); + _dbus_string_free (&servicedir_path); return TRUE; oom: @@ -3367,7 +3618,7 @@ _dbus_get_standard_system_servicedirs (DBusList **dirs) * Append the absolute path of the system.conf file * (there is no system bus on Windows so this can just * return FALSE and print a warning or something) - * + * * @param str the string to append to * @returns #FALSE if no memory */ @@ -3379,7 +3630,7 @@ _dbus_append_system_config_file (DBusString *str) /** * Append the absolute path of the session.conf file. - * + * * @param str the string to append to * @returns #FALSE if no memory */ @@ -3394,7 +3645,7 @@ _dbus_append_session_config_file (DBusString *str) * caches should be nuked. Of course any caches that need explicit reload * are probably broken, but c'est la vie. * - * + * */ void _dbus_flush_caches (void) @@ -3409,10 +3660,10 @@ _dbus_flush_caches (void) * * On UNIX the directory is ~/.dbus-keyrings while on Windows it should probably * be something else, since the dotfile convention is not normal on Windows. - * + * * @param directory string to append directory to * @param credentials credentials the directory should be for - * + * * @returns #FALSE on no memory */ dbus_bool_t @@ -3422,10 +3673,10 @@ _dbus_append_keyring_directory_for_credentials (DBusString *directory, DBusString homedir; DBusString dotdir; dbus_uid_t uid; - + _dbus_assert (credentials != NULL); _dbus_assert (!_dbus_credentials_are_anonymous (credentials)); - + if (!_dbus_string_init (&homedir)) return FALSE; @@ -3434,11 +3685,11 @@ _dbus_append_keyring_directory_for_credentials (DBusString *directory, if (!_dbus_homedir_from_uid (uid, &homedir)) goto failed; - + #ifdef DBUS_BUILD_TESTS { const char *override; - + override = _dbus_getenv ("DBUS_TEST_HOMEDIR"); if (override != NULL && *override != '\0') { @@ -3465,7 +3716,7 @@ _dbus_append_keyring_directory_for_credentials (DBusString *directory, if (!_dbus_concat_dir_and_file (&homedir, &dotdir)) goto failed; - + if (!_dbus_string_copy (&homedir, 0, directory, _dbus_string_get_length (directory))) { goto failed; @@ -3473,12 +3724,26 @@ _dbus_append_keyring_directory_for_credentials (DBusString *directory, _dbus_string_free (&homedir); return TRUE; - - failed: + + failed: _dbus_string_free (&homedir); return FALSE; } +//PENDING(kdab) docs +dbus_bool_t +_dbus_daemon_publish_session_bus_address (const char* addr, + const char *scope) +{ + return TRUE; +} + +//PENDING(kdab) docs +void +_dbus_daemon_unpublish_session_bus_address (void) +{ + +} /** * See if errno is EAGAIN or EWOULDBLOCK (this has to be done differently @@ -3492,4 +3757,78 @@ _dbus_get_is_errno_eagain_or_ewouldblock (void) return errno == EAGAIN || errno == EWOULDBLOCK; } +/** + * Removes a directory; Directory must be empty + * + * @param filename directory filename + * @param error initialized error object + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_delete_directory (const DBusString *filename, + DBusError *error) +{ + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + if (rmdir (filename_c) != 0) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Failed to remove directory %s: %s\n", + filename_c, _dbus_strerror (errno)); + return FALSE; + } + + return TRUE; +} + +/** + * Checks whether file descriptors may be passed via the socket + * + * @param fd the socket + * @return TRUE when fd passing over this socket is supported + * + */ +dbus_bool_t +_dbus_socket_can_pass_unix_fd(int fd) { + +#ifdef SCM_RIGHTS + union { + struct sockaddr sa; + struct sockaddr_storage storage; + struct sockaddr_un un; + } sa_buf; + + socklen_t sa_len = sizeof(sa_buf); + + _DBUS_ZERO(sa_buf); + + if (getsockname(fd, &sa_buf.sa, &sa_len) < 0) + return FALSE; + + return sa_buf.sa.sa_family == AF_UNIX; + +#else + return FALSE; + +#endif +} + + +/* + * replaces the term DBUS_PREFIX in configure_time_path by the + * current dbus installation directory. On unix this function is a noop + * + * @param configure_time_path + * @return real path + */ +const char * +_dbus_replace_install_prefix (const char *configure_time_path) +{ + return configure_time_path; +} + /* tests in dbus-sysdeps-util.c */ diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h index ecd20f67..d7022b07 100644 --- a/dbus/dbus-sysdeps-unix.h +++ b/dbus/dbus-sysdeps-unix.h @@ -1,11 +1,11 @@ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* dbus-sysdeps-unix.h UNIX-specific wrappers around system/libc features (internal to D-Bus implementation) - * + * * Copyright (C) 2002, 2003, 2006 Red Hat, Inc. * Copyright (C) 2003 CodeFactory AB * * Licensed under the Academic Free License version 2.1 - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,7 +15,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -25,7 +25,6 @@ #ifndef DBUS_SYSDEPS_UNIX_H #define DBUS_SYSDEPS_UNIX_H -#include <config.h> #include <dbus/dbus-sysdeps.h> #ifdef DBUS_WIN @@ -41,19 +40,21 @@ DBUS_BEGIN_DECLS * @{ */ -dbus_bool_t +dbus_bool_t _dbus_close (int fd, DBusError *error); -int +int _dbus_dup (int fd, + DBusError *error); +int _dbus_read (int fd, DBusString *buffer, int count); -int +int _dbus_write (int fd, const DBusString *buffer, int start, int len); -int +int _dbus_write_two (int fd, const DBusString *buffer1, int start1, @@ -71,12 +72,19 @@ int _dbus_listen_unix_socket (const char *path, dbus_bool_t abstract, DBusError *error); +int _dbus_listen_systemd_sockets (int **fd, + DBusError *error); + dbus_bool_t _dbus_read_credentials (int client_fd, DBusCredentials *credentials, DBusError *error); dbus_bool_t _dbus_send_credentials (int server_fd, DBusError *error); +dbus_bool_t _dbus_lookup_launchd_socket (DBusString *socket_path, + const char *launchd_env_var, + DBusError *error); + /** Information about a UNIX user */ typedef struct DBusUserInfo DBusUserInfo; /** Information about a UNIX group */ diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index 93ad253e..5904950d 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -21,9 +21,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-sysdeps.h" #include "dbus-sysdeps-unix.h" #include "dbus-internals.h" +#include "dbus-pipe.h" #include "dbus-protocol.h" #include "dbus-string.h" #define DBUS_USERDB_INCLUDES_PRIVATE 1 @@ -248,7 +251,8 @@ _dbus_write_pid_to_file_and_pipe (const DBusString *pidfile, DBusString pid; int bytes; - _dbus_verbose ("writing our pid to pipe %d\n", print_pid_pipe->fd_or_handle); + _dbus_verbose ("writing our pid to pipe %"PRIuPTR"\n", + print_pid_pipe->fd_or_handle); if (!_dbus_string_init (&pid)) { @@ -419,7 +423,7 @@ _dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list args } vsyslog (flags, msg, args); - + if (severity == DBUS_SYSTEM_LOG_FATAL) exit (1); } @@ -443,35 +447,6 @@ _dbus_set_signal_handler (int sig, sigaction (sig, &act, NULL); } - -/** - * Removes a directory; Directory must be empty - * - * @param filename directory filename - * @param error initialized error object - * @returns #TRUE on success - */ -dbus_bool_t -_dbus_delete_directory (const DBusString *filename, - DBusError *error) -{ - const char *filename_c; - - _DBUS_ASSERT_ERROR_IS_CLEAR (error); - - filename_c = _dbus_string_get_const_data (filename); - - if (rmdir (filename_c) != 0) - { - dbus_set_error (error, DBUS_ERROR_FAILED, - "Failed to remove directory %s: %s\n", - filename_c, _dbus_strerror (errno)); - return FALSE; - } - - return TRUE; -} - /** Checks if a file exists * * @param file full path to the file @@ -1076,7 +1051,7 @@ _dbus_string_get_dirname (const DBusString *filename, static void string_squash_nonprintable (DBusString *str) { - char *buf; + unsigned char *buf; int i, len; buf = _dbus_string_get_data (str); @@ -1172,4 +1147,3 @@ fail: _dbus_string_free (&path); return FALSE; } - diff --git a/dbus/dbus-sysdeps-util-win.c b/dbus/dbus-sysdeps-util-win.c new file mode 100644 index 00000000..2f214092 --- /dev/null +++ b/dbus/dbus-sysdeps-util-win.c @@ -0,0 +1,1544 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps-util.c Would be in dbus-sysdeps.c, but not used in libdbus + * + * Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> + +#define STRSAFE_NO_DEPRECATE + +#include "dbus-sysdeps.h" +#include "dbus-internals.h" +#include "dbus-protocol.h" +#include "dbus-string.h" +#include "dbus-sysdeps.h" +#include "dbus-sysdeps-win.h" +#include "dbus-sockets-win.h" +#include "dbus-memory.h" +#include "dbus-pipe.h" + +#include <stdio.h> +#include <stdlib.h> +#if HAVE_ERRNO_H +#include <errno.h> +#endif +#include <winsock2.h> // WSA error codes + +#ifndef DBUS_WINCE +#include <io.h> +#include <lm.h> +#include <sys/stat.h> +#endif + + +/** + * Does the chdir, fork, setsid, etc. to become a daemon process. + * + * @param pidfile #NULL, or pidfile to create + * @param print_pid_fd file descriptor to print daemon's pid to, or -1 for none + * @param error return location for errors + * @param keep_umask #TRUE to keep the original umask + * @returns #FALSE on failure + */ +dbus_bool_t +_dbus_become_daemon (const DBusString *pidfile, + DBusPipe *print_pid_pipe, + DBusError *error, + dbus_bool_t keep_umask) +{ + return TRUE; +} + +/** + * Creates a file containing the process ID. + * + * @param filename the filename to write to + * @param pid our process ID + * @param error return location for errors + * @returns #FALSE on failure + */ +static dbus_bool_t +_dbus_write_pid_file (const DBusString *filename, + unsigned long pid, + DBusError *error) +{ + const char *cfilename; + HANDLE hnd; + char pidstr[20]; + int total; + int bytes_to_write; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + cfilename = _dbus_string_get_const_data (filename); + + hnd = CreateFileA (cfilename, GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, + INVALID_HANDLE_VALUE); + if (hnd == INVALID_HANDLE_VALUE) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not create PID file %s: %s", + cfilename, emsg); + _dbus_win_free_error_string (emsg); + return FALSE; + } + + if (snprintf (pidstr, sizeof (pidstr), "%lu\n", pid) < 0) + { + dbus_set_error (error, _dbus_error_from_system_errno (), + "Failed to format PID for \"%s\": %s", cfilename, + _dbus_strerror_from_errno ()); + CloseHandle (hnd); + return FALSE; + } + + total = 0; + bytes_to_write = strlen (pidstr);; + + while (total < bytes_to_write) + { + DWORD bytes_written; + BOOL res; + + res = WriteFile (hnd, pidstr + total, bytes_to_write - total, + &bytes_written, NULL); + + if (res == 0 || bytes_written <= 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not write to %s: %s", cfilename, emsg); + _dbus_win_free_error_string (emsg); + CloseHandle (hnd); + return FALSE; + } + + total += bytes_written; + } + + if (CloseHandle (hnd) == 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Could not close file %s: %s", + cfilename, emsg); + _dbus_win_free_error_string (emsg); + + return FALSE; + } + + return TRUE; +} + +/** + * Writes the given pid_to_write to a pidfile (if non-NULL) and/or to a + * pipe (if non-NULL). Does nothing if pidfile and print_pid_pipe are both + * NULL. + * + * @param pidfile the file to write to or #NULL + * @param print_pid_pipe the pipe to write to or #NULL + * @param pid_to_write the pid to write out + * @param error error on failure + * @returns FALSE if error is set + */ +dbus_bool_t +_dbus_write_pid_to_file_and_pipe (const DBusString *pidfile, + DBusPipe *print_pid_pipe, + dbus_pid_t pid_to_write, + DBusError *error) +{ + if (pidfile) + { + _dbus_verbose ("writing pid file %s\n", _dbus_string_get_const_data (pidfile)); + if (!_dbus_write_pid_file (pidfile, + pid_to_write, + error)) + { + _dbus_verbose ("pid file write failed\n"); + _DBUS_ASSERT_ERROR_IS_SET(error); + return FALSE; + } + } + else + { + _dbus_verbose ("No pid file requested\n"); + } + + if (print_pid_pipe != NULL && _dbus_pipe_is_valid (print_pid_pipe)) + { + DBusString pid; + int bytes; + + _dbus_verbose ("writing our pid to pipe %d\n", print_pid_pipe->fd_or_handle); + + if (!_dbus_string_init (&pid)) + { + _DBUS_SET_OOM (error); + return FALSE; + } + + if (!_dbus_string_append_int (&pid, pid_to_write) || + !_dbus_string_append (&pid, "\n")) + { + _dbus_string_free (&pid); + _DBUS_SET_OOM (error); + return FALSE; + } + + bytes = _dbus_string_get_length (&pid); + if (_dbus_pipe_write (print_pid_pipe, &pid, 0, bytes, error) != bytes) + { + /* _dbus_pipe_write sets error only on failure, not short write */ + if (error != NULL && !dbus_error_is_set(error)) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Printing message bus PID: did not write enough bytes\n"); + } + _dbus_string_free (&pid); + return FALSE; + } + + _dbus_string_free (&pid); + } + else + { + _dbus_verbose ("No pid pipe to write to\n"); + } + + return TRUE; +} + +/** + * Verify that after the fork we can successfully change to this user. + * + * @param user the username given in the daemon configuration + * @returns #TRUE if username is valid + */ +dbus_bool_t +_dbus_verify_daemon_user (const char *user) +{ + return TRUE; +} + +/** + * Changes the user and group the bus is running as. + * + * @param user the user to become + * @param error return location for errors + * @returns #FALSE on failure + */ +dbus_bool_t +_dbus_change_to_daemon_user (const char *user, + DBusError *error) +{ + return TRUE; +} + +void +_dbus_init_system_log (void) +{ + // FIXME! +} + +/** + * Log a message to the system log file (e.g. syslog on Unix). + * + * @param severity a severity value + * @param msg a printf-style format string + * @param args arguments for the format string + * + */ +void +_dbus_system_log (DBusSystemLogSeverity severity, const char *msg, ...) +{ + va_list args; + + va_start (args, msg); + + _dbus_system_logv (severity, msg, args); + + va_end (args); +} + +/** + * Log a message to the system log file (e.g. syslog on Unix). + * + * @param severity a severity value + * @param msg a printf-style format string + * @param args arguments for the format string + * + * If the FATAL severity is given, this function will terminate the program + * with an error code. + */ +void +_dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list args) +{ + char *s = ""; + char buf[1024]; + + switch(severity) + { + case DBUS_SYSTEM_LOG_INFO: s = "info"; break; + case DBUS_SYSTEM_LOG_SECURITY: s = "security"; break; + case DBUS_SYSTEM_LOG_FATAL: s = "fatal"; break; + } + + sprintf(buf,"%s%s",s,msg); + vsprintf(buf,buf,args); + OutputDebugStringA(buf); + + if (severity == DBUS_SYSTEM_LOG_FATAL) + exit (1); +} + +/** Installs a signal handler + * + * @param sig the signal to handle + * @param handler the handler + */ +void +_dbus_set_signal_handler (int sig, + DBusSignalHandler handler) +{ + _dbus_verbose ("_dbus_set_signal_handler() has to be implemented\n"); +} + +/** + * stat() wrapper. + * + * @param filename the filename to stat + * @param statbuf the stat info to fill in + * @param error return location for error + * @returns #FALSE if error was set + */ +dbus_bool_t +_dbus_stat(const DBusString *filename, + DBusStat *statbuf, + DBusError *error) +{ + const char *filename_c; + WIN32_FILE_ATTRIBUTE_DATA wfad; + char *lastdot; + DWORD rc; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + if (!GetFileAttributesExA (filename_c, GetFileExInfoStandard, &wfad)) + { + _dbus_win_set_error_from_win_error (error, GetLastError ()); + return FALSE; + } + + if (wfad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + statbuf->mode = _S_IFDIR; + else + statbuf->mode = _S_IFREG; + + statbuf->mode |= _S_IREAD; + if (wfad.dwFileAttributes & FILE_ATTRIBUTE_READONLY) + statbuf->mode |= _S_IWRITE; + + lastdot = strrchr (filename_c, '.'); + if (lastdot && stricmp (lastdot, ".exe") == 0) + statbuf->mode |= _S_IEXEC; + + statbuf->mode |= (statbuf->mode & 0700) >> 3; + statbuf->mode |= (statbuf->mode & 0700) >> 6; + + statbuf->nlink = 1; + +#ifdef ENABLE_UID_TO_SID + { + PSID owner_sid, group_sid; + PSECURITY_DESCRIPTOR sd; + + sd = NULL; + rc = GetNamedSecurityInfo ((char *) filename_c, SE_FILE_OBJECT, + OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION, + &owner_sid, &group_sid, + NULL, NULL, + &sd); + if (rc != ERROR_SUCCESS) + { + _dbus_win_set_error_from_win_error (error, rc); + if (sd != NULL) + LocalFree (sd); + return FALSE; + } + + /* FIXME */ + statbuf->uid = _dbus_win_sid_to_uid_t (owner_sid); + statbuf->gid = _dbus_win_sid_to_uid_t (group_sid); + + LocalFree (sd); + } +#else + statbuf->uid = DBUS_UID_UNSET; + statbuf->gid = DBUS_GID_UNSET; +#endif + + statbuf->size = ((dbus_int64_t) wfad.nFileSizeHigh << 32) + wfad.nFileSizeLow; + + statbuf->atime = + (((dbus_int64_t) wfad.ftLastAccessTime.dwHighDateTime << 32) + + wfad.ftLastAccessTime.dwLowDateTime) / 10000000 - DBUS_INT64_CONSTANT (116444736000000000); + + statbuf->mtime = + (((dbus_int64_t) wfad.ftLastWriteTime.dwHighDateTime << 32) + + wfad.ftLastWriteTime.dwLowDateTime) / 10000000 - DBUS_INT64_CONSTANT (116444736000000000); + + statbuf->ctime = + (((dbus_int64_t) wfad.ftCreationTime.dwHighDateTime << 32) + + wfad.ftCreationTime.dwLowDateTime) / 10000000 - DBUS_INT64_CONSTANT (116444736000000000); + + return TRUE; +} + + +/* This file is part of the KDE project +Copyright (C) 2000 Werner Almesberger + +libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir + +This program 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 program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public License +along with this program; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. +*/ +#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */ +#define HAVE_DD_LOCK /* have locking mechanism */ + +#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */ + +#define __dirfd(dir) (dir)->dd_fd + +/* struct dirent - same as Unix */ +struct dirent + { + long d_ino; /* inode (always 1 in WIN32) */ + off_t d_off; /* offset to this dirent */ + unsigned short d_reclen; /* length of d_name */ + char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ + }; + +/* typedef DIR - not the same as Unix */ +typedef struct + { + HANDLE handle; /* FindFirst/FindNext handle */ + short offset; /* offset into directory */ + short finished; /* 1 if there are not more files */ + WIN32_FIND_DATAA fileinfo; /* from FindFirst/FindNext */ + char *dir; /* the dir we are reading */ + struct dirent dent; /* the dirent to return */ + } +DIR; + +/********************************************************************** +* Implement dirent-style opendir/readdir/closedir on Window 95/NT +* +* Functions defined are opendir(), readdir() and closedir() with the +* same prototypes as the normal dirent.h implementation. +* +* Does not implement telldir(), seekdir(), rewinddir() or scandir(). +* The dirent struct is compatible with Unix, except that d_ino is +* always 1 and d_off is made up as we go along. +* +* Error codes are not available with errno but GetLastError. +* +* The DIR typedef is not compatible with Unix. +**********************************************************************/ + +static DIR * _dbus_opendir(const char *dir) +{ + DIR *dp; + char *filespec; + HANDLE handle; + int index; + + filespec = malloc(strlen(dir) + 2 + 1); + strcpy(filespec, dir); + index = strlen(filespec) - 1; + if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\')) + filespec[index] = '\0'; + strcat(filespec, "\\*"); + + dp = (DIR *)malloc(sizeof(DIR)); + dp->offset = 0; + dp->finished = 0; + dp->dir = strdup(dir); + + handle = FindFirstFileA(filespec, &(dp->fileinfo)); + if (handle == INVALID_HANDLE_VALUE) + { + if (GetLastError() == ERROR_NO_MORE_FILES) + dp->finished = 1; + else + return NULL; + } + + dp->handle = handle; + free(filespec); + + return dp; +} + +static struct dirent * _dbus_readdir(DIR *dp) +{ + int saved_err = GetLastError(); + + if (!dp || dp->finished) + return NULL; + + if (dp->offset != 0) + { + if (FindNextFileA(dp->handle, &(dp->fileinfo)) == 0) + { + if (GetLastError() == ERROR_NO_MORE_FILES) + { + SetLastError(saved_err); + dp->finished = 1; + } + return NULL; + } + } + dp->offset++; + + strncpy(dp->dent.d_name, dp->fileinfo.cFileName, _MAX_FNAME); + dp->dent.d_ino = 1; + dp->dent.d_reclen = strlen(dp->dent.d_name); + dp->dent.d_off = dp->offset; + + return &(dp->dent); +} + + +static int _dbus_closedir(DIR *dp) +{ + if (!dp) + return 0; + FindClose(dp->handle); + if (dp->dir) + free(dp->dir); + if (dp) + free(dp); + + return 0; +} + + +/** + * Internals of directory iterator + */ +struct DBusDirIter + { + DIR *d; /**< The DIR* from opendir() */ + + }; + +/** + * Open a directory to iterate over. + * + * @param filename the directory name + * @param error exception return object or #NULL + * @returns new iterator, or #NULL on error + */ +DBusDirIter* +_dbus_directory_open (const DBusString *filename, + DBusError *error) +{ + DIR *d; + DBusDirIter *iter; + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + d = _dbus_opendir (filename_c); + if (d == NULL) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to read directory \"%s\": %s", + filename_c, emsg); + _dbus_win_free_error_string (emsg); + return NULL; + } + iter = dbus_new0 (DBusDirIter, 1); + if (iter == NULL) + { + _dbus_closedir (d); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Could not allocate memory for directory iterator"); + return NULL; + } + + iter->d = d; + + return iter; +} + +/** + * Get next file in the directory. Will not return "." or ".." on + * UNIX. If an error occurs, the contents of "filename" are + * undefined. The error is never set if the function succeeds. + * + * @todo for thread safety, I think we have to use + * readdir_r(). (GLib has the same issue, should file a bug.) + * + * @param iter the iterator + * @param filename string to be set to the next file in the dir + * @param error return location for error + * @returns #TRUE if filename was filled in with a new filename + */ +dbus_bool_t +_dbus_directory_get_next_file (DBusDirIter *iter, + DBusString *filename, + DBusError *error) +{ + struct dirent *ent; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + +again: + SetLastError (0); + ent = _dbus_readdir (iter->d); + if (ent == NULL) + { + if (GetLastError() != 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to get next in directory: %s", emsg); + _dbus_win_free_error_string (emsg); + } + return FALSE; + } + else if (ent->d_name[0] == '.' && + (ent->d_name[1] == '\0' || + (ent->d_name[1] == '.' && ent->d_name[2] == '\0'))) + goto again; + else + { + _dbus_string_set_length (filename, 0); + if (!_dbus_string_append (filename, ent->d_name)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "No memory to read directory entry"); + return FALSE; + } + else + return TRUE; + } +} + +/** + * Closes a directory iteration. + */ +void +_dbus_directory_close (DBusDirIter *iter) +{ + _dbus_closedir (iter->d); + dbus_free (iter); +} + +/** + * Checks whether the filename is an absolute path + * + * @param filename the filename + * @returns #TRUE if an absolute path + */ +dbus_bool_t +_dbus_path_is_absolute (const DBusString *filename) +{ + if (_dbus_string_get_length (filename) > 0) + return _dbus_string_get_byte (filename, 1) == ':' + || _dbus_string_get_byte (filename, 0) == '\\' + || _dbus_string_get_byte (filename, 0) == '/'; + else + return FALSE; +} + +/** @} */ /* End of DBusInternalsUtils functions */ + +/** + * @addtogroup DBusString + * + * @{ + */ +/** + * Get the directory name from a complete filename + * @param filename the filename + * @param dirname string to append directory name to + * @returns #FALSE if no memory + */ +dbus_bool_t +_dbus_string_get_dirname(const DBusString *filename, + DBusString *dirname) +{ + int sep; + + _dbus_assert (filename != dirname); + _dbus_assert (filename != NULL); + _dbus_assert (dirname != NULL); + + /* Ignore any separators on the end */ + sep = _dbus_string_get_length (filename); + if (sep == 0) + return _dbus_string_append (dirname, "."); /* empty string passed in */ + + while (sep > 0 && + (_dbus_string_get_byte (filename, sep - 1) == '/' || + _dbus_string_get_byte (filename, sep - 1) == '\\')) + --sep; + + _dbus_assert (sep >= 0); + + if (sep == 0 || + (sep == 2 && + _dbus_string_get_byte (filename, 1) == ':' && + isalpha (_dbus_string_get_byte (filename, 0)))) + return _dbus_string_copy_len (filename, 0, sep + 1, + dirname, _dbus_string_get_length (dirname)); + + { + int sep1, sep2; + _dbus_string_find_byte_backward (filename, sep, '/', &sep1); + _dbus_string_find_byte_backward (filename, sep, '\\', &sep2); + + sep = MAX (sep1, sep2); + } + if (sep < 0) + return _dbus_string_append (dirname, "."); + + while (sep > 0 && + (_dbus_string_get_byte (filename, sep - 1) == '/' || + _dbus_string_get_byte (filename, sep - 1) == '\\')) + --sep; + + _dbus_assert (sep >= 0); + + if ((sep == 0 || + (sep == 2 && + _dbus_string_get_byte (filename, 1) == ':' && + isalpha (_dbus_string_get_byte (filename, 0)))) + && + (_dbus_string_get_byte (filename, sep) == '/' || + _dbus_string_get_byte (filename, sep) == '\\')) + return _dbus_string_copy_len (filename, 0, sep + 1, + dirname, _dbus_string_get_length (dirname)); + else + return _dbus_string_copy_len (filename, 0, sep - 0, + dirname, _dbus_string_get_length (dirname)); +} + + +/** + * Checks to see if the UNIX user ID matches the UID of + * the process. Should always return #FALSE on Windows. + * + * @param uid the UNIX user ID + * @returns #TRUE if this uid owns the process. + */ +dbus_bool_t +_dbus_unix_user_is_process_owner (dbus_uid_t uid) +{ + return FALSE; +} + +dbus_bool_t _dbus_windows_user_is_process_owner (const char *windows_sid) +{ + return TRUE; +} + +/*===================================================================== + unix emulation functions - should be removed sometime in the future + =====================================================================*/ + +/** + * Checks to see if the UNIX user ID is at the console. + * Should always fail on Windows (set the error to + * #DBUS_ERROR_NOT_SUPPORTED). + * + * @param uid UID of person to check + * @param error return location for errors + * @returns #TRUE if the UID is the same as the console user and there are no errors + */ +dbus_bool_t +_dbus_unix_user_is_at_console (dbus_uid_t uid, + DBusError *error) +{ + dbus_set_error (error, DBUS_ERROR_NOT_SUPPORTED, + "UNIX user IDs not supported on Windows\n"); + return FALSE; +} + + +/** + * Parse a UNIX group from the bus config file. On Windows, this should + * simply always fail (just return #FALSE). + * + * @param groupname the groupname text + * @param gid_p place to return the gid + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_parse_unix_group_from_config (const DBusString *groupname, + dbus_gid_t *gid_p) +{ + return FALSE; +} + +/** + * Parse a UNIX user from the bus config file. On Windows, this should + * simply always fail (just return #FALSE). + * + * @param username the username text + * @param uid_p place to return the uid + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_parse_unix_user_from_config (const DBusString *username, + dbus_uid_t *uid_p) +{ + return FALSE; +} + + +/** + * Gets all groups corresponding to the given UNIX user ID. On UNIX, + * just calls _dbus_groups_from_uid(). On Windows, should always + * fail since we don't know any UNIX groups. + * + * @param uid the UID + * @param group_ids return location for array of group IDs + * @param n_group_ids return location for length of returned array + * @returns #TRUE if the UID existed and we got some credentials + */ +dbus_bool_t +_dbus_unix_groups_from_uid (dbus_uid_t uid, + dbus_gid_t **group_ids, + int *n_group_ids) +{ + return FALSE; +} + + + +/** @} */ /* DBusString stuff */ + +/************************************************************************ + + error handling + + ************************************************************************/ + + + + + +/* lan manager error codes */ +const char* +_dbus_lm_strerror(int error_number) +{ +#ifdef DBUS_WINCE + // TODO + return "unknown"; +#else + const char *msg; + switch (error_number) + { + case NERR_NetNotStarted: + return "The workstation driver is not installed."; + case NERR_UnknownServer: + return "The server could not be located."; + case NERR_ShareMem: + return "An internal error occurred. The network cannot access a shared memory segment."; + case NERR_NoNetworkResource: + return "A network resource shortage occurred."; + case NERR_RemoteOnly: + return "This operation is not supported on workstations."; + case NERR_DevNotRedirected: + return "The device is not connected."; + case NERR_ServerNotStarted: + return "The Server service is not started."; + case NERR_ItemNotFound: + return "The queue is empty."; + case NERR_UnknownDevDir: + return "The device or directory does not exist."; + case NERR_RedirectedPath: + return "The operation is invalid on a redirected resource."; + case NERR_DuplicateShare: + return "The name has already been shared."; + case NERR_NoRoom: + return "The server is currently out of the requested resource."; + case NERR_TooManyItems: + return "Requested addition of items exceeds the maximum allowed."; + case NERR_InvalidMaxUsers: + return "The Peer service supports only two simultaneous users."; + case NERR_BufTooSmall: + return "The API return buffer is too small."; + case NERR_RemoteErr: + return "A remote API error occurred."; + case NERR_LanmanIniError: + return "An error occurred when opening or reading the configuration file."; + case NERR_NetworkError: + return "A general network error occurred."; + case NERR_WkstaInconsistentState: + return "The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service."; + case NERR_WkstaNotStarted: + return "The Workstation service has not been started."; + case NERR_BrowserNotStarted: + return "The requested information is not available."; + case NERR_InternalError: + return "An internal error occurred."; + case NERR_BadTransactConfig: + return "The server is not configured for transactions."; + case NERR_InvalidAPI: + return "The requested API is not supported on the remote server."; + case NERR_BadEventName: + return "The event name is invalid."; + case NERR_DupNameReboot: + return "The computer name already exists on the network. Change it and restart the computer."; + case NERR_CfgCompNotFound: + return "The specified component could not be found in the configuration information."; + case NERR_CfgParamNotFound: + return "The specified parameter could not be found in the configuration information."; + case NERR_LineTooLong: + return "A line in the configuration file is too long."; + case NERR_QNotFound: + return "The printer does not exist."; + case NERR_JobNotFound: + return "The print job does not exist."; + case NERR_DestNotFound: + return "The printer destination cannot be found."; + case NERR_DestExists: + return "The printer destination already exists."; + case NERR_QExists: + return "The printer queue already exists."; + case NERR_QNoRoom: + return "No more printers can be added."; + case NERR_JobNoRoom: + return "No more print jobs can be added."; + case NERR_DestNoRoom: + return "No more printer destinations can be added."; + case NERR_DestIdle: + return "This printer destination is idle and cannot accept control operations."; + case NERR_DestInvalidOp: + return "This printer destination request contains an invalid control function."; + case NERR_ProcNoRespond: + return "The print processor is not responding."; + case NERR_SpoolerNotLoaded: + return "The spooler is not running."; + case NERR_DestInvalidState: + return "This operation cannot be performed on the print destination in its current state."; + case NERR_QInvalidState: + return "This operation cannot be performed on the printer queue in its current state."; + case NERR_JobInvalidState: + return "This operation cannot be performed on the print job in its current state."; + case NERR_SpoolNoMemory: + return "A spooler memory allocation failure occurred."; + case NERR_DriverNotFound: + return "The device driver does not exist."; + case NERR_DataTypeInvalid: + return "The data type is not supported by the print processor."; + case NERR_ProcNotFound: + return "The print processor is not installed."; + case NERR_ServiceTableLocked: + return "The service database is locked."; + case NERR_ServiceTableFull: + return "The service table is full."; + case NERR_ServiceInstalled: + return "The requested service has already been started."; + case NERR_ServiceEntryLocked: + return "The service does not respond to control actions."; + case NERR_ServiceNotInstalled: + return "The service has not been started."; + case NERR_BadServiceName: + return "The service name is invalid."; + case NERR_ServiceCtlTimeout: + return "The service is not responding to the control function."; + case NERR_ServiceCtlBusy: + return "The service control is busy."; + case NERR_BadServiceProgName: + return "The configuration file contains an invalid service program name."; + case NERR_ServiceNotCtrl: + return "The service could not be controlled in its present state."; + case NERR_ServiceKillProc: + return "The service ended abnormally."; + case NERR_ServiceCtlNotValid: + return "The requested pause or stop is not valid for this service."; + case NERR_NotInDispatchTbl: + return "The service control dispatcher could not find the service name in the dispatch table."; + case NERR_BadControlRecv: + return "The service control dispatcher pipe read failed."; + case NERR_ServiceNotStarting: + return "A thread for the new service could not be created."; + case NERR_AlreadyLoggedOn: + return "This workstation is already logged on to the local-area network."; + case NERR_NotLoggedOn: + return "The workstation is not logged on to the local-area network."; + case NERR_BadUsername: + return "The user name or group name parameter is invalid."; + case NERR_BadPassword: + return "The password parameter is invalid."; + case NERR_UnableToAddName_W: + return "@W The logon processor did not add the message alias."; + case NERR_UnableToAddName_F: + return "The logon processor did not add the message alias."; + case NERR_UnableToDelName_W: + return "@W The logoff processor did not delete the message alias."; + case NERR_UnableToDelName_F: + return "The logoff processor did not delete the message alias."; + case NERR_LogonsPaused: + return "Network logons are paused."; + case NERR_LogonServerConflict: + return "A centralized logon-server conflict occurred."; + case NERR_LogonNoUserPath: + return "The server is configured without a valid user path."; + case NERR_LogonScriptError: + return "An error occurred while loading or running the logon script."; + case NERR_StandaloneLogon: + return "The logon server was not specified. Your computer will be logged on as STANDALONE."; + case NERR_LogonServerNotFound: + return "The logon server could not be found."; + case NERR_LogonDomainExists: + return "There is already a logon domain for this computer."; + case NERR_NonValidatedLogon: + return "The logon server could not validate the logon."; + case NERR_ACFNotFound: + return "The security database could not be found."; + case NERR_GroupNotFound: + return "The group name could not be found."; + case NERR_UserNotFound: + return "The user name could not be found."; + case NERR_ResourceNotFound: + return "The resource name could not be found."; + case NERR_GroupExists: + return "The group already exists."; + case NERR_UserExists: + return "The user account already exists."; + case NERR_ResourceExists: + return "The resource permission list already exists."; + case NERR_NotPrimary: + return "This operation is only allowed on the primary domain controller of the domain."; + case NERR_ACFNotLoaded: + return "The security database has not been started."; + case NERR_ACFNoRoom: + return "There are too many names in the user accounts database."; + case NERR_ACFFileIOFail: + return "A disk I/O failure occurred."; + case NERR_ACFTooManyLists: + return "The limit of 64 entries per resource was exceeded."; + case NERR_UserLogon: + return "Deleting a user with a session is not allowed."; + case NERR_ACFNoParent: + return "The parent directory could not be located."; + case NERR_CanNotGrowSegment: + return "Unable to add to the security database session cache segment."; + case NERR_SpeGroupOp: + return "This operation is not allowed on this special group."; + case NERR_NotInCache: + return "This user is not cached in user accounts database session cache."; + case NERR_UserInGroup: + return "The user already belongs to this group."; + case NERR_UserNotInGroup: + return "The user does not belong to this group."; + case NERR_AccountUndefined: + return "This user account is undefined."; + case NERR_AccountExpired: + return "This user account has expired."; + case NERR_InvalidWorkstation: + return "The user is not allowed to log on from this workstation."; + case NERR_InvalidLogonHours: + return "The user is not allowed to log on at this time."; + case NERR_PasswordExpired: + return "The password of this user has expired."; + case NERR_PasswordCantChange: + return "The password of this user cannot change."; + case NERR_PasswordHistConflict: + return "This password cannot be used now."; + case NERR_PasswordTooShort: + return "The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements."; + case NERR_PasswordTooRecent: + return "The password of this user is too recent to change."; + case NERR_InvalidDatabase: + return "The security database is corrupted."; + case NERR_DatabaseUpToDate: + return "No updates are necessary to this replicant network/local security database."; + case NERR_SyncRequired: + return "This replicant database is outdated; synchronization is required."; + case NERR_UseNotFound: + return "The network connection could not be found."; + case NERR_BadAsgType: + return "This asg_type is invalid."; + case NERR_DeviceIsShared: + return "This device is currently being shared."; + case NERR_NoComputerName: + return "The computer name could not be added as a message alias. The name may already exist on the network."; + case NERR_MsgAlreadyStarted: + return "The Messenger service is already started."; + case NERR_MsgInitFailed: + return "The Messenger service failed to start."; + case NERR_NameNotFound: + return "The message alias could not be found on the network."; + case NERR_AlreadyForwarded: + return "This message alias has already been forwarded."; + case NERR_AddForwarded: + return "This message alias has been added but is still forwarded."; + case NERR_AlreadyExists: + return "This message alias already exists locally."; + case NERR_TooManyNames: + return "The maximum number of added message aliases has been exceeded."; + case NERR_DelComputerName: + return "The computer name could not be deleted."; + case NERR_LocalForward: + return "Messages cannot be forwarded back to the same workstation."; + case NERR_GrpMsgProcessor: + return "An error occurred in the domain message processor."; + case NERR_PausedRemote: + return "The message was sent, but the recipient has paused the Messenger service."; + case NERR_BadReceive: + return "The message was sent but not received."; + case NERR_NameInUse: + return "The message alias is currently in use. Try again later."; + case NERR_MsgNotStarted: + return "The Messenger service has not been started."; + case NERR_NotLocalName: + return "The name is not on the local computer."; + case NERR_NoForwardName: + return "The forwarded message alias could not be found on the network."; + case NERR_RemoteFull: + return "The message alias table on the remote station is full."; + case NERR_NameNotForwarded: + return "Messages for this alias are not currently being forwarded."; + case NERR_TruncatedBroadcast: + return "The broadcast message was truncated."; + case NERR_InvalidDevice: + return "This is an invalid device name."; + case NERR_WriteFault: + return "A write fault occurred."; + case NERR_DuplicateName: + return "A duplicate message alias exists on the network."; + case NERR_DeleteLater: + return "@W This message alias will be deleted later."; + case NERR_IncompleteDel: + return "The message alias was not successfully deleted from all networks."; + case NERR_MultipleNets: + return "This operation is not supported on computers with multiple networks."; + case NERR_NetNameNotFound: + return "This shared resource does not exist."; + case NERR_DeviceNotShared: + return "This device is not shared."; + case NERR_ClientNameNotFound: + return "A session does not exist with that computer name."; + case NERR_FileIdNotFound: + return "There is not an open file with that identification number."; + case NERR_ExecFailure: + return "A failure occurred when executing a remote administration command."; + case NERR_TmpFile: + return "A failure occurred when opening a remote temporary file."; + case NERR_TooMuchData: + return "The data returned from a remote administration command has been truncated to 64K."; + case NERR_DeviceShareConflict: + return "This device cannot be shared as both a spooled and a non-spooled resource."; + case NERR_BrowserTableIncomplete: + return "The information in the list of servers may be incorrect."; + case NERR_NotLocalDomain: + return "The computer is not active in this domain."; +#ifdef NERR_IsDfsShare + + case NERR_IsDfsShare: + return "The share must be removed from the Distributed File System before it can be deleted."; +#endif + + case NERR_DevInvalidOpCode: + return "The operation is invalid for this device."; + case NERR_DevNotFound: + return "This device cannot be shared."; + case NERR_DevNotOpen: + return "This device was not open."; + case NERR_BadQueueDevString: + return "This device name list is invalid."; + case NERR_BadQueuePriority: + return "The queue priority is invalid."; + case NERR_NoCommDevs: + return "There are no shared communication devices."; + case NERR_QueueNotFound: + return "The queue you specified does not exist."; + case NERR_BadDevString: + return "This list of devices is invalid."; + case NERR_BadDev: + return "The requested device is invalid."; + case NERR_InUseBySpooler: + return "This device is already in use by the spooler."; + case NERR_CommDevInUse: + return "This device is already in use as a communication device."; + case NERR_InvalidComputer: + return "This computer name is invalid."; + case NERR_MaxLenExceeded: + return "The string and prefix specified are too long."; + case NERR_BadComponent: + return "This path component is invalid."; + case NERR_CantType: + return "Could not determine the type of input."; + case NERR_TooManyEntries: + return "The buffer for types is not big enough."; + case NERR_ProfileFileTooBig: + return "Profile files cannot exceed 64K."; + case NERR_ProfileOffset: + return "The start offset is out of range."; + case NERR_ProfileCleanup: + return "The system cannot delete current connections to network resources."; + case NERR_ProfileUnknownCmd: + return "The system was unable to parse the command line in this file."; + case NERR_ProfileLoadErr: + return "An error occurred while loading the profile file."; + case NERR_ProfileSaveErr: + return "@W Errors occurred while saving the profile file. The profile was partially saved."; + case NERR_LogOverflow: + return "Log file %1 is full."; + case NERR_LogFileChanged: + return "This log file has changed between reads."; + case NERR_LogFileCorrupt: + return "Log file %1 is corrupt."; + case NERR_SourceIsDir: + return "The source path cannot be a directory."; + case NERR_BadSource: + return "The source path is illegal."; + case NERR_BadDest: + return "The destination path is illegal."; + case NERR_DifferentServers: + return "The source and destination paths are on different servers."; + case NERR_RunSrvPaused: + return "The Run server you requested is paused."; + case NERR_ErrCommRunSrv: + return "An error occurred when communicating with a Run server."; + case NERR_ErrorExecingGhost: + return "An error occurred when starting a background process."; + case NERR_ShareNotFound: + return "The shared resource you are connected to could not be found."; + case NERR_InvalidLana: + return "The LAN adapter number is invalid."; + case NERR_OpenFiles: + return "There are open files on the connection."; + case NERR_ActiveConns: + return "Active connections still exist."; + case NERR_BadPasswordCore: + return "This share name or password is invalid."; + case NERR_DevInUse: + return "The device is being accessed by an active process."; + case NERR_LocalDrive: + return "The drive letter is in use locally."; + case NERR_AlertExists: + return "The specified client is already registered for the specified event."; + case NERR_TooManyAlerts: + return "The alert table is full."; + case NERR_NoSuchAlert: + return "An invalid or nonexistent alert name was raised."; + case NERR_BadRecipient: + return "The alert recipient is invalid."; + case NERR_AcctLimitExceeded: + return "A user's session with this server has been deleted."; + case NERR_InvalidLogSeek: + return "The log file does not contain the requested record number."; + case NERR_BadUasConfig: + return "The user accounts database is not configured correctly."; + case NERR_InvalidUASOp: + return "This operation is not permitted when the Netlogon service is running."; + case NERR_LastAdmin: + return "This operation is not allowed on the last administrative account."; + case NERR_DCNotFound: + return "Could not find domain controller for this domain."; + case NERR_LogonTrackingError: + return "Could not set logon information for this user."; + case NERR_NetlogonNotStarted: + return "The Netlogon service has not been started."; + case NERR_CanNotGrowUASFile: + return "Unable to add to the user accounts database."; + case NERR_TimeDiffAtDC: + return "This server's clock is not synchronized with the primary domain controller's clock."; + case NERR_PasswordMismatch: + return "A password mismatch has been detected."; + case NERR_NoSuchServer: + return "The server identification does not specify a valid server."; + case NERR_NoSuchSession: + return "The session identification does not specify a valid session."; + case NERR_NoSuchConnection: + return "The connection identification does not specify a valid connection."; + case NERR_TooManyServers: + return "There is no space for another entry in the table of available servers."; + case NERR_TooManySessions: + return "The server has reached the maximum number of sessions it supports."; + case NERR_TooManyConnections: + return "The server has reached the maximum number of connections it supports."; + case NERR_TooManyFiles: + return "The server cannot open more files because it has reached its maximum number."; + case NERR_NoAlternateServers: + return "There are no alternate servers registered on this server."; + case NERR_TryDownLevel: + return "Try down-level (remote admin protocol) version of API instead."; + case NERR_UPSDriverNotStarted: + return "The UPS driver could not be accessed by the UPS service."; + case NERR_UPSInvalidConfig: + return "The UPS service is not configured correctly."; + case NERR_UPSInvalidCommPort: + return "The UPS service could not access the specified Comm Port."; + case NERR_UPSSignalAsserted: + return "The UPS indicated a line fail or low battery situation. Service not started."; + case NERR_UPSShutdownFailed: + return "The UPS service failed to perform a system shut down."; + case NERR_BadDosRetCode: + return "The program below returned an MS-DOS error code:"; + case NERR_ProgNeedsExtraMem: + return "The program below needs more memory:"; + case NERR_BadDosFunction: + return "The program below called an unsupported MS-DOS function:"; + case NERR_RemoteBootFailed: + return "The workstation failed to boot."; + case NERR_BadFileCheckSum: + return "The file below is corrupt."; + case NERR_NoRplBootSystem: + return "No loader is specified in the boot-block definition file."; + case NERR_RplLoadrNetBiosErr: + return "NetBIOS returned an error: The NCB and SMB are dumped above."; + case NERR_RplLoadrDiskErr: + return "A disk I/O error occurred."; + case NERR_ImageParamErr: + return "Image parameter substitution failed."; + case NERR_TooManyImageParams: + return "Too many image parameters cross disk sector boundaries."; + case NERR_NonDosFloppyUsed: + return "The image was not generated from an MS-DOS diskette formatted with /S."; + case NERR_RplBootRestart: + return "Remote boot will be restarted later."; + case NERR_RplSrvrCallFailed: + return "The call to the Remoteboot server failed."; + case NERR_CantConnectRplSrvr: + return "Cannot connect to the Remoteboot server."; + case NERR_CantOpenImageFile: + return "Cannot open image file on the Remoteboot server."; + case NERR_CallingRplSrvr: + return "Connecting to the Remoteboot server..."; + case NERR_StartingRplBoot: + return "Connecting to the Remoteboot server..."; + case NERR_RplBootServiceTerm: + return "Remote boot service was stopped; check the error log for the cause of the problem."; + case NERR_RplBootStartFailed: + return "Remote boot startup failed; check the error log for the cause of the problem."; + case NERR_RPL_CONNECTED: + return "A second connection to a Remoteboot resource is not allowed."; + case NERR_BrowserConfiguredToNotRun: + return "The browser service was configured with MaintainServerList=No."; + case NERR_RplNoAdaptersStarted: + return "Service failed to start since none of the network adapters started with this service."; + case NERR_RplBadRegistry: + return "Service failed to start due to bad startup information in the registry."; + case NERR_RplBadDatabase: + return "Service failed to start because its database is absent or corrupt."; + case NERR_RplRplfilesShare: + return "Service failed to start because RPLFILES share is absent."; + case NERR_RplNotRplServer: + return "Service failed to start because RPLUSER group is absent."; + case NERR_RplCannotEnum: + return "Cannot enumerate service records."; + case NERR_RplWkstaInfoCorrupted: + return "Workstation record information has been corrupted."; + case NERR_RplWkstaNotFound: + return "Workstation record was not found."; + case NERR_RplWkstaNameUnavailable: + return "Workstation name is in use by some other workstation."; + case NERR_RplProfileInfoCorrupted: + return "Profile record information has been corrupted."; + case NERR_RplProfileNotFound: + return "Profile record was not found."; + case NERR_RplProfileNameUnavailable: + return "Profile name is in use by some other profile."; + case NERR_RplProfileNotEmpty: + return "There are workstations using this profile."; + case NERR_RplConfigInfoCorrupted: + return "Configuration record information has been corrupted."; + case NERR_RplConfigNotFound: + return "Configuration record was not found."; + case NERR_RplAdapterInfoCorrupted: + return "Adapter ID record information has been corrupted."; + case NERR_RplInternal: + return "An internal service error has occurred."; + case NERR_RplVendorInfoCorrupted: + return "Vendor ID record information has been corrupted."; + case NERR_RplBootInfoCorrupted: + return "Boot block record information has been corrupted."; + case NERR_RplWkstaNeedsUserAcct: + return "The user account for this workstation record is missing."; + case NERR_RplNeedsRPLUSERAcct: + return "The RPLUSER local group could not be found."; + case NERR_RplBootNotFound: + return "Boot block record was not found."; + case NERR_RplIncompatibleProfile: + return "Chosen profile is incompatible with this workstation."; + case NERR_RplAdapterNameUnavailable: + return "Chosen network adapter ID is in use by some other workstation."; + case NERR_RplConfigNotEmpty: + return "There are profiles using this configuration."; + case NERR_RplBootInUse: + return "There are workstations, profiles, or configurations using this boot block."; + case NERR_RplBackupDatabase: + return "Service failed to backup Remoteboot database."; + case NERR_RplAdapterNotFound: + return "Adapter record was not found."; + case NERR_RplVendorNotFound: + return "Vendor record was not found."; + case NERR_RplVendorNameUnavailable: + return "Vendor name is in use by some other vendor record."; + case NERR_RplBootNameUnavailable: + return "(boot name, vendor ID) is in use by some other boot block record."; + case NERR_RplConfigNameUnavailable: + return "Configuration name is in use by some other configuration."; + case NERR_DfsInternalCorruption: + return "The internal database maintained by the Dfs service is corrupt."; + case NERR_DfsVolumeDataCorrupt: + return "One of the records in the internal Dfs database is corrupt."; + case NERR_DfsNoSuchVolume: + return "There is no DFS name whose entry path matches the input Entry Path."; + case NERR_DfsVolumeAlreadyExists: + return "A root or link with the given name already exists."; + case NERR_DfsAlreadyShared: + return "The server share specified is already shared in the Dfs."; + case NERR_DfsNoSuchShare: + return "The indicated server share does not support the indicated DFS namespace."; + case NERR_DfsNotALeafVolume: + return "The operation is not valid on this portion of the namespace."; + case NERR_DfsLeafVolume: + return "The operation is not valid on this portion of the namespace."; + case NERR_DfsVolumeHasMultipleServers: + return "The operation is ambiguous because the link has multiple servers."; + case NERR_DfsCantCreateJunctionPoint: + return "Unable to create a link."; + case NERR_DfsServerNotDfsAware: + return "The server is not Dfs Aware."; + case NERR_DfsBadRenamePath: + return "The specified rename target path is invalid."; + case NERR_DfsVolumeIsOffline: + return "The specified DFS link is offline."; + case NERR_DfsNoSuchServer: + return "The specified server is not a server for this link."; + case NERR_DfsCyclicalName: + return "A cycle in the Dfs name was detected."; + case NERR_DfsNotSupportedInServerDfs: + return "The operation is not supported on a server-based Dfs."; + case NERR_DfsDuplicateService: + return "This link is already supported by the specified server-share."; + case NERR_DfsCantRemoveLastServerShare: + return "Can't remove the last server-share supporting this root or link."; + case NERR_DfsVolumeIsInterDfs: + return "The operation is not supported for an Inter-DFS link."; + case NERR_DfsInconsistent: + return "The internal state of the Dfs Service has become inconsistent."; + case NERR_DfsServerUpgraded: + return "The Dfs Service has been installed on the specified server."; + case NERR_DfsDataIsIdentical: + return "The Dfs data being reconciled is identical."; + case NERR_DfsCantRemoveDfsRoot: + return "The DFS root cannot be deleted. Uninstall DFS if required."; + case NERR_DfsChildOrParentInDfs: + return "A child or parent directory of the share is already in a Dfs."; + case NERR_DfsInternalError: + return "Dfs internal error."; + /* the following are not defined in mingw */ +#if 0 + + case NERR_SetupAlreadyJoined: + return "This machine is already joined to a domain."; + case NERR_SetupNotJoined: + return "This machine is not currently joined to a domain."; + case NERR_SetupDomainController: + return "This machine is a domain controller and cannot be unjoined from a domain."; + case NERR_DefaultJoinRequired: + return "The destination domain controller does not support creating machine accounts in OUs."; + case NERR_InvalidWorkgroupName: + return "The specified workgroup name is invalid."; + case NERR_NameUsesIncompatibleCodePage: + return "The specified computer name is incompatible with the default language used on the domain controller."; + case NERR_ComputerAccountNotFound: + return "The specified computer account could not be found."; + case NERR_PersonalSku: + return "This version of Windows cannot be joined to a domain."; + case NERR_PasswordMustChange: + return "The password must change at the next logon."; + case NERR_AccountLockedOut: + return "The account is locked out."; + case NERR_PasswordTooLong: + return "The password is too long."; + case NERR_PasswordNotComplexEnough: + return "The password does not meet the complexity policy."; + case NERR_PasswordFilterError: + return "The password does not meet the requirements of the password filter DLLs."; +#endif + + } + msg = strerror (error_number); + if (msg == NULL) + msg = "unknown"; + + return msg; +#endif //DBUS_WINCE +} + +/** + * Get a printable string describing the command used to execute + * the process with pid. This string should only be used for + * informative purposes such as logging; it may not be trusted. + * + * The command is guaranteed to be printable ASCII and no longer + * than max_len. + * + * @param pid Process id + * @param str Append command to this string + * @param max_len Maximum length of returned command + * @param error return location for errors + * @returns #FALSE on error + */ +dbus_bool_t +_dbus_command_for_pid (unsigned long pid, + DBusString *str, + int max_len, + DBusError *error) +{ + // FIXME + return FALSE; +} diff --git a/dbus/dbus-sysdeps-util.c b/dbus/dbus-sysdeps-util.c index 67e19f7b..68669cf0 100644 --- a/dbus/dbus-sysdeps-util.c +++ b/dbus/dbus-sysdeps-util.c @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-sysdeps.h" #include "dbus-internals.h" #include "dbus-string.h" diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c new file mode 100644 index 00000000..024a8338 --- /dev/null +++ b/dbus/dbus-sysdeps-win.c @@ -0,0 +1,3569 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps.c Wrappers around system/libc features (internal to D-BUS implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * Copyright (C) 2005 Novell, Inc. + * Copyright (C) 2006 Peter Kümmel <syntheticpp@gmx.net> + * Copyright (C) 2006 Christian Ehrlicher <ch.ehrlicher@gmx.de> + * Copyright (C) 2006-2010 Ralf Habacker <ralf.habacker@freenet.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> + +#define STRSAFE_NO_DEPRECATE + +#ifndef DBUS_WINCE +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0501 +#endif +#endif + +#include "dbus-internals.h" +#include "dbus-sha.h" +#include "dbus-sysdeps.h" +#include "dbus-threads.h" +#include "dbus-protocol.h" +#include "dbus-string.h" +#include "dbus-sysdeps.h" +#include "dbus-sysdeps-win.h" +#include "dbus-protocol.h" +#include "dbus-hash.h" +#include "dbus-sockets-win.h" +#include "dbus-list.h" +#include "dbus-nonce.h" +#include "dbus-credentials.h" + +#include <windows.h> +#include <ws2tcpip.h> +#include <wincrypt.h> + +/* Declarations missing in mingw's headers */ +extern BOOL WINAPI ConvertStringSidToSidA (LPCSTR StringSid, PSID *Sid); +extern BOOL WINAPI ConvertSidToStringSidA (PSID Sid, LPSTR *StringSid); + +#include <stdio.h> + +#include <string.h> +#if HAVE_ERRNO_H +#include <errno.h> +#endif +#ifndef DBUS_WINCE +#include <mbstring.h> +#include <sys/stat.h> +#include <sys/types.h> +#endif + +#ifdef HAVE_WS2TCPIP_H +/* getaddrinfo for Windows CE (and Windows). */ +#include <ws2tcpip.h> +#endif + +#ifdef HAVE_WSPIAPI_H +// needed for w2k compatibility (getaddrinfo/freeaddrinfo/getnameinfo) +#ifdef __GNUC__ +#define _inline +#include "wspiapi.h" +#else +#include <wspiapi.h> +#endif +#endif // HAVE_WSPIAPI_H + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +typedef int socklen_t; + + +void +_dbus_win_set_errno (int err) +{ +#ifdef DBUS_WINCE + SetLastError (err); +#else + errno = err; +#endif +} + + +/* Convert GetLastError() to a dbus error. */ +const char* +_dbus_win_error_from_last_error (void) +{ + switch (GetLastError()) + { + case 0: + return DBUS_ERROR_FAILED; + + case ERROR_NO_MORE_FILES: + case ERROR_TOO_MANY_OPEN_FILES: + return DBUS_ERROR_LIMITS_EXCEEDED; /* kernel out of memory */ + + case ERROR_ACCESS_DENIED: + case ERROR_CANNOT_MAKE: + return DBUS_ERROR_ACCESS_DENIED; + + case ERROR_NOT_ENOUGH_MEMORY: + return DBUS_ERROR_NO_MEMORY; + + case ERROR_FILE_EXISTS: + return DBUS_ERROR_FILE_EXISTS; + + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + return DBUS_ERROR_FILE_NOT_FOUND; + } + + return DBUS_ERROR_FAILED; +} + + +char* +_dbus_win_error_string (int error_number) +{ + char *msg; + + FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_IGNORE_INSERTS | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, error_number, 0, + (LPSTR) &msg, 0, NULL); + + if (msg[strlen (msg) - 1] == '\n') + msg[strlen (msg) - 1] = '\0'; + if (msg[strlen (msg) - 1] == '\r') + msg[strlen (msg) - 1] = '\0'; + + return msg; +} + +void +_dbus_win_free_error_string (char *string) +{ + LocalFree (string); +} + +/** + * Socket interface + * + */ + +/** + * Thin wrapper around the read() system call that appends + * the data it reads to the DBusString buffer. It appends + * up to the given count, and returns the same value + * and same errno as read(). The only exception is that + * _dbus_read_socket() handles EINTR for you. + * _dbus_read_socket() can return ENOMEM, even though + * regular UNIX read doesn't. + * + * @param fd the file descriptor to read from + * @param buffer the buffer to append data to + * @param count the amount of data to read + * @returns the number of bytes read or -1 + */ + +int +_dbus_read_socket (int fd, + DBusString *buffer, + int count) +{ + int bytes_read; + int start; + char *data; + + _dbus_assert (count >= 0); + + start = _dbus_string_get_length (buffer); + + if (!_dbus_string_lengthen (buffer, count)) + { + _dbus_win_set_errno (ENOMEM); + return -1; + } + + data = _dbus_string_get_data_len (buffer, start, count); + + again: + + _dbus_verbose ("recv: count=%d fd=%d\n", count, fd); + bytes_read = recv (fd, data, count, 0); + + if (bytes_read == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO(); + _dbus_verbose ("recv: failed: %s (%d)\n", _dbus_strerror (errno), errno); + bytes_read = -1; + } + else + _dbus_verbose ("recv: = %d\n", bytes_read); + + if (bytes_read < 0) + { + if (errno == EINTR) + goto again; + else + { + /* put length back (note that this doesn't actually realloc anything) */ + _dbus_string_set_length (buffer, start); + return -1; + } + } + else + { + /* put length back (doesn't actually realloc) */ + _dbus_string_set_length (buffer, start + bytes_read); + +#if 0 + if (bytes_read > 0) + _dbus_verbose_bytes_of_string (buffer, start, bytes_read); +#endif + + return bytes_read; + } +} + +/** + * Thin wrapper around the write() system call that writes a part of a + * DBusString and handles EINTR for you. + * + * @param fd the file descriptor to write + * @param buffer the buffer to write data from + * @param start the first byte in the buffer to write + * @param len the number of bytes to try to write + * @returns the number of bytes written or -1 on error + */ +int +_dbus_write_socket (int fd, + const DBusString *buffer, + int start, + int len) +{ + const char *data; + int bytes_written; + + data = _dbus_string_get_const_data_len (buffer, start, len); + + again: + + _dbus_verbose ("send: len=%d fd=%d\n", len, fd); + bytes_written = send (fd, data, len, 0); + + if (bytes_written == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO(); + _dbus_verbose ("send: failed: %s\n", _dbus_strerror_from_errno ()); + bytes_written = -1; + } + else + _dbus_verbose ("send: = %d\n", bytes_written); + + if (bytes_written < 0 && errno == EINTR) + goto again; + +#if 0 + if (bytes_written > 0) + _dbus_verbose_bytes_of_string (buffer, start, bytes_written); +#endif + + return bytes_written; +} + + +/** + * Closes a file descriptor. + * + * @param fd the file descriptor + * @param error error object + * @returns #FALSE if error set + */ +dbus_bool_t +_dbus_close_socket (int fd, + DBusError *error) +{ + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + again: + if (closesocket (fd) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + + if (errno == EINTR) + goto again; + + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not close socket: socket=%d, , %s", + fd, _dbus_strerror_from_errno ()); + return FALSE; + } + _dbus_verbose ("_dbus_close_socket: socket=%d, \n", fd); + + return TRUE; +} + +/** + * Sets the file descriptor to be close + * on exec. Should be called for all file + * descriptors in D-Bus code. + * + * @param fd the file descriptor + */ +void +_dbus_fd_set_close_on_exec (intptr_t handle) +{ + if ( !SetHandleInformation( (HANDLE) handle, + HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE, + 0 /*disable both flags*/ ) ) + { + _dbus_win_warn_win_error ("Disabling socket handle inheritance failed:", GetLastError()); + } +} + +/** + * Sets a file descriptor to be nonblocking. + * + * @param fd the file descriptor. + * @param error address of error location. + * @returns #TRUE on success. + */ +dbus_bool_t +_dbus_set_fd_nonblocking (int handle, + DBusError *error) +{ + u_long one = 1; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + if (ioctlsocket (handle, FIONBIO, &one) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to set socket %d:%d to nonblocking: %s", handle, + _dbus_strerror_from_errno ()); + return FALSE; + } + + return TRUE; +} + + +/** + * Like _dbus_write() but will use writev() if possible + * to write both buffers in sequence. The return value + * is the number of bytes written in the first buffer, + * plus the number written in the second. If the first + * buffer is written successfully and an error occurs + * writing the second, the number of bytes in the first + * is returned (i.e. the error is ignored), on systems that + * don't have writev. Handles EINTR for you. + * The second buffer may be #NULL. + * + * @param fd the file descriptor + * @param buffer1 first buffer + * @param start1 first byte to write in first buffer + * @param len1 number of bytes to write from first buffer + * @param buffer2 second buffer, or #NULL + * @param start2 first byte to write in second buffer + * @param len2 number of bytes to write in second buffer + * @returns total bytes written from both buffers, or -1 on error + */ +int +_dbus_write_socket_two (int fd, + const DBusString *buffer1, + int start1, + int len1, + const DBusString *buffer2, + int start2, + int len2) +{ + WSABUF vectors[2]; + const char *data1; + const char *data2; + int rc; + DWORD bytes_written; + + _dbus_assert (buffer1 != NULL); + _dbus_assert (start1 >= 0); + _dbus_assert (start2 >= 0); + _dbus_assert (len1 >= 0); + _dbus_assert (len2 >= 0); + + + data1 = _dbus_string_get_const_data_len (buffer1, start1, len1); + + if (buffer2 != NULL) + data2 = _dbus_string_get_const_data_len (buffer2, start2, len2); + else + { + data2 = NULL; + start2 = 0; + len2 = 0; + } + + vectors[0].buf = (char*) data1; + vectors[0].len = len1; + vectors[1].buf = (char*) data2; + vectors[1].len = len2; + + again: + + _dbus_verbose ("WSASend: len1+2=%d+%d fd=%d\n", len1, len2, fd); + rc = WSASend (fd, + vectors, + data2 ? 2 : 1, + &bytes_written, + 0, + NULL, + NULL); + + if (rc == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + _dbus_verbose ("WSASend: failed: %s\n", _dbus_strerror_from_errno ()); + bytes_written = -1; + } + else + _dbus_verbose ("WSASend: = %ld\n", bytes_written); + + if (bytes_written < 0 && errno == EINTR) + goto again; + + return bytes_written; +} + +dbus_bool_t +_dbus_socket_is_invalid (int fd) +{ + return fd == INVALID_SOCKET ? TRUE : FALSE; +} + +#if 0 + +/** + * Opens the client side of a Windows named pipe. The connection D-BUS + * file descriptor index is returned. It is set up as nonblocking. + * + * @param path the path to named pipe socket + * @param error return location for error code + * @returns connection D-BUS file descriptor or -1 on error + */ +int +_dbus_connect_named_pipe (const char *path, + DBusError *error) +{ + _dbus_assert_not_reached ("not implemented"); +} + +#endif + + + +void +_dbus_win_startup_winsock (void) +{ + /* Straight from MSDN, deuglified */ + + static dbus_bool_t beenhere = FALSE; + + WORD wVersionRequested; + WSADATA wsaData; + int err; + + if (beenhere) + return; + + wVersionRequested = MAKEWORD (2, 0); + + err = WSAStartup (wVersionRequested, &wsaData); + if (err != 0) + { + _dbus_assert_not_reached ("Could not initialize WinSock"); + _dbus_abort (); + } + + /* Confirm that the WinSock DLL supports 2.0. Note that if the DLL + * supports versions greater than 2.0 in addition to 2.0, it will + * still return 2.0 in wVersion since that is the version we + * requested. + */ + if (LOBYTE (wsaData.wVersion) != 2 || + HIBYTE (wsaData.wVersion) != 0) + { + _dbus_assert_not_reached ("No usable WinSock found"); + _dbus_abort (); + } + + beenhere = TRUE; +} + + + + + + + + + +/************************************************************************ + + UTF / string code + + ************************************************************************/ + +/** + * Measure the message length without terminating nul + */ +int _dbus_printf_string_upper_bound (const char *format, + va_list args) +{ + /* MSVCRT's vsnprintf semantics are a bit different */ + char buf[1024]; + int bufsize; + int len; + + bufsize = sizeof (buf); + len = _vsnprintf (buf, bufsize - 1, format, args); + + while (len == -1) /* try again */ + { + char *p; + + bufsize *= 2; + + p = malloc (bufsize); + len = _vsnprintf (p, bufsize - 1, format, args); + free (p); + } + + return len; +} + + +/** + * Returns the UTF-16 form of a UTF-8 string. The result should be + * freed with dbus_free() when no longer needed. + * + * @param str the UTF-8 string + * @param error return location for error code + */ +wchar_t * +_dbus_win_utf8_to_utf16 (const char *str, + DBusError *error) +{ + DBusString s; + int n; + wchar_t *retval; + + _dbus_string_init_const (&s, str); + + if (!_dbus_string_validate_utf8 (&s, 0, _dbus_string_get_length (&s))) + { + dbus_set_error_const (error, DBUS_ERROR_FAILED, "Invalid UTF-8"); + return NULL; + } + + n = MultiByteToWideChar (CP_UTF8, 0, str, -1, NULL, 0); + + if (n == 0) + { + _dbus_win_set_error_from_win_error (error, GetLastError ()); + return NULL; + } + + retval = dbus_new (wchar_t, n); + + if (!retval) + { + _DBUS_SET_OOM (error); + return NULL; + } + + if (MultiByteToWideChar (CP_UTF8, 0, str, -1, retval, n) != n) + { + dbus_free (retval); + dbus_set_error_const (error, DBUS_ERROR_FAILED, "MultiByteToWideChar inconsistency"); + return NULL; + } + + return retval; +} + +/** + * Returns the UTF-8 form of a UTF-16 string. The result should be + * freed with dbus_free() when no longer needed. + * + * @param str the UTF-16 string + * @param error return location for error code + */ +char * +_dbus_win_utf16_to_utf8 (const wchar_t *str, + DBusError *error) +{ + int n; + char *retval; + + n = WideCharToMultiByte (CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); + + if (n == 0) + { + _dbus_win_set_error_from_win_error (error, GetLastError ()); + return NULL; + } + + retval = dbus_malloc (n); + + if (!retval) + { + _DBUS_SET_OOM (error); + return NULL; + } + + if (WideCharToMultiByte (CP_UTF8, 0, str, -1, retval, n, NULL, NULL) != n) + { + dbus_free (retval); + dbus_set_error_const (error, DBUS_ERROR_FAILED, "WideCharToMultiByte inconsistency"); + return NULL; + } + + return retval; +} + + + + + + +/************************************************************************ + + + ************************************************************************/ + +dbus_bool_t +_dbus_win_account_to_sid (const wchar_t *waccount, + void **ppsid, + DBusError *error) +{ + dbus_bool_t retval = FALSE; + DWORD sid_length, wdomain_length; + SID_NAME_USE use; + wchar_t *wdomain; + + *ppsid = NULL; + + sid_length = 0; + wdomain_length = 0; + if (!LookupAccountNameW (NULL, waccount, NULL, &sid_length, + NULL, &wdomain_length, &use) && + GetLastError () != ERROR_INSUFFICIENT_BUFFER) + { + _dbus_win_set_error_from_win_error (error, GetLastError ()); + return FALSE; + } + + *ppsid = dbus_malloc (sid_length); + if (!*ppsid) + { + _DBUS_SET_OOM (error); + return FALSE; + } + + wdomain = dbus_new (wchar_t, wdomain_length); + if (!wdomain) + { + _DBUS_SET_OOM (error); + goto out1; + } + + if (!LookupAccountNameW (NULL, waccount, (PSID) *ppsid, &sid_length, + wdomain, &wdomain_length, &use)) + { + _dbus_win_set_error_from_win_error (error, GetLastError ()); + goto out2; + } + + if (!IsValidSid ((PSID) *ppsid)) + { + dbus_set_error_const (error, DBUS_ERROR_FAILED, "Invalid SID"); + goto out2; + } + + retval = TRUE; + +out2: + dbus_free (wdomain); +out1: + if (!retval) + { + dbus_free (*ppsid); + *ppsid = NULL; + } + + return retval; +} + +/** @} end of sysdeps-win */ + + +/** + * The only reason this is separate from _dbus_getpid() is to allow it + * on Windows for logging but not for other purposes. + * + * @returns process ID to put in log messages + */ +unsigned long +_dbus_pid_for_log (void) +{ + return _dbus_getpid (); +} + + +#ifndef DBUS_WINCE +/** Gets our SID + * @param points to sid buffer, need to be freed with LocalFree() + * @returns process sid + */ +static dbus_bool_t +_dbus_getsid(char **sid) +{ + HANDLE process_token = INVALID_HANDLE_VALUE; + TOKEN_USER *token_user = NULL; + DWORD n; + PSID psid; + int retval = FALSE; + + if (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &process_token)) + { + _dbus_win_warn_win_error ("OpenProcessToken failed", GetLastError ()); + goto failed; + } + if ((!GetTokenInformation (process_token, TokenUser, NULL, 0, &n) + && GetLastError () != ERROR_INSUFFICIENT_BUFFER) + || (token_user = alloca (n)) == NULL + || !GetTokenInformation (process_token, TokenUser, token_user, n, &n)) + { + _dbus_win_warn_win_error ("GetTokenInformation failed", GetLastError ()); + goto failed; + } + psid = token_user->User.Sid; + if (!IsValidSid (psid)) + { + _dbus_verbose("%s invalid sid\n",__FUNCTION__); + goto failed; + } + if (!ConvertSidToStringSidA (psid, sid)) + { + _dbus_verbose("%s invalid sid\n",__FUNCTION__); + goto failed; + } +//okay: + retval = TRUE; + +failed: + if (process_token != INVALID_HANDLE_VALUE) + CloseHandle (process_token); + + _dbus_verbose("_dbus_getsid() returns %d\n",retval); + return retval; +} +#endif + +/************************************************************************ + + pipes + + ************************************************************************/ + +/** + * Creates a full-duplex pipe (as in socketpair()). + * Sets both ends of the pipe nonblocking. + * + * @todo libdbus only uses this for the debug-pipe server, so in + * principle it could be in dbus-sysdeps-util.c, except that + * dbus-sysdeps-util.c isn't in libdbus when tests are enabled and the + * debug-pipe server is used. + * + * @param fd1 return location for one end + * @param fd2 return location for the other end + * @param blocking #TRUE if pipe should be blocking + * @param error error return + * @returns #FALSE on failure (if error is set) + */ +dbus_bool_t +_dbus_full_duplex_pipe (int *fd1, + int *fd2, + dbus_bool_t blocking, + DBusError *error) +{ + SOCKET temp, socket1 = -1, socket2 = -1; + struct sockaddr_in saddr; + int len; + u_long arg; + fd_set read_set, write_set; + struct timeval tv; + int res; + + _dbus_win_startup_winsock (); + + temp = socket (AF_INET, SOCK_STREAM, 0); + if (temp == INVALID_SOCKET) + { + DBUS_SOCKET_SET_ERRNO (); + goto out0; + } + + _DBUS_ZERO (saddr); + saddr.sin_family = AF_INET; + saddr.sin_port = 0; + saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); + + if (bind (temp, (struct sockaddr *)&saddr, sizeof (saddr)) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + goto out0; + } + + if (listen (temp, 1) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + goto out0; + } + + len = sizeof (saddr); + if (getsockname (temp, (struct sockaddr *)&saddr, &len) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + goto out0; + } + + socket1 = socket (AF_INET, SOCK_STREAM, 0); + if (socket1 == INVALID_SOCKET) + { + DBUS_SOCKET_SET_ERRNO (); + goto out0; + } + + if (connect (socket1, (struct sockaddr *)&saddr, len) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + goto out1; + } + + socket2 = accept (temp, (struct sockaddr *) &saddr, &len); + if (socket2 == INVALID_SOCKET) + { + DBUS_SOCKET_SET_ERRNO (); + goto out1; + } + + if (!blocking) + { + arg = 1; + if (ioctlsocket (socket1, FIONBIO, &arg) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + goto out2; + } + + arg = 1; + if (ioctlsocket (socket2, FIONBIO, &arg) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + goto out2; + } + } + + *fd1 = socket1; + *fd2 = socket2; + + _dbus_verbose ("full-duplex pipe %d:%d <-> %d:%d\n", + *fd1, socket1, *fd2, socket2); + + closesocket (temp); + + return TRUE; + +out2: + closesocket (socket2); +out1: + closesocket (socket1); +out0: + closesocket (temp); + + dbus_set_error (error, _dbus_error_from_errno (errno), + "Could not setup socket pair: %s", + _dbus_strerror_from_errno ()); + + return FALSE; +} + +/** + * Wrapper for poll(). + * + * @param fds the file descriptors to poll + * @param n_fds number of descriptors in the array + * @param timeout_milliseconds timeout or -1 for infinite + * @returns numbers of fds with revents, or <0 on error + */ +int +_dbus_poll (DBusPollFD *fds, + int n_fds, + int timeout_milliseconds) +{ +#define USE_CHRIS_IMPL 0 + +#if USE_CHRIS_IMPL + +#define DBUS_POLL_CHAR_BUFFER_SIZE 2000 + char msg[DBUS_POLL_CHAR_BUFFER_SIZE]; + char *msgp; + + int ret = 0; + int i; + struct timeval tv; + int ready; + +#define DBUS_STACK_WSAEVENTS 256 + WSAEVENT eventsOnStack[DBUS_STACK_WSAEVENTS]; + WSAEVENT *pEvents = NULL; + if (n_fds > DBUS_STACK_WSAEVENTS) + pEvents = calloc(sizeof(WSAEVENT), n_fds); + else + pEvents = eventsOnStack; + + +#ifdef DBUS_ENABLE_VERBOSE_MODE + msgp = msg; + msgp += sprintf (msgp, "WSAEventSelect: to=%d\n\t", timeout_milliseconds); + for (i = 0; i < n_fds; i++) + { + static dbus_bool_t warned = FALSE; + DBusPollFD *fdp = &fds[i]; + + + if (fdp->events & _DBUS_POLLIN) + msgp += sprintf (msgp, "R:%d ", fdp->fd); + + if (fdp->events & _DBUS_POLLOUT) + msgp += sprintf (msgp, "W:%d ", fdp->fd); + + msgp += sprintf (msgp, "E:%d\n\t", fdp->fd); + + // FIXME: more robust code for long msg + // create on heap when msg[] becomes too small + if (msgp >= msg + DBUS_POLL_CHAR_BUFFER_SIZE) + { + _dbus_assert_not_reached ("buffer overflow in _dbus_poll"); + } + } + + msgp += sprintf (msgp, "\n"); + _dbus_verbose ("%s",msg); +#endif + for (i = 0; i < n_fds; i++) + { + DBusPollFD *fdp = &fds[i]; + WSAEVENT ev; + long lNetworkEvents = FD_OOB; + + ev = WSACreateEvent(); + + if (fdp->events & _DBUS_POLLIN) + lNetworkEvents |= FD_READ | FD_ACCEPT | FD_CLOSE; + + if (fdp->events & _DBUS_POLLOUT) + lNetworkEvents |= FD_WRITE | FD_CONNECT; + + WSAEventSelect(fdp->fd, ev, lNetworkEvents); + + pEvents[i] = ev; + } + + + ready = WSAWaitForMultipleEvents (n_fds, pEvents, FALSE, timeout_milliseconds, FALSE); + + if (DBUS_SOCKET_API_RETURNS_ERROR (ready)) + { + DBUS_SOCKET_SET_ERRNO (); + if (errno != WSAEWOULDBLOCK) + _dbus_verbose ("WSAWaitForMultipleEvents: failed: %s\n", _dbus_strerror_from_errno ()); + ret = -1; + } + else if (ready == WSA_WAIT_TIMEOUT) + { + _dbus_verbose ("WSAWaitForMultipleEvents: WSA_WAIT_TIMEOUT\n"); + ret = 0; + } + else if (ready >= WSA_WAIT_EVENT_0 && ready < (int)(WSA_WAIT_EVENT_0 + n_fds)) + { + msgp = msg; + msgp += sprintf (msgp, "WSAWaitForMultipleEvents: =%d\n\t", ready); + + for (i = 0; i < n_fds; i++) + { + DBusPollFD *fdp = &fds[i]; + WSANETWORKEVENTS ne; + + fdp->revents = 0; + + WSAEnumNetworkEvents(fdp->fd, pEvents[i], &ne); + + if (ne.lNetworkEvents & (FD_READ | FD_ACCEPT | FD_CLOSE)) + fdp->revents |= _DBUS_POLLIN; + + if (ne.lNetworkEvents & (FD_WRITE | FD_CONNECT)) + fdp->revents |= _DBUS_POLLOUT; + + if (ne.lNetworkEvents & (FD_OOB)) + fdp->revents |= _DBUS_POLLERR; + + if (ne.lNetworkEvents & (FD_READ | FD_ACCEPT | FD_CLOSE)) + msgp += sprintf (msgp, "R:%d ", fdp->fd); + + if (ne.lNetworkEvents & (FD_WRITE | FD_CONNECT)) + msgp += sprintf (msgp, "W:%d ", fdp->fd); + + if (ne.lNetworkEvents & (FD_OOB)) + msgp += sprintf (msgp, "E:%d ", fdp->fd); + + msgp += sprintf (msgp, "lNetworkEvents:%d ", ne.lNetworkEvents); + + if(ne.lNetworkEvents) + ret++; + + WSAEventSelect(fdp->fd, pEvents[i], 0); + } + + msgp += sprintf (msgp, "\n"); + _dbus_verbose ("%s",msg); + } + else + { + _dbus_verbose ("WSAWaitForMultipleEvents: failed for unknown reason!"); + ret = -1; + } + + for(i = 0; i < n_fds; i++) + { + WSACloseEvent(pEvents[i]); + } + + if (n_fds > DBUS_STACK_WSAEVENTS) + free(pEvents); + + return ret; + +#else /* USE_CHRIS_IMPL */ + +#define DBUS_POLL_CHAR_BUFFER_SIZE 2000 + char msg[DBUS_POLL_CHAR_BUFFER_SIZE]; + char *msgp; + + fd_set read_set, write_set, err_set; + int max_fd = 0; + int i; + struct timeval tv; + int ready; + + FD_ZERO (&read_set); + FD_ZERO (&write_set); + FD_ZERO (&err_set); + + +#ifdef DBUS_ENABLE_VERBOSE_MODE + msgp = msg; + msgp += sprintf (msgp, "select: to=%d\n\t", timeout_milliseconds); + for (i = 0; i < n_fds; i++) + { + static dbus_bool_t warned = FALSE; + DBusPollFD *fdp = &fds[i]; + + + if (fdp->events & _DBUS_POLLIN) + msgp += sprintf (msgp, "R:%d ", fdp->fd); + + if (fdp->events & _DBUS_POLLOUT) + msgp += sprintf (msgp, "W:%d ", fdp->fd); + + msgp += sprintf (msgp, "E:%d\n\t", fdp->fd); + + // FIXME: more robust code for long msg + // create on heap when msg[] becomes too small + if (msgp >= msg + DBUS_POLL_CHAR_BUFFER_SIZE) + { + _dbus_assert_not_reached ("buffer overflow in _dbus_poll"); + } + } + + msgp += sprintf (msgp, "\n"); + _dbus_verbose ("%s",msg); +#endif + for (i = 0; i < n_fds; i++) + { + DBusPollFD *fdp = &fds[i]; + + if (fdp->events & _DBUS_POLLIN) + FD_SET (fdp->fd, &read_set); + + if (fdp->events & _DBUS_POLLOUT) + FD_SET (fdp->fd, &write_set); + + FD_SET (fdp->fd, &err_set); + + max_fd = MAX (max_fd, fdp->fd); + } + + // Avoid random lockups with send(), for lack of a better solution so far + tv.tv_sec = timeout_milliseconds < 0 ? 1 : timeout_milliseconds / 1000; + tv.tv_usec = timeout_milliseconds < 0 ? 0 : (timeout_milliseconds % 1000) * 1000; + + ready = select (max_fd + 1, &read_set, &write_set, &err_set, &tv); + + if (DBUS_SOCKET_API_RETURNS_ERROR (ready)) + { + DBUS_SOCKET_SET_ERRNO (); + if (errno != WSAEWOULDBLOCK) + _dbus_verbose ("select: failed: %s\n", _dbus_strerror_from_errno ()); + } + else if (ready == 0) + _dbus_verbose ("select: = 0\n"); + else + if (ready > 0) + { +#ifdef DBUS_ENABLE_VERBOSE_MODE + msgp = msg; + msgp += sprintf (msgp, "select: = %d:\n\t", ready); + + for (i = 0; i < n_fds; i++) + { + DBusPollFD *fdp = &fds[i]; + + if (FD_ISSET (fdp->fd, &read_set)) + msgp += sprintf (msgp, "R:%d ", fdp->fd); + + if (FD_ISSET (fdp->fd, &write_set)) + msgp += sprintf (msgp, "W:%d ", fdp->fd); + + if (FD_ISSET (fdp->fd, &err_set)) + msgp += sprintf (msgp, "E:%d\n\t", fdp->fd); + } + msgp += sprintf (msgp, "\n"); + _dbus_verbose ("%s",msg); +#endif + + for (i = 0; i < n_fds; i++) + { + DBusPollFD *fdp = &fds[i]; + + fdp->revents = 0; + + if (FD_ISSET (fdp->fd, &read_set)) + fdp->revents |= _DBUS_POLLIN; + + if (FD_ISSET (fdp->fd, &write_set)) + fdp->revents |= _DBUS_POLLOUT; + + if (FD_ISSET (fdp->fd, &err_set)) + fdp->revents |= _DBUS_POLLERR; + } + } + return ready; +#endif /* USE_CHRIS_IMPL */ +} + + + + +/****************************************************************************** + +Original CVS version of dbus-sysdeps.c + +******************************************************************************/ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps.c Wrappers around system/libc features (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * Copyright (C) 2005 Novell, Inc. + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + + +/** + * Exit the process, returning the given value. + * + * @param code the exit code + */ +void +_dbus_exit (int code) +{ + _exit (code); +} + +/** + * Creates a socket and connects to a socket at the given host + * and port. The connection fd is returned, and is set up as + * nonblocking. + * + * @param host the host name to connect to + * @param port the port to connect to + * @param family the address family to listen on, NULL for all + * @param error return location for error code + * @returns connection file descriptor or -1 on error + */ +int +_dbus_connect_tcp_socket (const char *host, + const char *port, + const char *family, + DBusError *error) +{ + return _dbus_connect_tcp_socket_with_nonce (host, port, family, (const char*)NULL, error); +} + +int +_dbus_connect_tcp_socket_with_nonce (const char *host, + const char *port, + const char *family, + const char *noncefile, + DBusError *error) +{ + int fd = -1, res; + struct addrinfo hints; + struct addrinfo *ai, *tmp; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_win_startup_winsock (); + + _DBUS_ZERO (hints); + + if (!family) + hints.ai_family = AF_UNSPEC; + else if (!strcmp(family, "ipv4")) + hints.ai_family = AF_INET; + else if (!strcmp(family, "ipv6")) + hints.ai_family = AF_INET6; + else + { + dbus_set_error (error, + DBUS_ERROR_INVALID_ARGS, + "Unknown address family %s", family); + return -1; + } + hints.ai_protocol = IPPROTO_TCP; + hints.ai_socktype = SOCK_STREAM; +#ifdef AI_ADDRCONFIG + hints.ai_flags = AI_ADDRCONFIG; +#else + hints.ai_flags = 0; +#endif + + if ((res = getaddrinfo(host, port, &hints, &ai)) != 0 || !ai) + { + dbus_set_error (error, + _dbus_error_from_errno (res), + "Failed to lookup host/port: \"%s:%s\": %s (%d)", + host, port, _dbus_strerror(res), res); + return -1; + } + + tmp = ai; + while (tmp) + { + if ((fd = socket (tmp->ai_family, SOCK_STREAM, 0)) == INVALID_SOCKET) + { + DBUS_SOCKET_SET_ERRNO (); + dbus_set_error (error, + _dbus_error_from_errno (errno), + "Failed to open socket: %s", + _dbus_strerror_from_errno ()); + freeaddrinfo(ai); + return -1; + } + _DBUS_ASSERT_ERROR_IS_CLEAR(error); + + if (connect (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + closesocket(fd); + fd = -1; + tmp = tmp->ai_next; + continue; + } + + break; + } + freeaddrinfo(ai); + + if (fd == -1) + { + dbus_set_error (error, + _dbus_error_from_errno (errno), + "Failed to connect to socket \"%s:%s\" %s", + host, port, _dbus_strerror_from_errno ()); + return -1; + } + + if (noncefile != NULL) + { + DBusString noncefileStr; + dbus_bool_t ret; + if (!_dbus_string_init (&noncefileStr) || + !_dbus_string_append(&noncefileStr, noncefile)) + { + closesocket (fd); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + return -1; + } + + ret = _dbus_send_nonce (fd, &noncefileStr, error); + + _dbus_string_free (&noncefileStr); + + if (!ret) + { + closesocket (fd); + return -1; + } + } + + _dbus_fd_set_close_on_exec (fd); + + if (!_dbus_set_fd_nonblocking (fd, error)) + { + closesocket (fd); + return -1; + } + + return fd; +} + +/** + * Creates a socket and binds it to the given path, then listens on + * the socket. The socket is set to be nonblocking. In case of port=0 + * a random free port is used and returned in the port parameter. + * If inaddr_any is specified, the hostname is ignored. + * + * @param host the host name to listen on + * @param port the port to listen on, if zero a free port will be used + * @param family the address family to listen on, NULL for all + * @param retport string to return the actual port listened on + * @param fds_p location to store returned file descriptors + * @param error return location for errors + * @returns the number of listening file descriptors or -1 on error + */ + +int +_dbus_listen_tcp_socket (const char *host, + const char *port, + const char *family, + DBusString *retport, + int **fds_p, + DBusError *error) +{ + int nlisten_fd = 0, *listen_fd = NULL, res, i, port_num = -1; + struct addrinfo hints; + struct addrinfo *ai, *tmp; + + // On Vista, sockaddr_gen must be a sockaddr_in6, and not a sockaddr_in6_old + //That's required for family == IPv6(which is the default on Vista if family is not given) + //So we use our own union instead of sockaddr_gen: + + typedef union { + struct sockaddr Address; + struct sockaddr_in AddressIn; + struct sockaddr_in6 AddressIn6; + } mysockaddr_gen; + + *fds_p = NULL; + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + _dbus_win_startup_winsock (); + + _DBUS_ZERO (hints); + + if (!family) + hints.ai_family = AF_UNSPEC; + else if (!strcmp(family, "ipv4")) + hints.ai_family = AF_INET; + else if (!strcmp(family, "ipv6")) + hints.ai_family = AF_INET6; + else + { + dbus_set_error (error, + DBUS_ERROR_INVALID_ARGS, + "Unknown address family %s", family); + return -1; + } + + hints.ai_protocol = IPPROTO_TCP; + hints.ai_socktype = SOCK_STREAM; +#ifdef AI_ADDRCONFIG + hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE; +#else + hints.ai_flags = AI_PASSIVE; +#endif + + redo_lookup_with_port: + if ((res = getaddrinfo(host, port, &hints, &ai)) != 0 || !ai) + { + dbus_set_error (error, + _dbus_error_from_errno (res), + "Failed to lookup host/port: \"%s:%s\": %s (%d)", + host ? host : "*", port, _dbus_strerror(res), res); + return -1; + } + + tmp = ai; + while (tmp) + { + int fd = -1, *newlisten_fd; + if ((fd = socket (tmp->ai_family, SOCK_STREAM, 0)) == INVALID_SOCKET) + { + DBUS_SOCKET_SET_ERRNO (); + dbus_set_error (error, + _dbus_error_from_errno (errno), + "Failed to open socket: %s", + _dbus_strerror_from_errno ()); + goto failed; + } + _DBUS_ASSERT_ERROR_IS_CLEAR(error); + + if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to bind socket \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror_from_errno ()); + closesocket (fd); + goto failed; + } + + if (listen (fd, 30 /* backlog */) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to listen on socket \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror_from_errno ()); + closesocket (fd); + goto failed; + } + + newlisten_fd = dbus_realloc(listen_fd, sizeof(int)*(nlisten_fd+1)); + if (!newlisten_fd) + { + closesocket (fd); + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, + "Failed to allocate file handle array"); + goto failed; + } + listen_fd = newlisten_fd; + listen_fd[nlisten_fd] = fd; + nlisten_fd++; + + if (!_dbus_string_get_length(retport)) + { + /* If the user didn't specify a port, or used 0, then + the kernel chooses a port. After the first address + is bound to, we need to force all remaining addresses + to use the same port */ + if (!port || !strcmp(port, "0")) + { + mysockaddr_gen addr; + socklen_t addrlen = sizeof(addr); + char portbuf[10]; + + if (getsockname(fd, &addr.Address, &addrlen) == SOCKET_ERROR) + { + DBUS_SOCKET_SET_ERRNO (); + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to resolve port \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror_from_errno()); + goto failed; + } + snprintf( portbuf, sizeof( portbuf ) - 1, "%d", addr.AddressIn.sin_port ); + if (!_dbus_string_append(retport, portbuf)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto failed; + } + + /* Release current address list & redo lookup */ + port = _dbus_string_get_const_data(retport); + freeaddrinfo(ai); + goto redo_lookup_with_port; + } + else + { + if (!_dbus_string_append(retport, port)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto failed; + } + } + } + + tmp = tmp->ai_next; + } + freeaddrinfo(ai); + ai = NULL; + + if (!nlisten_fd) + { + _dbus_win_set_errno (WSAEADDRINUSE); + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to bind socket \"%s:%s\": %s", + host ? host : "*", port, _dbus_strerror_from_errno ()); + return -1; + } + + sscanf(_dbus_string_get_const_data(retport), "%d", &port_num); + + for (i = 0 ; i < nlisten_fd ; i++) + { + _dbus_fd_set_close_on_exec (listen_fd[i]); + if (!_dbus_set_fd_nonblocking (listen_fd[i], error)) + { + goto failed; + } + } + + *fds_p = listen_fd; + + return nlisten_fd; + + failed: + if (ai) + freeaddrinfo(ai); + for (i = 0 ; i < nlisten_fd ; i++) + closesocket (listen_fd[i]); + dbus_free(listen_fd); + return -1; +} + + +/** + * Accepts a connection on a listening socket. + * Handles EINTR for you. + * + * @param listen_fd the listen file descriptor + * @returns the connection fd of the client, or -1 on error + */ +int +_dbus_accept (int listen_fd) +{ + int client_fd; + + retry: + client_fd = accept (listen_fd, NULL, NULL); + + if (DBUS_SOCKET_IS_INVALID (client_fd)) + { + DBUS_SOCKET_SET_ERRNO (); + if (errno == EINTR) + goto retry; + } + + _dbus_verbose ("client fd %d accepted\n", client_fd); + + return client_fd; +} + + + + +dbus_bool_t +_dbus_send_credentials_socket (int handle, + DBusError *error) +{ +/* FIXME: for the session bus credentials shouldn't matter (?), but + * for the system bus they are presumably essential. A rough outline + * of a way to implement the credential transfer would be this: + * + * client waits to *read* a byte. + * + * server creates a named pipe with a random name, sends a byte + * contining its length, and its name. + * + * client reads the name, connects to it (using Win32 API). + * + * server waits for connection to the named pipe, then calls + * ImpersonateNamedPipeClient(), notes its now-current credentials, + * calls RevertToSelf(), closes its handles to the named pipe, and + * is done. (Maybe there is some other way to get the SID of a named + * pipe client without having to use impersonation?) + * + * client closes its handles and is done. + * + * Ralf: Why not sending credentials over the given this connection ? + * Using named pipes makes it impossible to be connected from a unix client. + * + */ + int bytes_written; + DBusString buf; + + _dbus_string_init_const_len (&buf, "\0", 1); +again: + bytes_written = _dbus_write_socket (handle, &buf, 0, 1 ); + + if (bytes_written < 0 && errno == EINTR) + goto again; + + if (bytes_written < 0) + { + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to write credentials byte: %s", + _dbus_strerror_from_errno ()); + return FALSE; + } + else if (bytes_written == 0) + { + dbus_set_error (error, DBUS_ERROR_IO_ERROR, + "wrote zero bytes writing credentials byte"); + return FALSE; + } + else + { + _dbus_assert (bytes_written == 1); + _dbus_verbose ("wrote 1 zero byte, credential sending isn't implemented yet\n"); + return TRUE; + } + return TRUE; +} + +/** + * Reads a single byte which must be nul (an error occurs otherwise), + * and reads unix credentials if available. Fills in pid/uid/gid with + * -1 if no credentials are available. Return value indicates whether + * a byte was read, not whether we got valid credentials. On some + * systems, such as Linux, reading/writing the byte isn't actually + * required, but we do it anyway just to avoid multiple codepaths. + * + * Fails if no byte is available, so you must select() first. + * + * The point of the byte is that on some systems we have to + * use sendmsg()/recvmsg() to transmit credentials. + * + * @param client_fd the client file descriptor + * @param credentials struct to fill with credentials of client + * @param error location to store error code + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_read_credentials_socket (int handle, + DBusCredentials *credentials, + DBusError *error) +{ + int bytes_read = 0; + DBusString buf; + + // could fail due too OOM + if (_dbus_string_init(&buf)) + { + bytes_read = _dbus_read_socket(handle, &buf, 1 ); + + if (bytes_read > 0) + _dbus_verbose("got one zero byte from server"); + + _dbus_string_free(&buf); + } + + _dbus_credentials_add_from_current_process (credentials); + _dbus_verbose("FIXME: get faked credentials from current process"); + + return TRUE; +} + +/** +* Checks to make sure the given directory is +* private to the user +* +* @param dir the name of the directory +* @param error error return +* @returns #FALSE on failure +**/ +dbus_bool_t +_dbus_check_dir_is_private_to_user (DBusString *dir, DBusError *error) +{ + /* TODO */ + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + return TRUE; +} + + +/** + * Appends the given filename to the given directory. + * + * @todo it might be cute to collapse multiple '/' such as "foo//" + * concat "//bar" + * + * @param dir the directory name + * @param next_component the filename + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_concat_dir_and_file (DBusString *dir, + const DBusString *next_component) +{ + dbus_bool_t dir_ends_in_slash; + dbus_bool_t file_starts_with_slash; + + if (_dbus_string_get_length (dir) == 0 || + _dbus_string_get_length (next_component) == 0) + return TRUE; + + dir_ends_in_slash = + ('/' == _dbus_string_get_byte (dir, _dbus_string_get_length (dir) - 1) || + '\\' == _dbus_string_get_byte (dir, _dbus_string_get_length (dir) - 1)); + + file_starts_with_slash = + ('/' == _dbus_string_get_byte (next_component, 0) || + '\\' == _dbus_string_get_byte (next_component, 0)); + + if (dir_ends_in_slash && file_starts_with_slash) + { + _dbus_string_shorten (dir, 1); + } + else if (!(dir_ends_in_slash || file_starts_with_slash)) + { + if (!_dbus_string_append_byte (dir, '\\')) + return FALSE; + } + + return _dbus_string_copy (next_component, 0, dir, + _dbus_string_get_length (dir)); +} + +/*---------------- DBusCredentials ----------------------------------*/ + +/** + * Adds the credentials corresponding to the given username. + * + * @param credentials credentials to fill in + * @param username the username + * @returns #TRUE if the username existed and we got some credentials + */ +dbus_bool_t +_dbus_credentials_add_from_user (DBusCredentials *credentials, + const DBusString *username) +{ + return _dbus_credentials_add_windows_sid (credentials, + _dbus_string_get_const_data(username)); +} + +/** + * Adds the credentials of the current process to the + * passed-in credentials object. + * + * @param credentials credentials to add to + * @returns #FALSE if no memory; does not properly roll back on failure, so only some credentials may have been added + */ + +dbus_bool_t +_dbus_credentials_add_from_current_process (DBusCredentials *credentials) +{ + dbus_bool_t retval = FALSE; + char *sid = NULL; + + if (!_dbus_getsid(&sid)) + goto failed; + + if (!_dbus_credentials_add_unix_pid(credentials, _dbus_getpid())) + goto failed; + + if (!_dbus_credentials_add_windows_sid (credentials,sid)) + goto failed; + + retval = TRUE; + goto end; +failed: + retval = FALSE; +end: + if (sid) + LocalFree(sid); + + return retval; +} + +/** + * Append to the string the identity we would like to have when we + * authenticate, on UNIX this is the current process UID and on + * Windows something else, probably a Windows SID string. No escaping + * is required, that is done in dbus-auth.c. The username here + * need not be anything human-readable, it can be the machine-readable + * form i.e. a user id. + * + * @param str the string to append to + * @returns #FALSE on no memory + * @todo to which class belongs this + */ +dbus_bool_t +_dbus_append_user_from_current_process (DBusString *str) +{ + dbus_bool_t retval = FALSE; + char *sid = NULL; + + if (!_dbus_getsid(&sid)) + return FALSE; + + retval = _dbus_string_append (str,sid); + + LocalFree(sid); + return retval; +} + +/** + * Gets our process ID + * @returns process ID + */ +dbus_pid_t +_dbus_getpid (void) +{ + return GetCurrentProcessId (); +} + +/** nanoseconds in a second */ +#define NANOSECONDS_PER_SECOND 1000000000 +/** microseconds in a second */ +#define MICROSECONDS_PER_SECOND 1000000 +/** milliseconds in a second */ +#define MILLISECONDS_PER_SECOND 1000 +/** nanoseconds in a millisecond */ +#define NANOSECONDS_PER_MILLISECOND 1000000 +/** microseconds in a millisecond */ +#define MICROSECONDS_PER_MILLISECOND 1000 + +/** + * Sleeps the given number of milliseconds. + * @param milliseconds number of milliseconds + */ +void +_dbus_sleep_milliseconds (int milliseconds) +{ + Sleep (milliseconds); +} + + +/** + * Get current time, as in gettimeofday(). + * + * @param tv_sec return location for number of seconds + * @param tv_usec return location for number of microseconds + */ +void +_dbus_get_current_time (long *tv_sec, + long *tv_usec) +{ + FILETIME ft; + dbus_uint64_t time64; + + GetSystemTimeAsFileTime (&ft); + + memcpy (&time64, &ft, sizeof (time64)); + + /* Convert from 100s of nanoseconds since 1601-01-01 + * to Unix epoch. Yes, this is Y2038 unsafe. + */ + time64 -= DBUS_INT64_CONSTANT (116444736000000000); + time64 /= 10; + + if (tv_sec) + *tv_sec = time64 / 1000000; + + if (tv_usec) + *tv_usec = time64 % 1000000; +} + + +/** + * signal (SIGPIPE, SIG_IGN); + */ +void +_dbus_disable_sigpipe (void) +{ +} + +/** + * Creates a directory; succeeds if the directory + * is created or already existed. + * + * @param filename directory filename + * @param error initialized error object + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_create_directory (const DBusString *filename, + DBusError *error) +{ + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + if (!CreateDirectoryA (filename_c, NULL)) + { + if (GetLastError () == ERROR_ALREADY_EXISTS) + return TRUE; + + dbus_set_error (error, DBUS_ERROR_FAILED, + "Failed to create directory %s: %s\n", + filename_c, _dbus_strerror_from_errno ()); + return FALSE; + } + else + return TRUE; +} + + +/** + * Generates the given number of random bytes, + * using the best mechanism we can come up with. + * + * @param str the string + * @param n_bytes the number of random bytes to append to string + * @returns #TRUE on success, #FALSE if no memory + */ +dbus_bool_t +_dbus_generate_random_bytes (DBusString *str, + int n_bytes) +{ + int old_len; + char *p; + HCRYPTPROV hprov; + + old_len = _dbus_string_get_length (str); + + if (!_dbus_string_lengthen (str, n_bytes)) + return FALSE; + + p = _dbus_string_get_data_len (str, old_len, n_bytes); + + if (!CryptAcquireContext (&hprov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) + return FALSE; + + if (!CryptGenRandom (hprov, n_bytes, p)) + { + CryptReleaseContext (hprov, 0); + return FALSE; + } + + CryptReleaseContext (hprov, 0); + + return TRUE; +} + +/** + * Gets the temporary files directory by inspecting the environment variables + * TMPDIR, TMP, and TEMP in that order. If none of those are set "/tmp" is returned + * + * @returns location of temp directory + */ +const char* +_dbus_get_tmpdir(void) +{ + static const char* tmpdir = NULL; + static char buf[1000]; + + if (tmpdir == NULL) + { + char *last_slash; + + if (!GetTempPathA (sizeof (buf), buf)) + { + _dbus_warn ("GetTempPath failed\n"); + _dbus_abort (); + } + + /* Drop terminating backslash or slash */ + last_slash = _mbsrchr (buf, '\\'); + if (last_slash > buf && last_slash[1] == '\0') + last_slash[0] = '\0'; + last_slash = _mbsrchr (buf, '/'); + if (last_slash > buf && last_slash[1] == '\0') + last_slash[0] = '\0'; + + tmpdir = buf; + } + + _dbus_assert(tmpdir != NULL); + + return tmpdir; +} + + +/** + * Deletes the given file. + * + * @param filename the filename + * @param error error location + * + * @returns #TRUE if unlink() succeeded + */ +dbus_bool_t +_dbus_delete_file (const DBusString *filename, + DBusError *error) +{ + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + if (DeleteFileA (filename_c) == 0) + { + dbus_set_error (error, DBUS_ERROR_FAILED, + "Failed to delete file %s: %s\n", + filename_c, _dbus_strerror_from_errno ()); + return FALSE; + } + else + return TRUE; +} + +/* Forward declaration of prototype used in next function */ +static dbus_bool_t +_dbus_get_install_root(char *prefix, int len); + +/* + * replaces the term DBUS_PREFIX in configure_time_path by the + * current dbus installation directory. On unix this function is a noop + * + * @param configure_time_path + * @return real path + */ +const char * +_dbus_replace_install_prefix (const char *configure_time_path) +{ +#ifndef DBUS_PREFIX + return configure_time_path; +#else + static char retval[1000]; + static char runtime_prefix[1000]; + int len = 1000; + int i; + + if (!configure_time_path) + return NULL; + + if ((!_dbus_get_install_root(runtime_prefix, len) || + strncmp (configure_time_path, DBUS_PREFIX "/", + strlen (DBUS_PREFIX) + 1))) { + strcat (retval, configure_time_path); + return retval; + } + + strcpy (retval, runtime_prefix); + strcat (retval, configure_time_path + strlen (DBUS_PREFIX) + 1); + + /* Somehow, in some situations, backslashes get collapsed in the string. + * Since windows C library accepts both forward and backslashes as + * path separators, convert all backslashes to forward slashes. + */ + + for(i = 0; retval[i] != '\0'; i++) { + if(retval[i] == '\\') + retval[i] = '/'; + } + return retval; +#endif +} + +#if !defined (DBUS_DISABLE_ASSERTS) || defined(DBUS_BUILD_TESTS) + +#if defined(_MSC_VER) || defined(DBUS_WINCE) +# ifdef BACKTRACES +# undef BACKTRACES +# endif +#else +# define BACKTRACES +#endif + +#ifdef BACKTRACES +/* + * Backtrace Generator + * + * Copyright 2004 Eric Poech + * Copyright 2004 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <winver.h> +#include <imagehlp.h> +#include <stdio.h> + +#define DPRINTF _dbus_warn + +#ifdef _MSC_VER +#define BOOL int + +#define __i386__ +#endif + +//#define MAKE_FUNCPTR(f) static typeof(f) * p##f + +//MAKE_FUNCPTR(StackWalk); +//MAKE_FUNCPTR(SymGetModuleBase); +//MAKE_FUNCPTR(SymFunctionTableAccess); +//MAKE_FUNCPTR(SymInitialize); +//MAKE_FUNCPTR(SymGetSymFromAddr); +//MAKE_FUNCPTR(SymGetModuleInfo); +static BOOL (WINAPI *pStackWalk)( + DWORD MachineType, + HANDLE hProcess, + HANDLE hThread, + LPSTACKFRAME StackFrame, + PVOID ContextRecord, + PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine, + PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine, + PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine, + PTRANSLATE_ADDRESS_ROUTINE TranslateAddress +); +#ifdef _WIN64 +static DWORD64 (WINAPI *pSymGetModuleBase)( + HANDLE hProcess, + DWORD64 dwAddr +); +static PVOID (WINAPI *pSymFunctionTableAccess)( + HANDLE hProcess, + DWORD64 AddrBase +); +#else +static DWORD (WINAPI *pSymGetModuleBase)( + HANDLE hProcess, + DWORD dwAddr +); +static PVOID (WINAPI *pSymFunctionTableAccess)( + HANDLE hProcess, + DWORD AddrBase +); +#endif +static BOOL (WINAPI *pSymInitialize)( + HANDLE hProcess, + PSTR UserSearchPath, + BOOL fInvadeProcess +); +static BOOL (WINAPI *pSymGetSymFromAddr)( + HANDLE hProcess, + DWORD Address, + PDWORD Displacement, + PIMAGEHLP_SYMBOL Symbol +); +static BOOL (WINAPI *pSymGetModuleInfo)( + HANDLE hProcess, + DWORD dwAddr, + PIMAGEHLP_MODULE ModuleInfo +); +static DWORD (WINAPI *pSymSetOptions)( + DWORD SymOptions +); + + +static BOOL init_backtrace() +{ + HMODULE hmodDbgHelp = LoadLibraryA("dbghelp"); +/* + #define GETFUNC(x) \ + p##x = (typeof(x)*)GetProcAddress(hmodDbgHelp, #x); \ + if (!p##x) \ + { \ + return FALSE; \ + } + */ + + +// GETFUNC(StackWalk); +// GETFUNC(SymGetModuleBase); +// GETFUNC(SymFunctionTableAccess); +// GETFUNC(SymInitialize); +// GETFUNC(SymGetSymFromAddr); +// GETFUNC(SymGetModuleInfo); + +#define FUNC(x) #x + + pStackWalk = (BOOL (WINAPI *)( +DWORD MachineType, +HANDLE hProcess, +HANDLE hThread, +LPSTACKFRAME StackFrame, +PVOID ContextRecord, +PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine, +PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine, +PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine, +PTRANSLATE_ADDRESS_ROUTINE TranslateAddress +))GetProcAddress (hmodDbgHelp, FUNC(StackWalk)); +#ifdef _WIN64 + pSymGetModuleBase=(DWORD64 (WINAPI *)( + HANDLE hProcess, + DWORD64 dwAddr +))GetProcAddress (hmodDbgHelp, FUNC(SymGetModuleBase)); + pSymFunctionTableAccess=(PVOID (WINAPI *)( + HANDLE hProcess, + DWORD64 AddrBase +))GetProcAddress (hmodDbgHelp, FUNC(SymFunctionTableAccess)); +#else + pSymGetModuleBase=(DWORD (WINAPI *)( + HANDLE hProcess, + DWORD dwAddr +))GetProcAddress (hmodDbgHelp, FUNC(SymGetModuleBase)); + pSymFunctionTableAccess=(PVOID (WINAPI *)( + HANDLE hProcess, + DWORD AddrBase +))GetProcAddress (hmodDbgHelp, FUNC(SymFunctionTableAccess)); +#endif + pSymInitialize = (BOOL (WINAPI *)( + HANDLE hProcess, + PSTR UserSearchPath, + BOOL fInvadeProcess +))GetProcAddress (hmodDbgHelp, FUNC(SymInitialize)); + pSymGetSymFromAddr = (BOOL (WINAPI *)( + HANDLE hProcess, + DWORD Address, + PDWORD Displacement, + PIMAGEHLP_SYMBOL Symbol +))GetProcAddress (hmodDbgHelp, FUNC(SymGetSymFromAddr)); + pSymGetModuleInfo = (BOOL (WINAPI *)( + HANDLE hProcess, + DWORD dwAddr, + PIMAGEHLP_MODULE ModuleInfo +))GetProcAddress (hmodDbgHelp, FUNC(SymGetModuleInfo)); +pSymSetOptions = (DWORD (WINAPI *)( +DWORD SymOptions +))GetProcAddress (hmodDbgHelp, FUNC(SymSetOptions)); + + + pSymSetOptions(SYMOPT_UNDNAME); + + pSymInitialize(GetCurrentProcess(), NULL, TRUE); + + return TRUE; +} + +static void dump_backtrace_for_thread(HANDLE hThread) +{ + STACKFRAME sf; + CONTEXT context; + DWORD dwImageType; + + if (!pStackWalk) + if (!init_backtrace()) + return; + + /* can't use this function for current thread as GetThreadContext + * doesn't support getting context from current thread */ + if (hThread == GetCurrentThread()) + return; + + DPRINTF("Backtrace:\n"); + + _DBUS_ZERO(context); + context.ContextFlags = CONTEXT_FULL; + + SuspendThread(hThread); + + if (!GetThreadContext(hThread, &context)) + { + DPRINTF("Couldn't get thread context (error %ld)\n", GetLastError()); + ResumeThread(hThread); + return; + } + + _DBUS_ZERO(sf); + +#ifdef __i386__ + sf.AddrFrame.Offset = context.Ebp; + sf.AddrFrame.Mode = AddrModeFlat; + sf.AddrPC.Offset = context.Eip; + sf.AddrPC.Mode = AddrModeFlat; + dwImageType = IMAGE_FILE_MACHINE_I386; +#elif _M_X64 + dwImageType = IMAGE_FILE_MACHINE_AMD64; + sf.AddrPC.Offset = context.Rip; + sf.AddrPC.Mode = AddrModeFlat; + sf.AddrFrame.Offset = context.Rsp; + sf.AddrFrame.Mode = AddrModeFlat; + sf.AddrStack.Offset = context.Rsp; + sf.AddrStack.Mode = AddrModeFlat; +#elif _M_IA64 + dwImageType = IMAGE_FILE_MACHINE_IA64; + sf.AddrPC.Offset = context.StIIP; + sf.AddrPC.Mode = AddrModeFlat; + sf.AddrFrame.Offset = context.IntSp; + sf.AddrFrame.Mode = AddrModeFlat; + sf.AddrBStore.Offset= context.RsBSP; + sf.AddrBStore.Mode = AddrModeFlat; + sf.AddrStack.Offset = context.IntSp; + sf.AddrStack.Mode = AddrModeFlat; +#else +# error You need to fill in the STACKFRAME structure for your architecture +#endif + + while (pStackWalk(dwImageType, GetCurrentProcess(), + hThread, &sf, &context, NULL, pSymFunctionTableAccess, + pSymGetModuleBase, NULL)) + { + BYTE buffer[256]; + IMAGEHLP_SYMBOL * pSymbol = (IMAGEHLP_SYMBOL *)buffer; + DWORD dwDisplacement; + + pSymbol->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL); + pSymbol->MaxNameLength = sizeof(buffer) - sizeof(IMAGEHLP_SYMBOL) + 1; + + if (!pSymGetSymFromAddr(GetCurrentProcess(), sf.AddrPC.Offset, + &dwDisplacement, pSymbol)) + { + IMAGEHLP_MODULE ModuleInfo; + ModuleInfo.SizeOfStruct = sizeof(ModuleInfo); + + if (!pSymGetModuleInfo(GetCurrentProcess(), sf.AddrPC.Offset, + &ModuleInfo)) + DPRINTF("1\t%p\n", (void*)sf.AddrPC.Offset); + else + DPRINTF("2\t%s+0x%lx\n", ModuleInfo.ImageName, + sf.AddrPC.Offset - ModuleInfo.BaseOfImage); + } + else if (dwDisplacement) + DPRINTF("3\t%s+0x%lx\n", pSymbol->Name, dwDisplacement); + else + DPRINTF("4\t%s\n", pSymbol->Name); + } + + ResumeThread(hThread); +} + +static DWORD WINAPI dump_thread_proc(LPVOID lpParameter) +{ + dump_backtrace_for_thread((HANDLE)lpParameter); + return 0; +} + +/* cannot get valid context from current thread, so we have to execute + * backtrace from another thread */ +static void dump_backtrace() +{ + HANDLE hCurrentThread; + HANDLE hThread; + DWORD dwThreadId; + DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), + GetCurrentProcess(), &hCurrentThread, 0, FALSE, DUPLICATE_SAME_ACCESS); + hThread = CreateThread(NULL, 0, dump_thread_proc, (LPVOID)hCurrentThread, + 0, &dwThreadId); + WaitForSingleObject(hThread, INFINITE); + CloseHandle(hThread); + CloseHandle(hCurrentThread); +} +#endif +#endif /* asserts or tests enabled */ + +#ifdef BACKTRACES +void _dbus_print_backtrace(void) +{ + init_backtrace(); + dump_backtrace(); +} +#else +void _dbus_print_backtrace(void) +{ + _dbus_verbose (" D-Bus not compiled with backtrace support\n"); +} +#endif + +static dbus_uint32_t fromAscii(char ascii) +{ + if(ascii >= '0' && ascii <= '9') + return ascii - '0'; + if(ascii >= 'A' && ascii <= 'F') + return ascii - 'A' + 10; + if(ascii >= 'a' && ascii <= 'f') + return ascii - 'a' + 10; + return 0; +} + +dbus_bool_t _dbus_read_local_machine_uuid (DBusGUID *machine_id, + dbus_bool_t create_if_not_found, + DBusError *error) +{ +#ifdef DBUS_WINCE + return TRUE; + // TODO +#else + HW_PROFILE_INFOA info; + char *lpc = &info.szHwProfileGuid[0]; + dbus_uint32_t u; + + // the hw-profile guid lives long enough + if(!GetCurrentHwProfileA(&info)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); // FIXME + return FALSE; + } + + // Form: {12340001-4980-1920-6788-123456789012} + lpc++; + // 12340001 + u = ((fromAscii(lpc[0]) << 0) | + (fromAscii(lpc[1]) << 4) | + (fromAscii(lpc[2]) << 8) | + (fromAscii(lpc[3]) << 12) | + (fromAscii(lpc[4]) << 16) | + (fromAscii(lpc[5]) << 20) | + (fromAscii(lpc[6]) << 24) | + (fromAscii(lpc[7]) << 28)); + machine_id->as_uint32s[0] = u; + + lpc += 9; + // 4980-1920 + u = ((fromAscii(lpc[0]) << 0) | + (fromAscii(lpc[1]) << 4) | + (fromAscii(lpc[2]) << 8) | + (fromAscii(lpc[3]) << 12) | + (fromAscii(lpc[5]) << 16) | + (fromAscii(lpc[6]) << 20) | + (fromAscii(lpc[7]) << 24) | + (fromAscii(lpc[8]) << 28)); + machine_id->as_uint32s[1] = u; + + lpc += 10; + // 6788-1234 + u = ((fromAscii(lpc[0]) << 0) | + (fromAscii(lpc[1]) << 4) | + (fromAscii(lpc[2]) << 8) | + (fromAscii(lpc[3]) << 12) | + (fromAscii(lpc[5]) << 16) | + (fromAscii(lpc[6]) << 20) | + (fromAscii(lpc[7]) << 24) | + (fromAscii(lpc[8]) << 28)); + machine_id->as_uint32s[2] = u; + + lpc += 9; + // 56789012 + u = ((fromAscii(lpc[0]) << 0) | + (fromAscii(lpc[1]) << 4) | + (fromAscii(lpc[2]) << 8) | + (fromAscii(lpc[3]) << 12) | + (fromAscii(lpc[4]) << 16) | + (fromAscii(lpc[5]) << 20) | + (fromAscii(lpc[6]) << 24) | + (fromAscii(lpc[7]) << 28)); + machine_id->as_uint32s[3] = u; +#endif + return TRUE; +} + +static +HANDLE _dbus_global_lock (const char *mutexname) +{ + HANDLE mutex; + DWORD gotMutex; + + mutex = CreateMutexA( NULL, FALSE, mutexname ); + if( !mutex ) + { + return FALSE; + } + + gotMutex = WaitForSingleObject( mutex, INFINITE ); + switch( gotMutex ) + { + case WAIT_ABANDONED: + ReleaseMutex (mutex); + CloseHandle (mutex); + return 0; + case WAIT_FAILED: + case WAIT_TIMEOUT: + return 0; + } + + return mutex; +} + +static +void _dbus_global_unlock (HANDLE mutex) +{ + ReleaseMutex (mutex); + CloseHandle (mutex); +} + +// for proper cleanup in dbus-daemon +static HANDLE hDBusDaemonMutex = NULL; +static HANDLE hDBusSharedMem = NULL; +// sync _dbus_daemon_publish_session_bus_address, _dbus_daemon_unpublish_session_bus_address and _dbus_daemon_already_runs +static const char *cUniqueDBusInitMutex = "UniqueDBusInitMutex"; +// sync _dbus_get_autolaunch_address +static const char *cDBusAutolaunchMutex = "DBusAutolaunchMutex"; +// mutex to determine if dbus-daemon is already started (per user) +static const char *cDBusDaemonMutex = "DBusDaemonMutex"; +// named shm for dbus adress info (per user) +static const char *cDBusDaemonAddressInfo = "DBusDaemonAddressInfo"; + +dbus_bool_t +_dbus_get_install_root(char *prefix, int len); + +static dbus_bool_t +_dbus_get_install_root_as_hash(DBusString *out) +{ + DBusString install_path; + + char path[MAX_PATH*2]; + int path_size = sizeof(path); + + if (!_dbus_get_install_root(path,path_size)) + return FALSE; + + _dbus_string_init(&install_path); + _dbus_string_append(&install_path,path); + + _dbus_string_init(out); + _dbus_string_tolower_ascii(&install_path,0,_dbus_string_get_length(&install_path)); + + if (!_dbus_sha_compute (&install_path, out)) + return FALSE; + + return TRUE; +} + +static dbus_bool_t +_dbus_get_address_string (DBusString *out, const char *basestring, const char *scope) +{ + _dbus_string_init(out); + _dbus_string_append(out,basestring); + + if (!scope) + { + return TRUE; + } + else if (strcmp(scope,"*install-path") == 0 + // for 1.3 compatibility + || strcmp(scope,"install-path") == 0) + { + DBusString temp; + if (!_dbus_get_install_root_as_hash(&temp)) + { + _dbus_string_free(out); + return FALSE; + } + _dbus_string_append(out,"-"); + _dbus_string_append(out,_dbus_string_get_const_data(&temp)); + _dbus_string_free(&temp); + } + else if (strcmp(scope,"*user") == 0) + { + _dbus_string_append(out,"-"); + if (!_dbus_append_user_from_current_process(out)) + { + _dbus_string_free(out); + return FALSE; + } + } + else if (strlen(scope) > 0) + { + _dbus_string_append(out,"-"); + _dbus_string_append(out,scope); + return TRUE; + } + return TRUE; +} + +static dbus_bool_t +_dbus_get_shm_name (DBusString *out,const char *scope) +{ + return _dbus_get_address_string (out,cDBusDaemonAddressInfo,scope); +} + +static dbus_bool_t +_dbus_get_mutex_name (DBusString *out,const char *scope) +{ + return _dbus_get_address_string (out,cDBusDaemonMutex,scope); +} + +dbus_bool_t +_dbus_daemon_is_session_bus_address_published (const char *scope) +{ + HANDLE lock; + HANDLE mutex; + DBusString mutex_name; + DWORD ret; + + if (!_dbus_get_mutex_name(&mutex_name,scope)) + { + _dbus_string_free( &mutex_name ); + return FALSE; + } + + if (hDBusDaemonMutex) + return TRUE; + + // sync _dbus_daemon_publish_session_bus_address, _dbus_daemon_unpublish_session_bus_address and _dbus_daemon_already_runs + lock = _dbus_global_lock( cUniqueDBusInitMutex ); + + // we use CreateMutex instead of OpenMutex because of possible race conditions, + // see http://msdn.microsoft.com/en-us/library/ms684315%28VS.85%29.aspx + hDBusDaemonMutex = CreateMutexA( NULL, FALSE, _dbus_string_get_const_data(&mutex_name) ); + + _dbus_global_unlock( lock ); + + _dbus_string_free( &mutex_name ); + + if (hDBusDaemonMutex == NULL) + return FALSE; + if (GetLastError() == ERROR_ALREADY_EXISTS) + { + CloseHandle(hDBusDaemonMutex); + hDBusDaemonMutex = NULL; + return TRUE; + } + // mutex wasn't created before, so return false. + // We leave the mutex name allocated for later reusage + // in _dbus_daemon_publish_session_bus_address. + return FALSE; +} + +dbus_bool_t +_dbus_daemon_publish_session_bus_address (const char* address, const char *scope) +{ + HANDLE lock; + char *shared_addr = NULL; + DWORD ret; + char addressInfo[1024]; + DBusString shm_name; + DBusString mutex_name; + + _dbus_assert (address); + + if (!_dbus_get_mutex_name(&mutex_name,scope)) + { + _dbus_string_free( &mutex_name ); + return FALSE; + } + + // sync _dbus_daemon_publish_session_bus_address, _dbus_daemon_unpublish_session_bus_address and _dbus_daemon_already_runs + lock = _dbus_global_lock( cUniqueDBusInitMutex ); + + if (!hDBusDaemonMutex) + { + hDBusDaemonMutex = CreateMutexA( NULL, FALSE, _dbus_string_get_const_data(&mutex_name) ); + } + _dbus_string_free( &mutex_name ); + + if (!_dbus_get_shm_name(&shm_name,scope)) + { + _dbus_string_free( &shm_name ); + _dbus_global_unlock( lock ); + return FALSE; + } + + // create shm + hDBusSharedMem = CreateFileMappingA( INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, + 0, strlen( address ) + 1, _dbus_string_get_const_data(&shm_name) ); + _dbus_assert( hDBusSharedMem ); + + shared_addr = MapViewOfFile( hDBusSharedMem, FILE_MAP_WRITE, 0, 0, 0 ); + + _dbus_assert (shared_addr); + + strcpy( shared_addr, address); + + // cleanup + UnmapViewOfFile( shared_addr ); + + _dbus_global_unlock( lock ); + _dbus_verbose( "published session bus address at %s\n",_dbus_string_get_const_data (&shm_name) ); + + _dbus_string_free( &shm_name ); + return TRUE; +} + +void +_dbus_daemon_unpublish_session_bus_address (void) +{ + HANDLE lock; + + // sync _dbus_daemon_publish_session_bus_address, _dbus_daemon_unpublish_session_bus_address and _dbus_daemon_already_runs + lock = _dbus_global_lock( cUniqueDBusInitMutex ); + + CloseHandle( hDBusSharedMem ); + + hDBusSharedMem = NULL; + + ReleaseMutex( hDBusDaemonMutex ); + + CloseHandle( hDBusDaemonMutex ); + + hDBusDaemonMutex = NULL; + + _dbus_global_unlock( lock ); +} + +static dbus_bool_t +_dbus_get_autolaunch_shm (DBusString *address, DBusString *shm_name) +{ + HANDLE sharedMem; + char *shared_addr; + int i; + + // read shm + for(i=0;i<20;++i) { + // we know that dbus-daemon is available, so we wait until shm is available + sharedMem = OpenFileMappingA( FILE_MAP_READ, FALSE, _dbus_string_get_const_data(shm_name)); + if( sharedMem == 0 ) + Sleep( 100 ); + if ( sharedMem != 0) + break; + } + + if( sharedMem == 0 ) + return FALSE; + + shared_addr = MapViewOfFile( sharedMem, FILE_MAP_READ, 0, 0, 0 ); + + if( !shared_addr ) + return FALSE; + + _dbus_string_init( address ); + + _dbus_string_append( address, shared_addr ); + + // cleanup + UnmapViewOfFile( shared_addr ); + + CloseHandle( sharedMem ); + + return TRUE; +} + +static dbus_bool_t +_dbus_daemon_already_runs (DBusString *address, DBusString *shm_name, const char *scope) +{ + HANDLE lock; + HANDLE daemon; + DBusString mutex_name; + dbus_bool_t bRet = TRUE; + + if (!_dbus_get_mutex_name(&mutex_name,scope)) + { + _dbus_string_free( &mutex_name ); + return FALSE; + } + + // sync _dbus_daemon_publish_session_bus_address, _dbus_daemon_unpublish_session_bus_address and _dbus_daemon_already_runs + lock = _dbus_global_lock( cUniqueDBusInitMutex ); + + // do checks + daemon = CreateMutexA( NULL, FALSE, _dbus_string_get_const_data(&mutex_name) ); + if(WaitForSingleObject( daemon, 10 ) != WAIT_TIMEOUT) + { + ReleaseMutex (daemon); + CloseHandle (daemon); + + _dbus_global_unlock( lock ); + _dbus_string_free( &mutex_name ); + return FALSE; + } + + // read shm + bRet = _dbus_get_autolaunch_shm( address, shm_name ); + + // cleanup + CloseHandle ( daemon ); + + _dbus_global_unlock( lock ); + _dbus_string_free( &mutex_name ); + + return bRet; +} + +dbus_bool_t +_dbus_get_autolaunch_address (const char *scope, DBusString *address, + DBusError *error) +{ + HANDLE mutex; + STARTUPINFOA si; + PROCESS_INFORMATION pi; + dbus_bool_t retval = FALSE; + LPSTR lpFile; + char dbus_exe_path[MAX_PATH]; + char dbus_args[MAX_PATH * 2]; + const char * daemon_name = DBUS_DAEMON_NAME ".exe"; + DBusString shm_name; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + if (!_dbus_get_shm_name(&shm_name,scope)) + { + dbus_set_error_const (error, DBUS_ERROR_FAILED, "could not determine shm name"); + return FALSE; + } + + mutex = _dbus_global_lock ( cDBusAutolaunchMutex ); + + if (_dbus_daemon_already_runs(address,&shm_name,scope)) + { + _dbus_verbose( "found running dbus daemon at %s\n", + _dbus_string_get_const_data (&shm_name) ); + retval = TRUE; + goto out; + } + + if (!SearchPathA(NULL, daemon_name, NULL, sizeof(dbus_exe_path), dbus_exe_path, &lpFile)) + { + printf ("please add the path to %s to your PATH environment variable\n", daemon_name); + printf ("or start the daemon manually\n\n"); + goto out; + } + + // Create process + ZeroMemory( &si, sizeof(si) ); + si.cb = sizeof(si); + ZeroMemory( &pi, sizeof(pi) ); + + _snprintf(dbus_args, sizeof(dbus_args) - 1, "\"%s\" %s", dbus_exe_path, " --session"); + +// argv[i] = "--config-file=bus\\session.conf"; +// printf("create process \"%s\" %s\n", dbus_exe_path, dbus_args); + if(CreateProcessA(dbus_exe_path, dbus_args, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) + { + CloseHandle (pi.hThread); + CloseHandle (pi.hProcess); + retval = _dbus_get_autolaunch_shm( address, &shm_name ); + if (retval == FALSE) + dbus_set_error_const (error, DBUS_ERROR_FAILED, "Failed to get autolaunch address from launched dbus-daemon"); + } + else + { + dbus_set_error_const (error, DBUS_ERROR_FAILED, "Failed to launch dbus-daemon"); + retval = FALSE; + } + +out: + if (retval) + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + else + _DBUS_ASSERT_ERROR_IS_SET (error); + + _dbus_global_unlock (mutex); + + return retval; + } + + +/** Makes the file readable by every user in the system. + * + * @param filename the filename + * @param error error location + * @returns #TRUE if the file's permissions could be changed. + */ +dbus_bool_t +_dbus_make_file_world_readable(const DBusString *filename, + DBusError *error) +{ + // TODO + return TRUE; +} + +/** + * return the relocated DATADIR + * + * @returns relocated DATADIR static string + */ + +static const char * +_dbus_windows_get_datadir (void) +{ + return _dbus_replace_install_prefix(DBUS_DATADIR); +} + +#undef DBUS_DATADIR +#define DBUS_DATADIR _dbus_windows_get_datadir () + + +#define DBUS_STANDARD_SESSION_SERVICEDIR "/dbus-1/services" +#define DBUS_STANDARD_SYSTEM_SERVICEDIR "/dbus-1/system-services" + +/** + * Returns the standard directories for a session bus to look for service + * activation files + * + * On Windows this should be data directories: + * + * %CommonProgramFiles%/dbus + * + * and + * + * relocated DBUS_DATADIR + * + * @param dirs the directory list we are returning + * @returns #FALSE on OOM + */ + +dbus_bool_t +_dbus_get_standard_session_servicedirs (DBusList **dirs) +{ + const char *common_progs; + DBusString servicedir_path; + + if (!_dbus_string_init (&servicedir_path)) + return FALSE; + +#ifdef DBUS_WINCE + { + /* On Windows CE, we adjust datadir dynamically to installation location. */ + const char *data_dir = _dbus_getenv ("DBUS_DATADIR"); + + if (data_dir != NULL) + { + if (!_dbus_string_append (&servicedir_path, data_dir)) + goto oom; + + if (!_dbus_string_append (&servicedir_path, _DBUS_PATH_SEPARATOR)) + goto oom; + } + } +#else +/* + the code for accessing services requires absolute base pathes + in case DBUS_DATADIR is relative make it absolute +*/ +#ifdef DBUS_WIN + { + DBusString p; + + _dbus_string_init_const (&p, DBUS_DATADIR); + + if (!_dbus_path_is_absolute (&p)) + { + char install_root[1000]; + if (_dbus_get_install_root (install_root, sizeof(install_root))) + if (!_dbus_string_append (&servicedir_path, install_root)) + goto oom; + } + } +#endif + if (!_dbus_string_append (&servicedir_path, DBUS_DATADIR)) + goto oom; + + if (!_dbus_string_append (&servicedir_path, _DBUS_PATH_SEPARATOR)) + goto oom; +#endif + + common_progs = _dbus_getenv ("CommonProgramFiles"); + + if (common_progs != NULL) + { + if (!_dbus_string_append (&servicedir_path, common_progs)) + goto oom; + + if (!_dbus_string_append (&servicedir_path, _DBUS_PATH_SEPARATOR)) + goto oom; + } + + if (!_dbus_split_paths_and_append (&servicedir_path, + DBUS_STANDARD_SESSION_SERVICEDIR, + dirs)) + goto oom; + + _dbus_string_free (&servicedir_path); + return TRUE; + + oom: + _dbus_string_free (&servicedir_path); + return FALSE; +} + +/** + * Returns the standard directories for a system bus to look for service + * activation files + * + * On UNIX this should be the standard xdg freedesktop.org data directories: + * + * XDG_DATA_DIRS=${XDG_DATA_DIRS-/usr/local/share:/usr/share} + * + * and + * + * DBUS_DATADIR + * + * On Windows there is no system bus and this function can return nothing. + * + * @param dirs the directory list we are returning + * @returns #FALSE on OOM + */ + +dbus_bool_t +_dbus_get_standard_system_servicedirs (DBusList **dirs) +{ + *dirs = NULL; + return TRUE; +} + +_DBUS_DEFINE_GLOBAL_LOCK (atomic); + +/** + * Atomically increments an integer + * + * @param atomic pointer to the integer to increment + * @returns the value before incrementing + * + */ +dbus_int32_t +_dbus_atomic_inc (DBusAtomic *atomic) +{ + // +/- 1 is needed here! + // no volatile argument with mingw + return InterlockedIncrement (&atomic->value) - 1; +} + +/** + * Atomically decrement an integer + * + * @param atomic pointer to the integer to decrement + * @returns the value before decrementing + * + */ +dbus_int32_t +_dbus_atomic_dec (DBusAtomic *atomic) +{ + // +/- 1 is needed here! + // no volatile argument with mingw + return InterlockedDecrement (&atomic->value) + 1; +} + +/** + * Called when the bus daemon is signaled to reload its configuration; any + * caches should be nuked. Of course any caches that need explicit reload + * are probably broken, but c'est la vie. + * + * + */ +void +_dbus_flush_caches (void) +{ +} + +/** + * See if errno is EAGAIN or EWOULDBLOCK (this has to be done differently + * for Winsock so is abstracted) + * + * @returns #TRUE if errno == EAGAIN or errno == EWOULDBLOCK + */ +dbus_bool_t +_dbus_get_is_errno_eagain_or_ewouldblock (void) +{ + return errno == WSAEWOULDBLOCK; +} + +/** + * return the absolute path of the dbus installation + * + * @param s buffer for installation path + * @param len length of buffer + * @returns #FALSE on failure + */ +static dbus_bool_t +_dbus_get_install_root(char *prefix, int len) +{ + //To find the prefix, we cut the filename and also \bin\ if present + char* p = 0; + int i; + DWORD pathLength; + char *lastSlash; + SetLastError( 0 ); + pathLength = GetModuleFileNameA(_dbus_win_get_dll_hmodule(), prefix, len); + if ( pathLength == 0 || GetLastError() != 0 ) { + *prefix = '\0'; + return FALSE; + } + lastSlash = _mbsrchr(prefix, '\\'); + if (lastSlash == NULL) { + *prefix = '\0'; + return FALSE; + } + //cut off binary name + lastSlash[1] = 0; + + //cut possible "\\bin" + + //this fails if we are in a double-byte system codepage and the + //folder's name happens to end with the *bytes* + //"\\bin"... (I.e. the second byte of some Han character and then + //the Latin "bin", but that is not likely I think... + if (lastSlash - prefix >= 4 && strnicmp(lastSlash - 4, "\\bin", 4) == 0) + lastSlash[-3] = 0; + else if (lastSlash - prefix >= 10 && strnicmp(lastSlash - 10, "\\bin\\debug", 10) == 0) + lastSlash[-9] = 0; + else if (lastSlash - prefix >= 12 && strnicmp(lastSlash - 12, "\\bin\\release", 12) == 0) + lastSlash[-11] = 0; + + return TRUE; +} + +/** + find config file either from installation or build root according to + the following path layout + install-root/ + bin/dbus-daemon[d].exe + etc/<config-file>.conf *or* etc/dbus-1/<config-file>.conf + (the former above is what dbus4win uses, the latter above is + what a "normal" Unix-style "make install" uses) + + build-root/ + bin/dbus-daemon[d].exe + bus/<config-file>.conf +*/ +dbus_bool_t +_dbus_get_config_file_name(DBusString *config_file, char *s) +{ + char path[MAX_PATH*2]; + int path_size = sizeof(path); + + if (!_dbus_get_install_root(path,path_size)) + return FALSE; + + if(strlen(s) + 4 + strlen(path) > sizeof(path)-2) + return FALSE; + strcat(path,"etc\\"); + strcat(path,s); + if (_dbus_file_exists(path)) + { + // find path from executable + if (!_dbus_string_append (config_file, path)) + return FALSE; + } + else + { + if (!_dbus_get_install_root(path,path_size)) + return FALSE; + if(strlen(s) + 11 + strlen(path) > sizeof(path)-2) + return FALSE; + strcat(path,"etc\\dbus-1\\"); + strcat(path,s); + + if (_dbus_file_exists(path)) + { + if (!_dbus_string_append (config_file, path)) + return FALSE; + } + else + { + if (!_dbus_get_install_root(path,path_size)) + return FALSE; + if(strlen(s) + 4 + strlen(path) > sizeof(path)-2) + return FALSE; + strcat(path,"bus\\"); + strcat(path,s); + + if (_dbus_file_exists(path)) + { + if (!_dbus_string_append (config_file, path)) + return FALSE; + } + } + } + return TRUE; +} + +/** + * Append the absolute path of the system.conf file + * (there is no system bus on Windows so this can just + * return FALSE and print a warning or something) + * + * @param str the string to append to + * @returns #FALSE if no memory + */ +dbus_bool_t +_dbus_append_system_config_file (DBusString *str) +{ + return _dbus_get_config_file_name(str, "system.conf"); +} + +/** + * Append the absolute path of the session.conf file. + * + * @param str the string to append to + * @returns #FALSE if no memory + */ +dbus_bool_t +_dbus_append_session_config_file (DBusString *str) +{ + return _dbus_get_config_file_name(str, "session.conf"); +} + +/* See comment in dbus-sysdeps-unix.c */ +dbus_bool_t +_dbus_lookup_session_address (dbus_bool_t *supported, + DBusString *address, + DBusError *error) +{ + /* Probably fill this in with something based on COM? */ + *supported = FALSE; + return TRUE; +} + +/** + * Appends the directory in which a keyring for the given credentials + * should be stored. The credentials should have either a Windows or + * UNIX user in them. The directory should be an absolute path. + * + * On UNIX the directory is ~/.dbus-keyrings while on Windows it should probably + * be something else, since the dotfile convention is not normal on Windows. + * + * @param directory string to append directory to + * @param credentials credentials the directory should be for + * + * @returns #FALSE on no memory + */ +dbus_bool_t +_dbus_append_keyring_directory_for_credentials (DBusString *directory, + DBusCredentials *credentials) +{ + DBusString homedir; + DBusString dotdir; + dbus_uid_t uid; + const char *homepath; + const char *homedrive; + + _dbus_assert (credentials != NULL); + _dbus_assert (!_dbus_credentials_are_anonymous (credentials)); + + if (!_dbus_string_init (&homedir)) + return FALSE; + + homedrive = _dbus_getenv("HOMEDRIVE"); + if (homedrive != NULL && *homedrive != '\0') + { + _dbus_string_append(&homedir,homedrive); + } + + homepath = _dbus_getenv("HOMEPATH"); + if (homepath != NULL && *homepath != '\0') + { + _dbus_string_append(&homedir,homepath); + } + +#ifdef DBUS_BUILD_TESTS + { + const char *override; + + override = _dbus_getenv ("DBUS_TEST_HOMEDIR"); + if (override != NULL && *override != '\0') + { + _dbus_string_set_length (&homedir, 0); + if (!_dbus_string_append (&homedir, override)) + goto failed; + + _dbus_verbose ("Using fake homedir for testing: %s\n", + _dbus_string_get_const_data (&homedir)); + } + else + { + static dbus_bool_t already_warned = FALSE; + if (!already_warned) + { + _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid\n"); + already_warned = TRUE; + } + } + } +#endif + +#ifdef DBUS_WINCE + /* It's not possible to create a .something directory in Windows CE + using the file explorer. */ +#define KEYRING_DIR "dbus-keyrings" +#else +#define KEYRING_DIR ".dbus-keyrings" +#endif + + _dbus_string_init_const (&dotdir, KEYRING_DIR); + if (!_dbus_concat_dir_and_file (&homedir, + &dotdir)) + goto failed; + + if (!_dbus_string_copy (&homedir, 0, + directory, _dbus_string_get_length (directory))) { + goto failed; + } + + _dbus_string_free (&homedir); + return TRUE; + + failed: + _dbus_string_free (&homedir); + return FALSE; +} + +/** Checks if a file exists +* +* @param file full path to the file +* @returns #TRUE if file exists +*/ +dbus_bool_t +_dbus_file_exists (const char *file) +{ + DWORD attributes = GetFileAttributesA (file); + + if (attributes != INVALID_FILE_ATTRIBUTES && GetLastError() != ERROR_PATH_NOT_FOUND) + return TRUE; + else + return FALSE; +} + +/** + * A wrapper around strerror() because some platforms + * may be lame and not have strerror(). + * + * @param error_number errno. + * @returns error description. + */ +const char* +_dbus_strerror (int error_number) +{ +#ifdef DBUS_WINCE + // TODO + return "unknown"; +#else + const char *msg; + + switch (error_number) + { + case WSAEINTR: + return "Interrupted function call"; + case WSAEACCES: + return "Permission denied"; + case WSAEFAULT: + return "Bad address"; + case WSAEINVAL: + return "Invalid argument"; + case WSAEMFILE: + return "Too many open files"; + case WSAEWOULDBLOCK: + return "Resource temporarily unavailable"; + case WSAEINPROGRESS: + return "Operation now in progress"; + case WSAEALREADY: + return "Operation already in progress"; + case WSAENOTSOCK: + return "Socket operation on nonsocket"; + case WSAEDESTADDRREQ: + return "Destination address required"; + case WSAEMSGSIZE: + return "Message too long"; + case WSAEPROTOTYPE: + return "Protocol wrong type for socket"; + case WSAENOPROTOOPT: + return "Bad protocol option"; + case WSAEPROTONOSUPPORT: + return "Protocol not supported"; + case WSAESOCKTNOSUPPORT: + return "Socket type not supported"; + case WSAEOPNOTSUPP: + return "Operation not supported"; + case WSAEPFNOSUPPORT: + return "Protocol family not supported"; + case WSAEAFNOSUPPORT: + return "Address family not supported by protocol family"; + case WSAEADDRINUSE: + return "Address already in use"; + case WSAEADDRNOTAVAIL: + return "Cannot assign requested address"; + case WSAENETDOWN: + return "Network is down"; + case WSAENETUNREACH: + return "Network is unreachable"; + case WSAENETRESET: + return "Network dropped connection on reset"; + case WSAECONNABORTED: + return "Software caused connection abort"; + case WSAECONNRESET: + return "Connection reset by peer"; + case WSAENOBUFS: + return "No buffer space available"; + case WSAEISCONN: + return "Socket is already connected"; + case WSAENOTCONN: + return "Socket is not connected"; + case WSAESHUTDOWN: + return "Cannot send after socket shutdown"; + case WSAETIMEDOUT: + return "Connection timed out"; + case WSAECONNREFUSED: + return "Connection refused"; + case WSAEHOSTDOWN: + return "Host is down"; + case WSAEHOSTUNREACH: + return "No route to host"; + case WSAEPROCLIM: + return "Too many processes"; + case WSAEDISCON: + return "Graceful shutdown in progress"; + case WSATYPE_NOT_FOUND: + return "Class type not found"; + case WSAHOST_NOT_FOUND: + return "Host not found"; + case WSATRY_AGAIN: + return "Nonauthoritative host not found"; + case WSANO_RECOVERY: + return "This is a nonrecoverable error"; + case WSANO_DATA: + return "Valid name, no data record of requested type"; + case WSA_INVALID_HANDLE: + return "Specified event object handle is invalid"; + case WSA_INVALID_PARAMETER: + return "One or more parameters are invalid"; + case WSA_IO_INCOMPLETE: + return "Overlapped I/O event object not in signaled state"; + case WSA_IO_PENDING: + return "Overlapped operations will complete later"; + case WSA_NOT_ENOUGH_MEMORY: + return "Insufficient memory available"; + case WSA_OPERATION_ABORTED: + return "Overlapped operation aborted"; +#ifdef WSAINVALIDPROCTABLE + + case WSAINVALIDPROCTABLE: + return "Invalid procedure table from service provider"; +#endif +#ifdef WSAINVALIDPROVIDER + + case WSAINVALIDPROVIDER: + return "Invalid service provider version number"; +#endif +#ifdef WSAPROVIDERFAILEDINIT + + case WSAPROVIDERFAILEDINIT: + return "Unable to initialize a service provider"; +#endif + + case WSASYSCALLFAILURE: + return "System call failure"; + } + msg = strerror (error_number); + if (msg == NULL) + msg = "unknown"; + + return msg; +#endif //DBUS_WINCE +} + +/** + * Assigns an error name and message corresponding to a Win32 error + * code to a DBusError. Does nothing if error is #NULL. + * + * @param error the error. + * @param code the Win32 error code + */ +void +_dbus_win_set_error_from_win_error (DBusError *error, + int code) +{ + char *msg; + + /* As we want the English message, use the A API */ + FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_IGNORE_INSERTS | + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, code, MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US), + (LPSTR) &msg, 0, NULL); + if (msg) + { + char *msg_copy; + + msg_copy = dbus_malloc (strlen (msg)); + strcpy (msg_copy, msg); + LocalFree (msg); + + dbus_set_error (error, "win32.error", "%s", msg_copy); + } + else + dbus_set_error (error, "win32.error", "Unknown error code %d or FormatMessage failed", code); +} + +void +_dbus_win_warn_win_error (const char *message, + int code) +{ + DBusError error; + + dbus_error_init (&error); + _dbus_win_set_error_from_win_error (&error, code); + _dbus_warn ("%s: %s\n", message, error.message); + dbus_error_free (&error); +} + +/** + * Removes a directory; Directory must be empty + * + * @param filename directory filename + * @param error initialized error object + * @returns #TRUE on success + */ +dbus_bool_t +_dbus_delete_directory (const DBusString *filename, + DBusError *error) +{ + const char *filename_c; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + + filename_c = _dbus_string_get_const_data (filename); + + if (RemoveDirectoryA (filename_c) == 0) + { + char *emsg = _dbus_win_error_string (GetLastError ()); + dbus_set_error (error, _dbus_win_error_from_last_error (), + "Failed to remove directory %s: %s", + filename_c, emsg); + _dbus_win_free_error_string (emsg); + return FALSE; + } + + return TRUE; +} + +/** @} end of sysdeps-win */ +/* tests in dbus-sysdeps-util.c */ + diff --git a/dbus/dbus-sysdeps-win.h b/dbus/dbus-sysdeps-win.h new file mode 100644 index 00000000..a8ff9433 --- /dev/null +++ b/dbus/dbus-sysdeps-win.h @@ -0,0 +1,88 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps.c Wrappers around system/libc features (internal to D-BUS implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * Copyright (C) 2005 Novell, Inc. + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_SYSDEPS_WIN_H +#define DBUS_SYSDEPS_WIN_H + +extern void *_dbus_win_get_dll_hmodule (void); +#define _WINSOCKAPI_ + +#include "dbus-hash.h" +#include "dbus-string.h" +#include <ctype.h> +#include <malloc.h> +#include <windows.h> +#undef interface + +#define DBUS_CONSOLE_DIR "/var/run/console/" + + +void _dbus_win_set_errno (int err); +const char* _dbus_win_error_from_last_error (void); + +void _dbus_win_startup_winsock (void); +void _dbus_win_warn_win_error (const char *message, + int code); + +char * _dbus_win_error_string (int error_number); +void _dbus_win_free_error_string (char *string); + +extern const char* _dbus_lm_strerror (int error_number); + + +dbus_bool_t _dbus_win_account_to_sid (const wchar_t *waccount, + void **ppsid, + DBusError *error); + +dbus_bool_t +_dbus_win32_sid_to_name_and_domain (dbus_uid_t uid, + wchar_t **wname, + wchar_t **wdomain, + DBusError *error); + + +/* Don't define DBUS_CONSOLE_DIR on Win32 */ + +wchar_t *_dbus_win_utf8_to_utf16 (const char *str, + DBusError *error); +char *_dbus_win_utf16_to_utf8 (const wchar_t *str, + DBusError *error); + +void _dbus_win_set_error_from_win_error (DBusError *error, int code); + +dbus_bool_t +_dbus_win_sid_to_name_and_domain (dbus_uid_t uid, + wchar_t **wname, + wchar_t **wdomain, + DBusError *error); + +dbus_bool_t _dbus_file_exists (const char *filename); + +dbus_bool_t _dbus_get_config_file_name(DBusString *config_file, + char *s); + +#endif + +/** @} end of sysdeps-win.h */ diff --git a/dbus/dbus-sysdeps-wince-glue.c b/dbus/dbus-sysdeps-wince-glue.c new file mode 100644 index 00000000..74b1371f --- /dev/null +++ b/dbus/dbus-sysdeps-wince-glue.c @@ -0,0 +1,1165 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps-wince-glue.c Wrappers for Windows CE around system/libc features (internal to D-BUS implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * Copyright (C) 2005 Novell, Inc. + * Copyright (C) 2006 Ralf Habacker <ralf.habacker@freenet.de> + * Copyright (C) 2006 Peter Kümmel <syntheticpp@gmx.net> + * Copyright (C) 2006 Christian Ehrlicher <ch.ehrlicher@gmx.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-internals.h" +#include "dbus-sysdeps.h" +#include "dbus-sysdeps-win.h" + +#include <windows.h> +/* Including shlobj.h creates trouble on some compilers. Just chicken + out here by defining just what we need. */ +#ifndef CSIDL_PERSONAL +#define CSIDL_PERSONAL 5 +#endif + + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ +static char * +stpcpy (char *dest, const char *src) +{ + char *d = dest; + const char *s = src; + + do + *d++ = *s; + while (*s++ != '\0'); + + return d - 1; +} + + +/* This is special cased, because we must avoid using many dbus + functions (such as memory allocations): Those functions may in turn + cause verbose output and check the flag! */ +static char * +get_verbose_setting() +{ + const wchar_t dir[] = L"Software\\freedesktop\\DBus"; + const wchar_t name[] = L"Verbose"; + HKEY root_key; + HKEY key_handle; + DWORD nbytes; + DWORD n1; + DWORD type; + wchar_t *result_w = NULL; + char *result; + int len; + + root_key = HKEY_LOCAL_MACHINE; + if (RegOpenKeyExW (root_key, dir, 0, KEY_READ, &key_handle)) + return NULL; + + nbytes = 1; + if (RegQueryValueExW (key_handle, name, 0, NULL, NULL, &nbytes)) + { + RegCloseKey (key_handle); + return NULL; + } + /* Round up to multiple of wchar_t, convert to number of wchar_t's, and add 1. */ + n1 = ((nbytes + sizeof(wchar_t) - 1) / sizeof (wchar_t)) + 1; + result_w = malloc (n1 * sizeof (wchar_t)); + if (!result_w) + { + RegCloseKey (key_handle); + return NULL; + } + if (RegQueryValueExW (key_handle, name, 0, &type, (LPBYTE) result_w, &nbytes)) + { + RegCloseKey (key_handle); + free (result_w); + return NULL; + } + RegCloseKey (key_handle); + result_w[n1 - 1] = 0; /* Make sure it is really a string. */ + + /* NOTE: REG_MULTI_SZ and REG_EXPAND_SZ not supported, because they + are not needed in this module. */ + if (type != REG_SZ) + { + free (result_w); + return NULL; + } + + len = WideCharToMultiByte (CP_UTF8, 0, result_w, -1, NULL, 0, NULL, NULL); + if (len < 0) + { + free (result_w); + return NULL; + } + + result = malloc (len + 1); + if (!result) + { + free (result_w); + return NULL; + } + + len = WideCharToMultiByte (CP_UTF8, 0, result_w, -1, result, len, NULL, NULL); + free (result_w); + if (len < 0) + { + free (result); + return NULL; + } + return result; +} + + +/* Return a string from the W32 Registry or NULL in case of error. + Caller must release the return value. A NULL for root is an alias + for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn. */ +static char * +read_w32_registry_string (const char *root, const char *dir, const char *name) +{ + HKEY root_key, key_handle; + DWORD n1, nbytes, type; + char *result = NULL; + + if ( !root ) + root_key = HKEY_CURRENT_USER; + else if ( !strcmp( root, "HKEY_CLASSES_ROOT" ) ) + root_key = HKEY_CLASSES_ROOT; + else if ( !strcmp( root, "HKEY_CURRENT_USER" ) ) + root_key = HKEY_CURRENT_USER; + else if ( !strcmp( root, "HKEY_LOCAL_MACHINE" ) ) + root_key = HKEY_LOCAL_MACHINE; + else if ( !strcmp( root, "HKEY_USERS" ) ) + root_key = HKEY_USERS; + else + return NULL; + + if (RegOpenKeyExA (root_key, dir, 0, KEY_READ, &key_handle)) + { + if (root) + return NULL; /* no need for a RegClose, so return direct */ + /* It seems to be common practise to fall back to HKLM. */ + if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) + return NULL; /* still no need for a RegClose, so return direct */ + } + + nbytes = 1; + if (RegQueryValueExA (key_handle, name, 0, NULL, NULL, &nbytes)) + { + if (root) + goto out; + /* Try to fallback to HKLM also for a missing value. */ + RegCloseKey (key_handle); + if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) + return NULL; /* Nope. */ + if (RegQueryValueExA (key_handle, name, 0, NULL, NULL, &nbytes)) + goto out; + } + n1 = nbytes + 1; + result = malloc (n1); + if (!result) + goto out; + if (RegQueryValueExA (key_handle, name, 0, &type, result, &n1)) + { + free(result); + result = NULL; + goto out; + } + result[nbytes] = 0; /* Make sure it is really a string. */ + + out: + RegCloseKey (key_handle); + return result; +} + + +static char * +find_inst_dir () +{ + return read_w32_registry_string ("HKEY_LOCAL_MACHINE", + "Software\\freedesktop\\DBus", + "Install Directory"); +} + + +static char * +find_env_in_registry (const char *name) +{ + return read_w32_registry_string ("HKEY_LOCAL_MACHINE", + "Software\\freedesktop\\DBus", + name); +} + + +static char * +find_program_in_inst_dir (const char *name) +{ + char *result = NULL; + char *tmp; + + tmp = find_inst_dir (); + if (!tmp) + return NULL; + + result = malloc (strlen (tmp) + 5 + strlen (name) + 1); + if (!result) + { + free (tmp); + return NULL; + } + + strcpy (stpcpy (stpcpy (result, tmp), "\\bin\\"), name); + free (tmp); + + return result; +} + + +static char * +find_inst_subdir (const char *name) +{ + char *result = NULL; + char *tmp; + + tmp = find_inst_dir (); + if (!tmp) + return NULL; + + result = malloc (strlen (tmp) + 1 + strlen (name) + 1); + if (!result) + { + free (tmp); + return NULL; + } + + strcpy (stpcpy (stpcpy (result, tmp), "\\"), name); + free (tmp); + + return result; +} + + +static char * +find_my_documents_folder () +{ + /* One for safety, just in case. */ + char dir[MAX_PATH + 1]; + char *result; + + dir[0] = '\0'; + /* May return false even if successful. */ + SHGetSpecialFolderPathA (0, dir, CSIDL_PERSONAL, 0); + if (dir[0] == '\0') + return NULL; + + result = malloc (strlen (dir) + 1); + if (!result) + return NULL; + strcpy (result, dir); + return result; +} + + +#define MAX_ENV 30 + +char *environ[MAX_ENV + 1]; + +char * +getenv (const char *name) +{ + static char *past_result; + char **envp; + int idx; + + if (past_result) + { + free (past_result); + past_result = NULL; + } + + if (! strcmp (name, "DBUS_VERBOSE")) + return past_result = get_verbose_setting (); + else if (! strcmp (name, "HOMEPATH")) + return past_result = find_my_documents_folder (); + else if (! strcmp (name, "DBUS_DATADIR")) + return past_result = find_inst_subdir ("share"); + + for (envp = environ; *envp != 0; envp++) + { + const char *varp = name; + char *ep = *envp; + int same_name = 0; + + while (*varp == *ep && *varp != '\0') + { + ++ep; + ++varp; + }; + + if (*varp == '\0' && *ep == '=') + return ep + 1; + } + + return NULL; +} + + +int +putenv (char *str) +{ + char **envp; + int idx; + for (envp = environ; *envp != 0; envp++) + { + char *varp = str; + char *ep = *envp; + int same_name = 0; + + while (*varp == *ep && *varp != '\0') + { + if (*varp == '=') + same_name = 1; + ++ep; + ++varp; + }; + + if (*varp == *ep && *varp == '\0') + return 0; + if (same_name) + { + *envp = str; + return 0; + } + } + + idx = envp - environ; + if (idx > MAX_ENV) + { + _dbus_win_set_errno (ENOMEM); + return -1; + } + + environ[idx] = str; + return 0; +} + + +clock_t +clock (void) +{ + return GetTickCount (); +} + + +void +abort (void) +{ + /* This is what windows does. */ + exit (3); +} + + +void +GetSystemTimeAsFileTime (LPFILETIME ftp) +{ + SYSTEMTIME st; + GetSystemTime (&st); + SystemTimeToFileTime (&st, ftp); +} + + +unsigned char* +_mbsrchr (const unsigned char* str, unsigned int ch) +{ + /* FIXME. This is not multi-byte safe. */ + return strrchr (str, ch); +} + + +HANDLE OpenFileMappingA(DWORD dwDesiredAccess, + BOOL bInheritHandle, + LPCSTR lpName) +{ + DWORD flProtect = 0; + HANDLE hMapping; + + if (dwDesiredAccess & FILE_MAP_READ) + flProtect |= PAGE_READONLY; + + if (dwDesiredAccess & FILE_MAP_WRITE) + flProtect |= PAGE_READWRITE; + + SetLastError (0); + hMapping = CreateFileMappingA(INVALID_HANDLE_VALUE, + NULL, flProtect, 0, 0, lpName); + if (hMapping != INVALID_HANDLE_VALUE) + { + /* Just in case Windows CE changes its behaviour, we check for + the right error value here. */ + if (GetLastError () != ERROR_ALREADY_EXISTS) + { + CloseHandle(hMapping); + hMapping = INVALID_HANDLE_VALUE; + } + } + return hMapping; +} + + +BOOL +MoveFileExA (LPCSTR lpExistingFileName, LPCSTR lpNewFileName, DWORD dwFlags) +{ + _dbus_assert (dwFlags == MOVEFILE_REPLACE_EXISTING); + + if (_dbus_file_exists (lpNewFileName)) + { + BOOL result = DeleteFileA (lpNewFileName); + if (result == 0) + return FALSE; + } + return MoveFileA (lpExistingFileName, lpNewFileName); +} + + +BOOL +SetHandleInformation (HANDLE hObject, DWORD dwMask, DWORD dwFlags) +{ + _dbus_assert (dwMask == (HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE)); + _dbus_assert (dwFlags == 0); + + /* Not supported on Windows CE, and actually the default. So just + return overwhelming success. */ + return 1; +} + + +DWORD +SearchPathA (LPCSTR lpPath, LPCSTR lpFileName, LPCSTR lpExtension, + DWORD nBufferLength, LPSTR lpBuffer, LPSTR* lpFilePart) +{ + char *filename; + char *filepart; + int filename_len; + + _dbus_assert (lpPath == NULL); + _dbus_assert (lpExtension == NULL); + + filename = find_program_in_inst_dir (lpFileName); + if (!filename) + { + SetLastError (ERROR_FILE_NOT_FOUND); + return 0; + } + + filename_len = strlen (filename) + 1; + if (filename_len > nBufferLength) + { + free (filename); + return filename_len; + } + + strcpy (lpBuffer, filename); + free (filename); + + filepart = _mbsrchr (lpBuffer, '\\'); + if (!filepart) + filepart = lpBuffer; + *lpFilePart = filepart; + + return filename_len - 1; +} + + +/** Gets our SID + * @param points to sid buffer, need to be freed with LocalFree() + * @returns process sid + */ +dbus_bool_t +_dbus_getsid(char **sid) +{ + /* There is nothing like this on Windows CE, so we fake it. */ + static const char asid[] = "S-1-5-21-515967899-920026266-1708537768-1000"; + char *buf = LocalAlloc (LMEM_FIXED, sizeof (asid)); + if (!buf) + { + _dbus_win_warn_win_error ("LocalAlloc failed", GetLastError ()); + return FALSE; + } + + memcpy (buf, asid, sizeof (asid)); + *sid = buf; + return TRUE; +} + + +BOOL +LookupAccountNameW (LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSID Sid, PDWORD cbSid, + LPWSTR ReferencedDomainName, PDWORD cchReferencedDomainName, PSID_NAME_USE peUse) +{ + /* Currently not needed. */ + return FALSE; +} + + +BOOL +IsValidSid (PSID psid) +{ + /* Currently not needed. */ + return FALSE; +} + + +HANDLE +CreateFileA (LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSharedMode, + LPSECURITY_ATTRIBUTES lpSecurityAttributes, + DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, + HANDLE hTemplateFile) +{ + wchar_t *filename; + HANDLE result; + int err; + + filename = _dbus_win_utf8_to_utf16 (lpFileName, NULL); + if (!filename) + return INVALID_HANDLE_VALUE; + + result = CreateFileW (filename, dwDesiredAccess, dwSharedMode, + lpSecurityAttributes, dwCreationDisposition, + dwFlagsAndAttributes, hTemplateFile); + + err = GetLastError (); + dbus_free (filename); + SetLastError (err); + return result; +} + + +BOOL +DeleteFileA (LPCSTR lpFileName) +{ + wchar_t *filename; + BOOL result; + int err; + + filename = _dbus_win_utf8_to_utf16 (lpFileName, NULL); + if (!filename) + return FALSE; + + result = DeleteFileW (filename); + + err = GetLastError (); + dbus_free (filename); + SetLastError (err); + return result; +} + + +BOOL +MoveFileA (LPCSTR lpExistingFileName, LPCSTR lpNewFileName) +{ + wchar_t *existing_filename; + wchar_t *new_filename; + BOOL result; + int err; + + existing_filename = _dbus_win_utf8_to_utf16 (lpExistingFileName, NULL); + if (! existing_filename) + return FALSE; + + new_filename = _dbus_win_utf8_to_utf16 (lpNewFileName, NULL); + if (! new_filename) + { + dbus_free (existing_filename); + return FALSE; + } + + result = MoveFileW (existing_filename, new_filename); + + err = GetLastError (); + dbus_free (existing_filename); + dbus_free (new_filename); + SetLastError (err); + return result; +} + + +DWORD +GetFileAttributesA(LPCSTR lpFileName) +{ + wchar_t *filename; + DWORD result; + int err; + + filename = _dbus_win_utf8_to_utf16 (lpFileName, NULL); + if (!filename) + return INVALID_FILE_ATTRIBUTES; + + result = GetFileAttributesW (filename); + + err = GetLastError (); + dbus_free (filename); + SetLastError (err); + return result; +} + + +BOOL +GetFileAttributesExA (LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, + PVOID lpFileInformation) +{ + wchar_t *filename; + DWORD result; + int err; + + filename = _dbus_win_utf8_to_utf16 (lpFileName, NULL); + if (!filename) + return INVALID_FILE_ATTRIBUTES; + + result = GetFileAttributesExW (filename, fInfoLevelId, lpFileInformation); + + err = GetLastError (); + dbus_free (filename); + SetLastError (err); + return result; +} + + +HANDLE +CreateFileMappingA (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, + DWORD flProtect, DWORD dwMaximumSizeHigh, + DWORD dwMaximumSizeLow, LPCSTR lpName) +{ + wchar_t *name; + HANDLE result; + int err; + + if (lpName) + { + name = _dbus_win_utf8_to_utf16 (lpName, NULL); + if (!name) + return INVALID_HANDLE_VALUE; + } + else + name = NULL; + + result = CreateFileMappingW (hFile, lpAttributes, flProtect, + dwMaximumSizeHigh, dwMaximumSizeLow, + name); + + err = GetLastError (); + dbus_free (name); + SetLastError (err); + return result; +} + + +BOOL +CreateDirectoryA (LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes) +{ + wchar_t *pathname; + BOOL result; + int err; + + pathname = _dbus_win_utf8_to_utf16 (lpPathName, NULL); + if (!pathname) + return FALSE; + + result = CreateDirectoryW (pathname, lpSecurityAttributes); + + err = GetLastError (); + dbus_free (pathname); + SetLastError (err); + return result; +} + + +BOOL +RemoveDirectoryA (LPCSTR lpPathName) +{ + wchar_t *pathname; + BOOL result; + int err; + + pathname = _dbus_win_utf8_to_utf16 (lpPathName, NULL); + if (!pathname) + return FALSE; + + result = RemoveDirectoryW (pathname); + + err = GetLastError (); + dbus_free (pathname); + SetLastError (err); + return result; +} + + +static BOOL +convert_find_data (LPWIN32_FIND_DATAW fdw, LPWIN32_FIND_DATAA fda) +{ + char *filename; + int len; + + fda->dwFileAttributes = fdw->dwFileAttributes; + fda->ftCreationTime = fdw->ftCreationTime; + fda->ftLastAccessTime = fdw->ftLastAccessTime; + fda->ftLastWriteTime = fdw->ftLastWriteTime; + fda->nFileSizeHigh = fdw->nFileSizeHigh; + fda->nFileSizeLow = fdw->nFileSizeLow; + + filename = _dbus_win_utf16_to_utf8 (fdw->cFileName, NULL); + if (!filename) + return FALSE; + + len = sizeof (fda->cFileName); + strncpy (fda->cFileName, filename, len); + fda->cFileName[len - 1] = '\0'; + + return TRUE; +} + + +HANDLE +FindFirstFileA (LPCSTR lpFileName, LPWIN32_FIND_DATAA lpFindFileData) +{ + wchar_t *pathname; + WIN32_FIND_DATAW find_file_data; + HANDLE result; + int err; + + pathname = _dbus_win_utf8_to_utf16 (lpFileName, NULL); + if (!pathname) + return INVALID_HANDLE_VALUE; + + result = FindFirstFileW (pathname, &find_file_data); + if (result != INVALID_HANDLE_VALUE) + { + BOOL res = convert_find_data (&find_file_data, lpFindFileData); + if (! res) + { + err = GetLastError (); + FindClose (result); + SetLastError (err); + result = INVALID_HANDLE_VALUE; + } + } + + err = GetLastError (); + dbus_free (pathname); + SetLastError (err); + return result; +} + + +BOOL +FindNextFileA (HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) +{ + WIN32_FIND_DATAW find_file_data; + BOOL result; + int err; + + result = FindNextFileW (hFindFile, &find_file_data); + if (result) + result = convert_find_data (&find_file_data, lpFindFileData); + + return result; +} + + +HANDLE +CreateMutexA (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner, + LPCSTR lpName) +{ + wchar_t *name; + HANDLE result; + int err; + + if (lpName) + { + name = _dbus_win_utf8_to_utf16 (lpName, NULL); + if (!name) + return INVALID_HANDLE_VALUE; + } + else + name = NULL; + + result = CreateMutexW (lpMutexAttributes, bInitialOwner, name); + + err = GetLastError (); + dbus_free (name); + SetLastError (err); + return result; +} + + +BOOL +CreateProcessA (LPCSTR pszImageName, LPSTR pszCmdLine, + LPSECURITY_ATTRIBUTES psaProcess, + LPSECURITY_ATTRIBUTES psaThread, BOOL fInheritHandles, + DWORD fdwCreate, PVOID pvEnvironment, LPCSTR pszCurDir, + LPSTARTUPINFOA psiStartInfo, + LPPROCESS_INFORMATION pProcInfo) +{ + wchar_t *image_name = NULL; + wchar_t *cmd_line = NULL; + BOOL result; + int err; + + _dbus_assert (psaProcess == NULL); + _dbus_assert (psaThread == NULL); + _dbus_assert (fInheritHandles == FALSE); + _dbus_assert (pvEnvironment == NULL); + _dbus_assert (pszCurDir == NULL); + /* psiStartInfo is generally not NULL. */ + + if (pszImageName) + { + image_name = _dbus_win_utf8_to_utf16 (pszImageName, NULL); + if (!image_name) + return 0; + } + if (pszCmdLine) + { + cmd_line = _dbus_win_utf8_to_utf16 (pszCmdLine, NULL); + if (!cmd_line) + { + if (image_name) + dbus_free (image_name); + return 0; + } + } + + result = CreateProcessW (image_name, cmd_line, NULL, NULL, FALSE, + fdwCreate, NULL, NULL, NULL, pProcInfo); + + err = GetLastError (); + dbus_free (image_name); + dbus_free (cmd_line); + SetLastError (err); + return result; +} + + +LONG +RegOpenKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, + REGSAM samDesired, PHKEY phkResult) +{ + wchar_t *subkey; + LONG result; + int err; + + if (lpSubKey) + { + subkey = _dbus_win_utf8_to_utf16 (lpSubKey, NULL); + if (!subkey) + return 0; + } + else + subkey = NULL; + + result = RegOpenKeyEx (hKey, subkey, ulOptions, samDesired, phkResult); + + err = GetLastError (); + dbus_free (subkey); + SetLastError (err); + return result; +} + + +LONG +RegQueryValueExA (HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, + LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) +{ + wchar_t *name; + LONG err; + BYTE *data; + DWORD data_len; + DWORD type; + + if (lpValueName) + { + name = _dbus_win_utf8_to_utf16 (lpValueName, NULL); + if (!name) + return GetLastError (); + } + else + name = NULL; + + data_len = 0; + err = RegQueryValueExW (hKey, name, lpReserved, lpType, NULL, &data_len); + if (err || !lpcbData) + { + dbus_free (name); + return err; + } + + data = malloc (data_len + sizeof (wchar_t)); + if (!data) + { + dbus_free (name); + return ERROR_NOT_ENOUGH_MEMORY; + } + + err = RegQueryValueExW (hKey, name, lpReserved, &type, data, &data_len); + if (lpType) + *lpType = type; + dbus_free (name); + /* If err is ERROR_MORE_DATA, there probably was a race condition. + We can punt this to the caller just as well. */ + if (err) + { + free (data); + return err; + } + + /* NOTE: REG_MULTI_SZ and REG_EXPAND_SZ not supported, because they + are not needed in this module. */ + if (type == REG_SZ) + { + char *data_c; + int data_c_len; + + /* This is valid since we allocated one more above. */ + data[data_len] = '\0'; + data[data_len + 1] = '\0'; + + /* The cast is valid because malloc guarantees alignment of + basic types. */ + data_c = _dbus_win_utf16_to_utf8 ((wchar_t*) data, NULL); + if (!data_c) + { + free (data); + return GetLastError(); + } + + data_c_len = strlen (data_c) + 1; + _dbus_assert (data_c_len <= data_len + sizeof (wchar_t)); + memcpy (data, data_c, data_c_len); + data_len = data_c_len; + dbus_free (data_c); + } + + /* DATA and DATA_LEN now contain the result. */ + if (lpData) + { + if (data_len > *lpcbData) + err = ERROR_MORE_DATA; + else + memcpy (lpData, data, data_len); + } + free (data); + *lpcbData = data_len; + return err; +} + + +DWORD +FormatMessageA (DWORD dwFlags, PCVOID lpSource, DWORD dwMessageId, + DWORD dwLanguageId, LPSTR lpBuffer, DWORD nSize, + va_list* Arguments) +{ + LPWSTR buffer_w = NULL; + LPSTR buffer_c; + DWORD len; + char *buffer_new; + DWORD buffer_new_len; + BOOL buffer_w_free; + + len = FormatMessageW (dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER, + lpSource, dwMessageId, dwLanguageId, + (LPWSTR) &buffer_w, 0, Arguments); + if (len == 0) + return 0; + + buffer_c = _dbus_win_utf16_to_utf8 (buffer_w, NULL); + if (! buffer_c) + { + LocalFree (buffer_w); + return 0; + } + + if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) + { + /* We need to return a buffer that's freeable with LocalFree. */ + buffer_new = (char *) buffer_w; + buffer_new_len = sizeof (wchar_t) * (len + 1); + buffer_w_free = FALSE; + /* Avoid alignment issue by using memcpy. */ + memcpy (lpBuffer, &buffer_new, sizeof (buffer_new)); + } + else + { + buffer_new = lpBuffer; + buffer_new_len = nSize; + buffer_w_free = TRUE; + } + + strncpy (buffer_new, buffer_c, buffer_new_len); + dbus_free (buffer_c); + buffer_new[buffer_new_len - 1] = '\0'; + if (buffer_w_free) + LocalFree (buffer_w); + + /* strlen is correct (not _mbstrlen), because we want storage and + not string length. */ + return strlen (buffer_new); +} + + +DWORD +GetModuleFileNameA (HINSTANCE hModule, LPSTR lpFilename, DWORD nSize) +{ + wchar_t *filename_w; + char *filename_c; + DWORD len; + + if (nSize == 0) + { + /* Windows XP/2000. */ + SetLastError (0); + return 0; + } + + filename_w = malloc (sizeof (wchar_t) * nSize); + if (! filename_w) + return 0; + + len = GetModuleFileNameW (hModule, filename_w, nSize); + if (len == 0) + { + /* Note: If we fail with ERROR_INSUFFICIENT_BUFFER, this is still + (approximately) correct. */ + free (filename_w); + return 0; + } + + filename_w[nSize - 1] = '\0'; + filename_c = _dbus_win_utf16_to_utf8 (filename_w, NULL); + free (filename_w); + if (! filename_c) + return 0; + + strncpy (lpFilename, filename_c, nSize); + dbus_free (filename_c); + lpFilename[nSize - 1] = '\0'; + /* strlen is correct (not _mbstrlen), because we want storage and + not string length. */ + return strlen (lpFilename); +} + + +DWORD +GetTempPathA (DWORD nBufferLength, LPSTR lpBuffer) +{ + wchar_t dummy[1]; + DWORD len; + + len = GetTempPathW (0, dummy); + if (len == 0) + return 0; + + _dbus_assert (len <= MAX_PATH); + + /* Better be safe than sorry. MSDN doesn't say if len is with or + without terminating 0. */ + len++; + + { + wchar_t *buffer_w; + DWORD len_w; + char *buffer_c; + DWORD len_c; + + buffer_w = malloc (sizeof (wchar_t) * len); + if (! buffer_w) + return 0; + + len_w = GetTempPathW (len, buffer_w); + /* Give up if we still can't get at it. */ + if (len_w == 0 || len_w >= len) + { + free (buffer_w); + return 0; + } + + /* Better be really safe. */ + buffer_w[len_w] = '\0'; + + buffer_c = _dbus_win_utf16_to_utf8 (buffer_w, NULL); + free (buffer_w); + if (! buffer_c) + return 0; + + /* strlen is correct (not _mbstrlen), because we want storage and + not string length. */ + len_c = strlen (buffer_c) + 1; + if (len_c > nBufferLength) + return len_c; + + strcpy (lpBuffer, buffer_c); + dbus_free (buffer_c); + return len_c - 1; + } +} + + +BOOL +SHGetSpecialFolderPathA (HWND hwndOwner, LPSTR lpszPath, int nFolder, + BOOL fCreate) +{ + wchar_t path[MAX_PATH]; + char *path_c; + BOOL result; + + path[0] = (wchar_t) 0; + result = SHGetSpecialFolderPathW (hwndOwner, path, nFolder, fCreate); + /* Note: May return false even if succeeds. */ + + path[MAX_PATH - 1] = (wchar_t) 0; + path_c = _dbus_win_utf16_to_utf8 (path, NULL); + if (! path_c) + return 0; + + strncpy (lpszPath, path_c, MAX_PATH); + dbus_free (path_c); + lpszPath[MAX_PATH - 1] = '\0'; + return result; +} + + +void +OutputDebugStringA (LPCSTR lpOutputString) +{ + wchar_t *str; + HANDLE result; + int err; + + str = _dbus_win_utf8_to_utf16 (lpOutputString, NULL); + if (!str) + return; + + OutputDebugStringW (str); + + err = GetLastError (); + dbus_free (str); + SetLastError (err); +} diff --git a/dbus/dbus-sysdeps-wince-glue.h b/dbus/dbus-sysdeps-wince-glue.h new file mode 100644 index 00000000..f5ac6c8a --- /dev/null +++ b/dbus/dbus-sysdeps-wince-glue.h @@ -0,0 +1,246 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-sysdeps-wince-glue.h Emulation of system/libc features for Windows CE (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_SYSDEPS_WINCE_GLUE_H +#define DBUS_SYSDEPS_WINCE_GLUE_H + +#include <time.h> +#include <stdarg.h> + +/* For getaddrinfo, configure/cmake defined _WIN32_WCE to something >= 0x0401. */ +#include <windows.h> +#undef interface + +DBUS_BEGIN_DECLS + +/* shlobj.h declares these only for _WIN32_IE that we don't want to define. + In any case, with mingw32ce we only get a SHGetSpecialFolderPath. */ +#define SHGetSpecialFolderPathW SHGetSpecialFolderPath +BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL); +BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL); + +#ifndef TLS_OUT_OF_INDEXES +#define TLS_OUT_OF_INDEXES 0xffffffff +#endif + + +/* Seriously. Windows CE does not have errno. Don't you hate it when + that happens? */ +#define errno ((int)GetLastError ()) + +#define ENOENT ERROR_FILE_NOT_FOUND +#define EMFILE ERROR_TOO_MANY_OPEN_FILES +#define EACCES ERROR_ACCESS_DENIED +#define EBADF ERROR_INVALID_HANDLE +#define ENOMEM ERROR_NOT_ENOUGH_MEMORY +#define EXDEV ERROR_NOT_SAME_DEVICE +#define ENFILE ERROR_NO_MORE_FILES +#define EROFS ERROR_WRITE_PROTECT +#define ENOLCK ERROR_SHARING_BUFFER_EXCEEDED +#define ENOSYS ERROR_NOT_SUPPORTED +#define EEXIST ERROR_FILE_EXISTS +#define EPERM ERROR_CANNOT_MAKE +#define EINVAL ERROR_INVALID_PARAMETER +#define EINTR ERROR_INVALID_AT_INTERRUPT_TIME +#define EPIPE ERROR_BROKEN_PIPE +#define ENOSPC ERROR_DISK_FULL +#define ENOTEMPTY ERROR_DIR_NOT_EMPTY +#define EBUSY ERROR_BUSY +#define ENAMETOOLONG ERROR_FILENAME_EXCED_RANGE +#define EAGAIN ERROR_MORE_DATA +#define ENOTDIR ERROR_DIRECTORY +#define ERANGE ERROR_ARITHMETIC_OVERFLOW +#define ENXIO ERROR_FILE_INVALID +#define EFAULT ERROR_PROCESS_ABORTED +#define EIO ERROR_IO_DEVICE +#define EDEADLOCK ERROR_POSSIBLE_DEADLOCK +#define ENODEV ERROR_BAD_DEVICE + +/* Windows CE is missing more stuff that is pretty standard. */ + +#define strdup _strdup +#define stricmp _stricmp +#define strnicmp _strnicmp + +#define environ _dbus_wince_environ +extern char *environ[]; + +#define getenv _dbus_wince_getenv +char *getenv (const char *name); + +#define putenv _dbus_wince_putenv +int putenv (char *str); + +#define clock _dbus_wince_clock +clock_t clock (void); + +#define abort _dbus_wince_abort +void abort (void); + +#define _S_IFMT 0170000 /* file type mask */ +#define _S_IFDIR 0040000 /* directory */ +#define _S_IFCHR 0020000 /* character special */ +#define _S_IFIFO 0010000 /* pipe */ +#define _S_IFREG 0100000 /* regular */ +#define _S_IREAD 0000400 /* read permission, owner */ +#define _S_IWRITE 0000200 /* write permission, owner */ +#define _S_IEXEC 0000100 /* execute/search permission, owner */ + +#ifndef __OFF_T_DEFINED +typedef long off_t; +#define __OFF_T_DEFINED +#endif +#ifndef _INTPTR_T_DEFINED +typedef int intptr_t; +#define _INTPTR_T_DEFINED +#endif +#ifndef _UINTPTR_T_DEFINED +typedef unsigned int uintptr_t; +#define _UINTPTR_T_DEFINED +#endif + +#ifndef _MAX_FNAME +#define _MAX_FNAME 256 +#endif + +#ifndef _IOFBF +#define _IOFBF 0 +#endif +#ifndef _IOLBF +#define _IOLBF 1 +#endif +#ifndef _IONBF +#define _IONBF 2 +#endif + + +/* Windows CE is missing some Windows functions that we want. */ + +#define GetSystemTimeAsFileTime _dbus_wince_GetSystemTimeAsFileTime +void GetSystemTimeAsFileTime (LPFILETIME ftp); + +#define _mbsrchr _dbus_wince_mbsrchr +unsigned char* _mbsrchr (const unsigned char*, unsigned int); + +#define OpenFileMappingA _dbus_wince_OpenFileMappingA +HANDLE OpenFileMappingA(DWORD,BOOL,LPCSTR); + +#define MoveFileExA _dbus_wince_MoveFileExA +BOOL MoveFileExA(LPCSTR,LPCSTR,DWORD); +#ifndef MOVEFILE_REPLACE_EXISTING +#define MOVEFILE_REPLACE_EXISTING 0x00000001 +#endif + +#define SetHandleInformation _dbus_wince_SetHandleInformation +BOOL SetHandleInformation(HANDLE,DWORD,DWORD); +#ifndef HANDLE_FLAG_INHERIT +#define HANDLE_FLAG_INHERIT 0x01 +#endif +#ifndef HANDLE_FLAG_PROTECT +#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02 +#endif + +#define SearchPathA _dbus_wince_SearchPathA +DWORD SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*); + +/* Instead of emulating all functions needed for this, we replace the + whole thing. */ +dbus_bool_t _dbus_getsid(char **sid); + + +#define LookupAccountNameW _dbus_wince_LookupAccountNameW +BOOL LookupAccountNameW(LPCWSTR,LPCWSTR,PSID,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE); + +#define IsValidSid _dbus_wince_IsValidSid +BOOL IsValidSid(PSID); + + +/* Windows CE does only have the UNICODE interfaces (FooW), but we + want to use the ASCII interfaces (FooA). We implement them + here. */ + +#define CreateFileA _dbus_wince_CreateFileA +HANDLE CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE); + +#define DeleteFileA _dbus_wince_DeleteFileA +BOOL DeleteFileA(LPCSTR); + +#define GetFileAttributesA _dbus_wince_GetFileAttributesA +DWORD GetFileAttributesA(LPCSTR); + +#define GetFileAttributesExA _dbus_wince_GetFileAttributesExA +BOOL GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID); + +#define CreateFileMappingA _dbus_wince_CreateFileMappingA +HANDLE CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR); + +#define CreateDirectoryA _dbus_wince_CreateDirectoryA +BOOL CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES); + +#define RemoveDirectoryA _dbus_wince_RemoveDirectoryA +BOOL RemoveDirectoryA(LPCSTR); + +#define FindFirstFileA _dbus_wince_FindFirstFileA +HANDLE FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA); + +#define FindNextFileA _dbus_wince_FindNextFileA +BOOL FindNextFileA(HANDLE,LPWIN32_FIND_DATAA); + +#define CreateMutexA _dbus_wince_CreateMutexA +HANDLE CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR); + +#define CreateProcessA _dbus_wince_CreateProcessA +BOOL CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION); +#ifndef CREATE_NO_WINDOW +#define CREATE_NO_WINDOW 0x08000000 +#endif + + +#define RegOpenKeyExA _dbus_wince_RegOpenKeyExA +LONG RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY); + +#define RegQueryValueExA _dbus_wince_RegQueryValueExA +LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); + + +#define FormatMessageA _dbus_wince_FormatMessageA +DWORD FormatMessageA(DWORD,PCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*); + +#define GetModuleFileNameA _dbus_wince_GetModuleFileNameA +DWORD GetModuleFileNameA(HINSTANCE,LPSTR,DWORD); + +#define GetTempPathA _dbus_wince_GetTempPathA +DWORD GetTempPathA(DWORD,LPSTR); + +#define SHGetSpecialFolderPathA _dbus_wince_SHGetSpecialFolderPathA +BOOL SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL); + + +#define OutputDebugStringA _dbus_wince_OutputDebugStringA +void OutputDebugStringA(LPCSTR); + + +DBUS_END_DECLS + +#endif /* DBUS_SYSDEPS_WINCE_GLUE_H */ diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index ccd80ccd..bab516de 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -22,6 +22,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-sysdeps.h" #include "dbus-threads.h" @@ -34,15 +35,13 @@ * * These are the standard ANSI C headers... */ +#if HAVE_LOCALE_H #include <locale.h> +#endif #include <stdlib.h> #include <string.h> #include <stdio.h> -/* This is UNIX-specific (on windows it's just in stdlib.h I believe) - * but OK since the same stuff does exist on Windows in stdlib.h - * and covered by a configure check. - */ #ifdef HAVE_ERRNO_H #include <errno.h> #endif @@ -51,7 +50,14 @@ _DBUS_DEFINE_GLOBAL_LOCK (win_fds); _DBUS_DEFINE_GLOBAL_LOCK (sid_atom_cache); _DBUS_DEFINE_GLOBAL_LOCK (system_users); +#ifdef DBUS_WIN + #include <stdlib.h> +#elif (defined __APPLE__) +# include <crt_externs.h> +# define environ (*_NSGetEnviron()) +#else extern char **environ; +#endif /** * @defgroup DBusSysdeps Internal system-dependent API @@ -242,65 +248,6 @@ _dbus_get_environment (void) return environment; } -/* - * init a pipe instance. - * - * @param pipe the pipe - * @param fd the file descriptor to init from - */ -void -_dbus_pipe_init (DBusPipe *pipe, - int fd) -{ - pipe->fd_or_handle = fd; -} - -/** - * init a pipe with stdout - * - * @param pipe the pipe - */ -void -_dbus_pipe_init_stdout (DBusPipe *pipe) -{ - _dbus_pipe_init (pipe, 1); -} - -/** - * check if a pipe is valid; pipes can be set invalid, similar to - * a -1 file descriptor. - * - * @param pipe the pipe instance - * @returns #FALSE if pipe is not valid - */ -dbus_bool_t -_dbus_pipe_is_valid(DBusPipe *pipe) -{ - return pipe->fd_or_handle >= 0; -} - -/** - * Check if a pipe is stdout or stderr. - * - * @param pipe the pipe instance - * @returns #TRUE if pipe is one of the standard out/err channels - */ -dbus_bool_t -_dbus_pipe_is_stdout_or_stderr (DBusPipe *pipe) -{ - return pipe->fd_or_handle == 1 || pipe->fd_or_handle == 2; -} - -/** - * Initializes a pipe to an invalid value. - * @param pipe the pipe - */ -void -_dbus_pipe_invalidate (DBusPipe *pipe) -{ - pipe->fd_or_handle = -1; -} - /** * Split paths into a list of char strings * @@ -571,7 +518,7 @@ _dbus_string_parse_int (const DBusString *str, _dbus_string_get_length (str) - start); end = NULL; - errno = 0; + _dbus_set_errno_to_zero (); v = strtol (p, &end, 0); if (end == NULL || end == p || errno != 0) return FALSE; @@ -610,7 +557,7 @@ _dbus_string_parse_uint (const DBusString *str, _dbus_string_get_length (str) - start); end = NULL; - errno = 0; + _dbus_set_errno_to_zero (); v = strtoul (p, &end, 0); if (end == NULL || end == p || errno != 0) return FALSE; @@ -678,10 +625,14 @@ ascii_strtod (const char *nptr, fail_pos = NULL; +#if HAVE_LOCALECONV locale_data = localeconv (); decimal_point = locale_data->decimal_point; - decimal_point_len = strlen (decimal_point); +#else + decimal_point = "."; +#endif + decimal_point_len = strlen (decimal_point); _dbus_assert (decimal_point_len != 0); decimal_point_pos = NULL; @@ -748,7 +699,7 @@ ascii_strtod (const char *nptr, /* Set errno to zero, so that we can distinguish zero results and underflows */ - errno = 0; + _dbus_set_errno_to_zero (); if (decimal_point_pos) { @@ -822,7 +773,7 @@ _dbus_string_parse_double (const DBusString *str, return FALSE; end = NULL; - errno = 0; + _dbus_set_errno_to_zero (); v = ascii_strtod (p, &end); if (end == NULL || end == p || errno != 0) return FALSE; @@ -940,8 +891,8 @@ _dbus_generate_random_ascii (DBusString *str, } /** - * Converts a UNIX or Windows errno - * into a #DBusError name. + * Converts a UNIX errno, or Windows errno or WinSock error value into + * a #DBusError name. * * @todo should cover more errnos, specifically those * from open(). @@ -961,10 +912,18 @@ _dbus_error_from_errno (int error_number) case EPROTONOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; #endif +#ifdef WSAEPROTONOSUPPORT + case WSAEPROTONOSUPPORT: + return DBUS_ERROR_NOT_SUPPORTED; +#endif #ifdef EAFNOSUPPORT case EAFNOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; #endif +#ifdef WSAEAFNOSUPPORT + case WSAEAFNOSUPPORT: + return DBUS_ERROR_NOT_SUPPORTED; +#endif #ifdef ENFILE case ENFILE: return DBUS_ERROR_LIMITS_EXCEEDED; /* kernel out of memory */ @@ -989,42 +948,38 @@ _dbus_error_from_errno (int error_number) case ENOMEM: return DBUS_ERROR_NO_MEMORY; #endif -#ifdef EINVAL - case EINVAL: - return DBUS_ERROR_FAILED; -#endif -#ifdef EBADF - case EBADF: - return DBUS_ERROR_FAILED; -#endif -#ifdef EFAULT - case EFAULT: - return DBUS_ERROR_FAILED; -#endif -#ifdef ENOTSOCK - case ENOTSOCK: - return DBUS_ERROR_FAILED; -#endif -#ifdef EISCONN - case EISCONN: - return DBUS_ERROR_FAILED; -#endif #ifdef ECONNREFUSED case ECONNREFUSED: return DBUS_ERROR_NO_SERVER; #endif +#ifdef WSAECONNREFUSED + case WSAECONNREFUSED: + return DBUS_ERROR_NO_SERVER; +#endif #ifdef ETIMEDOUT case ETIMEDOUT: return DBUS_ERROR_TIMEOUT; #endif +#ifdef WSAETIMEDOUT + case WSAETIMEDOUT: + return DBUS_ERROR_TIMEOUT; +#endif #ifdef ENETUNREACH case ENETUNREACH: return DBUS_ERROR_NO_NETWORK; #endif +#ifdef WSAENETUNREACH + case WSAENETUNREACH: + return DBUS_ERROR_NO_NETWORK; +#endif #ifdef EADDRINUSE case EADDRINUSE: return DBUS_ERROR_ADDRESS_IN_USE; #endif +#ifdef WSAEADDRINUSE + case WSAEADDRINUSE: + return DBUS_ERROR_ADDRESS_IN_USE; +#endif #ifdef EEXIST case EEXIST: return DBUS_ERROR_FILE_EXISTS; @@ -1039,12 +994,27 @@ _dbus_error_from_errno (int error_number) } /** + * Converts the current system errno value into a #DBusError name. + * + * @returns an error name + */ +const char* +_dbus_error_from_system_errno (void) +{ + return _dbus_error_from_errno (errno); +} + +/** * Assign 0 to the global errno variable */ void _dbus_set_errno_to_zero (void) { +#ifdef DBUS_WINCE + SetLastError (0); +#else errno = 0; +#endif } /** diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 7817e04f..eb919576 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -25,9 +25,15 @@ #ifndef DBUS_SYSDEPS_H #define DBUS_SYSDEPS_H -#include <config.h> +#include "config.h" + +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif #include <dbus/dbus-errors.h> +#include <dbus/dbus-file.h> +#include <dbus/dbus-string.h> /* this is perhaps bogus, but strcmp() etc. are faster if we use the * stuff straight out of string.h, so have this here for now. @@ -35,7 +41,6 @@ #include <string.h> #include <stdarg.h> - /* AIX sys/poll.h does #define events reqevents, and other * wonderousness, so must include sys/poll before declaring * DBusPollFD @@ -44,6 +49,12 @@ #include <sys/poll.h> #endif +#ifdef DBUS_WINCE +/* Windows CE lacks some system functions (such as errno and clock). + We bring them in here. */ +#include "dbus-sysdeps-wince-glue.h" +#endif + DBUS_BEGIN_DECLS #ifdef DBUS_WIN @@ -54,8 +65,6 @@ DBUS_BEGIN_DECLS /* Forward declarations */ -/** An opaque string type */ -typedef struct DBusString DBusString; /** An opaque list type */ typedef struct DBusList DBusList; @@ -63,38 +72,15 @@ typedef struct DBusList DBusList; /** Object that contains a list of credentials such as UNIX or Windows user ID */ typedef struct DBusCredentials DBusCredentials; +/** A wrapper around a pipe descriptor or handle */ +typedef struct DBusPipe DBusPipe; + /** * @addtogroup DBusSysdeps * * @{ */ -/* The idea of this file is to encapsulate everywhere that we're - * relying on external libc features, for ease of security - * auditing. The idea is from vsftpd. This also gives us a chance to - * make things more convenient to use, e.g. by reading into a - * DBusString. Operating system headers aren't intended to be used - * outside of this file and a limited number of others (such as - * dbus-memory.c) - */ - -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) \ - __attribute__((__format__ (__printf__, format_idx, arg_idx))) -#define _DBUS_GNUC_NORETURN \ - __attribute__((__noreturn__)) -#else /* !__GNUC__ */ -#define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) -#define _DBUS_GNUC_NORETURN -#endif /* !__GNUC__ */ - -/** @def _DBUS_GNUC_PRINTF - * used to tell gcc about printf format strings - */ -/** @def _DBUS_GNUC_NORETURN - * used to tell gcc about functions that never return, such as _dbus_abort() - */ - void _dbus_abort (void) _DBUS_GNUC_NORETURN; const char* _dbus_getenv (const char *varname); @@ -153,10 +139,39 @@ int _dbus_write_socket_two (int fd, const DBusString *buffer2, int start2, int len2); + +int _dbus_read_socket_with_unix_fds (int fd, + DBusString *buffer, + int count, + int *fds, + int *n_fds); +int _dbus_write_socket_with_unix_fds (int fd, + const DBusString *buffer, + int start, + int len, + const int *fds, + int n_fds); +int _dbus_write_socket_with_unix_fds_two (int fd, + const DBusString *buffer1, + int start1, + int len1, + const DBusString *buffer2, + int start2, + int len2, + const int *fds, + int n_fds); + +dbus_bool_t _dbus_socket_is_invalid (int fd); + int _dbus_connect_tcp_socket (const char *host, const char *port, const char *family, DBusError *error); +int _dbus_connect_tcp_socket_with_nonce (const char *host, + const char *port, + const char *family, + const char *noncefile, + DBusError *error); int _dbus_listen_tcp_socket (const char *host, const char *port, const char *family, @@ -192,6 +207,14 @@ dbus_bool_t _dbus_windows_user_is_process_owner (const char *windows_sid) dbus_bool_t _dbus_append_keyring_directory_for_credentials (DBusString *directory, DBusCredentials *credentials); +dbus_bool_t _dbus_daemon_is_session_bus_address_published (const char *scope); + +dbus_bool_t _dbus_daemon_publish_session_bus_address (const char* address, const char* shm_name); + +void _dbus_daemon_unpublish_session_bus_address (void); + +dbus_bool_t _dbus_socket_can_pass_unix_fd(int fd); + /** Opaque type representing an atomically-modifiable integer * that can be used from multiple threads. */ @@ -286,23 +309,8 @@ void _dbus_get_current_time (long *tv_sec, long *tv_usec); /** - * File/directory interface + * directory interface */ -dbus_bool_t _dbus_file_exists (const char *file); -dbus_bool_t _dbus_file_get_contents (DBusString *str, - const DBusString *filename, - DBusError *error); -dbus_bool_t _dbus_string_save_to_file (const DBusString *str, - const DBusString *filename, - DBusError *error); - -dbus_bool_t _dbus_make_file_world_readable (const DBusString *filename, - DBusError *error); - -dbus_bool_t _dbus_create_file_exclusively (const DBusString *filename, - DBusError *error); -dbus_bool_t _dbus_delete_file (const DBusString *filename, - DBusError *error); dbus_bool_t _dbus_create_directory (const DBusString *filename, DBusError *error); dbus_bool_t _dbus_delete_directory (const DBusString *filename, @@ -320,25 +328,6 @@ dbus_bool_t _dbus_get_standard_system_servicedirs (DBusList **dirs); dbus_bool_t _dbus_append_system_config_file (DBusString *str); dbus_bool_t _dbus_append_session_config_file (DBusString *str); -typedef struct { - int fd_or_handle; -} DBusPipe; - -void _dbus_pipe_init (DBusPipe *pipe, - int fd); -void _dbus_pipe_init_stdout (DBusPipe *pipe); -int _dbus_pipe_write (DBusPipe *pipe, - const DBusString *buffer, - int start, - int len, - DBusError *error); -int _dbus_pipe_close (DBusPipe *pipe, - DBusError *error); -dbus_bool_t _dbus_pipe_is_valid (DBusPipe *pipe); -void _dbus_pipe_invalidate (DBusPipe *pipe); -dbus_bool_t _dbus_pipe_is_stdout_or_stderr (DBusPipe *pipe); - - /** Opaque type for reading a directory listing */ typedef struct DBusDirIter DBusDirIter; @@ -352,7 +341,7 @@ void _dbus_directory_close (DBusDirIter *iter); dbus_bool_t _dbus_check_dir_is_private_to_user (DBusString *dir, DBusError *error); -void _dbus_fd_set_close_on_exec (int fd); +void _dbus_fd_set_close_on_exec (intptr_t fd); const char* _dbus_get_tmpdir (void); @@ -369,6 +358,7 @@ dbus_bool_t _dbus_generate_random_ascii (DBusString *str, int n_bytes); const char* _dbus_error_from_errno (int error_number); +const char* _dbus_error_from_system_errno (void); void _dbus_set_errno_to_zero (void); dbus_bool_t _dbus_get_is_errno_nonzero (void); @@ -418,6 +408,8 @@ dbus_bool_t _dbus_become_daemon (const DBusString *pidfile, dbus_bool_t keep_umask); dbus_bool_t _dbus_verify_daemon_user (const char *user); +dbus_bool_t _dbus_change_to_daemon_user (const char *user, + DBusError *error); dbus_bool_t _dbus_write_pid_to_file_and_pipe (const DBusString *pidfile, DBusPipe *print_pid_pipe, @@ -484,8 +476,9 @@ void _dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list _DBUS_BYTE_OF_PRIMITIVE (a, 6) == _DBUS_BYTE_OF_PRIMITIVE (b, 6) && \ _DBUS_BYTE_OF_PRIMITIVE (a, 7) == _DBUS_BYTE_OF_PRIMITIVE (b, 7)) -dbus_bool_t _dbus_get_autolaunch_address (DBusString *address, - DBusError *error); +dbus_bool_t _dbus_get_autolaunch_address (const char *scope, + DBusString *address, + DBusError *error); dbus_bool_t _dbus_lookup_session_address (dbus_bool_t *supported, DBusString *address, @@ -524,6 +517,16 @@ dbus_bool_t _dbus_change_to_daemon_user (const char *user, void _dbus_flush_caches (void); +/* + * replaces the term DBUS_PREFIX in configure_time_path by the + * current dbus installation directory. On unix this function is a noop + * + * @param configure_time_path + * @return real path + */ +const char * +_dbus_replace_install_prefix (const char *configure_time_path); + /** @} */ DBUS_END_DECLS diff --git a/dbus/dbus-test-main.c b/dbus/dbus-test-main.c index 1bb7c904..f6ef7821 100644 --- a/dbus/dbus-test-main.c +++ b/dbus/dbus-test-main.c @@ -22,11 +22,14 @@ */ +#include <config.h> #include "dbus-types.h" #include "dbus-test.h" #include <stdio.h> #include <stdlib.h> +#if HAVE_LOCALE_H #include <locale.h> +#endif int main (int argc, @@ -35,8 +38,9 @@ main (int argc, const char *test_data_dir; const char *specific_test; +#if HAVE_SETLOCALE setlocale(LC_ALL, ""); - +#endif if (argc > 1) test_data_dir = argv[1]; diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c index c9649646..37b68ba2 100644 --- a/dbus/dbus-threads.c +++ b/dbus/dbus-threads.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "dbus-threads.h" #include "dbus-internals.h" #include "dbus-threads-internal.h" @@ -424,7 +425,9 @@ init_locks (void) LOCK_ADDR (pending_call_slots), LOCK_ADDR (server_slots), LOCK_ADDR (message_slots), +#if !DBUS_USE_SYNC LOCK_ADDR (atomic), +#endif LOCK_ADDR (bus), LOCK_ADDR (bus_datas), LOCK_ADDR (shutdown_funcs), @@ -810,7 +813,11 @@ dbus_fake_condvar_wake_all (DBusCondVar *cond) dbus_bool_t _dbus_threads_init_debug (void) { +#ifdef DBUS_WIN + return _dbus_threads_init_platform_specific(); +#else return dbus_threads_init (&fake_functions); +#endif } #endif /* DBUS_BUILD_TESTS */ diff --git a/dbus/dbus-threads.h b/dbus/dbus-threads.h index 1fd83f21..ba07ca57 100644 --- a/dbus/dbus-threads.h +++ b/dbus/dbus-threads.h @@ -186,7 +186,9 @@ typedef struct } DBusThreadFunctions; +DBUS_EXPORT dbus_bool_t dbus_threads_init (const DBusThreadFunctions *functions); +DBUS_EXPORT dbus_bool_t dbus_threads_init_default (void); /** @} */ diff --git a/dbus/dbus-timeout.c b/dbus/dbus-timeout.c index 0d92ca11..a1d6ce59 100644 --- a/dbus/dbus-timeout.c +++ b/dbus/dbus-timeout.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-timeout.h" #include "dbus-list.h" diff --git a/dbus/dbus-transport-protected.h b/dbus/dbus-transport-protected.h index 280bbd3d..44b9d785 100644 --- a/dbus/dbus-transport-protected.h +++ b/dbus/dbus-transport-protected.h @@ -92,9 +92,9 @@ struct DBusTransport DBusCredentials *credentials; /**< Credentials of other end read from the socket */ long max_live_messages_size; /**< Max total size of received messages. */ + long max_live_messages_unix_fds; /**< Max total unix fds of received messages. */ - DBusCounter *live_messages_size; /**< Counter for size of all live messages. */ - + DBusCounter *live_messages; /**< Counter for size/unix fds of all live messages. */ char *address; /**< Address of the server we are connecting to (#NULL for the server side of a transport) */ @@ -138,6 +138,9 @@ DBusTransportOpenResult _dbus_transport_open_platform_specific (DBusAddressEntry DBusTransport **transport_p, DBusError *error); +#define DBUS_TRANSPORT_CAN_SEND_UNIX_FD(x) \ + _dbus_auth_get_unix_fd_negotiated((x)->auth) + DBUS_END_DECLS #endif /* DBUS_TRANSPORT_PROTECTED_H */ diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 05d7d91f..1d4c2bf7 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -21,14 +21,15 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-connection-internal.h" +#include "dbus-nonce.h" #include "dbus-transport-socket.h" #include "dbus-transport-protected.h" #include "dbus-watch.h" #include "dbus-credentials.h" - /** * @defgroup DBusTransportSocket DBusTransport implementations for sockets * @ingroup DBusInternals @@ -72,7 +73,7 @@ free_watches (DBusTransport *transport) { DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport; - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); if (socket_transport->read_watch) { @@ -94,7 +95,7 @@ free_watches (DBusTransport *transport) socket_transport->write_watch = NULL; } - _dbus_verbose ("%s end\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("end\n"); } static void @@ -102,7 +103,7 @@ socket_finalize (DBusTransport *transport) { DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport; - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); free_watches (transport); @@ -176,8 +177,7 @@ check_read_watch (DBusTransport *transport) DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport; dbus_bool_t need_read_watch; - _dbus_verbose ("%s: fd = %d\n", - _DBUS_FUNCTION_NAME, socket_transport->fd); + _dbus_verbose ("fd = %d\n",socket_transport->fd); if (transport->connection == NULL) return; @@ -192,7 +192,8 @@ check_read_watch (DBusTransport *transport) if (_dbus_transport_get_is_authenticated (transport)) need_read_watch = - _dbus_counter_get_value (transport->live_messages_size) < transport->max_live_messages_size; + (_dbus_counter_get_size_value (transport->live_messages) < transport->max_live_messages_size) && + (_dbus_counter_get_unix_fd_value (transport->live_messages) < transport->max_live_messages_unix_fds); else { if (transport->receive_credentials_pending) @@ -551,6 +552,9 @@ do_writing (DBusTransport *transport) if (_dbus_auth_needs_encoding (transport->auth)) { + /* Does fd passing even make sense with encoded data? */ + _dbus_assert(!DBUS_TRANSPORT_CAN_SEND_UNIX_FD(transport)); + if (_dbus_string_get_length (&socket_transport->encoded_outgoing) == 0) { if (!_dbus_auth_encode_data (transport->auth, @@ -588,27 +592,53 @@ do_writing (DBusTransport *transport) #if 0 _dbus_verbose ("message is %d bytes\n", - total_bytes_to_write); + total_bytes_to_write); #endif - - if (socket_transport->message_bytes_written < header_len) + +#ifdef HAVE_UNIX_FD_PASSING + if (socket_transport->message_bytes_written <= 0 && DBUS_TRANSPORT_CAN_SEND_UNIX_FD(transport)) { + /* Send the fds along with the first byte of the message */ + const int *unix_fds; + unsigned n; + + _dbus_message_get_unix_fds(message, &unix_fds, &n); + bytes_written = - _dbus_write_socket_two (socket_transport->fd, - header, - socket_transport->message_bytes_written, - header_len - socket_transport->message_bytes_written, - body, - 0, body_len); + _dbus_write_socket_with_unix_fds_two (socket_transport->fd, + header, + socket_transport->message_bytes_written, + header_len - socket_transport->message_bytes_written, + body, + 0, body_len, + unix_fds, + n); + + if (bytes_written > 0 && n > 0) + _dbus_verbose("Wrote %i unix fds\n", n); } else +#endif { - bytes_written = - _dbus_write_socket (socket_transport->fd, - body, - (socket_transport->message_bytes_written - header_len), - body_len - - (socket_transport->message_bytes_written - header_len)); + if (socket_transport->message_bytes_written < header_len) + { + bytes_written = + _dbus_write_socket_two (socket_transport->fd, + header, + socket_transport->message_bytes_written, + header_len - socket_transport->message_bytes_written, + body, + 0, body_len); + } + else + { + bytes_written = + _dbus_write_socket (socket_transport->fd, + body, + (socket_transport->message_bytes_written - header_len), + body_len - + (socket_transport->message_bytes_written - header_len)); + } } } @@ -670,8 +700,7 @@ do_reading (DBusTransport *transport) int total; dbus_bool_t oom; - _dbus_verbose ("%s: fd = %d\n", _DBUS_FUNCTION_NAME, - socket_transport->fd); + _dbus_verbose ("fd = %d\n",socket_transport->fd); /* No messages without authentication! */ if (!_dbus_transport_get_is_authenticated (transport)) @@ -704,6 +733,9 @@ do_reading (DBusTransport *transport) if (_dbus_auth_needs_decoding (transport->auth)) { + /* Does fd passing even make sense with encoded data? */ + _dbus_assert(!DBUS_TRANSPORT_CAN_SEND_UNIX_FD(transport)); + if (_dbus_string_get_length (&socket_transport->encoded_incoming) > 0) bytes_read = _dbus_string_get_length (&socket_transport->encoded_incoming); else @@ -748,10 +780,37 @@ do_reading (DBusTransport *transport) { _dbus_message_loader_get_buffer (transport->loader, &buffer); - - bytes_read = _dbus_read_socket (socket_transport->fd, - buffer, socket_transport->max_bytes_read_per_iteration); - + +#ifdef HAVE_UNIX_FD_PASSING + if (DBUS_TRANSPORT_CAN_SEND_UNIX_FD(transport)) + { + int *fds, n_fds; + + if (!_dbus_message_loader_get_unix_fds(transport->loader, &fds, &n_fds)) + { + _dbus_verbose ("Out of memory reading file descriptors\n"); + _dbus_message_loader_return_buffer (transport->loader, buffer, 0); + oom = TRUE; + goto out; + } + + bytes_read = _dbus_read_socket_with_unix_fds(socket_transport->fd, + buffer, + socket_transport->max_bytes_read_per_iteration, + fds, &n_fds); + + if (bytes_read >= 0 && n_fds > 0) + _dbus_verbose("Read %i unix fds\n", n_fds); + + _dbus_message_loader_return_unix_fds(transport->loader, fds, bytes_read < 0 ? 0 : n_fds); + } + else +#endif + { + bytes_read = _dbus_read_socket (socket_transport->fd, + buffer, socket_transport->max_bytes_read_per_iteration); + } + _dbus_message_loader_return_buffer (transport->loader, buffer, bytes_read < 0 ? 0 : bytes_read); @@ -923,7 +982,7 @@ socket_disconnect (DBusTransport *transport) { DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport; - _dbus_verbose ("%s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("\n"); free_watches (transport); @@ -1058,7 +1117,7 @@ socket_do_iteration (DBusTransport *transport, */ if (flags & DBUS_ITERATION_BLOCK) { - _dbus_verbose ("unlock %s pre poll\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock pre poll\n"); _dbus_connection_unlock (transport->connection); } @@ -1070,7 +1129,7 @@ socket_do_iteration (DBusTransport *transport, if (flags & DBUS_ITERATION_BLOCK) { - _dbus_verbose ("lock %s post poll\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("lock post poll\n"); _dbus_connection_lock (transport->connection); } @@ -1204,7 +1263,11 @@ _dbus_transport_new_for_socket (int fd, &socket_vtable, server_guid, address)) goto failed_4; - + +#ifdef HAVE_UNIX_FD_PASSING + _dbus_auth_set_unix_fd_possible(socket_transport->base.auth, _dbus_socket_can_pass_unix_fd(fd)); +#endif + socket_transport->fd = fd; socket_transport->message_bytes_written = 0; @@ -1234,6 +1297,7 @@ _dbus_transport_new_for_socket (int fd, * @param host the host to connect to * @param port the port to connect to * @param family the address family to connect to + * @param path to nonce file * @param error location to store reason for failure. * @returns a new transport, or #NULL on failure. */ @@ -1241,6 +1305,7 @@ DBusTransport* _dbus_transport_new_for_tcp_socket (const char *host, const char *port, const char *family, + const char *noncefile, DBusError *error) { int fd; @@ -1258,7 +1323,7 @@ _dbus_transport_new_for_tcp_socket (const char *host, if (host == NULL) host = "localhost"; - if (!_dbus_string_append (&address, "tcp:")) + if (!_dbus_string_append (&address, noncefile ? "nonce-tcp:" : "tcp:")) goto error; if (!_dbus_string_append (&address, "host=") || @@ -1274,7 +1339,12 @@ _dbus_transport_new_for_tcp_socket (const char *host, !_dbus_string_append (&address, family))) goto error; - fd = _dbus_connect_tcp_socket (host, port, family, error); + if (noncefile != NULL && + (!_dbus_string_append (&address, "noncefile=") || + !_dbus_string_append (&address, noncefile))) + goto error; + + fd = _dbus_connect_tcp_socket_with_nonce (host, port, family, noncefile, error); if (fd < 0) { _DBUS_ASSERT_ERROR_IS_SET (error); @@ -1282,8 +1352,6 @@ _dbus_transport_new_for_tcp_socket (const char *host, return NULL; } - _dbus_fd_set_close_on_exec (fd); - _dbus_verbose ("Successfully connected to tcp socket %s:%s\n", host, port); @@ -1318,23 +1386,34 @@ _dbus_transport_open_socket(DBusAddressEntry *entry, DBusError *error) { const char *method; + dbus_bool_t isTcp; + dbus_bool_t isNonceTcp; method = dbus_address_entry_get_method (entry); _dbus_assert (method != NULL); - if (strcmp (method, "tcp") == 0) + isTcp = strcmp (method, "tcp") == 0; + isNonceTcp = strcmp (method, "nonce-tcp") == 0; + + if (isTcp || isNonceTcp) { const char *host = dbus_address_entry_get_value (entry, "host"); const char *port = dbus_address_entry_get_value (entry, "port"); const char *family = dbus_address_entry_get_value (entry, "family"); + const char *noncefile = dbus_address_entry_get_value (entry, "noncefile"); + + if ((isNonceTcp == TRUE) != (noncefile != NULL)) { + _dbus_set_bad_address (error, method, "noncefile", NULL); + return DBUS_TRANSPORT_OPEN_BAD_ADDRESS; + } if (port == NULL) { - _dbus_set_bad_address (error, "tcp", "port", NULL); + _dbus_set_bad_address (error, method, "port", NULL); return DBUS_TRANSPORT_OPEN_BAD_ADDRESS; } - *transport_p = _dbus_transport_new_for_tcp_socket (host, port, family, error); + *transport_p = _dbus_transport_new_for_tcp_socket (host, port, family, noncefile, error); if (*transport_p == NULL) { _DBUS_ASSERT_ERROR_IS_SET (error); diff --git a/dbus/dbus-transport-socket.h b/dbus/dbus-transport-socket.h index eb833263..8aefae37 100644 --- a/dbus/dbus-transport-socket.h +++ b/dbus/dbus-transport-socket.h @@ -33,6 +33,7 @@ DBusTransport* _dbus_transport_new_for_socket (int f DBusTransport* _dbus_transport_new_for_tcp_socket (const char *host, const char *port, const char *family, + const char *noncefile, DBusError *error); DBusTransportOpenResult _dbus_transport_open_socket (DBusAddressEntry *entry, DBusTransport **transport_p, diff --git a/dbus/dbus-transport-unix.c b/dbus/dbus-transport-unix.c index a4452aa1..a47756f2 100644 --- a/dbus/dbus-transport-unix.c +++ b/dbus/dbus-transport-unix.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-connection-internal.h" #include "dbus-transport-unix.h" @@ -85,8 +86,6 @@ _dbus_transport_new_for_domain_socket (const char *path, goto failed_0; } - _dbus_fd_set_close_on_exec (fd); - _dbus_verbose ("Successfully connected to unix socket %s\n", path); @@ -171,6 +170,59 @@ _dbus_transport_open_platform_specific (DBusAddressEntry *entry, return DBUS_TRANSPORT_OPEN_OK; } } +#ifdef DBUS_ENABLE_LAUNCHD + else if (strcmp (method, "launchd") == 0) + { + DBusError tmp_error = DBUS_ERROR_INIT; + const char *launchd_env_var = dbus_address_entry_get_value (entry, "env"); + const char *launchd_socket; + DBusString socket_path; + dbus_bool_t valid_socket; + + if (!_dbus_string_init (&socket_path)) + { + _DBUS_SET_OOM (error); + return FALSE; + } + + if (launchd_env_var == NULL) + { + _dbus_set_bad_address (error, "launchd", "env", NULL); + return DBUS_TRANSPORT_OPEN_BAD_ADDRESS; + } + + valid_socket = _dbus_lookup_launchd_socket (&socket_path, launchd_env_var, error); + + if (dbus_error_is_set(error)) + { + _dbus_string_free(&socket_path); + return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT; + } + + if (!valid_socket) + { + dbus_set_error(&tmp_error, DBUS_ERROR_BAD_ADDRESS, + "launchd's env var %s does not exist", launchd_env_var); + dbus_error_free(error); + dbus_move_error(&tmp_error, error); + return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT; + } + + launchd_socket = _dbus_string_get_const_data(&socket_path); + *transport_p = _dbus_transport_new_for_domain_socket (launchd_socket, FALSE, error); + + if (*transport_p == NULL) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT; + } + else + { + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + return DBUS_TRANSPORT_OPEN_OK; + } + } +#endif else { _DBUS_ASSERT_ERROR_IS_CLEAR (error); diff --git a/dbus/dbus-transport-win.c b/dbus/dbus-transport-win.c new file mode 100644 index 00000000..faaf1bd2 --- /dev/null +++ b/dbus/dbus-transport-win.c @@ -0,0 +1,89 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-transport-win.c Windows socket subclasses of DBusTransport + * + * Copyright (C) 2002, 2003, 2004 Red Hat Inc. + * Copyright (C) 2007 Ralf Habacker <ralf.habacker@freenet.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#include "dbus-internals.h" +#include "dbus-connection-internal.h" +#include "dbus-transport-socket.h" +#include "dbus-transport-protected.h" +#include "dbus-watch.h" +#include "dbus-sysdeps-win.h" + +/** + * @defgroup DBusTransportUnix DBusTransport implementations for UNIX + * @ingroup DBusInternals + * @brief Implementation details of DBusTransport on UNIX + * + * @{ + */ + +/** + * Opens platform specific transport types. + * + * @param entry the address entry to try opening + * @param transport_p return location for the opened transport + * @param error error to be set + * @returns result of the attempt + */ +DBusTransportOpenResult +_dbus_transport_open_platform_specific (DBusAddressEntry *entry, + DBusTransport **transport_p, + DBusError *error) +{ + const char *method; + + const char *host = dbus_address_entry_get_value (entry, "host"); + const char *port = dbus_address_entry_get_value (entry, "port"); + const char *family = dbus_address_entry_get_value (entry, "family"); + const char *noncefile = dbus_address_entry_get_value (entry, "noncefile"); + + method = dbus_address_entry_get_method (entry); + _dbus_assert (method != NULL); + + if (strcmp (method, "nonce-tcp") != 0) + { + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + return DBUS_TRANSPORT_OPEN_NOT_HANDLED; + } + + if (port == NULL) + { + _dbus_set_bad_address (error, "nonce-tcp", "port", NULL); + return DBUS_TRANSPORT_OPEN_BAD_ADDRESS; + } + + *transport_p = _dbus_transport_new_for_tcp_socket (host, port, family, noncefile, error); + if (*transport_p == NULL) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + return DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT; + } + else + { + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + return DBUS_TRANSPORT_OPEN_OK; + } +} + +/** @} */ diff --git a/dbus/dbus-transport-win.h b/dbus/dbus-transport-win.h new file mode 100644 index 00000000..af997a27 --- /dev/null +++ b/dbus/dbus-transport-win.h @@ -0,0 +1,33 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-transport-win.h Windows socket subclasses of DBusTransport + * + * Copyright (C) 2002 Red Hat Inc. + * Copyright (C) 2007 Ralf Habacker <ralf.habacker@freenet.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#ifndef DBUS_TRANSPORT_WIN_H +#define DBUS_TRANSPORT_WIN_H + +#include <dbus/dbus-transport.h> + +DBUS_BEGIN_DECLS + +DBUS_END_DECLS + +#endif /* DBUS_TRANSPORT_WIN_H */ diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index 53289ad0..a078f7c6 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-transport-protected.h" #include "dbus-transport-unix.h" #include "dbus-transport-socket.h" @@ -29,6 +30,8 @@ #include "dbus-auth.h" #include "dbus-address.h" #include "dbus-credentials.h" +#include "dbus-message-private.h" +#include "dbus-marshal-header.h" #ifdef DBUS_BUILD_TESTS #include "dbus-server-debug-pipe.h" #endif @@ -55,7 +58,7 @@ */ static void -live_messages_size_notify (DBusCounter *counter, +live_messages_notify (DBusCounter *counter, void *user_data) { DBusTransport *transport = user_data; @@ -63,8 +66,10 @@ live_messages_size_notify (DBusCounter *counter, _dbus_transport_ref (transport); #if 0 - _dbus_verbose ("Counter value is now %d\n", - (int) _dbus_counter_get_value (counter)); + _dbus_verbose ("Size counter value is now %d\n", + (int) _dbus_counter_get_size_value (counter)); + _dbus_verbose ("Unix FD counter value is now %d\n", + (int) _dbus_counter_get_unix_fd_value (counter)); #endif /* disable or re-enable the read watch for the transport if @@ -155,7 +160,7 @@ _dbus_transport_init_base (DBusTransport *transport, transport->vtable = vtable; transport->loader = loader; transport->auth = auth; - transport->live_messages_size = counter; + transport->live_messages = counter; transport->authenticated = FALSE; transport->disconnected = FALSE; transport->is_server = (server_guid != NULL); @@ -178,17 +183,22 @@ _dbus_transport_init_base (DBusTransport *transport, */ transport->max_live_messages_size = _DBUS_ONE_MEGABYTE * 63; + /* On Linux RLIMIT_NOFILE defaults to 1024, so allowing 4096 fds live + should be more than enough */ + transport->max_live_messages_unix_fds = 4096; + /* credentials read from socket if any */ transport->credentials = creds; - - _dbus_counter_set_notify (transport->live_messages_size, + + _dbus_counter_set_notify (transport->live_messages, transport->max_live_messages_size, - live_messages_size_notify, + transport->max_live_messages_unix_fds, + live_messages_notify, transport); if (transport->address) _dbus_verbose ("Initialized transport on address %s\n", transport->address); - + return TRUE; } @@ -212,9 +222,9 @@ _dbus_transport_finalize_base (DBusTransport *transport) _dbus_message_loader_unref (transport->loader); _dbus_auth_unref (transport->auth); - _dbus_counter_set_notify (transport->live_messages_size, - 0, NULL, NULL); - _dbus_counter_unref (transport->live_messages_size); + _dbus_counter_set_notify (transport->live_messages, + 0, 0, NULL, NULL); + _dbus_counter_unref (transport->live_messages); dbus_free (transport->address); dbus_free (transport->expected_guid); if (transport->credentials) @@ -263,7 +273,7 @@ check_address (const char *address, DBusError *error) * @returns a new transport, or #NULL on failure. */ static DBusTransport* -_dbus_transport_new_for_autolaunch (DBusError *error) +_dbus_transport_new_for_autolaunch (const char *scope, DBusError *error) { DBusString address; DBusTransport *result = NULL; @@ -276,7 +286,7 @@ _dbus_transport_new_for_autolaunch (DBusError *error) return NULL; } - if (!_dbus_get_autolaunch_address (&address, error)) + if (!_dbus_get_autolaunch_address (scope, &address, error)) { _DBUS_ASSERT_ERROR_IS_SET (error); goto out; @@ -305,7 +315,9 @@ _dbus_transport_open_autolaunch (DBusAddressEntry *entry, if (strcmp (method, "autolaunch") == 0) { - *transport_p = _dbus_transport_new_for_autolaunch (error); + const char *scope = dbus_address_entry_get_value (entry, "scope"); + + *transport_p = _dbus_transport_new_for_autolaunch (scope, error); if (*transport_p == NULL) { @@ -465,7 +477,7 @@ _dbus_transport_unref (DBusTransport *transport) transport->refcount -= 1; if (transport->refcount == 0) { - _dbus_verbose ("%s: finalizing\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("finalizing\n"); _dbus_assert (transport->vtable->finalize != NULL); @@ -484,7 +496,7 @@ _dbus_transport_unref (DBusTransport *transport) void _dbus_transport_disconnect (DBusTransport *transport) { - _dbus_verbose ("%s start\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("start\n"); _dbus_assert (transport->vtable->disconnect != NULL); @@ -495,7 +507,7 @@ _dbus_transport_disconnect (DBusTransport *transport) transport->disconnected = TRUE; - _dbus_verbose ("%s end\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("end\n"); } /** @@ -532,14 +544,14 @@ auth_via_unix_user_function (DBusTransport *transport) unix_user_data = transport->unix_user_data; uid = _dbus_credentials_get_unix_uid (auth_identity); - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (connection); allow = (* unix_user_function) (connection, uid, unix_user_data); - _dbus_verbose ("lock %s post unix user function\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("lock post unix user function\n"); _dbus_connection_lock (connection); if (allow) @@ -583,14 +595,14 @@ auth_via_windows_user_function (DBusTransport *transport) return FALSE; } - _dbus_verbose ("unlock %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("unlock\n"); _dbus_connection_unlock (connection); allow = (* windows_user_function) (connection, windows_sid, windows_user_data); - _dbus_verbose ("lock %s post windows user function\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("lock post windows user function\n"); _dbus_connection_lock (connection); if (allow) @@ -651,8 +663,10 @@ auth_via_default_rules (DBusTransport *transport) if (_dbus_credentials_include(our_identity,DBUS_CREDENTIAL_WINDOWS_SID)) _dbus_verbose ("Client authorized as SID '%s'" " but our SID is '%s', disconnecting\n", - _dbus_credentials_get_windows_sid(auth_identity), - _dbus_credentials_get_windows_sid(our_identity)); + (_dbus_credentials_get_windows_sid(auth_identity) ? + _dbus_credentials_get_windows_sid(auth_identity) : "<null>"), + (_dbus_credentials_get_windows_sid(our_identity) ? + _dbus_credentials_get_windows_sid(our_identity) : "<null>")); else _dbus_verbose ("Client authorized as UID "DBUS_UID_FORMAT " but our UID is "DBUS_UID_FORMAT", disconnecting\n", @@ -734,7 +748,7 @@ _dbus_transport_get_is_authenticated (DBusTransport *transport) if (transport->expected_guid == NULL) { - _dbus_verbose ("No memory to complete auth in %s\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("No memory to complete auth\n"); return FALSE; } } @@ -803,6 +817,18 @@ _dbus_transport_get_is_anonymous (DBusTransport *transport) } /** + * Returns TRUE if the transport supports sending unix fds. + * + * @param transport the transport + * @returns #TRUE if TRUE it is possible to send unix fds across the transport. + */ +dbus_bool_t +_dbus_transport_can_pass_unix_fd(DBusTransport *transport) +{ + return DBUS_TRANSPORT_CAN_SEND_UNIX_FD(transport); +} + +/** * Gets the address of a transport. It will be * #NULL for a server-side transport. * @@ -957,7 +983,7 @@ _dbus_transport_do_iteration (DBusTransport *transport, timeout_milliseconds); _dbus_transport_unref (transport); - _dbus_verbose ("%s end\n", _DBUS_FUNCTION_NAME); + _dbus_verbose ("end\n"); } static dbus_bool_t @@ -1059,7 +1085,8 @@ recover_unused_bytes (DBusTransport *transport) DBusDispatchStatus _dbus_transport_get_dispatch_status (DBusTransport *transport) { - if (_dbus_counter_get_value (transport->live_messages_size) >= transport->max_live_messages_size) + if (_dbus_counter_get_size_value (transport->live_messages) >= transport->max_live_messages_size || + _dbus_counter_get_unix_fd_value (transport->live_messages) >= transport->max_live_messages_unix_fds) return DBUS_DISPATCH_COMPLETE; /* complete for now */ if (!_dbus_transport_get_is_authenticated (transport)) @@ -1116,7 +1143,7 @@ _dbus_transport_queue_messages (DBusTransport *transport) _dbus_verbose ("queueing received message %p\n", message); - if (!_dbus_message_add_size_counter (message, transport->live_messages_size)) + if (!_dbus_message_add_counter (message, transport->live_messages)) { _dbus_message_loader_putback_message_link (transport->loader, link); @@ -1154,6 +1181,19 @@ _dbus_transport_set_max_message_size (DBusTransport *transport, } /** + * See dbus_connection_set_max_message_unix_fds(). + * + * @param transport the transport + * @param n the max number of unix fds of a single message + */ +void +_dbus_transport_set_max_message_unix_fds (DBusTransport *transport, + long n) +{ + _dbus_message_loader_set_max_message_unix_fds (transport->loader, n); +} + +/** * See dbus_connection_get_max_message_size(). * * @param transport the transport @@ -1166,6 +1206,18 @@ _dbus_transport_get_max_message_size (DBusTransport *transport) } /** + * See dbus_connection_get_max_message_unix_fds(). + * + * @param transport the transport + * @returns max message unix fds + */ +long +_dbus_transport_get_max_message_unix_fds (DBusTransport *transport) +{ + return _dbus_message_loader_get_max_message_unix_fds (transport->loader); +} + +/** * See dbus_connection_set_max_received_size(). * * @param transport the transport @@ -1176,12 +1228,30 @@ _dbus_transport_set_max_received_size (DBusTransport *transport, long size) { transport->max_live_messages_size = size; - _dbus_counter_set_notify (transport->live_messages_size, + _dbus_counter_set_notify (transport->live_messages, transport->max_live_messages_size, - live_messages_size_notify, + transport->max_live_messages_unix_fds, + live_messages_notify, transport); } +/** + * See dbus_connection_set_max_received_unix_fds(). + * + * @param transport the transport + * @param n the max unix fds of all incoming messages + */ +void +_dbus_transport_set_max_received_unix_fds (DBusTransport *transport, + long n) +{ + transport->max_live_messages_unix_fds = n; + _dbus_counter_set_notify (transport->live_messages, + transport->max_live_messages_size, + transport->max_live_messages_unix_fds, + live_messages_notify, + transport); +} /** * See dbus_connection_get_max_received_size(). @@ -1196,6 +1266,18 @@ _dbus_transport_get_max_received_size (DBusTransport *transport) } /** + * See dbus_connection_set_max_received_unix_fds(). + * + * @param transport the transport + * @returns max unix fds for all live messages + */ +long +_dbus_transport_get_max_received_unix_fds (DBusTransport *transport) +{ + return transport->max_live_messages_unix_fds; +} + +/** * See dbus_connection_get_unix_user(). * * @param transport the transport diff --git a/dbus/dbus-transport.h b/dbus/dbus-transport.h index f2915f33..0db048a2 100644 --- a/dbus/dbus-transport.h +++ b/dbus/dbus-transport.h @@ -40,6 +40,8 @@ void _dbus_transport_disconnect (DBusTransport dbus_bool_t _dbus_transport_get_is_connected (DBusTransport *transport); dbus_bool_t _dbus_transport_get_is_authenticated (DBusTransport *transport); dbus_bool_t _dbus_transport_get_is_anonymous (DBusTransport *transport); +dbus_bool_t _dbus_transport_can_pass_unix_fd (DBusTransport *transport); + const char* _dbus_transport_get_address (DBusTransport *transport); const char* _dbus_transport_get_server_id (DBusTransport *transport); dbus_bool_t _dbus_transport_handle_watch (DBusTransport *transport, @@ -52,12 +54,21 @@ void _dbus_transport_do_iteration (DBusTransport int timeout_milliseconds); DBusDispatchStatus _dbus_transport_get_dispatch_status (DBusTransport *transport); dbus_bool_t _dbus_transport_queue_messages (DBusTransport *transport); + void _dbus_transport_set_max_message_size (DBusTransport *transport, long size); long _dbus_transport_get_max_message_size (DBusTransport *transport); void _dbus_transport_set_max_received_size (DBusTransport *transport, long size); long _dbus_transport_get_max_received_size (DBusTransport *transport); + +void _dbus_transport_set_max_message_unix_fds (DBusTransport *transport, + long n); +long _dbus_transport_get_max_message_unix_fds (DBusTransport *transport); +void _dbus_transport_set_max_received_unix_fds(DBusTransport *transport, + long n); +long _dbus_transport_get_max_received_unix_fds(DBusTransport *transport); + dbus_bool_t _dbus_transport_get_socket_fd (DBusTransport *transport, int *fd_p); dbus_bool_t _dbus_transport_get_unix_user (DBusTransport *transport, diff --git a/dbus/dbus-userdb-util.c b/dbus/dbus-userdb-util.c index f75d1bc0..c44c014f 100644 --- a/dbus/dbus-userdb-util.c +++ b/dbus/dbus-userdb-util.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #define DBUS_USERDB_INCLUDES_PRIVATE 1 #include "dbus-userdb.h" #include "dbus-test.h" @@ -225,7 +226,7 @@ _dbus_user_database_lookup_group (DBusUserDatabase *db, #ifdef DBUS_ENABLE_USERDB_CACHE if (gid != DBUS_GID_UNSET) - info = _dbus_hash_table_lookup_ulong (db->groups, gid); + info = _dbus_hash_table_lookup_uintptr (db->groups, gid); else info = _dbus_hash_table_lookup_string (db->groups_by_name, _dbus_string_get_const_data (groupname)); @@ -277,7 +278,7 @@ _dbus_user_database_lookup_group (DBusUserDatabase *db, gid = DBUS_GID_UNSET; groupname = NULL; - if (!_dbus_hash_table_insert_ulong (db->groups, info->gid, info)) + if (!_dbus_hash_table_insert_uintptr (db->groups, info->gid, info)) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); _dbus_group_info_free_allocated (info); @@ -289,7 +290,7 @@ _dbus_user_database_lookup_group (DBusUserDatabase *db, info->groupname, info)) { - _dbus_hash_table_remove_ulong (db->groups, info->gid); + _dbus_hash_table_remove_uintptr (db->groups, info->gid); dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return NULL; } diff --git a/dbus/dbus-userdb.c b/dbus/dbus-userdb.c index bfa4c435..4e8b39aa 100644 --- a/dbus/dbus-userdb.c +++ b/dbus/dbus-userdb.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #define DBUS_USERDB_INCLUDES_PRIVATE 1 #include "dbus-userdb.h" #include "dbus-hash.h" @@ -145,7 +146,7 @@ _dbus_user_database_lookup (DBusUserDatabase *db, #ifdef DBUS_ENABLE_USERDB_CACHE if (uid != DBUS_UID_UNSET) - info = _dbus_hash_table_lookup_ulong (db->users, uid); + info = _dbus_hash_table_lookup_uintptr (db->users, uid); else info = _dbus_hash_table_lookup_string (db->users_by_name, _dbus_string_get_const_data (username)); @@ -198,7 +199,7 @@ _dbus_user_database_lookup (DBusUserDatabase *db, username = NULL; /* insert into hash */ - if (!_dbus_hash_table_insert_ulong (db->users, info->uid, info)) + if (!_dbus_hash_table_insert_uintptr (db->users, info->uid, info)) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); _dbus_user_info_free_allocated (info); @@ -209,7 +210,7 @@ _dbus_user_database_lookup (DBusUserDatabase *db, info->username, info)) { - _dbus_hash_table_remove_ulong (db->users, info->uid); + _dbus_hash_table_remove_uintptr (db->users, info->uid); dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); return NULL; } @@ -537,13 +538,13 @@ _dbus_user_database_new (void) db->refcount = 1; - db->users = _dbus_hash_table_new (DBUS_HASH_ULONG, + db->users = _dbus_hash_table_new (DBUS_HASH_UINTPTR, NULL, (DBusFreeFunction) _dbus_user_info_free_allocated); if (db->users == NULL) goto failed; - db->groups = _dbus_hash_table_new (DBUS_HASH_ULONG, + db->groups = _dbus_hash_table_new (DBUS_HASH_UINTPTR, NULL, (DBusFreeFunction) _dbus_group_info_free_allocated); if (db->groups == NULL) diff --git a/dbus/dbus-uuidgen.c b/dbus/dbus-uuidgen.c index 5c571e88..6d7c0aec 100644 --- a/dbus/dbus-uuidgen.c +++ b/dbus/dbus-uuidgen.c @@ -20,6 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include <config.h> #include "dbus-uuidgen.h" #include "dbus-internals.h" #include "dbus-string.h" diff --git a/dbus/dbus-watch.c b/dbus/dbus-watch.c index bca699fd..8d759e5e 100644 --- a/dbus/dbus-watch.c +++ b/dbus/dbus-watch.c @@ -21,6 +21,7 @@ * */ +#include <config.h> #include "dbus-internals.h" #include "dbus-watch.h" #include "dbus-list.h" @@ -495,6 +496,8 @@ _dbus_watch_set_handler (DBusWatch *watch, int dbus_watch_get_fd (DBusWatch *watch) { + _dbus_return_val_if_fail (watch != NULL, -1); + return dbus_watch_get_unix_fd(watch); } @@ -514,6 +517,8 @@ dbus_watch_get_fd (DBusWatch *watch) int dbus_watch_get_unix_fd (DBusWatch *watch) { + _dbus_return_val_if_fail (watch != NULL, -1); + /* FIXME remove #ifdef and do this on a lower level * (watch should have set_socket and set_unix_fd and track * which it has, and the transport should provide the @@ -522,7 +527,7 @@ dbus_watch_get_unix_fd (DBusWatch *watch) #ifdef DBUS_UNIX return watch->fd; #else - return -1; + return dbus_watch_get_socket( watch ); #endif } @@ -541,6 +546,8 @@ dbus_watch_get_unix_fd (DBusWatch *watch) int dbus_watch_get_socket (DBusWatch *watch) { + _dbus_return_val_if_fail (watch != NULL, -1); + return watch->fd; } @@ -560,6 +567,7 @@ dbus_watch_get_socket (DBusWatch *watch) unsigned int dbus_watch_get_flags (DBusWatch *watch) { + _dbus_return_val_if_fail (watch != NULL, 0); _dbus_assert ((watch->flags & VALID_WATCH_FLAGS) == watch->flags); return watch->flags; @@ -575,6 +583,8 @@ dbus_watch_get_flags (DBusWatch *watch) void* dbus_watch_get_data (DBusWatch *watch) { + _dbus_return_val_if_fail (watch != NULL, NULL); + return watch->data; } @@ -594,6 +604,8 @@ dbus_watch_set_data (DBusWatch *watch, void *data, DBusFreeFunction free_data_function) { + _dbus_return_if_fail (watch != NULL); + _dbus_verbose ("Setting watch fd %d data to data = %p function = %p from data = %p function = %p\n", dbus_watch_get_socket (watch), data, free_data_function, watch->data, watch->free_data_function); @@ -615,7 +627,8 @@ dbus_watch_set_data (DBusWatch *watch, dbus_bool_t dbus_watch_get_enabled (DBusWatch *watch) { - _dbus_assert (watch != NULL); + _dbus_return_val_if_fail (watch != NULL, FALSE); + return watch->enabled; } @@ -646,11 +659,12 @@ dbus_bool_t dbus_watch_handle (DBusWatch *watch, unsigned int flags) { + _dbus_return_val_if_fail (watch != NULL, FALSE); + #ifndef DBUS_DISABLE_CHECKS if (watch->fd < 0 || watch->flags == 0) { - _dbus_warn_check_failed ("%s: Watch is invalid, it should have been removed\n", - _DBUS_FUNCTION_NAME); + _dbus_warn_check_failed ("Watch is invalid, it should have been removed\n"); return TRUE; } #endif diff --git a/dbus/sd-daemon.c b/dbus/sd-daemon.c new file mode 100644 index 00000000..9c23b917 --- /dev/null +++ b/dbus/sd-daemon.c @@ -0,0 +1,435 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + Copyright 2010 Lennart Poettering + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +***/ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <sys/fcntl.h> +#include <netinet/in.h> +#include <stdlib.h> +#include <errno.h> +#include <unistd.h> +#include <string.h> +#include <stdarg.h> +#include <stdio.h> + +#include "sd-daemon.h" + +int sd_listen_fds(int unset_environment) { + +#if defined(DISABLE_SYSTEMD) || !defined(__linux__) + return 0; +#else + int r, fd; + const char *e; + char *p = NULL; + unsigned long l; + + if (!(e = getenv("LISTEN_PID"))) { + r = 0; + goto finish; + } + + errno = 0; + l = strtoul(e, &p, 10); + + if (errno != 0) { + r = -errno; + goto finish; + } + + if (!p || *p || l <= 0) { + r = -EINVAL; + goto finish; + } + + /* Is this for us? */ + if (getpid() != (pid_t) l) { + r = 0; + goto finish; + } + + if (!(e = getenv("LISTEN_FDS"))) { + r = 0; + goto finish; + } + + errno = 0; + l = strtoul(e, &p, 10); + + if (errno != 0) { + r = -errno; + goto finish; + } + + if (!p || *p) { + r = -EINVAL; + goto finish; + } + + for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + (int) l; fd ++) { + int flags; + + if ((flags = fcntl(fd, F_GETFD)) < 0) { + r = -errno; + goto finish; + } + + if (flags & FD_CLOEXEC) + continue; + + if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) { + r = -errno; + goto finish; + } + } + + r = (int) l; + +finish: + if (unset_environment) { + unsetenv("LISTEN_PID"); + unsetenv("LISTEN_FDS"); + } + + return r; +#endif +} + +int sd_is_fifo(int fd, const char *path) { + struct stat st_fd; + + if (fd < 0) + return -EINVAL; + + memset(&st_fd, 0, sizeof(st_fd)); + if (fstat(fd, &st_fd) < 0) + return -errno; + + if (!S_ISFIFO(st_fd.st_mode)) + return 0; + + if (path) { + struct stat st_path; + + memset(&st_path, 0, sizeof(st_path)); + if (stat(path, &st_path) < 0) { + + if (errno == ENOENT || errno == ENOTDIR) + return 0; + + return -errno; + } + + return + st_path.st_dev == st_fd.st_dev && + st_path.st_ino == st_fd.st_ino; + } + + return 1; +} + +static int sd_is_socket_internal(int fd, int type, int listening) { + struct stat st_fd; + + if (fd < 0 || type < 0) + return -EINVAL; + + if (fstat(fd, &st_fd) < 0) + return -errno; + + if (!S_ISSOCK(st_fd.st_mode)) + return 0; + + if (type != 0) { + int other_type = 0; + socklen_t l = sizeof(other_type); + + if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &other_type, &l) < 0) + return -errno; + + if (l != sizeof(other_type)) + return -EINVAL; + + if (other_type != type) + return 0; + } + + if (listening >= 0) { + int accepting = 0; + socklen_t l = sizeof(accepting); + + if (getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN, &accepting, &l) < 0) + return -errno; + + if (l != sizeof(accepting)) + return -EINVAL; + + if (!accepting != !listening) + return 0; + } + + return 1; +} + +union sockaddr_union { + struct sockaddr sa; + struct sockaddr_in in4; + struct sockaddr_in6 in6; + struct sockaddr_un un; + struct sockaddr_storage storage; +}; + +int sd_is_socket(int fd, int family, int type, int listening) { + int r; + + if (family < 0) + return -EINVAL; + + if ((r = sd_is_socket_internal(fd, type, listening)) <= 0) + return r; + + if (family > 0) { + union sockaddr_union sockaddr; + socklen_t l; + + memset(&sockaddr, 0, sizeof(sockaddr)); + l = sizeof(sockaddr); + + if (getsockname(fd, &sockaddr.sa, &l) < 0) + return -errno; + + if (l < sizeof(sa_family_t)) + return -EINVAL; + + return sockaddr.sa.sa_family == family; + } + + return 1; +} + +int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) { + union sockaddr_union sockaddr; + socklen_t l; + int r; + + if (family != 0 && family != AF_INET && family != AF_INET6) + return -EINVAL; + + if ((r = sd_is_socket_internal(fd, type, listening)) <= 0) + return r; + + memset(&sockaddr, 0, sizeof(sockaddr)); + l = sizeof(sockaddr); + + if (getsockname(fd, &sockaddr.sa, &l) < 0) + return -errno; + + if (l < sizeof(sa_family_t)) + return -EINVAL; + + if (sockaddr.sa.sa_family != AF_INET && + sockaddr.sa.sa_family != AF_INET6) + return 0; + + if (family > 0) + if (sockaddr.sa.sa_family != family) + return 0; + + if (port > 0) { + if (sockaddr.sa.sa_family == AF_INET) { + if (l < sizeof(struct sockaddr_in)) + return -EINVAL; + + return htons(port) == sockaddr.in4.sin_port; + } else { + if (l < sizeof(struct sockaddr_in6)) + return -EINVAL; + + return htons(port) == sockaddr.in6.sin6_port; + } + } + + return 1; +} + +int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) { + union sockaddr_union sockaddr; + socklen_t l; + int r; + + if ((r = sd_is_socket_internal(fd, type, listening)) <= 0) + return r; + + memset(&sockaddr, 0, sizeof(sockaddr)); + l = sizeof(sockaddr); + + if (getsockname(fd, &sockaddr.sa, &l) < 0) + return -errno; + + if (l < sizeof(sa_family_t)) + return -EINVAL; + + if (sockaddr.sa.sa_family != AF_UNIX) + return 0; + + if (path) { + if (length <= 0) + length = strlen(path); + + if (length <= 0) + /* Unnamed socket */ + return l == sizeof(sa_family_t); + + if (path[0]) + /* Normal path socket */ + return + (l >= sizeof(sa_family_t) + length + 1) && + memcmp(path, sockaddr.un.sun_path, length+1) == 0; + else + /* Abstract namespace socket */ + return + (l == sizeof(sa_family_t) + length) && + memcmp(path, sockaddr.un.sun_path, length) == 0; + } + + return 1; +} + +int sd_notify(int unset_environment, const char *state) { +#if defined(DISABLE_SYSTEMD) || !defined(__linux__) || !defined(SOCK_CLOEXEC) + return 0; +#else + int fd = -1, r; + struct msghdr msghdr; + struct iovec iovec; + union sockaddr_union sockaddr; + const char *e; + + if (!state) { + r = -EINVAL; + goto finish; + } + + if (!(e = getenv("NOTIFY_SOCKET"))) + return 0; + + /* Must be an abstract socket, or an absolute path */ + if ((e[0] != '@' && e[0] != '/') || e[1] == 0) { + r = -EINVAL; + goto finish; + } + + if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) { + r = -errno; + goto finish; + } + + memset(&sockaddr, 0, sizeof(sockaddr)); + sockaddr.sa.sa_family = AF_UNIX; + strncpy(sockaddr.un.sun_path, e, sizeof(sockaddr.un.sun_path)); + + if (sockaddr.un.sun_path[0] == '@') + sockaddr.un.sun_path[0] = 0; + + memset(&iovec, 0, sizeof(iovec)); + iovec.iov_base = (char*) state; + iovec.iov_len = strlen(state); + + memset(&msghdr, 0, sizeof(msghdr)); + msghdr.msg_name = &sockaddr; + msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e); + + if (msghdr.msg_namelen > sizeof(struct sockaddr_un)) + msghdr.msg_namelen = sizeof(struct sockaddr_un); + + msghdr.msg_iov = &iovec; + msghdr.msg_iovlen = 1; + + if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) { + r = -errno; + goto finish; + } + + r = 1; + +finish: + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + if (fd >= 0) + close(fd); + + return r; +#endif +} + +int sd_notifyf(int unset_environment, const char *format, ...) { +#if defined(DISABLE_SYSTEMD) || !defined(__linux__) + return 0; +#else + va_list ap; + char *p = NULL; + int r; + + va_start(ap, format); + r = vasprintf(&p, format, ap); + va_end(ap); + + if (r < 0 || !p) + return -ENOMEM; + + r = sd_notify(unset_environment, p); + free(p); + + return r; +#endif +} + +int sd_booted(void) { +#if defined(DISABLE_SYSTEMD) || !defined(__linux__) + return 0; +#else + + struct stat a, b; + + /* We simply test whether the systemd cgroup hierarchy is + * mounted */ + + if (lstat("/sys/fs/cgroup", &a) < 0) + return 0; + + if (lstat("/sys/fs/cgroup/systemd", &b) < 0) + return 0; + + return a.st_dev != b.st_dev; +#endif +} diff --git a/dbus/sd-daemon.h b/dbus/sd-daemon.h new file mode 100644 index 00000000..c68c96d2 --- /dev/null +++ b/dbus/sd-daemon.h @@ -0,0 +1,257 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#ifndef foosddaemonhfoo +#define foosddaemonhfoo + +/*** + Copyright 2010 Lennart Poettering + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +***/ + +#include <sys/types.h> +#include <inttypes.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + Reference implementation of a few systemd related interfaces for + writing daemons. These interfaces are trivial to implement. To + simplify porting we provide this reference implementation. + Applications are welcome to reimplement the algorithms described + here if they do not want to include these two source files. + + The following functionality is provided: + + - Support for logging with log levels on stderr + - File descriptor passing for socket-based activation + - Daemon startup and status notification + - Detection of systemd boots + + You may compile this with -DDISABLE_SYSTEMD to disable systemd + support. This makes all those calls NOPs that are directly related to + systemd (i.e. only sd_is_xxx() will stay useful). + + Since this is drop-in code we don't want any of our symbols to be + exported in any case. Hence we declare hidden visibility for all of + them. + + You may find an up-to-date version of these source files online: + + http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h + http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c + + This should compile on non-Linux systems, too, but with the + exception of the sd_is_xxx() calls all functions will become NOPs. + + See sd-daemon(7) for more information. +*/ + +#if __GNUC__ >= 4 +#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b))) +#define _sd_hidden_ __attribute__ ((visibility("hidden"))) +#else +#define _sd_printf_attr_(a,b) +#define _sd_hidden_ +#endif + +/* + Log levels for usage on stderr: + + fprintf(stderr, SD_NOTICE "Hello World!\n"); + + This is similar to printk() usage in the kernel. +*/ +#define SD_EMERG "<0>" /* system is unusable */ +#define SD_ALERT "<1>" /* action must be taken immediately */ +#define SD_CRIT "<2>" /* critical conditions */ +#define SD_ERR "<3>" /* error conditions */ +#define SD_WARNING "<4>" /* warning conditions */ +#define SD_NOTICE "<5>" /* normal but significant condition */ +#define SD_INFO "<6>" /* informational */ +#define SD_DEBUG "<7>" /* debug-level messages */ + +/* The first passed file descriptor is fd 3 */ +#define SD_LISTEN_FDS_START 3 + +/* + Returns how many file descriptors have been passed, or a negative + errno code on failure. Optionally, removes the $LISTEN_FDS and + $LISTEN_PID file descriptors from the environment (recommended, but + problematic in threaded environments). If r is the return value of + this function you'll find the file descriptors passed as fds + SD_LISTEN_FDS_START to SD_LISTEN_FDS_START+r-1. Returns a negative + errno style error code on failure. This function call ensures that + the FD_CLOEXEC flag is set for the passed file descriptors, to make + sure they are not passed on to child processes. If FD_CLOEXEC shall + not be set, the caller needs to unset it after this call for all file + descriptors that are used. + + See sd_listen_fds(3) for more information. +*/ +int sd_listen_fds(int unset_environment) _sd_hidden_; + +/* + Helper call for identifying a passed file descriptor. Returns 1 if + the file descriptor is a FIFO in the file system stored under the + specified path, 0 otherwise. If path is NULL a path name check will + not be done and the call only verifies if the file descriptor + refers to a FIFO. Returns a negative errno style error code on + failure. + + See sd_is_fifo(3) for more information. +*/ +int sd_is_fifo(int fd, const char *path) _sd_hidden_; + +/* + Helper call for identifying a passed file descriptor. Returns 1 if + the file descriptor is a socket of the specified family (AF_INET, + ...) and type (SOCK_DGRAM, SOCK_STREAM, ...), 0 otherwise. If + family is 0 a socket family check will not be done. If type is 0 a + socket type check will not be done and the call only verifies if + the file descriptor refers to a socket. If listening is > 0 it is + verified that the socket is in listening mode. (i.e. listen() has + been called) If listening is == 0 it is verified that the socket is + not in listening mode. If listening is < 0 no listening mode check + is done. Returns a negative errno style error code on failure. + + See sd_is_socket(3) for more information. +*/ +int sd_is_socket(int fd, int family, int type, int listening) _sd_hidden_; + +/* + Helper call for identifying a passed file descriptor. Returns 1 if + the file descriptor is an Internet socket, of the specified family + (either AF_INET or AF_INET6) and the specified type (SOCK_DGRAM, + SOCK_STREAM, ...), 0 otherwise. If version is 0 a protocol version + check is not done. If type is 0 a socket type check will not be + done. If port is 0 a socket port check will not be done. The + listening flag is used the same way as in sd_is_socket(). Returns a + negative errno style error code on failure. + + See sd_is_socket_inet(3) for more information. +*/ +int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port) _sd_hidden_; + +/* + Helper call for identifying a passed file descriptor. Returns 1 if + the file descriptor is an AF_UNIX socket of the specified type + (SOCK_DGRAM, SOCK_STREAM, ...) and path, 0 otherwise. If type is 0 + a socket type check will not be done. If path is NULL a socket path + check will not be done. For normal AF_UNIX sockets set length to + 0. For abstract namespace sockets set length to the length of the + socket name (including the initial 0 byte), and pass the full + socket path in path (including the initial 0 byte). The listening + flag is used the same way as in sd_is_socket(). Returns a negative + errno style error code on failure. + + See sd_is_socket_unix(3) for more information. +*/ +int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t length) _sd_hidden_; + +/* + Informs systemd about changed daemon state. This takes a number of + newline seperated environment-style variable assignments in a + string. The following variables are known: + + READY=1 Tells systemd that daemon startup is finished (only + relevant for services of Type=notify). The passed + argument is a boolean "1" or "0". Since there is + little value in signalling non-readiness the only + value daemons should send is "READY=1". + + STATUS=... Passes a single-line status string back to systemd + that describes the daemon state. This is free-from + and can be used for various purposes: general state + feedback, fsck-like programs could pass completion + percentages and failing programs could pass a human + readable error message. Example: "STATUS=Completed + 66% of file system check..." + + ERRNO=... If a daemon fails, the errno-style error code, + formatted as string. Example: "ERRNO=2" for ENOENT. + + BUSERROR=... If a daemon fails, the D-Bus error-style error + code. Example: "BUSERROR=org.freedesktop.DBus.Error.TimedOut" + + MAINPID=... The main pid of a daemon, in case systemd did not + fork off the process itself. Example: "MAINPID=4711" + + Daemons can choose to send additional variables. However, it is + recommened to prefix variable names not listed above with X_. + + Returns a negative errno-style error code on failure. Returns > 0 + if systemd could be notified, 0 if it couldn't possibly because + systemd is not running. + + Example: When a daemon finished starting up, it could issue this + call to notify systemd about it: + + sd_notify(0, "READY=1"); + + See sd_notifyf() for more complete examples. + + See sd_notify(3) for more information. +*/ +int sd_notify(int unset_environment, const char *state) _sd_hidden_; + +/* + Similar to sd_notify() but takes a format string. + + Example 1: A daemon could send the following after initialization: + + sd_notifyf(0, "READY=1\n" + "STATUS=Processing requests...\n" + "MAINPID=%lu", + (unsigned long) getpid()); + + Example 2: A daemon could send the following shortly before + exiting, on failure: + + sd_notifyf(0, "STATUS=Failed to start up: %s\n" + "ERRNO=%i", + strerror(errno), + errno); + + See sd_notifyf(3) for more information. +*/ +int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3) _sd_hidden_; + +/* + Returns > 0 if the system was booted with systemd. Returns < 0 on + error. Returns 0 if the system was not booted with systemd. Note + that all of the functions above handle non-systemd boots just + fine. You should NOT protect them with a call to this function. Also + note that this function checks whether the system, not the user + session is controlled by systemd. However the functions above work + for both session and system services. + + See sd_booted(3) for more information. +*/ +int sd_booted(void) _sd_hidden_; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/dbus/versioninfo.rc.in b/dbus/versioninfo.rc.in new file mode 100644 index 00000000..b745b39a --- /dev/null +++ b/dbus/versioninfo.rc.in @@ -0,0 +1,52 @@ +/* versioninfo.rc.in - for dbus + * Copyright (C) 2005 g10 Code GmbH + * + * This file is free software; as a special exception the author 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. + */ + +/* This file is processed by configure to create versioninfo.rc */ + +#line __LINE__ "versioninfo.rc.in" + +#include <afxres.h> + + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @BUILD_FILEVERSION@ + PRODUCTVERSION @BUILD_FILEVERSION@ + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x21L +#else + FILEFLAGS 0x20L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Provided under the terms of the GNU Lesser General Public License.\0" + VALUE "CompanyName", "FreeDesktop.org\0" + VALUE "FileDescription", "dbus - FreeDesktop message bus system\0" + VALUE "FileVersion", "@DBUS_VERSION@\0" + VALUE "InternalName", "dbus\0" + VALUE "LegalCopyright", "Copyright © 2009 FreeDesktop.org\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "dbus-1.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "dbus\0" + VALUE "ProductVersion", "@DBUS_VERSION@\0" + VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0" + END + END +END + @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2005-07-09.11 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +16,9 @@ scriptversion=2009-04-28.21; # UTC # 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, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -85,34 +86,12 @@ if test "$depmode" = dashXmstdout; then depmode=dashmstdout fi -cygpath_u="cygpath -u -f -" -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" - depmode=msvisualcpp -fi - case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else @@ -199,14 +178,14 @@ sgi) ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> "$depfile" - echo >> "$depfile" +' ' ' >> $depfile + echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -222,39 +201,34 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u "$@" -M fi stat=$? + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + if test $stat -eq 0; then : else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + rm -f "$tmpdepfile" exit $stat fi - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done if test -f "$tmpdepfile"; then + outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[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,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -302,51 +276,6 @@ icc) rm -f "$tmpdepfile" ;; -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -359,13 +288,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to + # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and + # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is @@ -416,7 +345,7 @@ dashmstdout) # Remove the call to Libtool. if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do + while test $1 != '--mode=compile'; do shift done shift @@ -467,39 +396,32 @@ makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do + while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no eat=no - for arg - do + cleared=no + for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac - if test $eat = yes; then - eat=no - continue - fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix=`echo "$object" | sed 's/^.*\././'` + obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -519,7 +441,7 @@ cpp) # Remove the call to Libtool. if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do + while test $1 != '--mode=compile'; do shift done shift @@ -557,27 +479,13 @@ cpp) msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - IFS=" " for arg do case "$arg" in - -o) - shift - ;; - $object) - shift - ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -590,23 +498,16 @@ msvisualcpp) ;; esac done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; -msvcmsys) - # 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 - ;; - none) exec "$@" ;; @@ -625,6 +526,5 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/doc/Makefile.am b/doc/Makefile.am index f76335f6..bc349f87 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,16 +1,41 @@ -EXTRA_DIST= \ - busconfig.dtd \ - diagram.png \ - diagram.svg \ - introspect.dtd \ - dbus-faq.xml \ - dbus-specification.xml \ - dbus-test-plan.xml \ - dbus-tutorial.xml \ - dcop-howto.txt \ - file-boilerplate.c \ - introspect.xsl \ - system-activation.txt +man_MANS = \ + dbus-cleanup-sockets.1 \ + dbus-daemon.1 \ + dbus-launch.1 \ + dbus-monitor.1 \ + dbus-send.1 \ + dbus-uuidgen.1 + +MAN_IN_FILES = dbus-daemon.1.in + +MAN_HTML_FILES = \ + dbus-cleanup-sockets.1.html \ + dbus-daemon.1.html \ + dbus-launch.1.html \ + dbus-monitor.1.html \ + dbus-send.1.html \ + dbus-uuidgen.1.html + +DTDS = \ + busconfig.dtd \ + introspect.dtd + +STATIC_DOCS = \ + diagram.png \ + diagram.svg \ + dbus-faq.xml \ + dbus-specification.xml \ + dbus-test-plan.xml \ + dbus-tutorial.xml \ + dcop-howto.txt \ + introspect.xsl \ + system-activation.txt \ + $(DTDS) + +EXTRA_DIST = \ + file-boilerplate.c \ + $(STATIC_DOCS) \ + $(MAN_IN_FILES) $(man_MANS) HTML_FILES= \ dbus-faq.html \ @@ -19,7 +44,7 @@ HTML_FILES= \ dbus-tutorial.html if DBUS_XML_DOCS_ENABLED -all-local: $(HTML_FILES) +all-local:: $(HTML_FILES) EXTRA_DIST += $(HTML_FILES) @@ -37,5 +62,67 @@ dbus-faq.html: dbus-faq.xml endif +if DBUS_DOXYGEN_DOCS_ENABLED +# Use the index as a proxy for the entire doc tree. +DOXYGEN_HTML_INDEX = api/html/index.html + +all-local:: $(DOXYGEN_HTML_INDEX) + +$(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch]) + $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile +endif + +if DBUS_HAVE_MAN2HTML +all-local:: $(MAN_HTML_FILES) + +%.1.html: %.1 + $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ ) +endif + +if DBUS_CAN_UPLOAD_DOCS +BONUS_FILES = \ + $(top_srcdir)/README \ + $(top_srcdir)/HACKING \ + $(top_srcdir)/AUTHORS \ + $(top_srcdir)/NEWS \ + $(top_srcdir)/COPYING \ + $(top_srcdir)/ChangeLog + +dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) $(DOXYGEN_HTML_INDEX) + $(AM_V_at)rm -rf $@ + $(AM_V_GEN)mkdir -p $@/api + $(AM_V_at)cp $(STATIC_DOCS) $@ + $(AM_V_at)cp $(HTML_FILES) $@ + $(AM_V_at)cp $(MAN_HTML_FILES) $@ + $(AM_V_at)cp $(BONUS_FILES) $@ + $(AM_V_at)cp -r api/html $@/api + +dbus-docs.tar.gz: dbus-docs + $(AM_V_GEN)tar czf $@ $< + +DOC_SERVER = dbus.freedesktop.org +DOC_WWW_DIR = /srv/dbus.freedesktop.org/www + +SPECIFICATION_SERVER = specifications.freedesktop.org +SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0 + +maintainer-upload-docs: dbus-docs.tar.gz dbus-docs + scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR) + rsync -rvzP --chmod=Dg+s,ug+rwX,o=rX \ + dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/ + scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH) +else +maintainer-upload-docs: + @echo "Can't upload documentation! Re-run configure with" + @echo " --enable-doxygen-docs --enable-xml-docs" + @echo "and ensure that man2html is installed." + @false +endif + +clean-local: + rm -rf api + rm -rf dbus-docs + rm -f *.1.html + maintainer-clean-local: rm -f $(HTML_FILES) diff --git a/doc/Makefile.in b/doc/Makefile.in index 05386f6f..c75d4ee9 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -35,15 +35,18 @@ build_triplet = @build@ host_triplet = @host@ @DBUS_XML_DOCS_ENABLED_TRUE@am__append_1 = $(HTML_FILES) subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/dbus-daemon.1.in TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = dbus-daemon.1 CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) @@ -53,15 +56,43 @@ am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = +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' +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +NROFF = nroff +MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -93,6 +124,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -106,6 +139,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -119,6 +153,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -128,6 +163,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -143,6 +180,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -155,6 +193,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -184,6 +223,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -239,20 +279,67 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = busconfig.dtd diagram.png diagram.svg introspect.dtd \ - dbus-faq.xml dbus-specification.xml dbus-test-plan.xml \ - dbus-tutorial.xml dcop-howto.txt file-boilerplate.c \ - introspect.xsl system-activation.txt $(am__append_1) +man_MANS = \ + dbus-cleanup-sockets.1 \ + dbus-daemon.1 \ + dbus-launch.1 \ + dbus-monitor.1 \ + dbus-send.1 \ + dbus-uuidgen.1 + +MAN_IN_FILES = dbus-daemon.1.in +MAN_HTML_FILES = \ + dbus-cleanup-sockets.1.html \ + dbus-daemon.1.html \ + dbus-launch.1.html \ + dbus-monitor.1.html \ + dbus-send.1.html \ + dbus-uuidgen.1.html + +DTDS = \ + busconfig.dtd \ + introspect.dtd + +STATIC_DOCS = \ + diagram.png \ + diagram.svg \ + dbus-faq.xml \ + dbus-specification.xml \ + dbus-test-plan.xml \ + dbus-tutorial.xml \ + dcop-howto.txt \ + introspect.xsl \ + system-activation.txt \ + $(DTDS) + +EXTRA_DIST = file-boilerplate.c $(STATIC_DOCS) $(MAN_IN_FILES) \ + $(man_MANS) $(am__append_1) HTML_FILES = \ dbus-faq.html \ dbus-specification.html \ dbus-test-plan.html \ dbus-tutorial.html + +# Use the index as a proxy for the entire doc tree. +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@DOXYGEN_HTML_INDEX = api/html/index.html +@DBUS_CAN_UPLOAD_DOCS_TRUE@BONUS_FILES = \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/README \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/HACKING \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/AUTHORS \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/NEWS \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/COPYING \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(top_srcdir)/ChangeLog + +@DBUS_CAN_UPLOAD_DOCS_TRUE@DOC_SERVER = dbus.freedesktop.org +@DBUS_CAN_UPLOAD_DOCS_TRUE@DOC_WWW_DIR = /srv/dbus.freedesktop.org/www +@DBUS_CAN_UPLOAD_DOCS_TRUE@SPECIFICATION_SERVER = specifications.freedesktop.org +@DBUS_CAN_UPLOAD_DOCS_TRUE@SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0 all: all-am .SUFFIXES: @@ -286,12 +373,52 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +dbus-daemon.1: $(top_builddir)/config.status $(srcdir)/dbus-daemon.1.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs +install-man1: $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: @@ -300,6 +427,19 @@ CTAGS: distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -331,9 +471,12 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -@DBUS_XML_DOCS_ENABLED_FALSE@all-local: -all-am: Makefile all-local +@DBUS_DOXYGEN_DOCS_ENABLED_FALSE@@DBUS_HAVE_MAN2HTML_FALSE@@DBUS_XML_DOCS_ENABLED_FALSE@all-local: +all-am: Makefile $(MANS) all-local installdirs: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -361,7 +504,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -379,7 +522,7 @@ info: info-am info-am: -install-data-am: +install-data-am: install-man install-dvi: install-dvi-am @@ -395,7 +538,7 @@ install-info: install-info-am install-info-am: -install-man: +install-man: install-man1 install-pdf: install-pdf-am @@ -424,24 +567,27 @@ ps: ps-am ps-am: -uninstall-am: +uninstall-am: uninstall-man + +uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am all-local 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 \ + clean-libtool clean-local distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-man uninstall-man1 -@DBUS_XML_DOCS_ENABLED_TRUE@all-local: $(HTML_FILES) +@DBUS_XML_DOCS_ENABLED_TRUE@all-local:: $(HTML_FILES) @DBUS_XML_DOCS_ENABLED_TRUE@dbus-specification.html: dbus-specification.xml @DBUS_XML_DOCS_ENABLED_TRUE@ $(XMLTO) html-nochunks $< @@ -455,6 +601,44 @@ uninstall-am: @DBUS_XML_DOCS_ENABLED_TRUE@dbus-faq.html: dbus-faq.xml @DBUS_XML_DOCS_ENABLED_TRUE@ $(XMLTO) html-nochunks $< +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@all-local:: $(DOXYGEN_HTML_INDEX) + +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@$(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch]) +@DBUS_DOXYGEN_DOCS_ENABLED_TRUE@ $(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile + +@DBUS_HAVE_MAN2HTML_TRUE@all-local:: $(MAN_HTML_FILES) + +@DBUS_HAVE_MAN2HTML_TRUE@%.1.html: %.1 +@DBUS_HAVE_MAN2HTML_TRUE@ $(AM_V_GEN)( $(MAN2HTML) $< > $@.tmp && mv $@.tmp $@ ) + +@DBUS_CAN_UPLOAD_DOCS_TRUE@dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) $(DOXYGEN_HTML_INDEX) +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)rm -rf $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_GEN)mkdir -p $@/api +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(STATIC_DOCS) $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(HTML_FILES) $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(MAN_HTML_FILES) $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp $(BONUS_FILES) $@ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_at)cp -r api/html $@/api + +@DBUS_CAN_UPLOAD_DOCS_TRUE@dbus-docs.tar.gz: dbus-docs +@DBUS_CAN_UPLOAD_DOCS_TRUE@ $(AM_V_GEN)tar czf $@ $< + +@DBUS_CAN_UPLOAD_DOCS_TRUE@maintainer-upload-docs: dbus-docs.tar.gz dbus-docs +@DBUS_CAN_UPLOAD_DOCS_TRUE@ scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR) +@DBUS_CAN_UPLOAD_DOCS_TRUE@ rsync -rvzP --chmod=Dg+s,ug+rwX,o=rX \ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/ +@DBUS_CAN_UPLOAD_DOCS_TRUE@ scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH) +@DBUS_CAN_UPLOAD_DOCS_FALSE@maintainer-upload-docs: +@DBUS_CAN_UPLOAD_DOCS_FALSE@ @echo "Can't upload documentation! Re-run configure with" +@DBUS_CAN_UPLOAD_DOCS_FALSE@ @echo " --enable-doxygen-docs --enable-xml-docs" +@DBUS_CAN_UPLOAD_DOCS_FALSE@ @echo "and ensure that man2html is installed." +@DBUS_CAN_UPLOAD_DOCS_FALSE@ @false + +clean-local: + rm -rf api + rm -rf dbus-docs + rm -f *.1.html + maintainer-clean-local: rm -f $(HTML_FILES) diff --git a/tools/dbus-cleanup-sockets.1 b/doc/dbus-cleanup-sockets.1 index ca669f49..ca669f49 100644 --- a/tools/dbus-cleanup-sockets.1 +++ b/doc/dbus-cleanup-sockets.1 diff --git a/bus/dbus-daemon.1 b/doc/dbus-daemon.1 index 6bfca148..ed92aee7 100644 --- a/bus/dbus-daemon.1 +++ b/doc/dbus-daemon.1 @@ -1,4 +1,4 @@ -.\" +.\" .\" dbus-daemon manual page. .\" Copyright (C) 2003,2008 Red Hat, Inc. .\" @@ -12,7 +12,6 @@ dbus-daemon [\-\-version] [\-\-session] [\-\-system] [\-\-config-file=FILE] [\-\-print-address[=DESCRIPTOR]] [\-\-print-pid[=DESCRIPTOR]] [\-\-fork] .SH DESCRIPTION - \fIdbus-daemon\fP is the D-Bus message bus daemon. See http://www.freedesktop.org/software/dbus/ for more information about the big picture. D-Bus is first a library that provides one-to-one @@ -20,35 +19,29 @@ communication between any two applications; \fIdbus-daemon\fP is an application that uses this library to implement a message bus daemon. Multiple programs connect to the message bus daemon and can exchange messages with one another. - .PP -There are two standard message bus instances: the systemwide message bus -(installed on many systems as the "messagebus" init service) and the +There are two standard message bus instances: the systemwide message bus +(installed on many systems as the "messagebus" init service) and the per-user-login-session message bus (started each time a user logs in). -\fIdbus-daemon\fP is used for both of these instances, but with +\fIdbus-daemon\fP is used for both of these instances, but with a different configuration file. - .PP The \-\-session option is equivalent to -"\-\-config-file=/src/build/dbus/etc/dbus-1/session.conf" and the \-\-system +"\-\-config-file=/usr/local/etc/dbus-1/session.conf" and the \-\-system option is equivalent to -"\-\-config-file=/src/build/dbus/etc/dbus-1/system.conf". By creating +"\-\-config-file=/usr/local/etc/dbus-1/system.conf". By creating additional configuration files and using the \-\-config-file option, additional special-purpose message bus daemons could be created. - .PP -The systemwide daemon is normally launched by an init script, -standardly called simply "messagebus". - +The systemwide daemon is normally launched by an init script, +standardly called simply "messagebus". .PP -The systemwide daemon is largely used for broadcasting system events, +The systemwide daemon is largely used for broadcasting system events, such as changes to the printer queue, or adding/removing devices. - .PP -The per-session daemon is used for various interprocess communication -among desktop applications (however, it is not tied to X or the GUI +The per-session daemon is used for various interprocess communication +among desktop applications (however, it is not tied to X or the GUI in any way). - .PP SIGHUP will cause the D-Bus daemon to PARTIALLY reload its configuration file and to flush its user/group information caches. Some @@ -63,19 +56,22 @@ The following options are supported: Use the given configuration file. .TP .I "--fork" -Force the message bus to fork and become a daemon, even if +Force the message bus to fork and become a daemon, even if the configuration file does not specify that it should. In most contexts the configuration file already gets this right, though. +.I "--nofork" +Force the message bus not to fork and become a daemon, even if +the configuration file specifies that it should. .TP .I "--print-address[=DESCRIPTOR]" -Print the address of the message bus to standard output, or -to the given file descriptor. This is used by programs that +Print the address of the message bus to standard output, or +to the given file descriptor. This is used by programs that launch the message bus. .TP .I "--print-pid[=DESCRIPTOR]" -Print the process ID of the message bus to standard output, or -to the given file descriptor. This is used by programs that +Print the process ID of the message bus to standard output, or +to the given file descriptor. This is used by programs that launch the message bus. .TP .I "--session" @@ -87,27 +83,35 @@ Use the standard configuration file for the systemwide message bus. .TP .I "--version" Print the version of the daemon. +.TP +.I "--introspect" +Print the introspection information for all D-Bus internal interfaces. +.TP +.I "--address[=ADDRESS]" +Set the address to listen on. This option overrides the address +configured in the configuration file. +.TP +.I "--systemd-activation" +Enable systemd-style service activation. Only useful in conjunction +with the systemd system and session manager on Linux. .SH CONFIGURATION FILE A message bus daemon has a configuration file that specializes it -for a particular application. For example, one configuration -file might set up the message bus to be a systemwide message bus, +for a particular application. For example, one configuration +file might set up the message bus to be a systemwide message bus, while another might set it up to be a per-user-login-session bus. - .PP The configuration file also establishes resource limits, security parameters, and so forth. - .PP The configuration file is not part of any interoperability specification and its backward compatibility is not guaranteed; this document is documentation, not specification. - .PP The standard systemwide and per-session message bus setups are -configured in the files "/src/build/dbus/etc/dbus-1/system.conf" and -"/src/build/dbus/etc/dbus-1/session.conf". These files normally +configured in the files "/usr/local/etc/dbus-1/system.conf" and +"/usr/local/etc/dbus-1/session.conf". These files normally <include> a system-local.conf or session-local.conf; you can put local overrides in those files to avoid modifying the primary configuration files. @@ -127,7 +131,7 @@ The following elements may be present in the configuration file. .TP .I "<busconfig>" - + .PP Root element. @@ -159,16 +163,16 @@ Example: <type>session</type> .TP .I "<include>" - -.PP + +.PP Include a file <include>filename.conf</include> at this point. If the filename is relative, it is located relative to the configuration file doing the including. .PP <include> has an optional attribute "ignore_missing=(yes|no)" -which defaults to "no" if not provided. This attribute -controls whether it's a fatal error for the included file +which defaults to "no" if not provided. This attribute +controls whether it's a fatal error for the included file to be absent. .TP @@ -183,7 +187,7 @@ Only files ending in ".conf" are included. This is intended to allow extension of the system bus by particular packages. For example, if CUPS wants to be able to send out notification of printer queue changes, it could install a file to -/src/build/dbus/etc/dbus-1/system.d that allowed all apps to receive +/usr/local/etc/dbus-1/system.d that allowed all apps to receive this message and allowed the printer daemon user to send it. .TP @@ -201,21 +205,21 @@ The last <user> entry in the file "wins", the others are ignored. .PP The user is changed after the bus has completed initialization. So sockets etc. will be created before changing user, but no data will be -read from clients before changing user. This means that sockets -and PID files can be created in a location that requires root +read from clients before changing user. This means that sockets +and PID files can be created in a location that requires root privileges for writing. .TP .I "<fork>" - + .PP -If present, the bus daemon becomes a real daemon (forks -into the background, etc.). This is generally used +If present, the bus daemon becomes a real daemon (forks +into the background, etc.). This is generally used rather than the \-\-fork command line option. .TP .I "<keep_umask>" - + .PP If present, the bus daemon keeps its original umask when forking. This may be useful to avoid affecting the behavior of child processes. @@ -224,8 +228,8 @@ This may be useful to avoid affecting the behavior of child processes. .I "<listen>" .PP -Add an address that the bus should listen on. The -address is in the standard D-Bus format that contains +Add an address that the bus should listen on. The +address is in the standard D-Bus format that contains a transport name plus possible parameters/options. .PP @@ -235,10 +239,10 @@ Example: <listen>unix:path=/tmp/foo</listen> Example: <listen>tcp:host=localhost,port=1234</listen> .PP -If there are multiple <listen> elements, then the bus listens -on multiple addresses. The bus will pass its address to -started services or other interested parties with -the last address given in <listen> first. That is, +If there are multiple <listen> elements, then the bus listens +on multiple addresses. The bus will pass its address to +started services or other interested parties with +the last address given in <listen> first. That is, apps will try to connect to the last <listen> address first. .PP @@ -280,7 +284,7 @@ Lists permitted authorization mechanisms. If this element doesn't exist, then all known mechanisms are allowed. If there are multiple <auth> elements, all the listed mechanisms are allowed. The order in which mechanisms are listed is not meaningful. - + .PP Example: <auth>EXTERNAL</auth> @@ -292,13 +296,13 @@ Example: <auth>DBUS_COOKIE_SHA1</auth> .PP Adds a directory to scan for .service files. Directories are -scanned starting with the last to appear in the config file -(the first .service file found that provides a particular +scanned starting with the last to appear in the config file +(the first .service file found that provides a particular service will be used). .PP Service files tell the bus how to automatically start a program. -They are primarily used with the per-user-session bus, +They are primarily used with the per-user-session bus, not the systemwide bus. .TP @@ -319,7 +323,7 @@ otherwise try your favorite search engine. .PP The <standard_session_servicedirs/> option is only relevant to the per-user-session bus daemon defined in -/src/build/dbus/etc/dbus-1/session.conf. Putting it in any other +/usr/local/etc/dbus-1/session.conf. Putting it in any other configuration file would probably be nonsense. .TP @@ -328,12 +332,12 @@ configuration file would probably be nonsense. .PP <standard_system_servicedirs/> specifies the standard system-wide activation directories that should be searched for service files. -This option defaults to /src/build/dbus/share/dbus-1/system-services. +This option defaults to /usr/local/share/dbus-1/system-services. .PP The <standard_system_servicedirs/> option is only relevant to the per-system bus daemon defined in -/src/build/dbus/etc/dbus-1/system.conf. Putting it in any other +/usr/local/etc/dbus-1/system.conf. Putting it in any other configuration file would probably be nonsense. .TP @@ -346,7 +350,7 @@ the dbus-daemon-launch-helper executable in located in libexec. .PP The <servicehelper/> option is only relevant to the per-system bus daemon -defined in /src/build/dbus/etc/dbus-1/system.conf. Putting it in any other +defined in /usr/local/etc/dbus-1/system.conf. Putting it in any other configuration file would probably be nonsense. .TP @@ -365,31 +369,36 @@ Available limit names are: .nf "max_incoming_bytes" : total size in bytes of messages incoming from a single connection + "max_incoming_unix_fds" : total number of unix fds of messages + incoming from a single connection "max_outgoing_bytes" : total size in bytes of messages queued up for a single connection + "max_outgoing_unix_fds" : total number of unix fds of messages + queued up for a single connection "max_message_size" : max size of a single message in bytes - "service_start_timeout" : milliseconds (thousandths) until + "max_message_unix_fds" : max unix fds of a single message + "service_start_timeout" : milliseconds (thousandths) until a started service has to connect "auth_timeout" : milliseconds (thousandths) a connection is given to authenticate - "max_completed_connections" : max number of authenticated connections + "max_completed_connections" : max number of authenticated connections "max_incomplete_connections" : max number of unauthenticated connections "max_connections_per_user" : max number of completed connections from the same user "max_pending_service_starts" : max number of service launches in progress at the same time - "max_names_per_connection" : max number of names a single + "max_names_per_connection" : max number of names a single connection can own - "max_match_rules_per_connection": max number of match rules for a single + "max_match_rules_per_connection": max number of match rules for a single connection - "max_replies_per_connection" : max number of pending method + "max_replies_per_connection" : max number of pending method replies per connection (number of calls-in-progress) - "reply_timeout" : milliseconds (thousandths) - until a method call times out + "reply_timeout" : milliseconds (thousandths) + until a method call times out .fi .PP @@ -403,7 +412,7 @@ number of users that can work together to denial-of-service all other users by u up all connections on the systemwide bus. .PP -Limits are normally only of interest on the systemwide bus, not the user session +Limits are normally only of interest on the systemwide bus, not the user session buses. .TP @@ -413,11 +422,11 @@ buses. The <policy> element defines a security policy to be applied to a particular set of connections to the bus. A policy is made up of <allow> and <deny> elements. Policies are normally used with the systemwide bus; -they are analogous to a firewall in that they allow expected traffic +they are analogous to a firewall in that they allow expected traffic and prevent unexpected traffic. .PP -Currently, the system bus has a default-deny policy for sending method calls +Currently, the system bus has a default-deny policy for sending method calls and owning bus names. Everything else, in particular reply messages, receive checks, and signals has a default allow policy. @@ -430,7 +439,6 @@ your service. .PP The <policy> element has one of four attributes: -daemon.1.in .nf context="(default|mandatory)" at_console="(true|false)" @@ -452,9 +460,9 @@ Policies are applied to a connection as follows: .fi .PP -Policies applied later will override those applied earlier, -when the policies overlap. Multiple policies with the same -user/group/context are applied in the order they appear +Policies applied later will override those applied earlier, +when the policies overlap. Multiple policies with the same +user/group/context are applied in the order they appear in the config file. .TP @@ -470,16 +478,16 @@ statements, and works just like <deny> but with the inverse meaning. The possible attributes of these elements are: .nf send_interface="interface_name" - send_member="method_or_signal_name" - send_error="error_name" - send_destination="name" - send_type="method_call" | "method_return" | "signal" | "error" + send_member="method_or_signal_name" + send_error="error_name" + send_destination="name" + send_type="method_call" | "method_return" | "signal" | "error" send_path="/path/name" receive_interface="interface_name" - receive_member="method_or_signal_name" - receive_error="error_name" - receive_sender="name" + receive_member="method_or_signal_name" + receive_error="error_name" + receive_sender="name" receive_type="method_call" | "method_return" | "signal" | "error" receive_path="/path/name" @@ -496,9 +504,7 @@ The possible attributes of these elements are: .PP Examples: .nf - <deny send_interface="org.freedesktop.System" send_member="Reboot"/> - <deny receive_interface="org.freedesktop.System" receive_member="Reboot"/> - <deny own="org.freedesktop.System"/> + <deny send_destination="org.freedesktop.Service" send_interface="org.freedesktop.System" send_member="Reboot"/> <deny send_destination="org.freedesktop.System"/> <deny receive_sender="org.freedesktop.System"/> <deny user="john"/> @@ -509,36 +515,30 @@ Examples: The <deny> element's attributes determine whether the deny "matches" a particular action. If it matches, the action is denied (unless later rules in the config file allow it). - .PP send_destination and receive_sender rules mean that messages may not be sent to or received from the *owner* of the given name, not that they may not be sent *to that name*. That is, if a connection owns services A, B, C, and sending to A is denied, sending to B or C will not work either. - .PP The other send_* and receive_* attributes are purely textual/by-value matches against the given field in the message header. - .PP "Eavesdropping" occurs when an application receives a message that was explicitly addressed to a name the application does not own, or is a reply to such a message. Eavesdropping thus only applies to messages that are addressed to services and replies to such messages (i.e. it does not apply to signals). - .PP -For <allow>, eavesdrop="true" indicates that the rule matches even -when eavesdropping. eavesdrop="false" is the default and means that +For <allow>, eavesdrop="true" indicates that the rule matches even +when eavesdropping. eavesdrop="false" is the default and means that the rule only allows messages to go to their specified recipient. -For <deny>, eavesdrop="true" indicates that the rule matches +For <deny>, eavesdrop="true" indicates that the rule matches only when eavesdropping. eavesdrop="false" is the default for <deny> -also, but here it means that the rule applies always, even when +also, but here it means that the rule applies always, even when not eavesdropping. The eavesdrop attribute can only be combined with send and receive rules (with send_* and receive_* attributes). - - .PP The [send|receive]_requested_reply attribute works similarly to the eavesdrop attribute. It controls whether the <deny> or <allow> matches a reply @@ -559,7 +559,7 @@ requested. [send|receive]_requested_reply="true" indicates that the rule applies always, regardless of pending reply state. .PP -user and group denials mean that the given user or group may +user and group denials mean that the given user or group may not connect to the message bus. .PP @@ -587,7 +587,7 @@ rule, since "whether the message can be sent" and "whether it can be received" are evaluated separately. .PP -Be careful with send_interface/receive_interface, because the +Be careful with send_interface/receive_interface, because the interface field in messages is optional. In particular, do NOT specify <deny send_interface="org.foo.Bar"/>! This will cause no-interface messages to be blocked for all services, which is @@ -608,13 +608,13 @@ More details below. An <associate> element appears below an <selinux> element and creates a mapping. Right now only one kind of association is possible: .nf - <associate own="org.freedesktop.Foobar" context="foo_t"/> + <associate own="org.freedesktop.Foobar" context="foo_t"/> .fi .PP This means that if a connection asks to own the name "org.freedesktop.Foobar" then the source context will be the context -of the connection and the target context will be "foo_t" - see the +of the connection and the target context will be "foo_t" - see the short discussion of SELinux below. .PP @@ -625,7 +625,7 @@ NOT the context of the connection owning the name. There's currently no way to set a default for owning any name, if we add this syntax it will look like: .nf - <associate own="*" context="foo_t"/> + <associate own="*" context="foo_t"/> .fi If you find a reason this is useful, let the developers know. Right now the default will be the security context of the bus itself. @@ -677,26 +677,26 @@ the first connection as source, security context of the second connection as target, object class "dbus" and requested permission "send_msg". .PP -If a security context is not available for a connection -(impossible when using UNIX domain sockets), then the target +If a security context is not available for a connection +(impossible when using UNIX domain sockets), then the target context used is the context of the bus daemon itself. -There is currently no way to change this default, because we're -assuming that only UNIX domain sockets will be used to -connect to the systemwide bus. If this changes, we'll +There is currently no way to change this default, because we're +assuming that only UNIX domain sockets will be used to +connect to the systemwide bus. If this changes, we'll probably add a way to set the default connection context. .PP -Second, any time a connection asks to own a name, -the bus daemon will check permissions with the security +Second, any time a connection asks to own a name, +the bus daemon will check permissions with the security context of the connection as source, the security context specified -for the name in the config file as target, object +for the name in the config file as target, object class "dbus" and requested permission "acquire_svc". .PP -The security context for a bus name is specified with the +The security context for a bus name is specified with the <associate> element described earlier in this document. -If a name has no security context associated in the -configuration file, the security context of the bus daemon +If a name has no security context associated in the +configuration file, the security context of the bus daemon itself will be used. .SH DEBUGGING @@ -704,46 +704,39 @@ itself will be used. .PP If you're trying to figure out where your messages are going or why you aren't getting messages, there are several things you can try. - .PP Remember that the system bus is heavily locked down and if you haven't installed a security policy file to allow your message through, it won't work. For the session bus, this is not a concern. - .PP The simplest way to figure out what's happening on the bus is to run the \fIdbus-monitor\fP program, which comes with the D-Bus package. You can also send test messages with \fIdbus-send\fP. These programs have their own man pages. - .PP If you want to know what the daemon itself is doing, you might consider -running a separate copy of the daemon to test against. This will allow you -to put the daemon under a debugger, or run it with verbose output, without +running a separate copy of the daemon to test against. This will allow you +to put the daemon under a debugger, or run it with verbose output, without messing up your real session and system daemons. - .PP -To run a separate test copy of the daemon, for example you might open a terminal -and type: +To run a separate test copy of the daemon, for example you might open a terminal +and type: .nf DBUS_VERBOSE=1 dbus-daemon --session --print-address .fi - .PP The test daemon address will be printed when the daemon starts. You will need -to copy-and-paste this address and use it as the value of the +to copy-and-paste this address and use it as the value of the DBUS_SESSION_BUS_ADDRESS environment variable when you launch the applications -you want to test. This will cause those applications to connect to your +you want to test. This will cause those applications to connect to your test bus instead of the DBUS_SESSION_BUS_ADDRESS of your real session bus. - .PP DBUS_VERBOSE=1 will have NO EFFECT unless your copy of D-Bus was compiled with verbose mode enabled. This is not recommended in production builds due to performance impact. You may need to rebuild D-Bus if your copy was not built with debugging in mind. (DBUS_VERBOSE -also affects the D-Bus library and thus applications using D-Bus; it may +also affects the D-Bus library and thus applications using D-Bus; it may be useful to see verbose output on both the client side and from the daemon.) - .PP If you want to get fancy, you can create a custom bus configuration for your test bus (see the session.conf and system.conf @@ -751,7 +744,6 @@ files that define the two default configurations for example). This would allow you to specify a different directory for .service files, for example. - .SH AUTHOR See http://www.freedesktop.org/software/dbus/doc/AUTHORS diff --git a/bus/dbus-daemon.1.in b/doc/dbus-daemon.1.in index 8342600e..a54f8634 100644 --- a/bus/dbus-daemon.1.in +++ b/doc/dbus-daemon.1.in @@ -1,4 +1,4 @@ -.\" +.\" .\" dbus-daemon manual page. .\" Copyright (C) 2003,2008 Red Hat, Inc. .\" @@ -12,7 +12,6 @@ dbus-daemon [\-\-version] [\-\-session] [\-\-system] [\-\-config-file=FILE] [\-\-print-address[=DESCRIPTOR]] [\-\-print-pid[=DESCRIPTOR]] [\-\-fork] .SH DESCRIPTION - \fIdbus-daemon\fP is the D-Bus message bus daemon. See http://www.freedesktop.org/software/dbus/ for more information about the big picture. D-Bus is first a library that provides one-to-one @@ -20,35 +19,29 @@ communication between any two applications; \fIdbus-daemon\fP is an application that uses this library to implement a message bus daemon. Multiple programs connect to the message bus daemon and can exchange messages with one another. - .PP -There are two standard message bus instances: the systemwide message bus -(installed on many systems as the "messagebus" init service) and the +There are two standard message bus instances: the systemwide message bus +(installed on many systems as the "messagebus" init service) and the per-user-login-session message bus (started each time a user logs in). -\fIdbus-daemon\fP is used for both of these instances, but with +\fIdbus-daemon\fP is used for both of these instances, but with a different configuration file. - .PP The \-\-session option is equivalent to "\-\-config-file=@EXPANDED_SYSCONFDIR@/dbus-1/session.conf" and the \-\-system option is equivalent to -"\-\-config-file=@EXPANDED_SYSCONFDIR@/dbus-1/system.conf". By creating +"\-\-config-file=@EXPANDED_SYSCONFDIR@/dbus-1/system.conf". By creating additional configuration files and using the \-\-config-file option, additional special-purpose message bus daemons could be created. - .PP -The systemwide daemon is normally launched by an init script, -standardly called simply "messagebus". - +The systemwide daemon is normally launched by an init script, +standardly called simply "messagebus". .PP -The systemwide daemon is largely used for broadcasting system events, +The systemwide daemon is largely used for broadcasting system events, such as changes to the printer queue, or adding/removing devices. - .PP -The per-session daemon is used for various interprocess communication -among desktop applications (however, it is not tied to X or the GUI +The per-session daemon is used for various interprocess communication +among desktop applications (however, it is not tied to X or the GUI in any way). - .PP SIGHUP will cause the D-Bus daemon to PARTIALLY reload its configuration file and to flush its user/group information caches. Some @@ -63,19 +56,22 @@ The following options are supported: Use the given configuration file. .TP .I "--fork" -Force the message bus to fork and become a daemon, even if +Force the message bus to fork and become a daemon, even if the configuration file does not specify that it should. In most contexts the configuration file already gets this right, though. +.I "--nofork" +Force the message bus not to fork and become a daemon, even if +the configuration file specifies that it should. .TP .I "--print-address[=DESCRIPTOR]" -Print the address of the message bus to standard output, or -to the given file descriptor. This is used by programs that +Print the address of the message bus to standard output, or +to the given file descriptor. This is used by programs that launch the message bus. .TP .I "--print-pid[=DESCRIPTOR]" -Print the process ID of the message bus to standard output, or -to the given file descriptor. This is used by programs that +Print the process ID of the message bus to standard output, or +to the given file descriptor. This is used by programs that launch the message bus. .TP .I "--session" @@ -87,23 +83,31 @@ Use the standard configuration file for the systemwide message bus. .TP .I "--version" Print the version of the daemon. +.TP +.I "--introspect" +Print the introspection information for all D-Bus internal interfaces. +.TP +.I "--address[=ADDRESS]" +Set the address to listen on. This option overrides the address +configured in the configuration file. +.TP +.I "--systemd-activation" +Enable systemd-style service activation. Only useful in conjunction +with the systemd system and session manager on Linux. .SH CONFIGURATION FILE A message bus daemon has a configuration file that specializes it -for a particular application. For example, one configuration -file might set up the message bus to be a systemwide message bus, +for a particular application. For example, one configuration +file might set up the message bus to be a systemwide message bus, while another might set it up to be a per-user-login-session bus. - .PP The configuration file also establishes resource limits, security parameters, and so forth. - .PP The configuration file is not part of any interoperability specification and its backward compatibility is not guaranteed; this document is documentation, not specification. - .PP The standard systemwide and per-session message bus setups are configured in the files "@EXPANDED_SYSCONFDIR@/dbus-1/system.conf" and @@ -127,7 +131,7 @@ The following elements may be present in the configuration file. .TP .I "<busconfig>" - + .PP Root element. @@ -159,16 +163,16 @@ Example: <type>session</type> .TP .I "<include>" - -.PP + +.PP Include a file <include>filename.conf</include> at this point. If the filename is relative, it is located relative to the configuration file doing the including. .PP <include> has an optional attribute "ignore_missing=(yes|no)" -which defaults to "no" if not provided. This attribute -controls whether it's a fatal error for the included file +which defaults to "no" if not provided. This attribute +controls whether it's a fatal error for the included file to be absent. .TP @@ -201,21 +205,21 @@ The last <user> entry in the file "wins", the others are ignored. .PP The user is changed after the bus has completed initialization. So sockets etc. will be created before changing user, but no data will be -read from clients before changing user. This means that sockets -and PID files can be created in a location that requires root +read from clients before changing user. This means that sockets +and PID files can be created in a location that requires root privileges for writing. .TP .I "<fork>" - + .PP -If present, the bus daemon becomes a real daemon (forks -into the background, etc.). This is generally used +If present, the bus daemon becomes a real daemon (forks +into the background, etc.). This is generally used rather than the \-\-fork command line option. .TP .I "<keep_umask>" - + .PP If present, the bus daemon keeps its original umask when forking. This may be useful to avoid affecting the behavior of child processes. @@ -224,8 +228,8 @@ This may be useful to avoid affecting the behavior of child processes. .I "<listen>" .PP -Add an address that the bus should listen on. The -address is in the standard D-Bus format that contains +Add an address that the bus should listen on. The +address is in the standard D-Bus format that contains a transport name plus possible parameters/options. .PP @@ -235,10 +239,10 @@ Example: <listen>unix:path=/tmp/foo</listen> Example: <listen>tcp:host=localhost,port=1234</listen> .PP -If there are multiple <listen> elements, then the bus listens -on multiple addresses. The bus will pass its address to -started services or other interested parties with -the last address given in <listen> first. That is, +If there are multiple <listen> elements, then the bus listens +on multiple addresses. The bus will pass its address to +started services or other interested parties with +the last address given in <listen> first. That is, apps will try to connect to the last <listen> address first. .PP @@ -280,7 +284,7 @@ Lists permitted authorization mechanisms. If this element doesn't exist, then all known mechanisms are allowed. If there are multiple <auth> elements, all the listed mechanisms are allowed. The order in which mechanisms are listed is not meaningful. - + .PP Example: <auth>EXTERNAL</auth> @@ -292,13 +296,13 @@ Example: <auth>DBUS_COOKIE_SHA1</auth> .PP Adds a directory to scan for .service files. Directories are -scanned starting with the last to appear in the config file -(the first .service file found that provides a particular +scanned starting with the last to appear in the config file +(the first .service file found that provides a particular service will be used). .PP Service files tell the bus how to automatically start a program. -They are primarily used with the per-user-session bus, +They are primarily used with the per-user-session bus, not the systemwide bus. .TP @@ -365,31 +369,36 @@ Available limit names are: .nf "max_incoming_bytes" : total size in bytes of messages incoming from a single connection + "max_incoming_unix_fds" : total number of unix fds of messages + incoming from a single connection "max_outgoing_bytes" : total size in bytes of messages queued up for a single connection + "max_outgoing_unix_fds" : total number of unix fds of messages + queued up for a single connection "max_message_size" : max size of a single message in bytes - "service_start_timeout" : milliseconds (thousandths) until + "max_message_unix_fds" : max unix fds of a single message + "service_start_timeout" : milliseconds (thousandths) until a started service has to connect "auth_timeout" : milliseconds (thousandths) a connection is given to authenticate - "max_completed_connections" : max number of authenticated connections + "max_completed_connections" : max number of authenticated connections "max_incomplete_connections" : max number of unauthenticated connections "max_connections_per_user" : max number of completed connections from the same user "max_pending_service_starts" : max number of service launches in progress at the same time - "max_names_per_connection" : max number of names a single + "max_names_per_connection" : max number of names a single connection can own - "max_match_rules_per_connection": max number of match rules for a single + "max_match_rules_per_connection": max number of match rules for a single connection - "max_replies_per_connection" : max number of pending method + "max_replies_per_connection" : max number of pending method replies per connection (number of calls-in-progress) - "reply_timeout" : milliseconds (thousandths) - until a method call times out + "reply_timeout" : milliseconds (thousandths) + until a method call times out .fi .PP @@ -403,7 +412,7 @@ number of users that can work together to denial-of-service all other users by u up all connections on the systemwide bus. .PP -Limits are normally only of interest on the systemwide bus, not the user session +Limits are normally only of interest on the systemwide bus, not the user session buses. .TP @@ -413,11 +422,11 @@ buses. The <policy> element defines a security policy to be applied to a particular set of connections to the bus. A policy is made up of <allow> and <deny> elements. Policies are normally used with the systemwide bus; -they are analogous to a firewall in that they allow expected traffic +they are analogous to a firewall in that they allow expected traffic and prevent unexpected traffic. .PP -Currently, the system bus has a default-deny policy for sending method calls +Currently, the system bus has a default-deny policy for sending method calls and owning bus names. Everything else, in particular reply messages, receive checks, and signals has a default allow policy. @@ -430,7 +439,6 @@ your service. .PP The <policy> element has one of four attributes: -daemon.1.in .nf context="(default|mandatory)" at_console="(true|false)" @@ -452,9 +460,9 @@ Policies are applied to a connection as follows: .fi .PP -Policies applied later will override those applied earlier, -when the policies overlap. Multiple policies with the same -user/group/context are applied in the order they appear +Policies applied later will override those applied earlier, +when the policies overlap. Multiple policies with the same +user/group/context are applied in the order they appear in the config file. .TP @@ -470,16 +478,16 @@ statements, and works just like <deny> but with the inverse meaning. The possible attributes of these elements are: .nf send_interface="interface_name" - send_member="method_or_signal_name" - send_error="error_name" - send_destination="name" - send_type="method_call" | "method_return" | "signal" | "error" + send_member="method_or_signal_name" + send_error="error_name" + send_destination="name" + send_type="method_call" | "method_return" | "signal" | "error" send_path="/path/name" receive_interface="interface_name" - receive_member="method_or_signal_name" - receive_error="error_name" - receive_sender="name" + receive_member="method_or_signal_name" + receive_error="error_name" + receive_sender="name" receive_type="method_call" | "method_return" | "signal" | "error" receive_path="/path/name" @@ -496,9 +504,7 @@ The possible attributes of these elements are: .PP Examples: .nf - <deny send_interface="org.freedesktop.System" send_member="Reboot"/> - <deny receive_interface="org.freedesktop.System" receive_member="Reboot"/> - <deny own="org.freedesktop.System"/> + <deny send_destination="org.freedesktop.Service" send_interface="org.freedesktop.System" send_member="Reboot"/> <deny send_destination="org.freedesktop.System"/> <deny receive_sender="org.freedesktop.System"/> <deny user="john"/> @@ -509,36 +515,30 @@ Examples: The <deny> element's attributes determine whether the deny "matches" a particular action. If it matches, the action is denied (unless later rules in the config file allow it). - .PP send_destination and receive_sender rules mean that messages may not be sent to or received from the *owner* of the given name, not that they may not be sent *to that name*. That is, if a connection owns services A, B, C, and sending to A is denied, sending to B or C will not work either. - .PP The other send_* and receive_* attributes are purely textual/by-value matches against the given field in the message header. - .PP "Eavesdropping" occurs when an application receives a message that was explicitly addressed to a name the application does not own, or is a reply to such a message. Eavesdropping thus only applies to messages that are addressed to services and replies to such messages (i.e. it does not apply to signals). - .PP -For <allow>, eavesdrop="true" indicates that the rule matches even -when eavesdropping. eavesdrop="false" is the default and means that +For <allow>, eavesdrop="true" indicates that the rule matches even +when eavesdropping. eavesdrop="false" is the default and means that the rule only allows messages to go to their specified recipient. -For <deny>, eavesdrop="true" indicates that the rule matches +For <deny>, eavesdrop="true" indicates that the rule matches only when eavesdropping. eavesdrop="false" is the default for <deny> -also, but here it means that the rule applies always, even when +also, but here it means that the rule applies always, even when not eavesdropping. The eavesdrop attribute can only be combined with send and receive rules (with send_* and receive_* attributes). - - .PP The [send|receive]_requested_reply attribute works similarly to the eavesdrop attribute. It controls whether the <deny> or <allow> matches a reply @@ -559,7 +559,7 @@ requested. [send|receive]_requested_reply="true" indicates that the rule applies always, regardless of pending reply state. .PP -user and group denials mean that the given user or group may +user and group denials mean that the given user or group may not connect to the message bus. .PP @@ -587,7 +587,7 @@ rule, since "whether the message can be sent" and "whether it can be received" are evaluated separately. .PP -Be careful with send_interface/receive_interface, because the +Be careful with send_interface/receive_interface, because the interface field in messages is optional. In particular, do NOT specify <deny send_interface="org.foo.Bar"/>! This will cause no-interface messages to be blocked for all services, which is @@ -608,13 +608,13 @@ More details below. An <associate> element appears below an <selinux> element and creates a mapping. Right now only one kind of association is possible: .nf - <associate own="org.freedesktop.Foobar" context="foo_t"/> + <associate own="org.freedesktop.Foobar" context="foo_t"/> .fi .PP This means that if a connection asks to own the name "org.freedesktop.Foobar" then the source context will be the context -of the connection and the target context will be "foo_t" - see the +of the connection and the target context will be "foo_t" - see the short discussion of SELinux below. .PP @@ -625,7 +625,7 @@ NOT the context of the connection owning the name. There's currently no way to set a default for owning any name, if we add this syntax it will look like: .nf - <associate own="*" context="foo_t"/> + <associate own="*" context="foo_t"/> .fi If you find a reason this is useful, let the developers know. Right now the default will be the security context of the bus itself. @@ -677,26 +677,26 @@ the first connection as source, security context of the second connection as target, object class "dbus" and requested permission "send_msg". .PP -If a security context is not available for a connection -(impossible when using UNIX domain sockets), then the target +If a security context is not available for a connection +(impossible when using UNIX domain sockets), then the target context used is the context of the bus daemon itself. -There is currently no way to change this default, because we're -assuming that only UNIX domain sockets will be used to -connect to the systemwide bus. If this changes, we'll +There is currently no way to change this default, because we're +assuming that only UNIX domain sockets will be used to +connect to the systemwide bus. If this changes, we'll probably add a way to set the default connection context. .PP -Second, any time a connection asks to own a name, -the bus daemon will check permissions with the security +Second, any time a connection asks to own a name, +the bus daemon will check permissions with the security context of the connection as source, the security context specified -for the name in the config file as target, object +for the name in the config file as target, object class "dbus" and requested permission "acquire_svc". .PP -The security context for a bus name is specified with the +The security context for a bus name is specified with the <associate> element described earlier in this document. -If a name has no security context associated in the -configuration file, the security context of the bus daemon +If a name has no security context associated in the +configuration file, the security context of the bus daemon itself will be used. .SH DEBUGGING @@ -704,46 +704,39 @@ itself will be used. .PP If you're trying to figure out where your messages are going or why you aren't getting messages, there are several things you can try. - .PP Remember that the system bus is heavily locked down and if you haven't installed a security policy file to allow your message through, it won't work. For the session bus, this is not a concern. - .PP The simplest way to figure out what's happening on the bus is to run the \fIdbus-monitor\fP program, which comes with the D-Bus package. You can also send test messages with \fIdbus-send\fP. These programs have their own man pages. - .PP If you want to know what the daemon itself is doing, you might consider -running a separate copy of the daemon to test against. This will allow you -to put the daemon under a debugger, or run it with verbose output, without +running a separate copy of the daemon to test against. This will allow you +to put the daemon under a debugger, or run it with verbose output, without messing up your real session and system daemons. - .PP -To run a separate test copy of the daemon, for example you might open a terminal -and type: +To run a separate test copy of the daemon, for example you might open a terminal +and type: .nf DBUS_VERBOSE=1 dbus-daemon --session --print-address .fi - .PP The test daemon address will be printed when the daemon starts. You will need -to copy-and-paste this address and use it as the value of the +to copy-and-paste this address and use it as the value of the DBUS_SESSION_BUS_ADDRESS environment variable when you launch the applications -you want to test. This will cause those applications to connect to your +you want to test. This will cause those applications to connect to your test bus instead of the DBUS_SESSION_BUS_ADDRESS of your real session bus. - .PP DBUS_VERBOSE=1 will have NO EFFECT unless your copy of D-Bus was compiled with verbose mode enabled. This is not recommended in production builds due to performance impact. You may need to rebuild D-Bus if your copy was not built with debugging in mind. (DBUS_VERBOSE -also affects the D-Bus library and thus applications using D-Bus; it may +also affects the D-Bus library and thus applications using D-Bus; it may be useful to see verbose output on both the client side and from the daemon.) - .PP If you want to get fancy, you can create a custom bus configuration for your test bus (see the session.conf and system.conf @@ -751,7 +744,6 @@ files that define the two default configurations for example). This would allow you to specify a different directory for .service files, for example. - .SH AUTHOR See http://www.freedesktop.org/software/dbus/doc/AUTHORS diff --git a/doc/dbus-faq.html b/doc/dbus-faq.html index dff70fad..0f3dafae 100644 --- a/doc/dbus-faq.html +++ b/doc/dbus-faq.html @@ -1,13 +1,13 @@ <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>D-Bus FAQ</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" title="D-Bus FAQ"><div class="titlepage"><div><div><h2 class="title"><a name="index"></a>D-Bus FAQ</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Havoc</span> <span class="surname">Pennington</span></h3><div class="affiliation"><span class="orgname">Red Hat, Inc.<br></span><div class="address"><p><br> <code class="email"><<a class="email" href="mailto:hp@pobox.com">hp@pobox.com</a>></code><br> - </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="othername">A</span> <span class="surname">Wheeler</span></h3></div></div></div><div><p class="releaseinfo">Version 0.3</p></div></div><hr></div><div class="qandaset" title="Frequently Asked Questions"><a name="faq"></a><dl><dt>1. <a href="#id319467"> + </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="othername">A</span> <span class="surname">Wheeler</span></h3></div></div></div><div><p class="releaseinfo">Version 0.3</p></div></div><hr></div><div class="qandaset" title="Frequently Asked Questions"><a name="faq"></a><dl><dt>1. <a href="#id381073"> What is D-Bus? - </a></dt><dt>2. <a href="#id322828"> + </a></dt><dt>2. <a href="#id350904"> Is D-Bus stable/finished? - </a></dt><dt>3. <a href="#id322854"> + </a></dt><dt>3. <a href="#id353770"> How is the reference implementation licensed? Can I use it in proprietary applications? - </a></dt><dt>4. <a href="#id319923"> + </a></dt><dt>4. <a href="#id353803"> What is the difference between a bus name, and object path, and an interface? </a></dt><dt>5. <a href="#service"> @@ -39,9 +39,9 @@ How does D-Bus differ from [yet more IPC mechanisms]? </a></dt><dt>18. <a href="#which-ipc"> Which IPC mechanism should I use? - </a></dt><dt>19. <a href="#id359012"> + </a></dt><dt>19. <a href="#id390207"> How can I submit a bug or patch? - </a></dt></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%"><col><tbody><tr class="question" title="1."><td align="left" valign="top"><a name="id319467"></a><a name="id322798"></a><p><b>1.</b></p></td><td align="left" valign="top"><p> + </a></dt></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%"><col><tbody><tr class="question" title="1."><td align="left" valign="top"><a name="id381073"></a><a name="id381075"></a><p><b>1.</b></p></td><td align="left" valign="top"><p> What is D-Bus? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> This is probably best answered by reading the D-Bus <a class="ulink" href="dbus-tutorial.html" target="_top">tutorial</a> or @@ -52,7 +52,7 @@ Phrased differently, D-Bus is 1) an interprocess communication (IPC) system and 2) some higher-level structure (lifecycle tracking, service activation, security policy) provided by two bus daemons, one systemwide and one per-user-session. - </p></td></tr><tr class="question" title="2."><td align="left" valign="top"><a name="id322828"></a><a name="id322830"></a><p><b>2.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="2."><td align="left" valign="top"><a name="id350904"></a><a name="id350906"></a><p><b>2.</b></p></td><td align="left" valign="top"><p> Is D-Bus stable/finished? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> The low-level library "libdbus" and the protocol specification are considered @@ -62,7 +62,7 @@ have their own release schedules and degree of maturity, not linked to the low-level library and bus daemon release. Check the project page for the binding you're considering to understand that project's policies. - </p></td></tr><tr class="question" title="3."><td align="left" valign="top"><a name="id322854"></a><a name="id322856"></a><p><b>3.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="3."><td align="left" valign="top"><a name="id353770"></a><a name="id353772"></a><p><b>3.</b></p></td><td align="left" valign="top"><p> How is the reference implementation licensed? Can I use it in proprietary applications? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> @@ -77,7 +77,7 @@ use D-Bus</em></span>. If you're going to sue, you have to stop using the software. Read the licenses to determine their meaning, this FAQ entry is not intended to change the meaning or terms of the licenses. - </p></td></tr><tr class="question" title="4."><td align="left" valign="top"><a name="id319923"></a><a name="id319925"></a><p><b>4.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="4."><td align="left" valign="top"><a name="id353803"></a><a name="id353805"></a><p><b>4.</b></p></td><td align="left" valign="top"><p> What is the difference between a bus name, and object path, and an interface? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> @@ -107,7 +107,7 @@ interfaces, such as <code class="literal">org.freedesktop.DBus.Introspectable</code>, <code class="literal">org.freedesktop.BasicTextField</code>, <code class="literal">org.kde.RichTextDocument</code>. - </p></td></tr><tr class="question" title="5."><td align="left" valign="top"><a name="service"></a><a name="id320018"></a><p><b>5.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="5."><td align="left" valign="top"><a name="service"></a><a name="id350253"></a><p><b>5.</b></p></td><td align="left" valign="top"><p> What is a "service"? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> A service is a program that can be launched by the bus daemon @@ -120,7 +120,7 @@ In the D-Bus docs we try to use "service" only when talking about programs the bus knows how to launch, i.e. a service always has a .service file. - </p></td></tr><tr class="question" title="6."><td align="left" valign="top"><a name="components"></a><a name="id320045"></a><p><b>6.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="6."><td align="left" valign="top"><a name="components"></a><a name="id350280"></a><p><b>6.</b></p></td><td align="left" valign="top"><p> Is D-Bus a "component system"? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> It helps to keep these concepts separate in your mind: @@ -170,7 +170,7 @@ from component/object systems, though perhaps a "plugin" tends to be a bundle of objects with a user-visible name and can be downloaded/packaged as a unit. - </p></td></tr><tr class="question" title="7."><td align="left" valign="top"><a name="speed"></a><a name="id319564"></a><p><b>7.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="7."><td align="left" valign="top"><a name="speed"></a><a name="id350384"></a><p><b>7.</b></p></td><td align="left" valign="top"><p> How fast is the D-Bus reference implementation? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Of course it depends a bit on what you're doing. @@ -198,7 +198,7 @@ enable asynchronous communication and avoid round trips. This is frequently a more important performance issue than throughput. - </p></td></tr><tr class="question" title="8."><td align="left" valign="top"><a name="size"></a><a name="id319610"></a><p><b>8.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="8."><td align="left" valign="top"><a name="size"></a><a name="id350430"></a><p><b>8.</b></p></td><td align="left" valign="top"><p> How large is the D-Bus reference implementation? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> A production build (with assertions, unit tests, and verbose logging @@ -207,7 +207,7 @@ A much, much smaller implementation would be possible by omitting out of memory handling, hardcoding a main loop (or always using blocking I/O), skipping validation, and otherwise simplifying things. - </p></td></tr><tr class="question" title="9."><td align="left" valign="top"><a name="other-ipc"></a><a name="id358326"></a><p><b>9.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="9."><td align="left" valign="top"><a name="other-ipc"></a><a name="id350456"></a><p><b>9.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from other interprocess communication or networking protocols? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> @@ -240,7 +240,7 @@ Note: the D-Bus mailing list subscribers are <span class="emphasis"><em>very much not interested</em></span> in debating which IPC system is the One True System. So if you want to discuss that, please use another forum. - </p></td></tr><tr class="question" title="10."><td align="left" valign="top"><a name="corba"></a><a name="id358398"></a><p><b>10.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="10."><td align="left" valign="top"><a name="corba"></a><a name="id389592"></a><p><b>10.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from CORBA? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -292,7 +292,7 @@ </p><p> On a more trivial note, D-Bus involves substantially fewer acronyms than CORBA. - </p></td></tr><tr class="question" title="11."><td align="left" valign="top"><a name="xmlrpcsoap"></a><a name="id319108"></a><p><b>11.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="11."><td align="left" valign="top"><a name="xmlrpcsoap"></a><a name="id349982"></a><p><b>11.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from XML-RPC and SOAP? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -311,7 +311,7 @@ supports lifecycle tracking of other applications connected to the bus. With XML-RPC and SOAP, typically each method call exists in isolation and has its own HTTP connection. - </p></td></tr><tr class="question" title="12."><td align="left" valign="top"><a name="dce"></a><a name="id358723"></a><p><b>12.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="12."><td align="left" valign="top"><a name="dce"></a><a name="id389918"></a><p><b>12.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from DCE? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -324,7 +324,7 @@ a distributed time service. As the name implies, DCE is intended for use in a large, multi-computer distributed application. D-Bus would not be well-suited for this. - </p></td></tr><tr class="question" title="13."><td align="left" valign="top"><a name="dcom"></a><a name="id358763"></a><p><b>13.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="13."><td align="left" valign="top"><a name="dcom"></a><a name="id389958"></a><p><b>13.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from DCOM and COM? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -334,7 +334,7 @@ </p><p> DCOM (distributed COM) is a Windows IPC system designed for use with the COM object system. It's similar in some ways to DCE and CORBA. - </p></td></tr><tr class="question" title="14."><td align="left" valign="top"><a name="internet-communications-engine"></a><a name="id358799"></a><p><b>14.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="14."><td align="left" valign="top"><a name="internet-communications-engine"></a><a name="id389994"></a><p><b>14.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from ZeroC's Internet Communications Engine (Ice) </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -344,7 +344,7 @@ on the level of SOAP or CORBA than D-Bus. Ice has a "dual-license" business around it; i.e. you can use it under the GPL, or pay for a proprietary license. - </p></td></tr><tr class="question" title="15."><td align="left" valign="top"><a name="inter-client-exchange"></a><a name="id358832"></a><p><b>15.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="15."><td align="left" valign="top"><a name="inter-client-exchange"></a><a name="id390027"></a><p><b>15.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from Inter-Client Exchange (ICE)? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> <a class="ulink" href="http://www.x.org/X11R6.8.1/docs/ICE/ice.pdf" target="_top">ICE</a> @@ -362,7 +362,7 @@ DCOP and XSMP are the only two widely-used applications of ICE, and both could in principle be replaced by D-Bus. (Though whether GNOME and KDE will bother is an open question.) - </p></td></tr><tr class="question" title="16."><td align="left" valign="top"><a name="dcop"></a><a name="id358871"></a><p><b>16.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="16."><td align="left" valign="top"><a name="dcop"></a><a name="id390066"></a><p><b>16.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from DCOP? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -389,14 +389,14 @@ DCOP's implementation to use D-Bus internally (so that GNOME and KDE would end up using exactly the same bus). See the KDE mailing list archives for some of these discussions. - </p></td></tr><tr class="question" title="17."><td align="left" valign="top"><a name="yet-more-ipc"></a><a name="id358929"></a><p><b>17.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="17."><td align="left" valign="top"><a name="yet-more-ipc"></a><a name="id390124"></a><p><b>17.</b></p></td><td align="left" valign="top"><p> How does D-Bus differ from [yet more IPC mechanisms]? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. </p><p> There are countless uses of network sockets in the world. <a class="ulink" href="http://www.mbus.org/" target="_top">MBUS</a>, Sun ONC/RPC, Jabber/XMPP, SIP, are some we can think of quickly. - </p></td></tr><tr class="question" title="18."><td align="left" valign="top"><a name="which-ipc"></a><a name="id358962"></a><p><b>18.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="18."><td align="left" valign="top"><a name="which-ipc"></a><a name="id390157"></a><p><b>18.</b></p></td><td align="left" valign="top"><p> Which IPC mechanism should I use? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> Start by reading <a class="xref" href="#other-ipc" title="9.">Q: 9</a>. @@ -427,7 +427,7 @@ to search the list archives is probably to use an Internet engine such as Google. On Google, include "site:freedesktop.org" in your search. - </p></td></tr><tr class="question" title="19."><td align="left" valign="top"><a name="id359012"></a><a name="id359014"></a><p><b>19.</b></p></td><td align="left" valign="top"><p> + </p></td></tr><tr class="question" title="19."><td align="left" valign="top"><a name="id390207"></a><a name="id390209"></a><p><b>19.</b></p></td><td align="left" valign="top"><p> How can I submit a bug or patch? </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p> The D-Bus <a class="ulink" href="http://dbus.freedesktop.org" target="_top">web site</a> diff --git a/tools/dbus-launch.1 b/doc/dbus-launch.1 index 0ea19495..0ea19495 100644 --- a/tools/dbus-launch.1 +++ b/doc/dbus-launch.1 diff --git a/tools/dbus-monitor.1 b/doc/dbus-monitor.1 index c24c14d9..c24c14d9 100644 --- a/tools/dbus-monitor.1 +++ b/doc/dbus-monitor.1 diff --git a/tools/dbus-send.1 b/doc/dbus-send.1 index 4878c3d9..4878c3d9 100644 --- a/tools/dbus-send.1 +++ b/doc/dbus-send.1 diff --git a/doc/dbus-specification.html b/doc/dbus-specification.html index 18006de5..3be81a12 100644 --- a/doc/dbus-specification.html +++ b/doc/dbus-specification.html @@ -4,7 +4,7 @@ <code class="email"><<a class="email" href="mailto:andersca@codefactory.se">andersca@codefactory.se</a>></code><br> </p></div></div></div><div class="author"><h3 class="author"><span class="firstname">Alexander</span> <span class="surname">Larsson</span></h3><div class="affiliation"><span class="orgname">Red Hat, Inc.<br></span><div class="address"><p><br> <code class="email"><<a class="email" href="mailto:alexl@redhat.com">alexl@redhat.com</a>></code><br> - </p></div></div></div></div></div><div><p class="releaseinfo">Version 0.12</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#introduction">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#stability">Protocol and Specification Stability</a></span></dt></dl></dd><dt><span class="sect1"><a href="#message-protocol">Message Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-protocol-signatures">Type Signatures</a></span></dt><dt><span class="sect2"><a href="#message-protocol-marshaling">Marshaling (Wire Format)</a></span></dt><dt><span class="sect2"><a href="#message-protocol-messages">Message Format</a></span></dt><dt><span class="sect2"><a href="#message-protocol-names">Valid Names</a></span></dt><dt><span class="sect2"><a href="#message-protocol-types">Message Types</a></span></dt><dt><span class="sect2"><a href="#message-protocol-handling-invalid">Invalid Protocol and Spec Extensions</a></span></dt></dl></dd><dt><span class="sect1"><a href="#auth-protocol">Authentication Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#auth-protocol-overview">Protocol Overview</a></span></dt><dt><span class="sect2"><a href="#auth-nul-byte">Special credentials-passing nul byte</a></span></dt><dt><span class="sect2"><a href="#auth-command-auth">AUTH command</a></span></dt><dt><span class="sect2"><a href="#auth-command-cancel">CANCEL Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-data">DATA Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-begin">BEGIN Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-rejected">REJECTED Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-ok">OK Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-error">ERROR Command</a></span></dt><dt><span class="sect2"><a href="#auth-examples">Authentication examples</a></span></dt><dt><span class="sect2"><a href="#auth-states">Authentication state diagrams</a></span></dt><dt><span class="sect2"><a href="#auth-mechanisms">Authentication mechanisms</a></span></dt></dl></dd><dt><span class="sect1"><a href="#addresses">Server Addresses</a></span></dt><dt><span class="sect1"><a href="#transports">Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#transports-unix-domain-sockets">Unix Domain Sockets</a></span></dt></dl></dd><dt><span class="sect1"><a href="#naming-conventions">Naming Conventions</a></span></dt><dt><span class="sect1"><a href="#uuids">UUIDs</a></span></dt><dt><span class="sect1"><a href="#standard-interfaces">Standard Interfaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="#standard-interfaces-peer"><code class="literal">org.freedesktop.DBus.Peer</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-introspectable"><code class="literal">org.freedesktop.DBus.Introspectable</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-properties"><code class="literal">org.freedesktop.DBus.Properties</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="#introspection-format">Introspection Data Format</a></span></dt><dt><span class="sect1"><a href="#message-bus">Message Bus Specification</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-bus-overview">Message Bus Overview</a></span></dt><dt><span class="sect2"><a href="#message-bus-names">Message Bus Names</a></span></dt><dt><span class="sect2"><a href="#message-bus-routing">Message Bus Message Routing</a></span></dt><dt><span class="sect2"><a href="#message-bus-starting-services">Message Bus Starting Services</a></span></dt><dt><span class="sect2"><a href="#message-bus-types">Well-known Message Bus Instances</a></span></dt><dt><span class="sect2"><a href="#message-bus-messages">Message Bus Messages</a></span></dt></dl></dd><dt><span class="glossary"><a href="#id324439">Glossary</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div></div><p> + </p></div></div></div></div></div><div><p class="releaseinfo">Version 0.15</p></div><div><div class="revhistory"><table border="1" width="100%" summary="Revision history"><tr><th align="left" valign="top" colspan="3"><b>Revision History</b></th></tr><tr><td align="left">Revision current</td><td align="left"><a class="ulink" href="http://cgit.freedesktop.org/dbus/dbus/log/doc/dbus-specification.xml" target="_top">commit log</a></td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.15</td><td align="left">3 November 2010</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.14</td><td align="left">12 May 2010</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.13</td><td align="left">23 Dezember 2009</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.12</td><td align="left">7 November, 2006</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.11</td><td align="left">6 February 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.10</td><td align="left">28 January 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.9</td><td align="left">7 Januar 2005</td><td align="left"></td></tr><tr><td align="left" colspan="3"></td></tr><tr><td align="left">Revision 0.8</td><td align="left">06 September 2003</td><td align="left"></td></tr><tr><td align="left" colspan="3">First released document.</td></tr></table></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#introduction">Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#stability">Protocol and Specification Stability</a></span></dt></dl></dd><dt><span class="sect1"><a href="#message-protocol">Message Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-protocol-signatures">Type Signatures</a></span></dt><dt><span class="sect2"><a href="#message-protocol-marshaling">Marshaling (Wire Format)</a></span></dt><dt><span class="sect2"><a href="#message-protocol-messages">Message Format</a></span></dt><dt><span class="sect2"><a href="#message-protocol-names">Valid Names</a></span></dt><dt><span class="sect2"><a href="#message-protocol-types">Message Types</a></span></dt><dt><span class="sect2"><a href="#message-protocol-handling-invalid">Invalid Protocol and Spec Extensions</a></span></dt></dl></dd><dt><span class="sect1"><a href="#auth-protocol">Authentication Protocol</a></span></dt><dd><dl><dt><span class="sect2"><a href="#auth-protocol-overview">Protocol Overview</a></span></dt><dt><span class="sect2"><a href="#auth-nul-byte">Special credentials-passing nul byte</a></span></dt><dt><span class="sect2"><a href="#auth-command-auth">AUTH command</a></span></dt><dt><span class="sect2"><a href="#auth-command-cancel">CANCEL Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-data">DATA Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-begin">BEGIN Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-rejected">REJECTED Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-ok">OK Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-error">ERROR Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-negotiate-unix-fd">NEGOTIATE_UNIX_FD Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-agree-unix-fd">AGREE_UNIX_FD Command</a></span></dt><dt><span class="sect2"><a href="#auth-command-future">Future Extensions</a></span></dt><dt><span class="sect2"><a href="#auth-examples">Authentication examples</a></span></dt><dt><span class="sect2"><a href="#auth-states">Authentication state diagrams</a></span></dt><dt><span class="sect2"><a href="#auth-mechanisms">Authentication mechanisms</a></span></dt></dl></dd><dt><span class="sect1"><a href="#addresses">Server Addresses</a></span></dt><dt><span class="sect1"><a href="#transports">Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#transports-unix-domain-sockets">Unix Domain Sockets</a></span></dt><dt><span class="sect2"><a href="#transports-launchd">launchd</a></span></dt><dt><span class="sect2"><a href="#transports-tcp-sockets">TCP Sockets</a></span></dt><dt><span class="sect2"><a href="#transports-nonce-tcp-sockets">Nonce-secured TCP Sockets</a></span></dt></dl></dd><dt><span class="sect1"><a href="#meta-transports">Meta Transports</a></span></dt><dd><dl><dt><span class="sect2"><a href="#meta-transports-autolaunch">Autolaunch</a></span></dt></dl></dd><dt><span class="sect1"><a href="#naming-conventions">Naming Conventions</a></span></dt><dt><span class="sect1"><a href="#uuids">UUIDs</a></span></dt><dt><span class="sect1"><a href="#standard-interfaces">Standard Interfaces</a></span></dt><dd><dl><dt><span class="sect2"><a href="#standard-interfaces-peer"><code class="literal">org.freedesktop.DBus.Peer</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-introspectable"><code class="literal">org.freedesktop.DBus.Introspectable</code></a></span></dt><dt><span class="sect2"><a href="#standard-interfaces-properties"><code class="literal">org.freedesktop.DBus.Properties</code></a></span></dt></dl></dd><dt><span class="sect1"><a href="#introspection-format">Introspection Data Format</a></span></dt><dt><span class="sect1"><a href="#message-bus">Message Bus Specification</a></span></dt><dd><dl><dt><span class="sect2"><a href="#message-bus-overview">Message Bus Overview</a></span></dt><dt><span class="sect2"><a href="#message-bus-names">Message Bus Names</a></span></dt><dt><span class="sect2"><a href="#message-bus-routing">Message Bus Message Routing</a></span></dt><dt><span class="sect2"><a href="#message-bus-starting-services">Message Bus Starting Services</a></span></dt><dt><span class="sect2"><a href="#message-bus-types">Well-known Message Bus Instances</a></span></dt><dt><span class="sect2"><a href="#message-bus-messages">Message Bus Messages</a></span></dt></dl></dd><dt><span class="glossary"><a href="#id367478">Glossary</a></span></dt></dl></div><div class="sect1" title="Introduction"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introduction"></a>Introduction</h2></div></div></div><p> D-Bus is a system for low-latency, low-overhead, easy to use interprocess communication (IPC). In more detail: </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> @@ -219,7 +219,7 @@ map, hash table, or dict object. </p><p> The following table summarizes the D-Bus types. - </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Conventional Name</th><th>Code</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">INVALID</code></td><td>0 (ASCII NUL)</td><td>Not a valid type code, used to terminate signatures</td></tr><tr><td><code class="literal">BYTE</code></td><td>121 (ASCII 'y')</td><td>8-bit unsigned integer</td></tr><tr><td><code class="literal">BOOLEAN</code></td><td>98 (ASCII 'b')</td><td>Boolean value, 0 is <code class="literal">FALSE</code> and 1 is <code class="literal">TRUE</code>. Everything else is invalid.</td></tr><tr><td><code class="literal">INT16</code></td><td>110 (ASCII 'n')</td><td>16-bit signed integer</td></tr><tr><td><code class="literal">UINT16</code></td><td>113 (ASCII 'q')</td><td>16-bit unsigned integer</td></tr><tr><td><code class="literal">INT32</code></td><td>105 (ASCII 'i')</td><td>32-bit signed integer</td></tr><tr><td><code class="literal">UINT32</code></td><td>117 (ASCII 'u')</td><td>32-bit unsigned integer</td></tr><tr><td><code class="literal">INT64</code></td><td>120 (ASCII 'x')</td><td>64-bit signed integer</td></tr><tr><td><code class="literal">UINT64</code></td><td>116 (ASCII 't')</td><td>64-bit unsigned integer</td></tr><tr><td><code class="literal">DOUBLE</code></td><td>100 (ASCII 'd')</td><td>IEEE 754 double</td></tr><tr><td><code class="literal">STRING</code></td><td>115 (ASCII 's')</td><td>UTF-8 string (<span class="emphasis"><em>must</em></span> be valid UTF-8). Must be nul terminated and contain no other nul bytes.</td></tr><tr><td><code class="literal">OBJECT_PATH</code></td><td>111 (ASCII 'o')</td><td>Name of an object instance</td></tr><tr><td><code class="literal">SIGNATURE</code></td><td>103 (ASCII 'g')</td><td>A type signature</td></tr><tr><td><code class="literal">ARRAY</code></td><td>97 (ASCII 'a')</td><td>Array</td></tr><tr><td><code class="literal">STRUCT</code></td><td>114 (ASCII 'r'), 40 (ASCII '('), 41 (ASCII ')')</td><td>Struct</td></tr><tr><td><code class="literal">VARIANT</code></td><td>118 (ASCII 'v') </td><td>Variant type (the type of the value is part of the value itself)</td></tr><tr><td><code class="literal">DICT_ENTRY</code></td><td>101 (ASCII 'e'), 123 (ASCII '{'), 125 (ASCII '}') </td><td>Entry in a dict or map (array of key-value pairs)</td></tr></tbody></table></div><p> + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Conventional Name</th><th>Code</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">INVALID</code></td><td>0 (ASCII NUL)</td><td>Not a valid type code, used to terminate signatures</td></tr><tr><td><code class="literal">BYTE</code></td><td>121 (ASCII 'y')</td><td>8-bit unsigned integer</td></tr><tr><td><code class="literal">BOOLEAN</code></td><td>98 (ASCII 'b')</td><td>Boolean value, 0 is <code class="literal">FALSE</code> and 1 is <code class="literal">TRUE</code>. Everything else is invalid.</td></tr><tr><td><code class="literal">INT16</code></td><td>110 (ASCII 'n')</td><td>16-bit signed integer</td></tr><tr><td><code class="literal">UINT16</code></td><td>113 (ASCII 'q')</td><td>16-bit unsigned integer</td></tr><tr><td><code class="literal">INT32</code></td><td>105 (ASCII 'i')</td><td>32-bit signed integer</td></tr><tr><td><code class="literal">UINT32</code></td><td>117 (ASCII 'u')</td><td>32-bit unsigned integer</td></tr><tr><td><code class="literal">INT64</code></td><td>120 (ASCII 'x')</td><td>64-bit signed integer</td></tr><tr><td><code class="literal">UINT64</code></td><td>116 (ASCII 't')</td><td>64-bit unsigned integer</td></tr><tr><td><code class="literal">DOUBLE</code></td><td>100 (ASCII 'd')</td><td>IEEE 754 double</td></tr><tr><td><code class="literal">STRING</code></td><td>115 (ASCII 's')</td><td>UTF-8 string (<span class="emphasis"><em>must</em></span> be valid UTF-8). Must be nul terminated and contain no other nul bytes.</td></tr><tr><td><code class="literal">OBJECT_PATH</code></td><td>111 (ASCII 'o')</td><td>Name of an object instance</td></tr><tr><td><code class="literal">SIGNATURE</code></td><td>103 (ASCII 'g')</td><td>A type signature</td></tr><tr><td><code class="literal">ARRAY</code></td><td>97 (ASCII 'a')</td><td>Array</td></tr><tr><td><code class="literal">STRUCT</code></td><td>114 (ASCII 'r'), 40 (ASCII '('), 41 (ASCII ')')</td><td>Struct</td></tr><tr><td><code class="literal">VARIANT</code></td><td>118 (ASCII 'v') </td><td>Variant type (the type of the value is part of the value itself)</td></tr><tr><td><code class="literal">DICT_ENTRY</code></td><td>101 (ASCII 'e'), 123 (ASCII '{'), 125 (ASCII '}') </td><td>Entry in a dict or map (array of key-value pairs)</td></tr><tr><td><code class="literal">UNIX_FD</code></td><td>104 (ASCII 'h')</td><td>Unix file descriptor</td></tr></tbody></table></div><p> </p></div><div class="sect2" title="Marshaling (Wire Format)"><div class="titlepage"><div><div><h3 class="title"><a name="message-protocol-marshaling"></a>Marshaling (Wire Format)</h3></div></div></div><p> Given a type signature, a block of bytes can be converted into typed values. This section describes the format of the block of bytes. Byte @@ -277,19 +277,26 @@ </td><td> 8 </td></tr><tr><td><code class="literal">VARIANT</code></td><td> - A variant type has a marshaled <code class="literal">SIGNATURE</code> - followed by a marshaled value with the type - given in the signature. - Unlike a message signature, the variant signature - can contain only a single complete type. - So "i", "ai" or "(ii)" is OK, but "ii" is not. + A variant type has a marshaled + <code class="literal">SIGNATURE</code> followed by a marshaled + value with the type given in the signature. Unlike + a message signature, the variant signature can + contain only a single complete type. So "i", "ai" + or "(ii)" is OK, but "ii" is not. Use of variants may not + cause a total message depth to be larger than 64, including + other container types such as structures. </td><td> 1 (alignment of the signature) </td></tr><tr><td><code class="literal">DICT_ENTRY</code></td><td> Identical to STRUCT. </td><td> 8 - </td></tr></tbody></table></div><p> + </td></tr><tr><td><code class="literal">UNIX_FD</code></td><td>32-bit unsigned integer in the message's byte + order. The actual file descriptors need to be + transferred out-of-band via some platform specific + mechanism. On the wire, values of this type store the index to the + file descriptor in the array of file descriptors that + accompany the message.</td><td>4</td></tr></tbody></table></div><p> </p><div class="sect3" title="Valid Object Paths"><div class="titlepage"><div><div><h4 class="title"><a name="message-protocol-marshaling-object-path"></a>Valid Object Paths</h4></div></div></div><p> An object path is a name used to refer to an object instance. Conceptually, each participant in a D-Bus message exchange may have @@ -450,7 +457,16 @@ The message bus fills in this field so it is reliable; the field is only meaningful in combination with the message bus.</td></tr><tr><td><code class="literal">SIGNATURE</code></td><td>8</td><td><code class="literal">SIGNATURE</code></td><td>optional</td><td>The signature of the message body. If omitted, it is assumed to be the - empty signature "" (i.e. the body must be 0-length).</td></tr></tbody></table></div><p> + empty signature "" (i.e. the body must be 0-length).</td></tr><tr><td><code class="literal">UNIX_FDS</code></td><td>9</td><td><code class="literal">UINT32</code></td><td>optional</td><td>The number of Unix file descriptors that + accompany the message. If omitted, it is assumed + that no Unix file descriptors accompany the + message. The actual file descriptors need to be + transferred via platform specific mechanism + out-of-band. They must be sent at the same time as + part of the message itself. They may not be sent + before the first byte of the message itself is + transferred or after the last byte of the message + itself.</td></tr></tbody></table></div><p> </p></div></div><div class="sect2" title="Valid Names"><div class="titlepage"><div><div><h3 class="title"><a name="message-protocol-names"></a>Valid Names</h3></div></div></div><p> The various names in D-Bus messages have some restrictions. </p><p> @@ -715,11 +731,11 @@ Commands from the client to the server are as follows: - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>AUTH [mechanism] [initial-response]</p></li><li class="listitem"><p>CANCEL</p></li><li class="listitem"><p>BEGIN</p></li><li class="listitem"><p>DATA <data in hex encoding></p></li><li class="listitem"><p>ERROR [human-readable error explanation]</p></li></ul></div><p> + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>AUTH [mechanism] [initial-response]</p></li><li class="listitem"><p>CANCEL</p></li><li class="listitem"><p>BEGIN</p></li><li class="listitem"><p>DATA <data in hex encoding></p></li><li class="listitem"><p>ERROR [human-readable error explanation]</p></li><li class="listitem"><p>NEGOTIATE_UNIX_FD</p></li></ul></div><p> From server to client are as follows: - </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>REJECTED <space-separated list of mechanism names></p></li><li class="listitem"><p>OK <GUID in hex></p></li><li class="listitem"><p>DATA <data in hex encoding></p></li><li class="listitem"><p>ERROR</p></li></ul></div><p> + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>REJECTED <space-separated list of mechanism names></p></li><li class="listitem"><p>OK <GUID in hex></p></li><li class="listitem"><p>DATA <data in hex encoding></p></li><li class="listitem"><p>ERROR</p></li><li class="listitem"><p>AGREE_UNIX_FD</p></li></ul></div><p> </p><p> Unofficial extensions to the command set must begin with the letters "EXTENSION_", to avoid conflicts with future official commands. @@ -764,13 +780,14 @@ If authentication succeeds after exchanging DATA commands, an OK command must be sent to the client. </p><p> - The first octet received by the client after the \r\n of the OK - command must be the first octet of the authenticated/encrypted - stream of D-Bus messages. - </p><p> The first octet received by the server after the \r\n of the BEGIN command from the client must be the first octet of the authenticated/encrypted stream of D-Bus messages. + </p><p> + If BEGIN is received by the server, the first octet received + by the client after the \r\n of the OK command must be the + first octet of the authenticated/encrypted stream of D-Bus + messages. </p></div><div class="sect2" title="CANCEL Command"><div class="titlepage"><div><div><h3 class="title"><a name="auth-command-cancel"></a>CANCEL Command</h3></div></div></div><p> At any time up to sending the BEGIN command, the client may send a CANCEL command. On receiving the CANCEL command, the server must @@ -803,18 +820,22 @@ each time it sends a REJECTED message. Clients are free to ignore all lists received after the first. </p></div><div class="sect2" title="OK Command"><div class="titlepage"><div><div><h3 class="title"><a name="auth-command-ok"></a>OK Command</h3></div></div></div><p> - The OK command indicates that the client has been authenticated, - and that further communication will be a stream of D-Bus messages - (optionally encrypted, as negotiated) rather than this protocol. - </p><p> - The first octet received by the client after the \r\n of the OK - command must be the first octet of the authenticated/encrypted - stream of D-Bus messages. - </p><p> - The client must respond to the OK command by sending a BEGIN - command, followed by its stream of messages, or by disconnecting. - The server must not accept additional commands using this protocol - after the OK command has been sent. + The OK command indicates that the client has been + authenticated. The client may now proceed with negotiating + Unix file descriptor passing. To do that it shall send + NEGOTIATE_UNIX_FD to the server. + </p><p> + Otherwise, the client must respond to the OK command by + sending a BEGIN command, followed by its stream of messages, + or by disconnecting. The server must not accept additional + commands using this protocol after the BEGIN command has been + received. Further communication will be a stream of D-Bus + messages (optionally encrypted, as negotiated) rather than + this protocol. + </p><p> + If a client sends BEGIN the first octet received by the client + after the \r\n of the OK command must be the first octet of + the authenticated/encrypted stream of D-Bus messages. </p><p> The OK command has one argument, which is the GUID of the server. See <a class="xref" href="#addresses" title="Server Addresses">the section called “Server Addresses”</a> for more on server GUIDs. @@ -839,15 +860,51 @@ receiving an ERROR from applications that don't understand it. Thus the ERROR feature of the auth protocol is an escape hatch that lets us negotiate extensions or changes to the D-Bus protocol in the future. + </p></div><div class="sect2" title="NEGOTIATE_UNIX_FD Command"><div class="titlepage"><div><div><h3 class="title"><a name="auth-command-negotiate-unix-fd"></a>NEGOTIATE_UNIX_FD Command</h3></div></div></div><p> + The NEGOTIATE_UNIX_FD command indicates that the client + supports Unix file descriptor passing. This command may only + be sent after the connection is authenticated, i.e. after OK + was received by the client. This command may only be sent on + transports that support Unix file descriptor passing. + </p><p> + On receiving NEGOTIATE_UNIX_FD the server must respond with + either AGREE_UNIX_FD or ERROR. It shall respond the former if + the transport chosen supports Unix file descriptor passing and + the server supports this feature. It shall respond the latter + if the transport does not support Unix file descriptor + passing, the server does not support this feature, or the + server decides not to enable file descriptor passing due to + security or other reasons. + </p></div><div class="sect2" title="AGREE_UNIX_FD Command"><div class="titlepage"><div><div><h3 class="title"><a name="auth-command-agree-unix-fd"></a>AGREE_UNIX_FD Command</h3></div></div></div><p> + The AGREE_UNIX_FD command indicates that the server supports + Unix file descriptor passing. This command may only be sent + after the connection is authenticated, and the client sent + NEGOTIATE_UNIX_FD to enable Unix file descriptor passing. This + command may only be sent on transports that support Unix file + descriptor passing. + </p><p> + On receiving AGREE_UNIX_FD the client must respond with BEGIN, + followed by its stream of messages, or by disconnecting. The + server must not accept additional commands using this protocol + after the BEGIN command has been received. Further + communication will be a stream of D-Bus messages (optionally + encrypted, as negotiated) rather than this protocol. + </p></div><div class="sect2" title="Future Extensions"><div class="titlepage"><div><div><h3 class="title"><a name="auth-command-future"></a>Future Extensions</h3></div></div></div><p> + Future extensions to the authentication and negotiation + protocol are possible. For that new commands may be + introduced. If a client or server receives an unknown command + it shall respond with ERROR and not consider this fatal. New + commands may be introduced both before, and after + authentication, i.e. both before and after the OK command. </p></div><div class="sect2" title="Authentication examples"><div class="titlepage"><div><div><h3 class="title"><a name="auth-examples"></a>Authentication examples</h3></div></div></div><p> - </p><div class="figure"><a name="id320449"></a><p class="title"><b>Figure 1. Example of successful magic cookie authentication</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id362126"></a><p class="title"><b>Figure 1. Example of successful magic cookie authentication</b></p><div class="figure-contents"><pre class="programlisting"> (MAGIC_COOKIE is a made up mechanism) C: AUTH MAGIC_COOKIE 3138363935333137393635383634 S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="id320464"></a><p class="title"><b>Figure 2. Example of finding out mechanisms then picking one</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id362141"></a><p class="title"><b>Figure 2. Example of finding out mechanisms then picking one</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -856,14 +913,14 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="id320480"></a><p class="title"><b>Figure 3. Example of client sends unknown command then falls back to regular auth</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id362157"></a><p class="title"><b>Figure 3. Example of client sends unknown command then falls back to regular auth</b></p><div class="figure-contents"><pre class="programlisting"> C: FOOBAR S: ERROR C: AUTH MAGIC_COOKIE 3736343435313230333039 S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="id320496"></a><p class="title"><b>Figure 4. Example of server doesn't support initial auth mechanism</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id362173"></a><p class="title"><b>Figure 4. Example of server doesn't support initial auth mechanism</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -872,7 +929,7 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="id320513"></a><p class="title"><b>Figure 5. Example of wrong password or the like followed by successful retry</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id362190"></a><p class="title"><b>Figure 5. Example of wrong password or the like followed by successful retry</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -885,7 +942,7 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> - </p><div class="figure"><a name="id320531"></a><p class="title"><b>Figure 6. Example of skey cancelled and restarted</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id362208"></a><p class="title"><b>Figure 6. Example of skey cancelled and restarted</b></p><div class="figure-contents"><pre class="programlisting"> C: AUTH MAGIC_COOKIE 3736343435313230333039 S: REJECTED KERBEROS_V4 SKEY C: AUTH SKEY 7ab83f32ee @@ -898,6 +955,24 @@ S: OK 1234deadbeef C: BEGIN </pre></div></div><p><br class="figure-break"> + </p><div class="figure"><a name="id362225"></a><p class="title"><b>Figure 7. Example of successful magic cookie authentication with successful negotiation of Unix FD passing</b></p><div class="figure-contents"><pre class="programlisting"> + (MAGIC_COOKIE is a made up mechanism) + + C: AUTH MAGIC_COOKIE 3138363935333137393635383634 + S: OK 1234deadbeef + C: NEGOTIATE_UNIX_FD + S: AGREE_UNIX_FD + C: BEGIN + </pre></div></div><p><br class="figure-break"> + </p><div class="figure"><a name="id362242"></a><p class="title"><b>Figure 8. Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</b></p><div class="figure-contents"><pre class="programlisting"> + (MAGIC_COOKIE is a made up mechanism) + + C: AUTH MAGIC_COOKIE 3138363935333137393635383634 + S: OK 1234deadbeef + C: NEGOTIATE_UNIX_FD + S: ERROR + C: BEGIN + </pre></div></div><p><br class="figure-break"> </p></div><div class="sect2" title="Authentication state diagrams"><div class="titlepage"><div><div><h3 class="title"><a name="auth-states"></a>Authentication state diagrams</h3></div></div></div><p> This section documents the auth protocol in terms of a state machine for the client and the server. This is @@ -1167,7 +1242,7 @@ fails, the lock fails. Servers should retry for a reasonable period of time, then they may choose to delete an existing lock to keep users from having to manually delete a stale - lock. <sup>[<a name="id321252" href="#ftn.id321252" class="footnote">1</a>]</sup> + lock. <sup>[<a name="id362953" href="#ftn.id362953" class="footnote">1</a>]</sup> </p></li><li class="listitem"><p> Once the lockfile has been created, the server loads the cookie file. It should then delete any cookies that are old (the @@ -1246,8 +1321,8 @@ [FIXME we need to specify in detail each transport and its possible arguments] Current transports include: unix domain sockets (including - abstract namespace on linux), TCP/IP, and a debug/testing transport using - in-process pipes. Future possible transports include one that + abstract namespace on linux), launchd, TCP/IP, and a debug/testing transport + using in-process pipes. Future possible transports include one that tunnels over X11 protocol. </p><div class="sect2" title="Unix Domain Sockets"><div class="titlepage"><div><div><h3 class="title"><a name="transports-unix-domain-sockets"></a>Unix Domain Sockets</h3></div></div></div><p> Unix domain sockets can be either paths in the file system or on Linux @@ -1260,7 +1335,117 @@ previous versions of D-Bus that would create sockets with a fixed length path name. Names which were shorter than the fixed length would be padded by Nul bytes. - </p></div></div><div class="sect1" title="Naming Conventions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="naming-conventions"></a>Naming Conventions</h2></div></div></div><p> + </p><p> + Unix domain sockets are not available on windows. + </p><div class="sect3" title="Server Address Format"><div class="titlepage"><div><div><h4 class="title"><a name="transports-unix-domain-sockets-addresses"></a>Server Address Format</h4></div></div></div><p> + Unix domain socket addresses are identified by the "unix:" prefix + and support the following key/value pairs: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td>path</td><td>(path)</td><td>path of the unix domain socket. If set, the "tmpdir" and "abstract" key must not be set.</td></tr><tr><td>tmpdir</td><td>(path)</td><td>temporary directory in which a socket file with a random file name starting with 'dbus-' will be created by the server. This key can only be used in server addresses, not in client addresses. If set, the "path" and "abstract" key must not be set.</td></tr><tr><td>abstract</td><td>(string)</td><td>unique string (path) in the abstract namespace. If set, the "path" or "tempdir" key must not be set.</td></tr></tbody></table></div></div></div><div class="sect2" title="launchd"><div class="titlepage"><div><div><h3 class="title"><a name="transports-launchd"></a>launchd</h3></div></div></div><p> + launchd is a open-source server management system that replaces init, inetd + and cron on Apple Mac OS X versions 10.4 and above. It provides a common session + bus address for each user and deprecates the X11-enabled D-Bus launcher on OSX. + </p><p> + launchd allocates a socket and provides it with the unix path through the + DBUS_LAUNCHD_SESSION_BUS_SOCKET variable in launchd's environment. Every process + spawned by launchd (or dbus-daemon, if it was started by launchd) can access + it through its environment. + Other processes can query for the launchd socket by executing: + $ launchctl getenv DBUS_LAUNCHD_SESSION_BUS_SOCKET + This is normally done by the D-Bus client library so doesn't have to be done + manually. + </p><p> + launchd is not available on Microsoft Windows. + </p><div class="sect3" title="Server Address Format"><div class="titlepage"><div><div><h4 class="title"><a name="transports-launchd-addresses"></a>Server Address Format</h4></div></div></div><p> + launchd addresses are identified by the "launchd:" prefix + and support the following key/value pairs: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td>env</td><td>(environment variable)</td><td>path of the unix domain socket for the launchd created dbus-daemon.</td></tr></tbody></table></div></div></div><div class="sect2" title="TCP Sockets"><div class="titlepage"><div><div><h3 class="title"><a name="transports-tcp-sockets"></a>TCP Sockets</h3></div></div></div><p> + The tcp transport provides TCP/IP based connections between clients + located on the same or different hosts. + </p><p> + Using tcp transport without any additional secure authentification mechanismus + over a network is unsecure. + </p><p> + Windows notes: Because of the tcp stack on windows does not provide sending + credentials over a tcp connection, the EXTERNAL authentification + mechanismus does not work. + </p><div class="sect3" title="Server Address Format"><div class="titlepage"><div><div><h4 class="title"><a name="transports-tcp-sockets-addresses"></a>Server Address Format</h4></div></div></div><p> + TCP/IP socket addresses are identified by the "tcp:" prefix + and support the following key/value pairs: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td>host</td><td>(string)</td><td>dns name or ip address</td></tr><tr><td>port</td><td>(number)</td><td>The tcp port the server will open. A zero value let the server + choose a free port provided from the underlaying operating system. + libdbus is able to retrieve the real used port from the server. + </td></tr><tr><td>family</td><td>(string)</td><td>If set, provide the type of socket family either "ipv4" or "ipv6". If unset, the family is unspecified.</td></tr></tbody></table></div></div></div><div class="sect2" title="Nonce-secured TCP Sockets"><div class="titlepage"><div><div><h3 class="title"><a name="transports-nonce-tcp-sockets"></a>Nonce-secured TCP Sockets</h3></div></div></div><p> + The nonce-tcp transport provides a secured TCP transport, using a + simple authentication mechanism to ensure that only clients with read + access to a certain location in the filesystem can connect to the server. + The server writes a secret, the nonce, to a file and an incoming client + connection is only accepted if the client sends the nonce right after + the connect. The nonce mechanism requires no setup and is orthogonal to + the higher-level authentication mechanisms described in the + Authentication section. + </p><p> + On start, the server generates a random 16 byte nonce and writes it + to a file in the user's temporary directory. The nonce file location + is published as part of the server's D-Bus address using the + "noncefile" key-value pair. + + After an accept, the server reads 16 bytes from the socket. If the + read bytes do not match the nonce stored in the nonce file, the + server MUST immediately drop the connection. + If the nonce match the received byte sequence, the client is accepted + and the transport behaves like an unsecured tcp transport. + </p><p> + After a successful connect to the server socket, the client MUST read + the nonce from the file published by the server via the noncefile= + key-value pair and send it over the socket. After that, the + transport behaves like an unsecured tcp transport. + </p><div class="sect3" title="Server Address Format"><div class="titlepage"><div><div><h4 class="title"><a name="transports-nonce-tcp-sockets-addresses"></a>Server Address Format</h4></div></div></div><p> + Nonce TCP/IP socket addresses uses the "nonce-tcp:" prefix + and support the following key/value pairs: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td>host</td><td>(string)</td><td>dns name or ip address</td></tr><tr><td>port</td><td>(number)</td><td>The tcp port the server will open. A zero value let the server + choose a free port provided from the underlaying operating system. + libdbus is able to retrieve the real used port from the server. + </td></tr><tr><td>family</td><td>(string)</td><td>If set, provide the type of socket family either "ipv4" or "ipv6". If unset, the family is unspecified.</td></tr><tr><td>noncefile</td><td>(path)</td><td>file location containing the secret</td></tr></tbody></table></div></div></div></div><div class="sect1" title="Meta Transports"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="meta-transports"></a>Meta Transports</h2></div></div></div><p> + Meta transports are a kind of transport with special enhancements or + behavior. Currently available meta transports include: autolaunch + </p><div class="sect2" title="Autolaunch"><div class="titlepage"><div><div><h3 class="title"><a name="meta-transports-autolaunch"></a>Autolaunch</h3></div></div></div><p>The autolaunch transport provides a way for dbus clients to autodetect + a running dbus session bus and to autolaunch a session bus if not present. + </p><div class="sect3" title="Server Address Format"><div class="titlepage"><div><div><h4 class="title"><a name="meta-transports-autolaunch-addresses"></a>Server Address Format</h4></div></div></div><p> + Autolaunch addresses uses the "autolaunch:" prefix and support the + following key/value pairs: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values</th><th>Description</th></tr></thead><tbody><tr><td>scope</td><td>(string)</td><td>scope of autolaunch (Windows only) + <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> + "*install-path" - limit session bus to dbus installation path. + The dbus installation path is determined from the location of + the shared dbus library. If the library is located in a 'bin' + subdirectory the installation root is the directory above, + otherwise the directory where the library lives is taken as + installation root. + </p><pre class="programlisting"> + <install-root>/bin/[lib]dbus-1.dll + <install-root>/[lib]dbus-1.dll + </pre><p> + </p></li><li class="listitem"><p> + "*user" - limit session bus to the recent user. + </p></li><li class="listitem"><p> + other values - specify dedicated session bus like "release", + "debug" or other + </p></li></ul></div> + </td></tr></tbody></table></div></div><div class="sect3" title="Windows implementation"><div class="titlepage"><div><div><h4 class="title"><a name="meta-transports-autolaunch-windows-implementation"></a>Windows implementation</h4></div></div></div><p> + On start, the server opens a platform specific transport, creates a mutex + and a shared memory section containing the related session bus address. + This mutex will be inspected by the dbus client library to detect a + running dbus session bus. The access to the mutex and the shared memory + section are protected by global locks. + </p><p> + In the recent implementation the autolaunch transport uses a tcp transport + on localhost with a port choosen from the operating system. This detail may + change in the future. + </p><p> + Disclaimer: The recent implementation is in an early state and may not + work in all cirumstances and/or may have security issues. Because of this + the implementation is not documentated yet. + </p></div></div></div><div class="sect1" title="Naming Conventions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="naming-conventions"></a>Naming Conventions</h2></div></div></div><p> D-Bus namespaces are all lowercase and correspond to reversed domain names, as with Java. e.g. "org.freedesktop" </p><p> @@ -1373,6 +1558,34 @@ the results are undefined (picking one by according to an arbitrary deterministic rule, or returning an error, are the reasonable possibilities). + </p><p> + If one or more properties change on an object, the + <code class="literal">org.freedesktop.DBus.Properties.PropertiesChanged</code> + signal may be emitted (this signal was added in 0.14): + </p><p> + </p><pre class="programlisting"> + org.freedesktop.DBus.Properties.PropertiesChanged (STRING interface_name, + DICT<STRING,VARIANT> changed_properties, + ARRAY<STRING> invalidated_properties); + </pre><p> + </p><p> + where <code class="literal">changed_properties</code> is a dictionary + containing the changed properties with the new values and + <code class="literal">invalidated_properties</code> is an array of + properties that changed but the value is not conveyed. + </p><p> + Whether the <code class="literal">PropertiesChanged</code> signal is + supported can be determined by calling + <code class="literal">org.freedesktop.DBus.Introspectable.Introspect</code>. Note + that the signal may be supported for an object but it may + differ how whether and how it is used on a per-property basis + (for e.g. performance or security reasons). Each property (or + the parent interface) must be annotated with the + <code class="literal">org.freedesktop.DBus.Property.EmitsChangedSignal</code> + annotation to convey this (usually the default value + <code class="literal">true</code> is sufficient meaning that the + annotation does not need to be used). See <a class="xref" href="#introspection-format" title="Introspection Data Format">the section called “Introspection Data Format”</a> for details on this + annotation. </p></div></div><div class="sect1" title="Introspection Data Format"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="introspection-format"></a>Introspection Data Format</h2></div></div></div><p> As described in <a class="xref" href="#standard-interfaces-introspectable" title="org.freedesktop.DBus.Introspectable">the section called “<code class="literal">org.freedesktop.DBus.Introspectable</code>”</a>, objects may be introspected at runtime, returning an XML string @@ -1447,7 +1660,30 @@ "annotations", which are generic key/value pairs of metadata. They are similar conceptually to Java's annotations and C# attributes. Well-known annotations: - </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values (separated by ,)</th><th>Description</th></tr></thead><tbody><tr><td>org.freedesktop.DBus.Deprecated</td><td>true,false</td><td>Whether or not the entity is deprecated; defaults to false</td></tr><tr><td>org.freedesktop.DBus.GLib.CSymbol</td><td>(string)</td><td>The C symbol; may be used for methods and interfaces</td></tr><tr><td>org.freedesktop.DBus.Method.NoReply</td><td>true,false</td><td>If set, don't expect a reply to the method call; defaults to false.</td></tr></tbody></table></div></div><div class="sect1" title="Message Bus Specification"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="message-bus"></a>Message Bus Specification</h2></div></div></div><div class="sect2" title="Message Bus Overview"><div class="titlepage"><div><div><h3 class="title"><a name="message-bus-overview"></a>Message Bus Overview</h3></div></div></div><p> + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Name</th><th>Values (separated by ,)</th><th>Description</th></tr></thead><tbody><tr><td>org.freedesktop.DBus.Deprecated</td><td>true,false</td><td>Whether or not the entity is deprecated; defaults to false</td></tr><tr><td>org.freedesktop.DBus.GLib.CSymbol</td><td>(string)</td><td>The C symbol; may be used for methods and interfaces</td></tr><tr><td>org.freedesktop.DBus.Method.NoReply</td><td>true,false</td><td>If set, don't expect a reply to the method call; defaults to false.</td></tr><tr><td>org.freedesktop.DBus.Property.EmitsChangedSignal</td><td>true,invalidates,false</td><td> + <p> + If set to <code class="literal">false</code>, the + <code class="literal">org.freedesktop.DBus.Properties.PropertiesChanged</code> + signal, see <a class="xref" href="#standard-interfaces-properties" title="org.freedesktop.DBus.Properties">the section called “<code class="literal">org.freedesktop.DBus.Properties</code>”</a> is not + guaranteed to be emitted if the property changes. + </p> + <p> + If set to <code class="literal">invalidates</code> the signal + is emitted but the value is not included in the + signal. + </p> + <p> + If set to <code class="literal">true</code> the signal is + emitted with the value included. + </p> + <p> + The value for the annotation defaults to + <code class="literal">true</code> if the enclosing interface + element does not specify the annotation. Otherwise it + defaults to the value specified in the enclosing + interface element. + </p> + </td></tr></tbody></table></div></div><div class="sect1" title="Message Bus Specification"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="message-bus"></a>Message Bus Specification</h2></div></div></div><div class="sect2" title="Message Bus Overview"><div class="titlepage"><div><div><h3 class="title"><a name="message-bus-overview"></a>Message Bus Overview</h3></div></div></div><p> The message bus accepts connections from one or more applications. Once connected, applications can exchange messages with other applications that are also connected to the bus. @@ -1479,6 +1715,10 @@ Messages may have a <code class="literal">DESTINATION</code> field (see <a class="xref" href="#message-protocol-header-fields" title="Header Fields">the section called “Header Fields”</a>). If the <code class="literal">DESTINATION</code> field is present, it specifies a message recipient by name. Method calls and replies normally specify this field. + The message bus must send messages (of any type) with the + <code class="literal">DESTINATION</code> field set to the specified recipient, + regardless of whether the recipient has set up a match rule matching + the message. </p><p> Signals normally do not specify a destination; they are sent to all applications with <em class="firstterm">message matching rules</em> that @@ -1669,6 +1909,22 @@ in the queue for the name and has now been removed from the queue.</td></tr><tr><td>DBUS_RELEASE_NAME_REPLY_NON_EXISTENT</td><td>2</td><td>The given name does not exist on this bus.</td></tr><tr><td>DBUS_RELEASE_NAME_REPLY_NOT_OWNER</td><td>3</td><td>The caller was not the primary owner of this name, and was also not waiting in the queue to own this name.</td></tr></tbody></table></div><p> + </p></div><div class="sect3" title="org.freedesktop.DBus.ListQueuedOwners"><div class="titlepage"><div><div><h4 class="title"><a name="bus-messages-list-queued-owners"></a><code class="literal">org.freedesktop.DBus.ListQueuedOwners</code></h4></div></div></div><p> + As a method: + </p><pre class="programlisting"> + ARRAY of STRING ListQueuedOwners (in STRING name) + </pre><p> + Message arguments: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>STRING</td><td>The well-known bus name to query, such as + <code class="literal">com.example.cappuccino</code></td></tr></tbody></table></div><p> + Reply arguments: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>ARRAY of STRING</td><td>The unique bus names of connections currently queued + for the name</td></tr></tbody></table></div><p> + </p><p> + This method call should be sent to + <code class="literal">org.freedesktop.DBus</code> and lists the connections + currently queued for a bus name (see + <a class="xref" href="#term-queued-owner" title="Queued Name Owner">Queued Name Owner</a>). </p></div></div><div class="sect2" title="Message Bus Message Routing"><div class="titlepage"><div><div><h3 class="title"><a name="message-bus-routing"></a>Message Bus Message Routing</h3></div></div></div><p> FIXME </p><div class="sect3" title="Match Rules"><div class="titlepage"><div><div><h4 class="title"><a name="message-bus-routing-match-rules"></a>Match Rules</h4></div></div></div><p> @@ -1682,7 +1938,7 @@ only relevant message need to be processed by the client. </p><p> Match rules are added using the AddMatch bus method - (see xref linkend="bus-messages-add-match"/>). Rules are + (see <a class="xref" href="#bus-messages-add-match" title="org.freedesktop.DBus.AddMatch">the section called “<code class="literal">org.freedesktop.DBus.AddMatch</code>”</a>). Rules are specified as a string of comma separated key/value pairs. Excluding a key from the rule indicates a wildcard match. For instance excluding the the member from a match rule but @@ -1741,13 +1997,13 @@ badly-specified. ;-)] Service description files have the ".service" file extension. The message bus will only load service description files ending with .service; all other files will be ignored. The file format - is similar to that of <a class="ulink" href="http://www.freedesktop.org/standards/desktop-entry-spec/desktop-entry-spec.html" target="_top">desktop + is similar to that of <a class="ulink" href="http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html" target="_top">desktop entries</a>. All service description files must be in UTF-8 encoding. To ensure that there will be no name collisions, service files must be namespaced using the same mechanism as messages and service names. - </p><div class="figure"><a name="id322982"></a><p class="title"><b>Figure 7. Example service description file</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id365470"></a><p class="title"><b>Figure 9. Example service description file</b></p><div class="figure-contents"><pre class="programlisting"> # Sample service description file [D-BUS Service] Names=org.freedesktop.ConfigurationDatabase;org.gnome.GConf; @@ -1815,11 +2071,113 @@ The root window property must have type <code class="literal">STRING</code>. The environment variable should have precedence over the root window property. - </p><p> - [FIXME specify location of .service files, probably using - DESKTOP_DIRS etc. from basedir specification, though login session - bus is not really desktop-specific] - </p></div><div class="sect3" title="System message bus"><div class="titlepage"><div><div><h4 class="title"><a name="message-bus-types-system"></a>System message bus</h4></div></div></div><p> + </p><p>The address of the login session message bus is given in the + <code class="literal">DBUS_SESSION_BUS_ADDRESS</code> environment variable. If + DBUS_SESSION_BUS_ADDRESS is not set, or if it's set to the string + "autolaunch:", the system should use platform-specific methods of + locating a running D-Bus session server, or starting one if a running + instance cannot be found. Note that this mechanism is not recommended + for attempting to determine if a daemon is running. It is inherently + racy to attempt to make this determination, since the bus daemon may + be started just before or just after the determination is made. + Therefore, it is recommended that applications do not try to make this + determination for their functionality purposes, and instead they + should attempt to start the server.</p><div class="sect4" title="X Windowing System"><div class="titlepage"><div><div><h5 class="title"><a name="message-bus-types-login-x-windows"></a>X Windowing System</h5></div></div></div><p> + For the X Windowing System, the application must locate the + window owner of the selection represented by the atom formed by + concatenating: + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>the literal string "_DBUS_SESSION_BUS_SELECTION_"</p></li><li class="listitem"><p>the current user's username</p></li><li class="listitem"><p>the literal character '_' (underscore)</p></li><li class="listitem"><p>the machine's ID</p></li></ul></div><p> + </p><p> + The following properties are defined for the window that owns + this X selection: + </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td> + <p>Atom</p> + </td><td> + <p>meaning</p> + </td></tr><tr><td> + <p>_DBUS_SESSION_BUS_ADDRESS</p> + </td><td> + <p>the actual address of the server socket</p> + </td></tr><tr><td> + <p>_DBUS_SESSION_BUS_PID</p> + </td><td> + <p>the PID of the server process</p> + </td></tr></tbody></table></div><p> + </p><p> + At least the _DBUS_SESSION_BUS_ADDRESS property MUST be + present in this window. + </p><p> + If the X selection cannot be located or if reading the + properties from the window fails, the implementation MUST conclude + that there is no D-Bus server running and proceed to start a new + server. (See below on concurrency issues) + </p><p> + Failure to connect to the D-Bus server address thus obtained + MUST be treated as a fatal connection error and should be reported + to the application. + </p><p> + As an alternative, an implementation MAY find the information + in the following file located in the current user's home directory, + in subdirectory .dbus/session-bus/: + </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>the machine's ID</p></li><li class="listitem"><p>the literal character '-' (dash)</p></li><li class="listitem"><p>the X display without the screen number, with the + following prefixes removed, if present: ":", "localhost:" + ."localhost.localdomain:". That is, a display of + "localhost:10.0" produces just the number "10"</p></li></ul></div><p> + </p><p> + The contents of this file NAME=value assignment pairs and + lines starting with # are comments (no comments are allowed + otherwise). The following variable names are defined: + </p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td> + <p>Variable</p> + </td><td> + <p>meaning</p> + </td></tr><tr><td> + <p>DBUS_SESSION_BUS_ADDRESS</p> + </td><td> + <p>the actual address of the server socket</p> + </td></tr><tr><td> + <p>DBUS_SESSION_BUS_PID</p> + </td><td> + <p>the PID of the server process</p> + </td></tr><tr><td> + <p>DBUS_SESSION_BUS_WINDOWID</p> + </td><td> + <p>the window ID</p> + </td></tr></tbody></table></div><p> + </p><p> + At least the DBUS_SESSION_BUS_ADDRESS variable MUST be present + in this file. + </p><p> + Failure to open this file MUST be interpreted as absence of a + running server. Therefore, the implementation MUST proceed to + attempting to launch a new bus server if the file cannot be + opened. + </p><p> + However, success in opening this file MUST NOT lead to the + conclusion that the server is running. Thus, a failure to connect to + the bus address obtained by the alternative method MUST NOT be + considered a fatal error. If the connection cannot be established, + the implementation MUST proceed to check the X selection settings or + to start the server on its own. + </p><p> + If the implementation concludes that the D-Bus server is not + running it MUST attempt to start a new server and it MUST also + ensure that the daemon started as an effect of the "autolaunch" + mechanism provides the lookup mechanisms described above, so + subsequent calls can locate the newly started server. The + implementation MUST also ensure that if two or more concurrent + initiations happen, only one server remains running and all other + initiations are able to obtain the address of this server and + connect to it. In other words, the implementation MUST ensure that + the X selection is not present when it attempts to set it, without + allowing another process to set the selection between the + verification and the setting (e.g., by using XGrabServer / + XungrabServer). + </p></div><div class="sect4"><div class="titlepage"><div><div><h5 class="title"><a name="id366057"></a></h5></div></div></div><p> + [FIXME specify location of .service files, probably using + DESKTOP_DIRS etc. from basedir specification, though login session + bus is not really desktop-specific] + </p></div></div><div class="sect3" title="System message bus"><div class="titlepage"><div><div><h4 class="title"><a name="message-bus-types-system"></a>System message bus</h4></div></div></div><p> A computer may have a <em class="firstterm">system message bus</em>, accessible to all applications on the system. This message bus may be used to broadcast system events, such as adding new hardware devices, @@ -1830,7 +2188,7 @@ variable. If that variable is not set, applications should try to connect to the well-known address <code class="literal">unix:path=/var/run/dbus/system_bus_socket</code>. - <sup>[<a name="id323183" href="#ftn.id323183" class="footnote">2</a>]</sup> + <sup>[<a name="id366098" href="#ftn.id366098" class="footnote">2</a>]</sup> </p><p> [FIXME specify location of system bus .service files] </p></div></div><div class="sect2" title="Message Bus Messages"><div class="titlepage"><div><div><h3 class="title"><a name="message-bus-messages"></a>Message Bus Messages</h3></div></div></div><p> @@ -1939,6 +2297,8 @@ Normally, session bus activated services inherit the environment of the bus daemon. This method adds to or modifies that environment when activating services. </p><p> Some bus instances, such as the standard system bus, may disable access to this method for some or all callers. + </p><p> + Note, both the environment variable names and values must be valid UTF-8. There's no way to update the activation environment with data that is invalid UTF-8. </p></div><div class="sect3" title="org.freedesktop.DBus.GetNameOwner"><div class="titlepage"><div><div><h4 class="title"><a name="bus-messages-get-name-owner"></a><code class="literal">org.freedesktop.DBus.GetNameOwner</code></h4></div></div></div><p> As a method: </p><pre class="programlisting"> @@ -1954,15 +2314,31 @@ </p></div><div class="sect3" title="org.freedesktop.DBus.GetConnectionUnixUser"><div class="titlepage"><div><div><h4 class="title"><a name="bus-messages-get-connection-unix-user"></a><code class="literal">org.freedesktop.DBus.GetConnectionUnixUser</code></h4></div></div></div><p> As a method: </p><pre class="programlisting"> - UINT32 GetConnectionUnixUser (in STRING connection_name) + UINT32 GetConnectionUnixUser (in STRING bus_name) </pre><p> Message arguments: - </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>STRING</td><td>Name of the connection to query</td></tr></tbody></table></div><p> + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>STRING</td><td>Unique or well-known bus name of the connection to + query, such as <code class="literal">:12.34</code> or + <code class="literal">com.example.tea</code></td></tr></tbody></table></div><p> Reply arguments: - </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>UINT32</td><td>unix user id</td></tr></tbody></table></div><p> - Returns the unix uid of the process connected to the server. If unable to - determine it, a <code class="literal">org.freedesktop.DBus.Error.Failed</code> - error is returned. + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>UINT32</td><td>Unix user ID</td></tr></tbody></table></div><p> + Returns the Unix user ID of the process connected to the server. If + unable to determine it (for instance, because the process is not on the + same machine as the bus daemon), an error is returned. + </p></div><div class="sect3" title="org.freedesktop.DBus.GetConnectionUnixProcessID"><div class="titlepage"><div><div><h4 class="title"><a name="bus-messages-get-connection-unix-process-id"></a><code class="literal">org.freedesktop.DBus.GetConnectionUnixProcessID</code></h4></div></div></div><p> + As a method: + </p><pre class="programlisting"> + UINT32 GetConnectionUnixProcessID (in STRING bus_name) + </pre><p> + Message arguments: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>STRING</td><td>Unique or well-known bus name of the connection to + query, such as <code class="literal">:12.34</code> or + <code class="literal">com.example.tea</code></td></tr></tbody></table></div><p> + Reply arguments: + </p><div class="informaltable"><table border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Argument</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>UINT32</td><td>Unix process id</td></tr></tbody></table></div><p> + Returns the Unix process ID of the process connected to the server. If + unable to determine it (for instance, because the process is not on the + same machine as the bus daemon), an error is returned. </p></div><div class="sect3" title="org.freedesktop.DBus.AddMatch"><div class="titlepage"><div><div><h4 class="title"><a name="bus-messages-add-match"></a><code class="literal">org.freedesktop.DBus.AddMatch</code></h4></div></div></div><p> As a method: </p><pre class="programlisting"> @@ -1997,7 +2373,7 @@ There is also a per-machine ID, described in <a class="xref" href="#standard-interfaces-peer" title="org.freedesktop.DBus.Peer">the section called “<code class="literal">org.freedesktop.DBus.Peer</code>”</a> and returned by org.freedesktop.DBus.Peer.GetMachineId(). For a desktop session bus, the bus ID can be used as a way to uniquely identify a user's session. - </p></div></div></div><div class="glossary" title="Glossary"><div class="titlepage"><div><div><h2 class="title"><a name="id324439"></a>Glossary</h2></div></div></div><p> + </p></div></div></div><div class="glossary" title="Glossary"><div class="titlepage"><div><div><h2 class="title"><a name="id367478"></a>Glossary</h2></div></div></div><p> This glossary defines some of the terms used in this specification. </p><dl><dt><a name="term-bus-name"></a>Bus Name</dt><dd><p> The message bus maintains an association between names and @@ -2071,10 +2447,10 @@ message bus. This name will never change owner, and will be unique (never reused during the lifetime of the message bus). It will begin with a ':' character. - </p></dd></dl></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.id321252" href="#id321252" class="para">1</a>] </sup>Lockfiles are used instead of real file + </p></dd></dl></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"><p><sup>[<a name="ftn.id362953" href="#id362953" class="para">1</a>] </sup>Lockfiles are used instead of real file locking <code class="literal">fcntl()</code> because real locking implementations are still flaky on network - filesystems.</p></div><div class="footnote"><p><sup>[<a name="ftn.id323183" href="#id323183" class="para">2</a>] </sup> + filesystems.</p></div><div class="footnote"><p><sup>[<a name="ftn.id366098" href="#id366098" class="para">2</a>] </sup> The D-Bus reference implementation actually honors the <code class="literal">$(localstatedir)</code> configure option for this address, on both client and server side. diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index b5866e53..ee5aac58 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -1,14 +1,13 @@ -<?xml version="1.0" standalone="no"?> +<?xml version="1.0" standalone="no" ?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ ]> - <article id="index"> <articleinfo> <title>D-Bus Specification</title> - <releaseinfo>Version 0.12</releaseinfo> - <date>7 November 2006</date> + <releaseinfo>Version 0.15</releaseinfo> + <date>3 November 2010</date> <authorgroup> <author> <firstname>Havoc</firstname> @@ -41,6 +40,62 @@ </affiliation> </author> </authorgroup> + <revhistory> + <revision> + <revnumber>current</revnumber> + <date><ulink url='http://cgit.freedesktop.org/dbus/dbus/log/doc/dbus-specification.xml'>commit log</ulink></date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.15</revnumber> + <date>3 November 2010</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.14</revnumber> + <date>12 May 2010</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.13</revnumber> + <date>23 Dezember 2009</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.12</revnumber> + <date>7 November, 2006</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.11</revnumber> + <date>6 February 2005</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.10</revnumber> + <date>28 January 2005</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.9</revnumber> + <date>7 Januar 2005</date> + <authorinitials></authorinitials> + <revremark></revremark> + </revision> + <revision> + <revnumber>0.8</revnumber> + <date>06 September 2003</date> + <authorinitials></authorinitials> + <revremark>First released document.</revremark> + </revision> + </revhistory> </articleinfo> <sect1 id="introduction"> @@ -415,6 +470,10 @@ <entry><literal>DICT_ENTRY</literal></entry> <entry>101 (ASCII 'e'), 123 (ASCII '{'), 125 (ASCII '}') </entry> <entry>Entry in a dict or map (array of key-value pairs)</entry> + </row><row> + <entry><literal>UNIX_FD</literal></entry> + <entry>104 (ASCII 'h')</entry> + <entry>Unix file descriptor</entry> </row> </tbody> </tgroup> @@ -561,12 +620,14 @@ </row><row> <entry><literal>VARIANT</literal></entry> <entry> - A variant type has a marshaled <literal>SIGNATURE</literal> - followed by a marshaled value with the type - given in the signature. - Unlike a message signature, the variant signature - can contain only a single complete type. - So "i", "ai" or "(ii)" is OK, but "ii" is not. + A variant type has a marshaled + <literal>SIGNATURE</literal> followed by a marshaled + value with the type given in the signature. Unlike + a message signature, the variant signature can + contain only a single complete type. So "i", "ai" + or "(ii)" is OK, but "ii" is not. Use of variants may not + cause a total message depth to be larger than 64, including + other container types such as structures. </entry> <entry> 1 (alignment of the signature) @@ -579,6 +640,15 @@ <entry> 8 </entry> + </row><row> + <entry><literal>UNIX_FD</literal></entry> + <entry>32-bit unsigned integer in the message's byte + order. The actual file descriptors need to be + transferred out-of-band via some platform specific + mechanism. On the wire, values of this type store the index to the + file descriptor in the array of file descriptors that + accompany the message.</entry> + <entry>4</entry> </row> </tbody> </tgroup> @@ -999,6 +1069,22 @@ If omitted, it is assumed to be the empty signature "" (i.e. the body must be 0-length).</entry> </row> + <row> + <entry><literal>UNIX_FDS</literal></entry> + <entry>9</entry> + <entry><literal>UINT32</literal></entry> + <entry>optional</entry> + <entry>The number of Unix file descriptors that + accompany the message. If omitted, it is assumed + that no Unix file descriptors accompany the + message. The actual file descriptors need to be + transferred via platform specific mechanism + out-of-band. They must be sent at the same time as + part of the message itself. They may not be sent + before the first byte of the message itself is + transferred or after the last byte of the message + itself.</entry> + </row> </tbody> </tgroup> </informaltable> @@ -1410,6 +1496,7 @@ <listitem><para>BEGIN</para></listitem> <listitem><para>DATA <data in hex encoding></para></listitem> <listitem><para>ERROR [human-readable error explanation]</para></listitem> + <listitem><para>NEGOTIATE_UNIX_FD</para></listitem> </itemizedlist> From server to client are as follows: @@ -1419,6 +1506,7 @@ <listitem><para>OK <GUID in hex></para></listitem> <listitem><para>DATA <data in hex encoding></para></listitem> <listitem><para>ERROR</para></listitem> + <listitem><para>AGREE_UNIX_FD</para></listitem> </itemizedlist> </para> <para> @@ -1480,15 +1568,16 @@ an OK command must be sent to the client. </para> <para> - The first octet received by the client after the \r\n of the OK - command must be the first octet of the authenticated/encrypted - stream of D-Bus messages. - </para> - <para> The first octet received by the server after the \r\n of the BEGIN command from the client must be the first octet of the authenticated/encrypted stream of D-Bus messages. </para> + <para> + If BEGIN is received by the server, the first octet received + by the client after the \r\n of the OK command must be the + first octet of the authenticated/encrypted stream of D-Bus + messages. + </para> </sect2> <sect2 id="auth-command-cancel"> <title>CANCEL Command</title> @@ -1542,20 +1631,24 @@ <sect2 id="auth-command-ok"> <title>OK Command</title> <para> - The OK command indicates that the client has been authenticated, - and that further communication will be a stream of D-Bus messages - (optionally encrypted, as negotiated) rather than this protocol. + The OK command indicates that the client has been + authenticated. The client may now proceed with negotiating + Unix file descriptor passing. To do that it shall send + NEGOTIATE_UNIX_FD to the server. </para> <para> - The first octet received by the client after the \r\n of the OK - command must be the first octet of the authenticated/encrypted - stream of D-Bus messages. + Otherwise, the client must respond to the OK command by + sending a BEGIN command, followed by its stream of messages, + or by disconnecting. The server must not accept additional + commands using this protocol after the BEGIN command has been + received. Further communication will be a stream of D-Bus + messages (optionally encrypted, as negotiated) rather than + this protocol. </para> <para> - The client must respond to the OK command by sending a BEGIN - command, followed by its stream of messages, or by disconnecting. - The server must not accept additional commands using this protocol - after the OK command has been sent. + If a client sends BEGIN the first octet received by the client + after the \r\n of the OK command must be the first octet of + the authenticated/encrypted stream of D-Bus messages. </para> <para> The OK command has one argument, which is the GUID of the server. @@ -1589,6 +1682,56 @@ negotiate extensions or changes to the D-Bus protocol in the future. </para> </sect2> + <sect2 id="auth-command-negotiate-unix-fd"> + <title>NEGOTIATE_UNIX_FD Command</title> + <para> + The NEGOTIATE_UNIX_FD command indicates that the client + supports Unix file descriptor passing. This command may only + be sent after the connection is authenticated, i.e. after OK + was received by the client. This command may only be sent on + transports that support Unix file descriptor passing. + </para> + <para> + On receiving NEGOTIATE_UNIX_FD the server must respond with + either AGREE_UNIX_FD or ERROR. It shall respond the former if + the transport chosen supports Unix file descriptor passing and + the server supports this feature. It shall respond the latter + if the transport does not support Unix file descriptor + passing, the server does not support this feature, or the + server decides not to enable file descriptor passing due to + security or other reasons. + </para> + </sect2> + <sect2 id="auth-command-agree-unix-fd"> + <title>AGREE_UNIX_FD Command</title> + <para> + The AGREE_UNIX_FD command indicates that the server supports + Unix file descriptor passing. This command may only be sent + after the connection is authenticated, and the client sent + NEGOTIATE_UNIX_FD to enable Unix file descriptor passing. This + command may only be sent on transports that support Unix file + descriptor passing. + </para> + <para> + On receiving AGREE_UNIX_FD the client must respond with BEGIN, + followed by its stream of messages, or by disconnecting. The + server must not accept additional commands using this protocol + after the BEGIN command has been received. Further + communication will be a stream of D-Bus messages (optionally + encrypted, as negotiated) rather than this protocol. + </para> + </sect2> + <sect2 id="auth-command-future"> + <title>Future Extensions</title> + <para> + Future extensions to the authentication and negotiation + protocol are possible. For that new commands may be + introduced. If a client or server receives an unknown command + it shall respond with ERROR and not consider this fatal. New + commands may be introduced both before, and after + authentication, i.e. both before and after the OK command. + </para> + </sect2> <sect2 id="auth-examples"> <title>Authentication examples</title> @@ -1669,6 +1812,30 @@ C: BEGIN </programlisting> </figure> + <figure> + <title>Example of successful magic cookie authentication with successful negotiation of Unix FD passing</title> + <programlisting> + (MAGIC_COOKIE is a made up mechanism) + + C: AUTH MAGIC_COOKIE 3138363935333137393635383634 + S: OK 1234deadbeef + C: NEGOTIATE_UNIX_FD + S: AGREE_UNIX_FD + C: BEGIN + </programlisting> + </figure> + <figure> + <title>Example of successful magic cookie authentication with unsuccessful negotiation of Unix FD passing</title> + <programlisting> + (MAGIC_COOKIE is a made up mechanism) + + C: AUTH MAGIC_COOKIE 3138363935333137393635383634 + S: OK 1234deadbeef + C: NEGOTIATE_UNIX_FD + S: ERROR + C: BEGIN + </programlisting> + </figure> </para> </sect2> <sect2 id="auth-states"> @@ -2299,8 +2466,8 @@ [FIXME we need to specify in detail each transport and its possible arguments] Current transports include: unix domain sockets (including - abstract namespace on linux), TCP/IP, and a debug/testing transport using - in-process pipes. Future possible transports include one that + abstract namespace on linux), launchd, TCP/IP, and a debug/testing transport + using in-process pipes. Future possible transports include one that tunnels over X11 protocol. </para> @@ -2320,10 +2487,311 @@ length path name. Names which were shorter than the fixed length would be padded by Nul bytes. </para> + <para> + Unix domain sockets are not available on windows. + </para> + <sect3 id="transports-unix-domain-sockets-addresses"> + <title>Server Address Format</title> + <para> + Unix domain socket addresses are identified by the "unix:" prefix + and support the following key/value pairs: + </para> + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Values</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>path</entry> + <entry>(path)</entry> + <entry>path of the unix domain socket. If set, the "tmpdir" and "abstract" key must not be set.</entry> + </row> + <row> + <entry>tmpdir</entry> + <entry>(path)</entry> + <entry>temporary directory in which a socket file with a random file name starting with 'dbus-' will be created by the server. This key can only be used in server addresses, not in client addresses. If set, the "path" and "abstract" key must not be set.</entry> + </row> + <row> + <entry>abstract</entry> + <entry>(string)</entry> + <entry>unique string (path) in the abstract namespace. If set, the "path" or "tempdir" key must not be set.</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> </sect2> - </sect1> + <sect2 id="transports-launchd"> + <title>launchd</title> + <para> + launchd is a open-source server management system that replaces init, inetd + and cron on Apple Mac OS X versions 10.4 and above. It provides a common session + bus address for each user and deprecates the X11-enabled D-Bus launcher on OSX. + </para> + + <para> + launchd allocates a socket and provides it with the unix path through the + DBUS_LAUNCHD_SESSION_BUS_SOCKET variable in launchd's environment. Every process + spawned by launchd (or dbus-daemon, if it was started by launchd) can access + it through its environment. + Other processes can query for the launchd socket by executing: + $ launchctl getenv DBUS_LAUNCHD_SESSION_BUS_SOCKET + This is normally done by the D-Bus client library so doesn't have to be done + manually. + </para> + <para> + launchd is not available on Microsoft Windows. + </para> + <sect3 id="transports-launchd-addresses"> + <title>Server Address Format</title> + <para> + launchd addresses are identified by the "launchd:" prefix + and support the following key/value pairs: + </para> + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Values</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>env</entry> + <entry>(environment variable)</entry> + <entry>path of the unix domain socket for the launchd created dbus-daemon.</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> + </sect2> + <sect2 id="transports-tcp-sockets"> + <title>TCP Sockets</title> + <para> + The tcp transport provides TCP/IP based connections between clients + located on the same or different hosts. + </para> + <para> + Using tcp transport without any additional secure authentification mechanismus + over a network is unsecure. + </para> + <para> + Windows notes: Because of the tcp stack on windows does not provide sending + credentials over a tcp connection, the EXTERNAL authentification + mechanismus does not work. + </para> + <sect3 id="transports-tcp-sockets-addresses"> + <title>Server Address Format</title> + <para> + TCP/IP socket addresses are identified by the "tcp:" prefix + and support the following key/value pairs: + </para> + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Values</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>host</entry> + <entry>(string)</entry> + <entry>dns name or ip address</entry> + </row> + <row> + <entry>port</entry> + <entry>(number)</entry> + <entry>The tcp port the server will open. A zero value let the server + choose a free port provided from the underlaying operating system. + libdbus is able to retrieve the real used port from the server. + </entry> + </row> + <row> + <entry>family</entry> + <entry>(string)</entry> + <entry>If set, provide the type of socket family either "ipv4" or "ipv6". If unset, the family is unspecified.</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> + </sect2> + <sect2 id="transports-nonce-tcp-sockets"> + <title>Nonce-secured TCP Sockets</title> + <para> + The nonce-tcp transport provides a secured TCP transport, using a + simple authentication mechanism to ensure that only clients with read + access to a certain location in the filesystem can connect to the server. + The server writes a secret, the nonce, to a file and an incoming client + connection is only accepted if the client sends the nonce right after + the connect. The nonce mechanism requires no setup and is orthogonal to + the higher-level authentication mechanisms described in the + Authentication section. + </para> + + <para> + On start, the server generates a random 16 byte nonce and writes it + to a file in the user's temporary directory. The nonce file location + is published as part of the server's D-Bus address using the + "noncefile" key-value pair. + + After an accept, the server reads 16 bytes from the socket. If the + read bytes do not match the nonce stored in the nonce file, the + server MUST immediately drop the connection. + If the nonce match the received byte sequence, the client is accepted + and the transport behaves like an unsecured tcp transport. + </para> + <para> + After a successful connect to the server socket, the client MUST read + the nonce from the file published by the server via the noncefile= + key-value pair and send it over the socket. After that, the + transport behaves like an unsecured tcp transport. + </para> + <sect3 id="transports-nonce-tcp-sockets-addresses"> + <title>Server Address Format</title> + <para> + Nonce TCP/IP socket addresses uses the "nonce-tcp:" prefix + and support the following key/value pairs: + </para> + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Values</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>host</entry> + <entry>(string)</entry> + <entry>dns name or ip address</entry> + </row> + <row> + <entry>port</entry> + <entry>(number)</entry> + <entry>The tcp port the server will open. A zero value let the server + choose a free port provided from the underlaying operating system. + libdbus is able to retrieve the real used port from the server. + </entry> + </row> + <row> + <entry>family</entry> + <entry>(string)</entry> + <entry>If set, provide the type of socket family either "ipv4" or "ipv6". If unset, the family is unspecified.</entry> + </row> + <row> + <entry>noncefile</entry> + <entry>(path)</entry> + <entry>file location containing the secret</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> + </sect2> + </sect1> + <sect1 id="meta-transports"> + <title>Meta Transports</title> + <para> + Meta transports are a kind of transport with special enhancements or + behavior. Currently available meta transports include: autolaunch + </para> + + <sect2 id="meta-transports-autolaunch"> + <title>Autolaunch</title> + <para>The autolaunch transport provides a way for dbus clients to autodetect + a running dbus session bus and to autolaunch a session bus if not present. + </para> + <sect3 id="meta-transports-autolaunch-addresses"> + <title>Server Address Format</title> + <para> + Autolaunch addresses uses the "autolaunch:" prefix and support the + following key/value pairs: + </para> + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Name</entry> + <entry>Values</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>scope</entry> + <entry>(string)</entry> + <entry>scope of autolaunch (Windows only) + <itemizedlist> + <listitem> + <para> + "*install-path" - limit session bus to dbus installation path. + The dbus installation path is determined from the location of + the shared dbus library. If the library is located in a 'bin' + subdirectory the installation root is the directory above, + otherwise the directory where the library lives is taken as + installation root. + <programlisting> + <install-root>/bin/[lib]dbus-1.dll + <install-root>/[lib]dbus-1.dll + </programlisting> + </para> + </listitem> + <listitem> + <para> + "*user" - limit session bus to the recent user. + </para> + </listitem> + <listitem> + <para> + other values - specify dedicated session bus like "release", + "debug" or other + </para> + </listitem> + </itemizedlist> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect3> - <sect1 id="naming-conventions"> + <sect3 id="meta-transports-autolaunch-windows-implementation"> + <title>Windows implementation</title> + <para> + On start, the server opens a platform specific transport, creates a mutex + and a shared memory section containing the related session bus address. + This mutex will be inspected by the dbus client library to detect a + running dbus session bus. The access to the mutex and the shared memory + section are protected by global locks. + </para> + <para> + In the recent implementation the autolaunch transport uses a tcp transport + on localhost with a port choosen from the operating system. This detail may + change in the future. + </para> + <para> + Disclaimer: The recent implementation is in an early state and may not + work in all cirumstances and/or may have security issues. Because of this + the implementation is not documentated yet. + </para> + </sect3> + </sect2> + </sect1> + <sect1 id="naming-conventions"> <title>Naming Conventions</title> <para> @@ -2479,6 +2947,39 @@ deterministic rule, or returning an error, are the reasonable possibilities). </para> + <para> + If one or more properties change on an object, the + <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal> + signal may be emitted (this signal was added in 0.14): + </para> + <para> + <programlisting> + org.freedesktop.DBus.Properties.PropertiesChanged (STRING interface_name, + DICT<STRING,VARIANT> changed_properties, + ARRAY<STRING> invalidated_properties); + </programlisting> + </para> + <para> + where <literal>changed_properties</literal> is a dictionary + containing the changed properties with the new values and + <literal>invalidated_properties</literal> is an array of + properties that changed but the value is not conveyed. + </para> + <para> + Whether the <literal>PropertiesChanged</literal> signal is + supported can be determined by calling + <literal>org.freedesktop.DBus.Introspectable.Introspect</literal>. Note + that the signal may be supported for an object but it may + differ how whether and how it is used on a per-property basis + (for e.g. performance or security reasons). Each property (or + the parent interface) must be annotated with the + <literal>org.freedesktop.DBus.Property.EmitsChangedSignal</literal> + annotation to convey this (usually the default value + <literal>true</literal> is sufficient meaning that the + annotation does not need to be used). See <xref + linkend="introspection-format"/> for details on this + annotation. + </para> </sect2> </sect1> @@ -2609,6 +3110,35 @@ <entry>true,false</entry> <entry>If set, don't expect a reply to the method call; defaults to false.</entry> </row> + <row> + <entry>org.freedesktop.DBus.Property.EmitsChangedSignal</entry> + <entry>true,invalidates,false</entry> + <entry> + <para> + If set to <literal>false</literal>, the + <literal>org.freedesktop.DBus.Properties.PropertiesChanged</literal> + signal, see <xref + linkend="standard-interfaces-properties"/> is not + guaranteed to be emitted if the property changes. + </para> + <para> + If set to <literal>invalidates</literal> the signal + is emitted but the value is not included in the + signal. + </para> + <para> + If set to <literal>true</literal> the signal is + emitted with the value included. + </para> + <para> + The value for the annotation defaults to + <literal>true</literal> if the enclosing interface + element does not specify the annotation. Otherwise it + defaults to the value specified in the enclosing + interface element. + </para> + </entry> + </row> </tbody> </tgroup> </informaltable> @@ -2657,6 +3187,10 @@ linkend="message-protocol-header-fields"/>). If the <literal>DESTINATION</literal> field is present, it specifies a message recipient by name. Method calls and replies normally specify this field. + The message bus must send messages (of any type) with the + <literal>DESTINATION</literal> field set to the specified recipient, + regardless of whether the recipient has set up a match rule matching + the message. </para> <para> @@ -3054,7 +3588,63 @@ </tgroup> </informaltable> </para> - </sect3> + </sect3> + + <sect3 id="bus-messages-list-queued-owners"> + <title><literal>org.freedesktop.DBus.ListQueuedOwners</literal></title> + <para> + As a method: + <programlisting> + ARRAY of STRING ListQueuedOwners (in STRING name) + </programlisting> + Message arguments: + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Argument</entry> + <entry>Type</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>0</entry> + <entry>STRING</entry> + <entry>The well-known bus name to query, such as + <literal>com.example.cappuccino</literal></entry> + </row> + </tbody> + </tgroup> + </informaltable> + Reply arguments: + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Argument</entry> + <entry>Type</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>0</entry> + <entry>ARRAY of STRING</entry> + <entry>The unique bus names of connections currently queued + for the name</entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + <para> + This method call should be sent to + <literal>org.freedesktop.DBus</literal> and lists the connections + currently queued for a bus name (see + <xref linkend="term-queued-owner"/>). + </para> + </sect3> </sect2> <sect2 id="message-bus-routing"> @@ -3076,7 +3666,7 @@ </para> <para> Match rules are added using the AddMatch bus method - (see xref linkend="bus-messages-add-match"/>). Rules are + (see <xref linkend="bus-messages-add-match"/>). Rules are specified as a string of comma separated key/value pairs. Excluding a key from the rule indicates a wildcard match. For instance excluding the the member from a match rule but @@ -3197,7 +3787,7 @@ extension. The message bus will only load service description files ending with .service; all other files will be ignored. The file format is similar to that of <ulink - url="http://www.freedesktop.org/standards/desktop-entry-spec/desktop-entry-spec.html">desktop + url="http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html">desktop entries</ulink>. All service description files must be in UTF-8 encoding. To ensure that there will be no name collisions, service files must be namespaced using the same mechanism as messages and service @@ -3296,11 +3886,221 @@ The environment variable should have precedence over the root window property. </para> - <para> - [FIXME specify location of .service files, probably using - DESKTOP_DIRS etc. from basedir specification, though login session - bus is not really desktop-specific] - </para> + <para>The address of the login session message bus is given in the + <literal>DBUS_SESSION_BUS_ADDRESS</literal> environment variable. If + DBUS_SESSION_BUS_ADDRESS is not set, or if it's set to the string + "autolaunch:", the system should use platform-specific methods of + locating a running D-Bus session server, or starting one if a running + instance cannot be found. Note that this mechanism is not recommended + for attempting to determine if a daemon is running. It is inherently + racy to attempt to make this determination, since the bus daemon may + be started just before or just after the determination is made. + Therefore, it is recommended that applications do not try to make this + determination for their functionality purposes, and instead they + should attempt to start the server.</para> + + <sect4 id="message-bus-types-login-x-windows"> + <title>X Windowing System</title> + <para> + For the X Windowing System, the application must locate the + window owner of the selection represented by the atom formed by + concatenating: + <itemizedlist> + <listitem> + <para>the literal string "_DBUS_SESSION_BUS_SELECTION_"</para> + </listitem> + + <listitem> + <para>the current user's username</para> + </listitem> + + <listitem> + <para>the literal character '_' (underscore)</para> + </listitem> + + <listitem> + <para>the machine's ID</para> + </listitem> + </itemizedlist> + </para> + + <para> + The following properties are defined for the window that owns + this X selection: + <informaltable frame="all"> + <tgroup cols="2"> + <tbody> + <row> + <entry> + <para>Atom</para> + </entry> + + <entry> + <para>meaning</para> + </entry> + </row> + + <row> + <entry> + <para>_DBUS_SESSION_BUS_ADDRESS</para> + </entry> + + <entry> + <para>the actual address of the server socket</para> + </entry> + </row> + + <row> + <entry> + <para>_DBUS_SESSION_BUS_PID</para> + </entry> + + <entry> + <para>the PID of the server process</para> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + + <para> + At least the _DBUS_SESSION_BUS_ADDRESS property MUST be + present in this window. + </para> + + <para> + If the X selection cannot be located or if reading the + properties from the window fails, the implementation MUST conclude + that there is no D-Bus server running and proceed to start a new + server. (See below on concurrency issues) + </para> + + <para> + Failure to connect to the D-Bus server address thus obtained + MUST be treated as a fatal connection error and should be reported + to the application. + </para> + + <para> + As an alternative, an implementation MAY find the information + in the following file located in the current user's home directory, + in subdirectory .dbus/session-bus/: + <itemizedlist> + <listitem> + <para>the machine's ID</para> + </listitem> + + <listitem> + <para>the literal character '-' (dash)</para> + </listitem> + + <listitem> + <para>the X display without the screen number, with the + following prefixes removed, if present: ":", "localhost:" + ."localhost.localdomain:". That is, a display of + "localhost:10.0" produces just the number "10"</para> + </listitem> + </itemizedlist> + </para> + + <para> + The contents of this file NAME=value assignment pairs and + lines starting with # are comments (no comments are allowed + otherwise). The following variable names are defined: + <informaltable + frame="all"> + <tgroup cols="2"> + <tbody> + <row> + <entry> + <para>Variable</para> + </entry> + + <entry> + <para>meaning</para> + </entry> + </row> + + <row> + <entry> + <para>DBUS_SESSION_BUS_ADDRESS</para> + </entry> + + <entry> + <para>the actual address of the server socket</para> + </entry> + </row> + + <row> + <entry> + <para>DBUS_SESSION_BUS_PID</para> + </entry> + + <entry> + <para>the PID of the server process</para> + </entry> + </row> + + <row> + <entry> + <para>DBUS_SESSION_BUS_WINDOWID</para> + </entry> + + <entry> + <para>the window ID</para> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + + <para> + At least the DBUS_SESSION_BUS_ADDRESS variable MUST be present + in this file. + </para> + + <para> + Failure to open this file MUST be interpreted as absence of a + running server. Therefore, the implementation MUST proceed to + attempting to launch a new bus server if the file cannot be + opened. + </para> + + <para> + However, success in opening this file MUST NOT lead to the + conclusion that the server is running. Thus, a failure to connect to + the bus address obtained by the alternative method MUST NOT be + considered a fatal error. If the connection cannot be established, + the implementation MUST proceed to check the X selection settings or + to start the server on its own. + </para> + + <para> + If the implementation concludes that the D-Bus server is not + running it MUST attempt to start a new server and it MUST also + ensure that the daemon started as an effect of the "autolaunch" + mechanism provides the lookup mechanisms described above, so + subsequent calls can locate the newly started server. The + implementation MUST also ensure that if two or more concurrent + initiations happen, only one server remains running and all other + initiations are able to obtain the address of this server and + connect to it. In other words, the implementation MUST ensure that + the X selection is not present when it attempts to set it, without + allowing another process to set the selection between the + verification and the setting (e.g., by using XGrabServer / + XungrabServer). + </para> + </sect4> + <sect4> + <title></title> + <para> + [FIXME specify location of .service files, probably using + DESKTOP_DIRS etc. from basedir specification, though login session + bus is not really desktop-specific] + </para> + </sect4> </sect3> <sect3 id="message-bus-types-system"> <title>System message bus</title> @@ -3714,6 +4514,9 @@ <para> Some bus instances, such as the standard system bus, may disable access to this method for some or all callers. </para> + <para> + Note, both the environment variable names and values must be valid UTF-8. There's no way to update the activation environment with data that is invalid UTF-8. + </para> </sect3> @@ -3773,7 +4576,7 @@ <para> As a method: <programlisting> - UINT32 GetConnectionUnixUser (in STRING connection_name) + UINT32 GetConnectionUnixUser (in STRING bus_name) </programlisting> Message arguments: <informaltable> @@ -3789,7 +4592,9 @@ <row> <entry>0</entry> <entry>STRING</entry> - <entry>Name of the connection to query</entry> + <entry>Unique or well-known bus name of the connection to + query, such as <literal>:12.34</literal> or + <literal>com.example.tea</literal></entry> </row> </tbody> </tgroup> @@ -3808,14 +4613,67 @@ <row> <entry>0</entry> <entry>UINT32</entry> - <entry>unix user id</entry> + <entry>Unix user ID</entry> </row> </tbody> </tgroup> </informaltable> - Returns the unix uid of the process connected to the server. If unable to - determine it, a <literal>org.freedesktop.DBus.Error.Failed</literal> - error is returned. + Returns the Unix user ID of the process connected to the server. If + unable to determine it (for instance, because the process is not on the + same machine as the bus daemon), an error is returned. + </para> + </sect3> + + <sect3 id="bus-messages-get-connection-unix-process-id"> + <title><literal>org.freedesktop.DBus.GetConnectionUnixProcessID</literal></title> + <para> + As a method: + <programlisting> + UINT32 GetConnectionUnixProcessID (in STRING bus_name) + </programlisting> + Message arguments: + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Argument</entry> + <entry>Type</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>0</entry> + <entry>STRING</entry> + <entry>Unique or well-known bus name of the connection to + query, such as <literal>:12.34</literal> or + <literal>com.example.tea</literal></entry> + </row> + </tbody> + </tgroup> + </informaltable> + Reply arguments: + <informaltable> + <tgroup cols="3"> + <thead> + <row> + <entry>Argument</entry> + <entry>Type</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>0</entry> + <entry>UINT32</entry> + <entry>Unix process id</entry> + </row> + </tbody> + </tgroup> + </informaltable> + Returns the Unix process ID of the process connected to the server. If + unable to determine it (for instance, because the process is not on the + same machine as the bus daemon), an error is returned. </para> </sect3> @@ -4083,4 +4941,3 @@ </glossary> </article> - diff --git a/doc/dbus-test-plan.html b/doc/dbus-test-plan.html index e9e70a11..88b17592 100644 --- a/doc/dbus-test-plan.html +++ b/doc/dbus-test-plan.html @@ -38,7 +38,7 @@ Message Builder. The message builder can take a serialized message in string-form and convert it into a raw character string which can then be loaded by the message loader. - </p><div class="figure"><a name="id528362"></a><p class="title"><b>Figure 1. Example of a message in string form</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id368459"></a><p class="title"><b>Figure 1. Example of a message in string form</b></p><div class="figure-contents"><pre class="programlisting"> # Standard org.freedesktop.DBus.Hello message VALID_HEADER @@ -75,7 +75,7 @@ can read authentication sequences from a file and play them back to a dummy server and client to make sure that authentication is working according to the specification. - </p><div class="figure"><a name="id524894"></a><p class="title"><b>Figure 2. Example of an authentication script</b></p><div class="figure-contents"><pre class="programlisting"> + </p><div class="figure"><a name="id365459"></a><p class="title"><b>Figure 2. Example of an authentication script</b></p><div class="figure-contents"><pre class="programlisting"> ## this tests a successful auth of type EXTERNAL SERVER diff --git a/tools/dbus-uuidgen.1 b/doc/dbus-uuidgen.1 index 480fd18f..480fd18f 100644 --- a/tools/dbus-uuidgen.1 +++ b/doc/dbus-uuidgen.1 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,68 +39,38 @@ scriptversion=2009-04-28.21; # UTC # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' +doit="${DOITPROG-}" -posix_mkdir= +# put in absolute paths if you don't have them in your path; or use env. vars. -# Desired mode of installed file. -mode=0755 +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" -chgrpcmd= -chmodcmd=$chmodprog +chmodcmd="$chmodprog 0755" chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" +chgrpcmd= stripcmd= - +rmcmd="$rmprog -f" +mvcmd="$mvprog" src= dst= dir_arg= -dst_arg= - -copy_on_change=false +dstarg= no_target_directory= -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -110,86 +80,81 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test $# -ne 0; do +while test -n "$1"; do case $1 in - -c) ;; - - -C) copy_on_change=true;; + -c) shift + continue;; - -d) dir_arg=true;; + -d) dir_arg=true + shift + continue;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift + shift + continue;; --help) echo "$usage"; exit $?;; - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; -o) chowncmd="$chownprog $2" - shift;; + shift + shift + continue;; - -s) stripcmd=$stripprog;; + -s) stripcmd=$stripprog + shift + continue;; - -t) dst_arg=$2 - shift;; + -t) dstarg=$2 + shift + shift + continue;; - -T) no_target_directory=true;; + -T) no_target_directory=true + shift + continue;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; esac - shift done -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then +if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -199,47 +164,24 @@ if test $# -eq 0; then exit 0 fi -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - for src do # Protect names starting with `-'. case $src in - -*) src=./$src;; + -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else + src= + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -248,199 +190,71 @@ do exit 1 fi - if test -z "$dst_arg"; then + if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg + dst=$dstarg # Protect names starting with `-'. case $dst in - -*) dst=./$dst;; + -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 + echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? + dst=$dst/`basename "$src"` fi fi - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else + # Make sure that the destination directory exists. - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS - eval "$initialize_posix_glob" + pathcomp= - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit fi - fi + pathcomp=$pathcomp/ + done fi if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + else + dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -448,9 +262,10 @@ do # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # @@ -458,63 +273,51 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } done +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: @@ -65,7 +65,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b +# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 # automake: $automake_version # autoconf: $autoconf_version # @@ -73,7 +73,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=2.2.6b +VERSION="2.2.6b Debian-2.2.6b-2" TIMESTAMP="" package_revision=1.3017 @@ -5033,7 +5033,10 @@ func_mode_link () case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -5344,19 +5347,19 @@ func_mode_link () # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_duplicate_deps ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done continue fi # $pass = conv @@ -5893,6 +5896,7 @@ func_mode_link () if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do + path= case $deplib in -L*) path="$deplib" ;; *.la) @@ -6206,6 +6210,9 @@ func_mode_link () revision="$number_minor" lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; esac ;; no) diff --git a/m4/libtool.m4 b/m4/libtool.m4 new file mode 100644 index 00000000..a3fee536 --- /dev/null +++ b/m4/libtool.m4 @@ -0,0 +1,7377 @@ +# 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. +# Written by Gordon Matzigkeit, 1996 +# +# 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. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008 Free Software Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 56 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_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_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl +_LT_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +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 + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# 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"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# <var>='`$ECHO "X$<var>" | $Xsed -e "$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)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# 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 + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + 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_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +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 + +cat >>"$CONFIG_LT" <<\_LTEOF +AS_SHELL_SANITIZE +_AS_PREPARE + +exec AS_MESSAGE_FD>&1 +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to <bug-libtool@gnu.org>." + +lt_cl_version="\ +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. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# 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_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_XSI_SHELLFNS + + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +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)]) +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], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $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 + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + 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 + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES +# -------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _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)='' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=echo + _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}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX +# ----------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +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 +])# _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 + + +# _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. +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! + : +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 + +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_PROG_ECHO_BACKSLASH + + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _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]) + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi +_LT_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_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # 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 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + 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' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + 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' + # 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="/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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # 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 + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$lt_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +_LT_PATH_LD_GNU +AC_SUBST([LD]) + +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) +])# LT_PATH_LD + +# Old names: +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_LD], []) +dnl AC_DEFUN([AC_PROG_LD], []) + + +# _LT_PATH_LD_GNU +#- -------------- +m4_defun([_LT_PATH_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac]) +with_gnu_ld=$lt_cv_prog_gnu_ld +])# _LT_PATH_LD_GNU + + +# _LT_CMD_RELOAD +# -------------- +# find reload flag for linker +# -- PORTME Some linkers may need a different reload flag. +m4_defun([_LT_CMD_RELOAD], +[AC_CACHE_CHECK([for $LD option to reload object files], + lt_cv_ld_reload_flag, + [lt_cv_ld_reload_flag='-r']) +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + else + reload_cmds='$LD$reload_flag -o $output$reload_objs' + fi + ;; +esac +_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_DECL([], [reload_cmds], [2])dnl +])# _LT_CMD_RELOAD + + +# _LT_CHECK_MAGIC_METHOD +# ---------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_MAGIC_METHOD], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +AC_CACHE_CHECK([how to recognize dependent libraries], +lt_cv_deplibs_check_method, +[lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix[[4-9]]*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi[[45]]*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +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' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=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 +]) +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 + +_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"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +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"], :) + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_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 "$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 "$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) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_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' + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +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'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_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 + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +_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], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_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_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_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 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + 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 + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC*) + # IBM XL 8.0 on PPC + _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\ 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)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | 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). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + 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 + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | 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']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # 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 + _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\ 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' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _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]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +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' + 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 + 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' + 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) + _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)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _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 + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _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 +*** 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. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + 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 + _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' + + 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' + # 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag= + 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' + 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' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + 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) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + 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(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf*) + # 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' + 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' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _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' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_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' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _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' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + 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' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _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" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _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' + _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' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_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 + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _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 + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + 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 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # 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(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + 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' + 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 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + 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' + 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 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_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 -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _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' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + 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' + # 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" + 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' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _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(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' + 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' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + 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(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_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' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _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_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' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _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' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _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' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_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)]) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_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], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + 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], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_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([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_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_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## 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_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +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_DECL_EGREP])dnl + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_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 +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_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(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_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_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_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(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX + _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" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX + _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' + _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' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + 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 + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + gnu*) + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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' + ;; + *) + 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' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _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 -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_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' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_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' + 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' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *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`"' + _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`~ + $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' + _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' + ;; + *) # Version 6 will 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' + ;; + esac + + _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' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "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' + ;; + xl*) + # 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' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$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~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _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(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' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_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 + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + 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(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_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~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "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' + ;; + *) + 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}-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' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _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)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_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_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -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 -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + 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(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + 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(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +]) +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _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) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_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 +_LT_TAGVAR(inherit_rpath, $1)=no +_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(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_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_GCC=$GCC + CC=${F77-"f77"} + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +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) + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_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 +_LT_TAGVAR(inherit_rpath, $1)=no +_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(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_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_GCC=$GCC + CC=${FC-"f95"} + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_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_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ 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 + +## 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" +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_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_GCC=$GCC +GCC= +CC=${RC-"windres"} +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC="$lt_save_CC" +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_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 +} + +# 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"` +} + +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. + +# 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 +]) diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 new file mode 100644 index 00000000..34151a3b --- /dev/null +++ b/m4/ltoptions.m4 @@ -0,0 +1,368 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008 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 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [0], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# 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], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 new file mode 100644 index 00000000..9000a057 --- /dev/null +++ b/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 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 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 new file mode 100644 index 00000000..f3c53098 --- /dev/null +++ b/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 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. + +# Generated from ltversion.in. + +# serial 3017 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.2.6b]) +m4_define([LT_PACKAGE_REVISION], [1.3017]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.2.6b' +macro_revision='1.3017' +_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 new file mode 100644 index 00000000..637bb206 --- /dev/null +++ b/m4/lt~obsolete.m4 @@ -0,0 +1,92 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007 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 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +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])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +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])]) @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2005-06-08.21 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -18,7 +18,9 @@ scriptversion=2009-04-28.21; # UTC # 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, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -31,8 +33,6 @@ if test $# -eq 0; then fi run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +44,7 @@ fi msg="missing on your system" -case $1 in +case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,7 +77,6 @@ Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -87,9 +86,6 @@ Supported PROGRAM values: 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 -\`g' are ignored when checking the name. - Send bug reports to <bug-automake@gnu.org>." exit $? ;; @@ -107,22 +103,15 @@ Send bug reports to <bug-automake@gnu.org>." esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) +# the program). +case "$1" in + lex|yacc) # Not GNU programs, they don't have --version. ;; - tar*) + tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -146,7 +135,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $program in +case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -156,7 +145,7 @@ WARNING: \`$1' is $msg. You should only need it if touch aclocal.m4 ;; - autoconf*) + autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -165,7 +154,7 @@ WARNING: \`$1' is $msg. You should only need it if touch configure ;; - autoheader*) + autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -175,7 +164,7 @@ WARNING: \`$1' is $msg. You should only need it if test -z "$files" && files="config.h" touch_files= for f in $files; do - case $f in + case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -195,7 +184,7 @@ WARNING: \`$1' is $msg. You should only need it if while read f; do touch "$f"; done ;; - autom4te*) + autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -203,8 +192,8 @@ WARNING: \`$1' is needed, but is $msg. You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else @@ -218,78 +207,80 @@ WARNING: \`$1' is needed, but is $msg. fi ;; - bison*|yacc*) + bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if test $# -ne 1; then + if [ $# -ne 1 ]; then eval LASTARG="\${$#}" - case $LASTARG in + case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if test ! -f y.tab.h; then + if [ ! -f y.tab.h ]; then echo >y.tab.h fi - if test ! -f y.tab.c; then + if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; - lex*|flex*) + lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if test $# -ne 1; then + if [ $# -ne 1 ]; then eval LASTARG="\${$#}" - case $LASTARG in + case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if test ! -f lex.yy.c; then + if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; - help2man*) + help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit $? + exit 1 fi ;; - makeinfo*) + makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -298,17 +289,11 @@ WARNING: \`$1' is $msg. You should only need it if DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -318,7 +303,7 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar*) + tar) shift # We have already tried tar in the generic part. @@ -332,13 +317,13 @@ WARNING: \`$1' is $msg. You should only need it if fi firstarg="$1" if shift; then - case $firstarg in + case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case $firstarg in + case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 @@ -371,6 +356,5 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/test/Makefile.am b/test/Makefile.am index c759906a..5fb86357 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -61,17 +61,19 @@ test_sleep_forever_SOURCES = \ decode_gcov_SOURCES= \ decode-gcov.c -TEST_LIBS=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +# When any programs are not linked to libdbus-internal, fix this. +AM_CPPFLAGS=-DDBUS_STATIC_BUILD +TEST_LIBS=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) -test_service_LDADD=$(TEST_LIBS) libdbus-testutils.la +test_service_LDADD=libdbus-testutils.la $(TEST_LIBS) test_service_LDFLAGS=@R_DYNAMIC_LDFLAG@ -test_names_LDADD=$(TEST_LIBS) libdbus-testutils.la +test_names_LDADD=libdbus-testutils.la $(TEST_LIBS) test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@ ## break_loader_LDADD= $(TEST_LIBS) ## break_loader_LDFLAGS=@R_DYNAMIC_LDFLAG@ -test_shell_service_LDADD=$(TEST_LIBS) libdbus-testutils.la +test_shell_service_LDADD=libdbus-testutils.la $(TEST_LIBS) test_shell_service_LDFLAGS=@R_DYNAMIC_LDFLAG@ -shell_test_LDADD=$(TEST_LIBS) libdbus-testutils.la +shell_test_LDADD=libdbus-testutils.la $(TEST_LIBS) shell_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ spawn_test_LDADD=$(TEST_LIBS) spawn_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ @@ -105,7 +107,7 @@ TESTDIRS= \ data/equiv-config-files/entities/basic.d -FIND_TESTS=find . -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service" +FIND_TESTS=find . -type f -a \( -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service" \) dist-hook: for D in $(TESTDIRS); do \ @@ -120,7 +122,7 @@ dist-hook: ## copy tests to builddir so that generated tests and static tests ## are all in one place. all-local: - for D in $(TESTDIRS); do \ + $(AM_V_at)for D in $(TESTDIRS); do \ test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \ done ; \ if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \ diff --git a/test/Makefile.in b/test/Makefile.in index 10f5258d..21d5b61c 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -40,8 +40,10 @@ noinst_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -67,7 +69,7 @@ PROGRAMS = $(noinst_PROGRAMS) am_decode_gcov_OBJECTS = decode-gcov.$(OBJEXT) decode_gcov_OBJECTS = $(am_decode_gcov_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/dbus/libdbus-convenience.la \ +am__DEPENDENCIES_2 = $(top_builddir)/dbus/libdbus-internal.la \ $(am__DEPENDENCIES_1) decode_gcov_DEPENDENCIES = $(am__DEPENDENCIES_2) decode_gcov_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -75,7 +77,7 @@ decode_gcov_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(decode_gcov_LDFLAGS) $(LDFLAGS) -o $@ am_shell_test_OBJECTS = shell-test.$(OBJEXT) shell_test_OBJECTS = $(am_shell_test_OBJECTS) -shell_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libdbus-testutils.la +shell_test_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_2) shell_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(shell_test_LDFLAGS) $(LDFLAGS) -o $@ @@ -90,7 +92,7 @@ test_exit_OBJECTS = $(am_test_exit_OBJECTS) test_exit_LDADD = $(LDADD) am_test_names_OBJECTS = test-names.$(OBJEXT) test_names_OBJECTS = $(am_test_names_OBJECTS) -test_names_DEPENDENCIES = $(am__DEPENDENCIES_2) libdbus-testutils.la +test_names_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_2) test_names_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(test_names_LDFLAGS) $(LDFLAGS) -o $@ @@ -99,14 +101,14 @@ test_segfault_OBJECTS = $(am_test_segfault_OBJECTS) test_segfault_LDADD = $(LDADD) am_test_service_OBJECTS = test-service.$(OBJEXT) test_service_OBJECTS = $(am_test_service_OBJECTS) -test_service_DEPENDENCIES = $(am__DEPENDENCIES_2) libdbus-testutils.la +test_service_DEPENDENCIES = libdbus-testutils.la $(am__DEPENDENCIES_2) test_service_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(test_service_LDFLAGS) $(LDFLAGS) -o $@ am_test_shell_service_OBJECTS = test-shell-service.$(OBJEXT) test_shell_service_OBJECTS = $(am_test_shell_service_OBJECTS) -test_shell_service_DEPENDENCIES = $(am__DEPENDENCIES_2) \ - libdbus-testutils.la +test_shell_service_DEPENDENCIES = libdbus-testutils.la \ + $(am__DEPENDENCIES_2) test_shell_service_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(test_shell_service_LDFLAGS) \ @@ -196,10 +198,13 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -231,6 +236,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -244,6 +251,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -257,6 +265,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -266,6 +275,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -281,6 +292,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -293,6 +305,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -322,6 +335,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -377,6 +391,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -417,14 +432,17 @@ test_sleep_forever_SOURCES = \ decode_gcov_SOURCES = \ decode-gcov.c -TEST_LIBS = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) -test_service_LDADD = $(TEST_LIBS) libdbus-testutils.la + +# When any programs are not linked to libdbus-internal, fix this. +AM_CPPFLAGS = -DDBUS_STATIC_BUILD +TEST_LIBS = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) +test_service_LDADD = libdbus-testutils.la $(TEST_LIBS) test_service_LDFLAGS = @R_DYNAMIC_LDFLAG@ -test_names_LDADD = $(TEST_LIBS) libdbus-testutils.la +test_names_LDADD = libdbus-testutils.la $(TEST_LIBS) test_names_LDFLAGS = @R_DYNAMIC_LDFLAG@ -test_shell_service_LDADD = $(TEST_LIBS) libdbus-testutils.la +test_shell_service_LDADD = libdbus-testutils.la $(TEST_LIBS) test_shell_service_LDFLAGS = @R_DYNAMIC_LDFLAG@ -shell_test_LDADD = $(TEST_LIBS) libdbus-testutils.la +shell_test_LDADD = libdbus-testutils.la $(TEST_LIBS) shell_test_LDFLAGS = @R_DYNAMIC_LDFLAG@ spawn_test_LDADD = $(TEST_LIBS) spawn_test_LDFLAGS = @R_DYNAMIC_LDFLAG@ @@ -454,7 +472,7 @@ TESTDIRS = \ data/equiv-config-files/entities \ data/equiv-config-files/entities/basic.d -FIND_TESTS = find . -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service" +FIND_TESTS = find . -type f -a \( -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service" \) all: all-recursive .SUFFIXES: @@ -1005,7 +1023,7 @@ dist-hook: done all-local: - for D in $(TESTDIRS); do \ + $(AM_V_at)for D in $(TESTDIRS); do \ test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \ done ; \ if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \ diff --git a/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service b/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service index 43a89a7b..2d1c9784 100644 --- a/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service +++ b/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service @@ -1,4 +1,4 @@ [D-BUS Service] -Exec=/src/jhbuild/checkout/dbus/test/test-service +Exec=/home/wjt/src/dbus/test/test-service User=anyrandomuser diff --git a/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service b/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service index 0440c7aa..56d43abe 100644 --- a/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service +++ b/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteNoUser -Exec=/src/jhbuild/checkout/dbus/test/test-service +Exec=/home/wjt/src/dbus/test/test-service diff --git a/test/data/valid-config-files-system/debug-allow-all-fail.conf b/test/data/valid-config-files-system/debug-allow-all-fail.conf index 493a2886..d5f695ad 100644 --- a/test/data/valid-config-files-system/debug-allow-all-fail.conf +++ b/test/data/valid-config-files-system/debug-allow-all-fail.conf @@ -6,8 +6,8 @@ <listen>debug-pipe:name=test-server</listen> <listen>unix:tmpdir=/tmp</listen> <type>system</type> - <servicehelper>/src/jhbuild/checkout/dbus/bus/dbus-daemon-launch-helper-test</servicehelper> - <servicedir>/src/jhbuild/checkout/dbus/test/data/invalid-service-files-system</servicedir> + <servicehelper>/home/wjt/src/dbus/bus/dbus-daemon-launch-helper-test</servicehelper> + <servicedir>/home/wjt/src/dbus/test/data/invalid-service-files-system</servicedir> <policy context="default"> <allow send_interface="*"/> <allow receive_interface="*"/> diff --git a/test/data/valid-config-files-system/debug-allow-all-pass.conf b/test/data/valid-config-files-system/debug-allow-all-pass.conf index cc8058cc..dea3bacf 100644 --- a/test/data/valid-config-files-system/debug-allow-all-pass.conf +++ b/test/data/valid-config-files-system/debug-allow-all-pass.conf @@ -6,8 +6,8 @@ <listen>debug-pipe:name=test-server</listen> <listen>unix:tmpdir=/tmp</listen> <type>system</type> - <servicehelper>/src/jhbuild/checkout/dbus/bus/dbus-daemon-launch-helper-test</servicehelper> - <servicedir>/src/jhbuild/checkout/dbus/test/data/valid-service-files-system</servicedir> + <servicehelper>/home/wjt/src/dbus/bus/dbus-daemon-launch-helper-test</servicehelper> + <servicedir>/home/wjt/src/dbus/test/data/valid-service-files-system</servicedir> <policy context="default"> <allow send_interface="*"/> <allow receive_interface="*"/> diff --git a/test/data/valid-config-files/debug-allow-all-sha1.conf b/test/data/valid-config-files/debug-allow-all-sha1.conf index 0323cc8f..b69d7a6a 100644 --- a/test/data/valid-config-files/debug-allow-all-sha1.conf +++ b/test/data/valid-config-files/debug-allow-all-sha1.conf @@ -5,7 +5,7 @@ <busconfig> <listen>debug-pipe:name=test-server</listen> <listen>unix:tmpdir=/tmp</listen> - <servicedir>/src/jhbuild/checkout/dbus/test/data/valid-service-files</servicedir> + <servicedir>/home/wjt/src/dbus/test/data/valid-service-files</servicedir> <auth>DBUS_COOKIE_SHA1</auth> <policy context="default"> <allow send_interface="*"/> diff --git a/test/data/valid-config-files/debug-allow-all.conf b/test/data/valid-config-files/debug-allow-all.conf index d6a3b28b..897bbba8 100644 --- a/test/data/valid-config-files/debug-allow-all.conf +++ b/test/data/valid-config-files/debug-allow-all.conf @@ -5,7 +5,7 @@ <busconfig> <listen>debug-pipe:name=test-server</listen> <listen>unix:tmpdir=/tmp</listen> - <servicedir>/src/jhbuild/checkout/dbus/test/data/valid-service-files</servicedir> + <servicedir>/home/wjt/src/dbus/test/data/valid-service-files</servicedir> <policy context="default"> <allow send_interface="*"/> <allow receive_interface="*"/> diff --git a/test/data/valid-config-files/many-rules.conf b/test/data/valid-config-files/many-rules.conf index 0a15e83c..089908b4 100644 --- a/test/data/valid-config-files/many-rules.conf +++ b/test/data/valid-config-files/many-rules.conf @@ -17,7 +17,7 @@ <deny send_destination="org.freedesktop.System"/> <deny receive_sender="org.freedesktop.System"/> <deny user="root"/> - <deny group="root"/> + <deny group="bin"/> <allow send_type="error"/> <allow send_type="method_call"/> <allow send_type="method_return"/> @@ -35,7 +35,7 @@ <deny send_destination="org.freedesktop.System"/> <deny receive_sender="org.freedesktop.System"/> <deny user="root"/> - <deny group="root"/> + <deny group="bin"/> <allow send_type="error"/> <allow send_type="method_call"/> <allow send_type="method_return"/> diff --git a/test/data/valid-config-files/session.conf b/test/data/valid-config-files/session.conf index 9fd9f54c..dde5ef6b 100644 --- a/test/data/valid-config-files/session.conf +++ b/test/data/valid-config-files/session.conf @@ -45,8 +45,11 @@ <!-- the memory limits are 1G instead of say 4G because they can't exceed 32-bit signed int max --> <limit name="max_incoming_bytes">1000000000</limit> + <limit name="max_incoming_unix_fds">250000000</limit> <limit name="max_outgoing_bytes">1000000000</limit> + <limit name="max_outgoing_unix_fds">250000000</limit> <limit name="max_message_size">1000000000</limit> + <limit name="max_message_unix_fds">4096</limit> <limit name="service_start_timeout">120000</limit> <limit name="auth_timeout">240000</limit> <limit name="max_completed_connections">100000</limit> diff --git a/test/data/valid-config-files/system.conf b/test/data/valid-config-files/system.conf index 298c5458..828fd032 100644 --- a/test/data/valid-config-files/system.conf +++ b/test/data/valid-config-files/system.conf @@ -24,10 +24,10 @@ <standard_system_servicedirs/> <!-- This is a setuid helper that is used to launch system services --> - <servicehelper>/src/build/dbus/libexec/dbus-daemon-launch-helper</servicehelper> + <servicehelper>/usr/local/libexec/dbus-daemon-launch-helper</servicehelper> <!-- Write a pid file --> - <pidfile>/src/build/dbus/var/run/messagebus.pid</pidfile> + <pidfile>/usr/local/var/run/dbus/pid</pidfile> <!-- Enable logging to syslog --> <syslog/> @@ -39,7 +39,7 @@ means use abstract namespace, don't really create filesystem file; only Linux supports this. Use path=/whatever on other systems.) --> - <listen>unix:path=/src/build/dbus/var/run/dbus/system_bus_socket</listen> + <listen>unix:path=/usr/local/var/run/dbus/system_bus_socket</listen> <policy context="default"> <!-- All users can connect to system bus --> diff --git a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service index ebbd4cfa..7f7d7fab 100644 --- a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service +++ b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteEchoService -Exec=/src/jhbuild/checkout/dbus/test/test-service +Exec=/home/wjt/src/dbus/test/test-service User=anyrandomuser diff --git a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service index 06168bf0..64796a97 100644 --- a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service +++ b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteSegfaultService -Exec=/src/jhbuild/checkout/dbus/test/test-segfault +Exec=/home/wjt/src/dbus/test/test-segfault User=anyrandomuser diff --git a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service index 6c6f3e72..9d4281e0 100644 --- a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service +++ b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteShellEchoServiceFail -Exec=/src/jhbuild/checkout/dbus/test/test-shell-service "this should 'fail' because of an unterminated quote +Exec=/home/wjt/src/dbus/test/test-shell-service "this should 'fail' because of an unterminated quote User=anyrandomuser diff --git a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service index 6e0009b9..355b234a 100644 --- a/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service +++ b/test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess -Exec=/src/jhbuild/checkout/dbus/test/test-shell-service -test "that" 'we get' back --what "we put in" +Exec=/home/wjt/src/dbus/test/test-shell-service -test "that" 'we get' back --what "we put in" User=anyrandomuser diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service b/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service index 84e6026b..3a9175bf 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuite.PrivServer -Exec=/src/jhbuild/checkout/dbus/test/name-test/test-privserver +Exec=/home/wjt/src/dbus/test/name-test/test-privserver diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service index 5b4dd5f8..40c6121b 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteEchoService -Exec=/src/jhbuild/checkout/dbus/test/test-service +Exec=/home/wjt/src/dbus/test/test-service diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service index 64b20fb1..d8c5f012 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteForkingEchoService -Exec=/src/jhbuild/checkout/dbus/test/test-service org.freedesktop.DBus.TestSuiteForkingEchoService fork +Exec=/home/wjt/src/dbus/test/test-service org.freedesktop.DBus.TestSuiteForkingEchoService fork diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service index a8c72df4..8b6a6736 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteSegfaultService -Exec=/src/jhbuild/checkout/dbus/test/test-segfault +Exec=/home/wjt/src/dbus/test/test-segfault diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service index 91a8bef3..5e76527c 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteShellEchoServiceFail -Exec=/src/jhbuild/checkout/dbus/test/test-shell-service "this should 'fail' because of an unterminated quote +Exec=/home/wjt/src/dbus/test/test-shell-service "this should 'fail' because of an unterminated quote diff --git a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service index 7c26e0d1..1b503e8d 100644 --- a/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service +++ b/test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess -Exec=/src/jhbuild/checkout/dbus/test/test-shell-service -test "that" 'we get' back --what "we put in" +Exec=/home/wjt/src/dbus/test/test-shell-service -test "that" 'we get' back --what "we put in" diff --git a/test/decode-gcov.c b/test/decode-gcov.c index f26afd3e..3b2a1522 100644 --- a/test/decode-gcov.c +++ b/test/decode-gcov.c @@ -27,6 +27,7 @@ * */ +#include <config.h> #define DBUS_COMPILATION /* cheat */ #include <dbus/dbus-list.h> #include <dbus/dbus-string.h> diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index 9a508a12..1b5722b0 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -16,51 +16,65 @@ if DBUS_BUILD_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we ## build even when not doing "make check" -noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-threads-init test-ids test-shutdown test-privserver test-privserver-client +noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-threads-init test-ids test-shutdown test-privserver test-privserver-client test-autolaunch +test_names_SOURCES= \ + test-names.c + +test_names_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@ + +AM_CPPFLAGS = -DDBUS_STATIC_BUILD test_pending_call_dispatch_SOURCES = \ test-pending-call-dispatch.c -test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) test_pending_call_dispatch_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_pending_call_timeout_SOURCES = \ test-pending-call-timeout.c -test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) test_pending_call_timeout_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_threads_init_SOURCES = \ test-threads-init.c -test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) test_threads_init_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_ids_SOURCES = \ test-ids.c -test_ids_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_ids_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) test_ids_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_shutdown_SOURCES = \ test-shutdown.c test_shutdown_CFLAGS= -test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) test_shutdown_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_privserver_SOURCES = \ test-privserver.c test_privserver_CFLAGS= -test_privserver_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_privserver_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) test_privserver_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_privserver_client_SOURCES = \ test-privserver-client.c test_privserver_client_CFLAGS= -test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) test_privserver_client_LDFLAGS=@R_DYNAMIC_LDFLAG@ +test_autolaunch_SOURCES = \ + test-autolaunch.c + +test_autolaunch_CFLAGS= +test_autolaunch_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_autolaunch_LDFLAGS=@R_DYNAMIC_LDFLAG@ + endif diff --git a/test/name-test/Makefile.in b/test/name-test/Makefile.in index 077ab22e..280de4fe 100644 --- a/test/name-test/Makefile.in +++ b/test/name-test/Makefile.in @@ -42,12 +42,15 @@ host_triplet = @host@ @DBUS_BUILD_TESTS_TRUE@ test-ids$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ test-shutdown$(EXEEXT) \ @DBUS_BUILD_TESTS_TRUE@ test-privserver$(EXEEXT) \ -@DBUS_BUILD_TESTS_TRUE@ test-privserver-client$(EXEEXT) +@DBUS_BUILD_TESTS_TRUE@ test-privserver-client$(EXEEXT) \ +@DBUS_BUILD_TESTS_TRUE@ test-autolaunch$(EXEEXT) subdir = test/name-test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -55,15 +58,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) -am__test_ids_SOURCES_DIST = test-ids.c -@DBUS_BUILD_TESTS_TRUE@am_test_ids_OBJECTS = test-ids.$(OBJEXT) -test_ids_OBJECTS = $(am_test_ids_OBJECTS) +am__test_autolaunch_SOURCES_DIST = test-autolaunch.c +@DBUS_BUILD_TESTS_TRUE@am_test_autolaunch_OBJECTS = test_autolaunch-test-autolaunch.$(OBJEXT) +test_autolaunch_OBJECTS = $(am_test_autolaunch_OBJECTS) am__DEPENDENCIES_1 = -@DBUS_BUILD_TESTS_TRUE@test_ids_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_autolaunch_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ +@DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent +test_autolaunch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_autolaunch_CFLAGS) $(CFLAGS) $(test_autolaunch_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__test_ids_SOURCES_DIST = test-ids.c +@DBUS_BUILD_TESTS_TRUE@am_test_ids_OBJECTS = test-ids.$(OBJEXT) +test_ids_OBJECTS = $(am_test_ids_OBJECTS) +@DBUS_BUILD_TESTS_TRUE@test_ids_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ +@DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_ids_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(test_ids_LDFLAGS) $(LDFLAGS) -o $@ @@ -73,7 +86,7 @@ am__test_pending_call_dispatch_SOURCES_DIST = \ @DBUS_BUILD_TESTS_TRUE@ test-pending-call-dispatch.$(OBJEXT) test_pending_call_dispatch_OBJECTS = \ $(am_test_pending_call_dispatch_OBJECTS) -@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_pending_call_dispatch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ @@ -85,7 +98,7 @@ am__test_pending_call_timeout_SOURCES_DIST = \ @DBUS_BUILD_TESTS_TRUE@ test-pending-call-timeout.$(OBJEXT) test_pending_call_timeout_OBJECTS = \ $(am_test_pending_call_timeout_OBJECTS) -@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_pending_call_timeout_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ @@ -94,7 +107,7 @@ test_pending_call_timeout_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ am__test_privserver_SOURCES_DIST = test-privserver.c @DBUS_BUILD_TESTS_TRUE@am_test_privserver_OBJECTS = test_privserver-test-privserver.$(OBJEXT) test_privserver_OBJECTS = $(am_test_privserver_OBJECTS) -@DBUS_BUILD_TESTS_TRUE@test_privserver_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_privserver_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ @DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_privserver_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -104,7 +117,7 @@ test_privserver_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ am__test_privserver_client_SOURCES_DIST = test-privserver-client.c @DBUS_BUILD_TESTS_TRUE@am_test_privserver_client_OBJECTS = test_privserver_client-test-privserver-client.$(OBJEXT) test_privserver_client_OBJECTS = $(am_test_privserver_client_OBJECTS) -@DBUS_BUILD_TESTS_TRUE@test_privserver_client_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_privserver_client_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ @DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_privserver_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -115,7 +128,7 @@ am__test_shutdown_SOURCES_DIST = test-shutdown.c @DBUS_BUILD_TESTS_TRUE@am_test_shutdown_OBJECTS = \ @DBUS_BUILD_TESTS_TRUE@ test_shutdown-test-shutdown.$(OBJEXT) test_shutdown_OBJECTS = $(am_test_shutdown_OBJECTS) -@DBUS_BUILD_TESTS_TRUE@test_shutdown_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_shutdown_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ @DBUS_BUILD_TESTS_TRUE@ ../libdbus-testutils.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_shutdown_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -125,7 +138,7 @@ am__test_threads_init_SOURCES_DIST = test-threads-init.c @DBUS_BUILD_TESTS_TRUE@am_test_threads_init_OBJECTS = \ @DBUS_BUILD_TESTS_TRUE@ test-threads-init.$(OBJEXT) test_threads_init_OBJECTS = $(am_test_threads_init_OBJECTS) -@DBUS_BUILD_TESTS_TRUE@test_threads_init_DEPENDENCIES = $(top_builddir)/dbus/libdbus-convenience.la \ +@DBUS_BUILD_TESTS_TRUE@test_threads_init_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la \ @DBUS_BUILD_TESTS_TRUE@ $(am__DEPENDENCIES_1) test_threads_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ @@ -157,11 +170,13 @@ 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_0 = @echo " GEN " $@; -SOURCES = $(test_ids_SOURCES) $(test_pending_call_dispatch_SOURCES) \ +SOURCES = $(test_autolaunch_SOURCES) $(test_ids_SOURCES) \ + $(test_pending_call_dispatch_SOURCES) \ $(test_pending_call_timeout_SOURCES) \ $(test_privserver_SOURCES) $(test_privserver_client_SOURCES) \ $(test_shutdown_SOURCES) $(test_threads_init_SOURCES) -DIST_SOURCES = $(am__test_ids_SOURCES_DIST) \ +DIST_SOURCES = $(am__test_autolaunch_SOURCES_DIST) \ + $(am__test_ids_SOURCES_DIST) \ $(am__test_pending_call_dispatch_SOURCES_DIST) \ $(am__test_pending_call_timeout_SOURCES_DIST) \ $(am__test_privserver_SOURCES_DIST) \ @@ -177,10 +192,13 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -212,6 +230,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -225,6 +245,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -238,6 +259,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -247,6 +269,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -262,6 +286,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -274,6 +299,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -303,6 +329,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -358,6 +385,7 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ @@ -365,44 +393,56 @@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_TEST_CFLAGS) -DDBUS_COMPILATION @DBUS_BUILD_TESTS_TRUE@TESTS_ENVIRONMENT = DBUS_TOP_BUILDDIR=@abs_top_builddir@ DBUS_TOP_SRCDIR=@abs_top_srcdir@ EXTRA_DIST = run-test.sh run-test-systemserver.sh test-wait-for-echo.py test-activation-forking.py +@DBUS_BUILD_TESTS_TRUE@test_names_SOURCES = \ +@DBUS_BUILD_TESTS_TRUE@ test-names.c + +@DBUS_BUILD_TESTS_TRUE@test_names_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_names_LDFLAGS = @R_DYNAMIC_LDFLAG@ +@DBUS_BUILD_TESTS_TRUE@AM_CPPFLAGS = -DDBUS_STATIC_BUILD @DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-pending-call-dispatch.c -@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_pending_call_dispatch_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-pending-call-timeout.c -@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_pending_call_timeout_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@test_threads_init_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-threads-init.c -@DBUS_BUILD_TESTS_TRUE@test_threads_init_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_threads_init_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_threads_init_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@test_ids_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-ids.c -@DBUS_BUILD_TESTS_TRUE@test_ids_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_ids_LDADD = $(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_ids_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@test_shutdown_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-shutdown.c @DBUS_BUILD_TESTS_TRUE@test_shutdown_CFLAGS = -@DBUS_BUILD_TESTS_TRUE@test_shutdown_LDADD = $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_shutdown_LDADD = $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_shutdown_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@test_privserver_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-privserver.c @DBUS_BUILD_TESTS_TRUE@test_privserver_CFLAGS = -@DBUS_BUILD_TESTS_TRUE@test_privserver_LDADD = $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_privserver_LDADD = $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_privserver_LDFLAGS = @R_DYNAMIC_LDFLAG@ @DBUS_BUILD_TESTS_TRUE@test_privserver_client_SOURCES = \ @DBUS_BUILD_TESTS_TRUE@ test-privserver-client.c @DBUS_BUILD_TESTS_TRUE@test_privserver_client_CFLAGS = -@DBUS_BUILD_TESTS_TRUE@test_privserver_client_LDADD = $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_privserver_client_LDADD = $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) @DBUS_BUILD_TESTS_TRUE@test_privserver_client_LDFLAGS = @R_DYNAMIC_LDFLAG@ +@DBUS_BUILD_TESTS_TRUE@test_autolaunch_SOURCES = \ +@DBUS_BUILD_TESTS_TRUE@ test-autolaunch.c + +@DBUS_BUILD_TESTS_TRUE@test_autolaunch_CFLAGS = +@DBUS_BUILD_TESTS_TRUE@test_autolaunch_LDADD = $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +@DBUS_BUILD_TESTS_TRUE@test_autolaunch_LDFLAGS = @R_DYNAMIC_LDFLAG@ all: all-am .SUFFIXES: @@ -446,6 +486,9 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list +test-autolaunch$(EXEEXT): $(test_autolaunch_OBJECTS) $(test_autolaunch_DEPENDENCIES) + @rm -f test-autolaunch$(EXEEXT) + $(AM_V_CCLD)$(test_autolaunch_LINK) $(test_autolaunch_OBJECTS) $(test_autolaunch_LDADD) $(LIBS) test-ids$(EXEEXT): $(test_ids_OBJECTS) $(test_ids_DEPENDENCIES) @rm -f test-ids$(EXEEXT) $(AM_V_CCLD)$(test_ids_LINK) $(test_ids_OBJECTS) $(test_ids_LDADD) $(LIBS) @@ -478,6 +521,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pending-call-dispatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pending-call-timeout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-threads-init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_autolaunch-test-autolaunch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_privserver-test-privserver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_privserver_client-test-privserver-client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shutdown-test-shutdown.Po@am__quote@ @@ -506,6 +550,22 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +test_autolaunch-test-autolaunch.o: test-autolaunch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_autolaunch_CFLAGS) $(CFLAGS) -MT test_autolaunch-test-autolaunch.o -MD -MP -MF $(DEPDIR)/test_autolaunch-test-autolaunch.Tpo -c -o test_autolaunch-test-autolaunch.o `test -f 'test-autolaunch.c' || echo '$(srcdir)/'`test-autolaunch.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_autolaunch-test-autolaunch.Tpo $(DEPDIR)/test_autolaunch-test-autolaunch.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-autolaunch.c' object='test_autolaunch-test-autolaunch.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_autolaunch_CFLAGS) $(CFLAGS) -c -o test_autolaunch-test-autolaunch.o `test -f 'test-autolaunch.c' || echo '$(srcdir)/'`test-autolaunch.c + +test_autolaunch-test-autolaunch.obj: test-autolaunch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_autolaunch_CFLAGS) $(CFLAGS) -MT test_autolaunch-test-autolaunch.obj -MD -MP -MF $(DEPDIR)/test_autolaunch-test-autolaunch.Tpo -c -o test_autolaunch-test-autolaunch.obj `if test -f 'test-autolaunch.c'; then $(CYGPATH_W) 'test-autolaunch.c'; else $(CYGPATH_W) '$(srcdir)/test-autolaunch.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_autolaunch-test-autolaunch.Tpo $(DEPDIR)/test_autolaunch-test-autolaunch.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test-autolaunch.c' object='test_autolaunch-test-autolaunch.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_autolaunch_CFLAGS) $(CFLAGS) -c -o test_autolaunch-test-autolaunch.obj `if test -f 'test-autolaunch.c'; then $(CYGPATH_W) 'test-autolaunch.c'; else $(CYGPATH_W) '$(srcdir)/test-autolaunch.c'; fi` + test_privserver-test-privserver.o: test-privserver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_privserver_CFLAGS) $(CFLAGS) -MT test_privserver-test-privserver.o -MD -MP -MF $(DEPDIR)/test_privserver-test-privserver.Tpo -c -o test_privserver-test-privserver.o `test -f 'test-privserver.c' || echo '$(srcdir)/'`test-privserver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_privserver-test-privserver.Tpo $(DEPDIR)/test_privserver-test-privserver.Po diff --git a/test/name-test/run-test-systemserver.sh b/test/name-test/run-test-systemserver.sh index 34dd6487..d3b8d557 100755 --- a/test/name-test/run-test-systemserver.sh +++ b/test/name-test/run-test-systemserver.sh @@ -41,7 +41,7 @@ if ! grep -q 'DBus.Error' echo-error-output.tmp; then fi echo "running test echo signal" -if ! python ./test-wait-for-echo.py; then +if ! python $DBUS_TOP_SRCDIR/test/name-test/test-wait-for-echo.py; then echo "Failed test-wait-for-echo" exit 1 fi diff --git a/test/name-test/run-test.sh b/test/name-test/run-test.sh index 832ce0a5..a70055bb 100755 --- a/test/name-test/run-test.sh +++ b/test/name-test/run-test.sh @@ -53,3 +53,6 @@ if ! python $DBUS_TOP_SRCDIR/test/name-test/test-activation-forking.py; then echo "Failed test-activation-forking" exit 1 fi + +echo "running test-autolaunch" +${DBUS_TOP_BUILDDIR}/libtool --mode=execute $DEBUG $DBUS_TOP_BUILDDIR/test/name-test/test-autolaunch || die "test-autolaunch failed" diff --git a/test/name-test/run-with-tmp-session-bus.conf b/test/name-test/run-with-tmp-session-bus.conf index 41f6856c..f794c557 100644 --- a/test/name-test/run-with-tmp-session-bus.conf +++ b/test/name-test/run-with-tmp-session-bus.conf @@ -8,11 +8,15 @@ <!-- Our well-known bus type, don't change this --> <type>session</type> + <!-- If we fork, keep the user's original umask to avoid affecting + the behavior of child processes. --> + <keep_umask/> + <syslog/> <listen>unix:tmpdir=/tmp</listen> - <servicedir>/src/jhbuild/checkout/dbus/test/data/valid-service-files</servicedir> + <servicedir>/home/wjt/src/dbus/test/data/valid-service-files</servicedir> <!-- intended to match system bus --> <policy context="default"> diff --git a/test/name-test/test-autolaunch.c b/test/name-test/test-autolaunch.c new file mode 100644 index 00000000..d3f42e35 --- /dev/null +++ b/test/name-test/test-autolaunch.c @@ -0,0 +1,31 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <dbus/dbus.h> +#include "dbus/dbus-sysdeps.h" + +int +main (int argc, char *argv[]) +{ + DBusConnection *conn = NULL; + DBusError error; + + _dbus_setenv ("DBUS_SESSION_BUS_ADDRESS", NULL); + + dbus_error_init (&error); + + conn = dbus_bus_get (DBUS_BUS_SESSION, &error); + if (dbus_error_is_set (&error)) + { + fprintf (stderr, "*** Failed to autolaunch session bus: %s\n", + error.message); + dbus_error_free (&error); + return 1; + } + + return 0; +} diff --git a/test/name-test/test-ids.c b/test/name-test/test-ids.c index f08d4ac9..8f63d044 100644 --- a/test/name-test/test-ids.c +++ b/test/name-test/test-ids.c @@ -1,3 +1,4 @@ +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/test/name-test/test-pending-call-dispatch.c b/test/name-test/test-pending-call-dispatch.c index 54726498..57582d49 100644 --- a/test/name-test/test-pending-call-dispatch.c +++ b/test/name-test/test-pending-call-dispatch.c @@ -7,6 +7,7 @@ * and blocking. **/ +#include <config.h> #include <dbus/dbus.h> #include <dbus/dbus-sysdeps.h> #include <stdio.h> diff --git a/test/name-test/test-pending-call-timeout.c b/test/name-test/test-pending-call-timeout.c index 53a0c3a7..381113bd 100644 --- a/test/name-test/test-pending-call-timeout.c +++ b/test/name-test/test-pending-call-timeout.c @@ -3,6 +3,7 @@ * specific and infinite timeout. **/ +#include <config.h> #include <dbus/dbus.h> #include <dbus/dbus-sysdeps.h> #include <stdio.h> diff --git a/test/name-test/test-privserver-client.c b/test/name-test/test-privserver-client.c index 5af470ae..d02eea89 100644 --- a/test/name-test/test-privserver-client.c +++ b/test/name-test/test-privserver-client.c @@ -1,3 +1,4 @@ +#include <config.h> #include "../test-utils.h" static void diff --git a/test/name-test/test-privserver.c b/test/name-test/test-privserver.c index c814001c..39a98b7f 100644 --- a/test/name-test/test-privserver.c +++ b/test/name-test/test-privserver.c @@ -1,3 +1,4 @@ +#include <config.h> #include "../test-utils.h" static void @@ -88,7 +89,11 @@ main (int argc, char *argv[]) if (!dbus_connection_add_filter (session, filter_session_message, testdata, NULL)) die ("couldn't add filter"); +#ifdef DBUS_CMAKE + server = dbus_server_listen (TEST_LISTEN, &error); +#else server = dbus_server_listen ("unix:tmpdir=/tmp", &error); +#endif if (!server) die (error.message); testdata->private_addr = dbus_server_get_address (server); diff --git a/test/name-test/test-shutdown.c b/test/name-test/test-shutdown.c index e76c1ea2..526c1cbc 100644 --- a/test/name-test/test-shutdown.c +++ b/test/name-test/test-shutdown.c @@ -1,4 +1,5 @@ +#include <config.h> #include "../test-utils.h" static DBusLoop *loop; diff --git a/test/name-test/test-threads-init.c b/test/name-test/test-threads-init.c index 8cda413c..5e22852a 100644 --- a/test/name-test/test-threads-init.c +++ b/test/name-test/test-threads-init.c @@ -2,6 +2,7 @@ * Test to make sure late thread initialization works */ +#include <config.h> #include <dbus/dbus.h> #include <dbus/dbus-sysdeps.h> #include <stdio.h> diff --git a/test/name-test/tmp-session-like-system.conf b/test/name-test/tmp-session-like-system.conf index 0818109a..29ab115f 100644 --- a/test/name-test/tmp-session-like-system.conf +++ b/test/name-test/tmp-session-like-system.conf @@ -8,6 +8,10 @@ <!-- Our well-known bus type, don't change this --> <type>session</type> + <!-- If we fork, keep the user's original umask to avoid affecting + the behavior of child processes. --> + <keep_umask/> + <syslog/> <listen>unix:tmpdir=/tmp</listen> diff --git a/test/shell-test.c b/test/shell-test.c index c0134677..b479a9c6 100644 --- a/test/shell-test.c +++ b/test/shell-test.c @@ -1,3 +1,4 @@ +#include <config.h> #include <stdio.h> #include <stdlib.h> #define DBUS_COMPILATION diff --git a/test/spawn-test.c b/test/spawn-test.c index 991a5e83..f1a55051 100644 --- a/test/spawn-test.c +++ b/test/spawn-test.c @@ -1,3 +1,4 @@ +#include <config.h> #include <dbus/dbus.h> #define DBUS_COMPILATION /* cheat and use dbus-sysdeps */ @@ -36,6 +37,8 @@ main (int argc, char **argv) fprintf (stderr, "Could not launch application: \"%s\"\n", error.message); } - + + dbus_free(argv_copy); + return 0; } diff --git a/test/test-exit.c b/test/test-exit.c index abb95865..f3358185 100644 --- a/test/test-exit.c +++ b/test/test-exit.c @@ -1,5 +1,4 @@ /* This is a process that just exits with a failure code */ - int main (int argc, char **argv) { diff --git a/test/test-names.c b/test/test-names.c index e618e99b..27366350 100644 --- a/test/test-names.c +++ b/test/test-names.c @@ -1,4 +1,4 @@ - +#include <config.h> #include "test-utils.h" static DBusLoop *loop; diff --git a/test/test-segfault.c b/test/test-segfault.c index bf4d964b..329a21fd 100644 --- a/test/test-segfault.c +++ b/test/test-segfault.c @@ -1,7 +1,9 @@ /* This is simply a process that segfaults */ #include <config.h> #include <stdlib.h> +#ifdef HAVE_SIGNAL_H #include <signal.h> +#endif #ifdef HAVE_SETRLIMIT #include <sys/resource.h> diff --git a/test/test-service.c b/test/test-service.c index 9a129aac..6627ea75 100644 --- a/test/test-service.c +++ b/test/test-service.c @@ -1,6 +1,9 @@ +#include <config.h> #include "test-utils.h" +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif static DBusLoop *loop; static dbus_bool_t already_quit = FALSE; @@ -234,7 +237,7 @@ handle_delay_echo (DBusConnection *connection, _dbus_verbose ("sleeping for a short time\n"); - usleep (50000); + _dbus_sleep_milliseconds (50); _dbus_verbose ("sending reply to DelayEcho method\n"); @@ -407,7 +410,11 @@ main (int argc, else { name = argv[1]; +#ifndef DBUS_WIN do_fork = strcmp (argv[2], "fork") == 0; +#else + do_fork = FALSE; +#endif } /* The bare minimum for simulating a program "daemonizing"; the intent @@ -415,13 +422,15 @@ main (int argc, * activated services. * https://bugzilla.redhat.com/show_bug.cgi?id=545267 */ - if (do_fork) +#ifndef DBUS_WIN + if (do_fork) { pid_t pid = fork (); if (pid != 0) exit (0); sleep (1); } +#endif dbus_error_init (&error); connection = dbus_bus_get (DBUS_BUS_STARTER, &error); diff --git a/test/test-shell-service.c b/test/test-shell-service.c index 21801c7b..57c16123 100644 --- a/test/test-shell-service.c +++ b/test/test-shell-service.c @@ -1,3 +1,4 @@ +#include <config.h> #include "test-utils.h" diff --git a/test/test-sleep-forever.c b/test/test-sleep-forever.c index ff0d8e26..d54769ab 100644 --- a/test/test-sleep-forever.c +++ b/test/test-sleep-forever.c @@ -6,11 +6,17 @@ #include <unistd.h> #endif +#ifdef DBUS_WIN +# include <windows.h> +# define sleep Sleep +#endif + + int main (int argc, char **argv) { while (1) sleep (10000000); - + return 1; } diff --git a/test/test-utils.c b/test/test-utils.c index d875cc95..eda20cd5 100644 --- a/test/test-utils.c +++ b/test/test-utils.c @@ -1,3 +1,4 @@ +#include <config.h> #include "test-utils.h" typedef struct diff --git a/test/test-utils.h b/test/test-utils.h index 90d87767..3e1e55e6 100644 --- a/test/test-utils.h +++ b/test/test-utils.h @@ -1,6 +1,5 @@ #ifndef TEST_UTILS_H #define TEST_UTILS_H -#include <config.h> #ifndef DBUS_COMPILATION #define DBUS_COMPILATION /* Cheat and use private stuff */ #endif diff --git a/tools/Makefile.am b/tools/Makefile.am index 9fad7a78..ce88c85f 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,8 +1,13 @@ configdir=$(sysconfdir)/dbus-1 -INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" +INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" -bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets dbus-uuidgen +extra_bin_programs= +if DBUS_UNIX +extra_bin_programs += dbus-cleanup-sockets dbus-uuidgen +endif + +bin_PROGRAMS=dbus-launch dbus-send dbus-monitor $(extra_bin_programs) dbus_send_SOURCES= \ dbus-print-message.c \ @@ -14,10 +19,16 @@ dbus_monitor_SOURCES= \ dbus-print-message.c \ dbus-print-message.h +if DBUS_WIN +dbus_launch_SOURCES= \ + dbus-launch-win.c \ + dbus-launch.h +else dbus_launch_SOURCES= \ dbus-launch.c \ dbus-launch-x11.c \ dbus-launch.h +endif dbus_cleanup_sockets_SOURCES= \ dbus-cleanup-sockets.c @@ -37,8 +48,7 @@ dbus_uuidgen_LDFLAGS=@R_DYNAMIC_LDFLAG@ dbus_launch_LDADD= $(DBUS_X_LIBS) $(DBUS_CLIENT_LIBS) dbus_launch_LDFLAGS=@R_DYNAMIC_LDFLAG@ -man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1 dbus-uuidgen.1 -EXTRA_DIST = $(man_MANS) run-with-tmp-session-bus.sh +EXTRA_DIST = run-with-tmp-session-bus.sh strtoll.c strtoull.c CLEANFILES = \ run-with-tmp-session-bus.conf diff --git a/tools/Makefile.in b/tools/Makefile.in index 14d048bc..65bd1c91 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -35,21 +35,26 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = dbus-send$(EXEEXT) dbus-monitor$(EXEEXT) \ - dbus-launch$(EXEEXT) dbus-cleanup-sockets$(EXEEXT) \ - dbus-uuidgen$(EXEEXT) +@DBUS_UNIX_TRUE@am__append_1 = dbus-cleanup-sockets dbus-uuidgen +bin_PROGRAMS = dbus-launch$(EXEEXT) dbus-send$(EXEEXT) \ + dbus-monitor$(EXEEXT) $(am__EXEEXT_2) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(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)/acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ +@DBUS_UNIX_TRUE@am__EXEEXT_1 = dbus-cleanup-sockets$(EXEEXT) \ +@DBUS_UNIX_TRUE@ dbus-uuidgen$(EXEEXT) +am__EXEEXT_2 = $(am__EXEEXT_1) +am__installdirs = "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(localstatelibdir)" PROGRAMS = $(bin_PROGRAMS) am_dbus_cleanup_sockets_OBJECTS = dbus-cleanup-sockets.$(OBJEXT) @@ -58,8 +63,11 @@ dbus_cleanup_sockets_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent -am_dbus_launch_OBJECTS = dbus-launch.$(OBJEXT) \ - dbus-launch-x11.$(OBJEXT) +am__dbus_launch_SOURCES_DIST = dbus-launch.c dbus-launch-x11.c \ + dbus-launch.h dbus-launch-win.c +@DBUS_WIN_FALSE@am_dbus_launch_OBJECTS = dbus-launch.$(OBJEXT) \ +@DBUS_WIN_FALSE@ dbus-launch-x11.$(OBJEXT) +@DBUS_WIN_TRUE@am_dbus_launch_OBJECTS = dbus-launch-win.$(OBJEXT) dbus_launch_OBJECTS = $(am_dbus_launch_OBJECTS) am__DEPENDENCIES_1 = dbus_launch_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) @@ -118,9 +126,9 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(dbus_cleanup_sockets_SOURCES) $(dbus_launch_SOURCES) \ $(dbus_monitor_SOURCES) $(dbus_send_SOURCES) \ $(dbus_uuidgen_SOURCES) -DIST_SOURCES = $(dbus_cleanup_sockets_SOURCES) $(dbus_launch_SOURCES) \ - $(dbus_monitor_SOURCES) $(dbus_send_SOURCES) \ - $(dbus_uuidgen_SOURCES) +DIST_SOURCES = $(dbus_cleanup_sockets_SOURCES) \ + $(am__dbus_launch_SOURCES_DIST) $(dbus_monitor_SOURCES) \ + $(dbus_send_SOURCES) $(dbus_uuidgen_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -142,9 +150,6 @@ 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' -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man_MANS) DATA = $(localstatelib_DATA) ETAGS = etags CTAGS = ctags @@ -153,10 +158,13 @@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ +AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BUILD_FILEVERSION = @BUILD_FILEVERSION@ +BUILD_TIMESTAMP = @BUILD_TIMESTAMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -188,6 +196,8 @@ DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@ DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@ DBUS_MINOR_VERSION = @DBUS_MINOR_VERSION@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ +DBUS_PREFIX = @DBUS_PREFIX@ +DBUS_SESSION_BUS_DEFAULT_ADDRESS = @DBUS_SESSION_BUS_DEFAULT_ADDRESS@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@ @@ -201,6 +211,7 @@ DBUS_X_CFLAGS = @DBUS_X_CFLAGS@ DBUS_X_LIBS = @DBUS_X_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ @@ -214,6 +225,7 @@ EXPANDED_DATADIR = @EXPANDED_DATADIR@ EXPANDED_LIBDIR = @EXPANDED_LIBDIR@ EXPANDED_LIBEXECDIR = @EXPANDED_LIBEXECDIR@ EXPANDED_LOCALSTATEDIR = @EXPANDED_LOCALSTATEDIR@ +EXPANDED_PREFIX = @EXPANDED_PREFIX@ EXPANDED_SYSCONFDIR = @EXPANDED_SYSCONFDIR@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ @@ -223,6 +235,8 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LAUNCHCTL = @LAUNCHCTL@ +LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -238,6 +252,7 @@ LT_CURRENT = @LT_CURRENT@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MAN2HTML = @MAN2HTML@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -250,6 +265,7 @@ 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@ PIC_CFLAGS = @PIC_CFLAGS@ @@ -279,6 +295,7 @@ TEST_SOCKET_DIR = @TEST_SOCKET_DIR@ TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@ TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@ VERSION = @VERSION@ +WINDRES = @WINDRES@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ X_CFLAGS = @X_CFLAGS@ @@ -334,12 +351,14 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ configdir = $(sysconfdir)/dbus-1 -INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_DAEMONDIR=\"@DBUS_DAEMONDIR@\" -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" +INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"@EXPANDED_DATADIR@/locale\" -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" +extra_bin_programs = $(am__append_1) dbus_send_SOURCES = \ dbus-print-message.c \ dbus-print-message.h \ @@ -350,10 +369,14 @@ dbus_monitor_SOURCES = \ dbus-print-message.c \ dbus-print-message.h -dbus_launch_SOURCES = \ - dbus-launch.c \ - dbus-launch-x11.c \ - dbus-launch.h +@DBUS_WIN_FALSE@dbus_launch_SOURCES = \ +@DBUS_WIN_FALSE@ dbus-launch.c \ +@DBUS_WIN_FALSE@ dbus-launch-x11.c \ +@DBUS_WIN_FALSE@ dbus-launch.h + +@DBUS_WIN_TRUE@dbus_launch_SOURCES = \ +@DBUS_WIN_TRUE@ dbus-launch-win.c \ +@DBUS_WIN_TRUE@ dbus-launch.h dbus_cleanup_sockets_SOURCES = \ dbus-cleanup-sockets.c @@ -369,8 +392,7 @@ dbus_uuidgen_LDADD = $(top_builddir)/dbus/libdbus-1.la $(DBUS_CLIENT_LIBS) dbus_uuidgen_LDFLAGS = @R_DYNAMIC_LDFLAG@ dbus_launch_LDADD = $(DBUS_X_LIBS) $(DBUS_CLIENT_LIBS) dbus_launch_LDFLAGS = @R_DYNAMIC_LDFLAG@ -man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1 dbus-uuidgen.1 -EXTRA_DIST = $(man_MANS) run-with-tmp-session-bus.sh +EXTRA_DIST = run-with-tmp-session-bus.sh strtoll.c strtoull.c CLEANFILES = \ run-with-tmp-session-bus.conf @@ -478,6 +500,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-cleanup-sockets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-launch-win.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-launch-x11.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-launch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-monitor.Po@am__quote@ @@ -514,44 +537,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-localstatelibDATA: $(localstatelib_DATA) @$(NORMAL_INSTALL) test -z "$(localstatelibdir)" || $(MKDIR_P) "$(DESTDIR)$(localstatelibdir)" @@ -626,19 +611,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -670,9 +642,9 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) +all-am: Makefile $(PROGRAMS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(localstatelibdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(localstatelibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -723,7 +695,7 @@ info: info-am info-am: -install-data-am: install-localstatelibDATA install-man +install-data-am: install-localstatelibDATA install-dvi: install-dvi-am @@ -739,7 +711,7 @@ install-info: install-info-am install-info-am: -install-man: install-man1 +install-man: install-pdf: install-pdf-am @@ -769,10 +741,7 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-localstatelibDATA \ - uninstall-man - -uninstall-man: uninstall-man1 +uninstall-am: uninstall-binPROGRAMS uninstall-localstatelibDATA .MAKE: install-am install-strip @@ -783,13 +752,13 @@ uninstall-man: uninstall-man1 install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ - install-localstatelibDATA install-man install-man1 install-pdf \ + install-localstatelibDATA install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-localstatelibDATA uninstall-man uninstall-man1 + uninstall-localstatelibDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tools/dbus-launch-win.c b/tools/dbus-launch-win.c new file mode 100644 index 00000000..ea4bf0dd --- /dev/null +++ b/tools/dbus-launch-win.c @@ -0,0 +1,170 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-launch-win.c dbus-launch utility + * + * Copyright (C) 2007 Ralf Habacker <ralf.habacker@freenet.de> + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <config.h> +#ifndef UNICODE +#define UNICODE 1 +#endif +#include <windows.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + +/* Save string functions. Instead of figuring out the exact _MSC_VER + that work, override for everybody. */ + +#define errno_t int +#define wcscat_s my_wcscat_s +#define wcscpy_s my_wcscpy_s + +static errno_t +wcscat_s (wchar_t *dest, size_t size, wchar_t *src) +{ + assert (sizeof (wchar_t) * (wcslen (dest) + wcslen (src) + 1) <= size); + wcscat (dest, src); + return 0; +} + + +static errno_t +wcscpy_s (wchar_t *dest, size_t size, wchar_t *src) +{ + assert (sizeof (wchar_t) * (wcslen (src) + 1) <= size); + wcscpy (dest, src); + return 0; +} + +/* TODO (tl): This Windows version of dbus-launch is curretly rather + * pointless as it doesn't take the same command-line options as the + * UNIX dbus-launch does. A main point of the dbus-launch command is + * to pass it for instance a --config-file option to make the started + * dbus-daemon use that config file. + * + * This version also doesn't print out any information, which is a + * main point of the UNIX one. It should at least support the + * --sh-syntax option, and maybe also a --cmd-syntax to print out the + * variable settings in cmd.exe syntax? + * + * NOTE (rh): The main task of dbus-launch is (from the man page) to start + * a session bus and this is archieved by the current implemention. + * + * Additional on windows the session bus starting in not integrated + * into the logon process, so there is no need for any --syntax option. + * In fact (at least for kde on windows) the session bus is autostarted + * with the first application requesting a session bus. + * + */ + +#define AUTO_ACTIVATE_CONSOLE_WHEN_VERBOSE_MODE 1 + +#define DIM(x) (sizeof(x) / sizeof(x[0])) +#define WCSTRINGIFY_(x) L ## x +#define WCSTRINGIFY(x) WCSTRINGIFY_(x) + +int +main (int argc, char **argv) +{ + wchar_t dbusDaemonPath[MAX_PATH * 2 + 1]; + wchar_t command[MAX_PATH * 2 + 1]; + wchar_t *p; + wchar_t *daemon_name; + int result; + int showConsole = 0; +#ifdef DBUS_WINCE + char *s = NULL; +#else + char *s = getenv("DBUS_VERBOSE"); +#endif + int verbose = s && *s != '\0' ? 1 : 0; + + PROCESS_INFORMATION pi; + STARTUPINFOW si; + BOOL inherit = TRUE; + DWORD flags = 0; + +#ifdef AUTO_ACTIVATE_CONSOLE_WHEN_VERBOSE_MODE + if (verbose) + showConsole = 1; +#endif + GetModuleFileNameW (NULL, dbusDaemonPath, DIM (dbusDaemonPath)); + + daemon_name = WCSTRINGIFY(DBUS_DAEMON_NAME) L".exe"; + + if ((p = wcsrchr (dbusDaemonPath, L'\\'))) + { + p[1] = L'\0'; + wcscat_s (dbusDaemonPath, sizeof (dbusDaemonPath), daemon_name); + } + else + { + if (verbose) + fprintf (stderr, "error: could not extract path from current " + "applications module filename\n"); + return 1; + } + +#ifdef DBUS_WINCE + /* Windows CE has a different interpretation of cmdline: Start with argv[1]. */ + wcscpy_s (command, sizeof (command), L"--session"); + if (verbose) + fprintf (stderr, "%ls %ls\n", dbusDaemonPath, command); +#else + command[0] = L'\0'; + /* Windows CE has a different interpretation of cmdline: Start with argv[1]. */ + wcscpy_s (command, sizeof (command), dbusDaemonPath); + wcscat_s (command, sizeof (command), L" --session"); + if (verbose) + fprintf (stderr, "%ls\n", command); +#endif + + memset (&si, 0, sizeof (si)); + memset (&pi, 0, sizeof (pi)); + si.cb = sizeof (si); + + if (verbose) + flags |= CREATE_NEW_CONSOLE; + +#ifdef DBUS_WINCE + inherit = FALSE; +#else + flags |= NORMAL_PRIORITY_CLASS; + if (!verbose) + flags |= DETACHED_PROCESS; +#endif + + result = CreateProcessW (dbusDaemonPath, command, 0, 0, + inherit, flags, 0, 0, &si, &pi); + + if (result == 0) + { + if (verbose) + fprintf (stderr, "Could not start " DBUS_DAEMON_NAME ". error=%d\n", + GetLastError ()); + return 4; + } + + CloseHandle (pi.hProcess); + CloseHandle (pi.hThread); + + return 0; +} diff --git a/tools/dbus-launch-x11.c b/tools/dbus-launch-x11.c index 56d7f744..fe492227 100644 --- a/tools/dbus-launch-x11.c +++ b/tools/dbus-launch-x11.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-launch.h" #ifdef DBUS_BUILD_X11 @@ -459,5 +461,7 @@ x11_handle_event (void) } #else +void dummy_dbus_launch_x11 (void); + void dummy_dbus_launch_x11 (void) { } #endif diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c index d3553e81..ce9c7b1c 100644 --- a/tools/dbus-launch.c +++ b/tools/dbus-launch.c @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-launch.h" #include <stdlib.h> #include <ctype.h> @@ -363,9 +365,9 @@ print_variables (const char *bus_address, pid_t bus_pid, long bus_wid, { if (binary_syntax) { - write (1, bus_address, strlen (bus_address) + 1); - write (1, &bus_pid, sizeof bus_pid); - write (1, &bus_wid, sizeof bus_wid); + do_write (1, bus_address, strlen (bus_address) + 1); + do_write (1, &bus_pid, sizeof bus_pid); + do_write (1, &bus_wid, sizeof bus_wid); return; } else if (c_shell_syntax) @@ -699,7 +701,11 @@ pass_info (const char *runprog, const char *bus_address, pid_t bus_pid, args = malloc (sizeof (char *) * ((argc-remaining_args)+2)); if (envvar == NULL || args == NULL) - goto oom; + { + free (envvar); + free (args); + goto oom; + } args[0] = xstrdup (runprog); if (!args[0]) diff --git a/tools/dbus-launch.h b/tools/dbus-launch.h index d0d0617d..8220bb8e 100644 --- a/tools/dbus-launch.h +++ b/tools/dbus-launch.h @@ -24,7 +24,6 @@ #ifndef DBUS_LAUNCH_H #define DBUS_LAUNCH_H -#include <config.h> #include <sys/types.h> #ifndef TRUE diff --git a/tools/dbus-monitor.c b/tools/dbus-monitor.c index c3681289..3779368a 100644 --- a/tools/dbus-monitor.c +++ b/tools/dbus-monitor.c @@ -41,6 +41,24 @@ #define DBUS_SECONDS_SINCE_1601 11644473600LL #define DBUS_USEC_IN_SEC 1000000LL +#ifdef DBUS_WINCE + +#ifndef _IOLBF +#define _IOLBF 0x40 +#endif +#ifndef _IONBF +#define _IONBF 0x04 +#endif + +void +GetSystemTimeAsFileTime (LPFILETIME ftp) +{ + SYSTEMTIME st; + GetSystemTime (&st); + SystemTimeToFileTime (&st, ftp); +} +#endif + static int gettimeofday (struct timeval *__p, void *__t) @@ -77,7 +95,11 @@ monitor_filter_func (DBusConnection *connection, return DBUS_HANDLER_RESULT_HANDLED; } +#ifdef __APPLE__ +#define PROFILE_TIMED_FORMAT "%s\t%lu\t%d" +#else #define PROFILE_TIMED_FORMAT "%s\t%lu\t%lu" +#endif #define TRAP_NULL_STRING(str) ((str) ? (str) : "<none>") typedef enum @@ -217,7 +239,12 @@ main (int argc, char *argv[]) * do dbus-monitor > file, then send SIGINT via Control-C, they * don't lose the last chunk of messages. */ + +#ifdef DBUS_WIN + setvbuf (stdout, NULL, _IONBF, 0); +#else setvbuf (stdout, NULL, _IOLBF, 0); +#endif for (i = 1; i < argc; i++) { diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c index fac5cc1f..75d00aca 100644 --- a/tools/dbus-print-message.c +++ b/tools/dbus-print-message.c @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#include <config.h> #include "dbus-print-message.h" #include <stdlib.h> @@ -54,7 +56,7 @@ indent (int depth) static void print_hex (unsigned char *bytes, unsigned int len, int depth) { - int i, columns; + unsigned int i, columns; printf ("array of bytes [\n"); diff --git a/tools/dbus-send.c b/tools/dbus-send.c index c9c9be27..c7d50908 100644 --- a/tools/dbus-send.c +++ b/tools/dbus-send.c @@ -26,6 +26,24 @@ #include <dbus/dbus.h> +#ifndef HAVE_STRTOLL +#undef strtoll +#define strtoll mystrtoll +#include "strtoll.c" +#endif + +#ifndef HAVE_STRTOULL +#undef strtoull +#define strtoull mystrtoull +#include "strtoull.c" +#endif + +#ifdef DBUS_WINCE +#ifndef strdup +#define strdup _strdup +#endif +#endif + #include "dbus-print-message.h" static const char *appname; diff --git a/tools/strtoll.c b/tools/strtoll.c new file mode 100644 index 00000000..e4f57701 --- /dev/null +++ b/tools/strtoll.c @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#include <limits.h> +#ifdef HAVE_ERRNO_H +#include <errno.h> +#endif +#include <stdlib.h> +#ifdef DBUS_WINCE +#include <windows.h> +#endif + +#ifndef isspace +#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n') +#endif + +/* Minimum and maximum values a `signed long long int' can hold. */ +#ifndef LLONG_MAX +# define LLONG_MAX 9223372036854775807LL +#endif + +#ifndef LLONG_MIN +# define LLONG_MIN (-LLONG_MAX - 1LL) +#endif +/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ +#ifndef ULLONG_MAX +# define ULLONG_MAX 18446744073709551615ULL +#endif +/* + * Convert a string to a long long integer. + * + * Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +long long strtoll (const char*, char **, int); + +long long +strtoll(const char * nptr, char ** endptr, int base) +{ + const char *s; + unsigned long long acc; + char c; + unsigned long long cutoff; + int neg, any, cutlim; + + /* + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. + */ + s = nptr; + do { + c = *s++; + } while (isspace((unsigned char)c)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'A' && s[1] <= 'F') || + (s[1] >= 'a' && s[1] <= 'f'))) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; + + /* + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for quads is + * [-9223372036854775808..9223372036854775807] and the input base + * is 10, cutoff will be set to 922337203685477580 and cutlim to + * either 7 (neg==0) or 8 (neg==1), meaning that if we have + * accumulated a value > 922337203685477580, or equal but the + * next digit is > 7 (or 8), the number is too big, and we will + * return a range error. + * + * Set 'any' if any `digits' consumed; make it negative to indicate + * overflow. + */ + cutoff = neg ? (unsigned long long)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX + : LLONG_MAX; + cutlim = cutoff % base; + cutoff /= base; + for ( ; ; c = *s++) { + if (c >= '0' && c <= '9') + c -= '0'; + else if (c >= 'A' && c <= 'Z') + c -= 'A' - 10; + else if (c >= 'a' && c <= 'z') + c -= 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = neg ? LLONG_MIN : LLONG_MAX; +#ifdef DBUS_WINCE + SetLastError (ERROR_ARITHMETIC_OVERFLOW); +#else + errno = ERANGE; +#endif + } else if (!any) { +noconv: +#ifdef DBUS_WINCE + SetLastError (ERROR_INVALID_PARAMETER); +#else + errno = EINVAL; +#endif + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} + diff --git a/tools/strtoull.c b/tools/strtoull.c new file mode 100644 index 00000000..459c5091 --- /dev/null +++ b/tools/strtoull.c @@ -0,0 +1,144 @@ +/*- + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#include <limits.h> +#ifdef HAVE_ERRNO_H +#include <errno.h> +#endif +#include <stdlib.h> +#ifdef DBUS_WINCE +#include <windows.h> +#endif + +#ifndef isspace +#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n') +#endif + +/* Minimum and maximum values a `signed long long int' can hold. */ +#ifndef LLONG_MAX +# define LLONG_MAX 9223372036854775807LL +#endif + +#ifndef LLONG_MIN +# define LLONG_MIN (-LLONG_MAX - 1LL) +#endif +/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ +#ifndef ULLONG_MAX +# define ULLONG_MAX 18446744073709551615ULL +#endif + +/* + * Convert a string to an unsigned long long integer. + * + * Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +unsigned long long strtoull (const char *, char **, int); + +unsigned long long +strtoull(const char * nptr, char ** endptr, int base) +{ + const char *s; + unsigned long long acc; + char c; + unsigned long long cutoff; + int neg, any, cutlim; + + /* + * See strtoq for comments as to the logic used. + */ + s = nptr; + do { + c = *s++; + } while (isspace((unsigned char)c)); + if (c == '-') { + neg = 1; + c = *s++; + } else { + neg = 0; + if (c == '+') + c = *s++; + } + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'A' && s[1] <= 'F') || + (s[1] >= 'a' && s[1] <= 'f'))) { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + acc = any = 0; + if (base < 2 || base > 36) + goto noconv; + + cutoff = ULLONG_MAX / base; + cutlim = ULLONG_MAX % base; + for ( ; ; c = *s++) { + if (c >= '0' && c <= '9') + c -= '0'; + else if (c >= 'A' && c <= 'Z') + c -= 'A' - 10; + else if (c >= 'a' && c <= 'z') + c -= 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) { + acc = ULLONG_MAX; +#ifdef DBUS_WINCE + SetLastError (ERROR_ARITHMETIC_OVERFLOW); +#else + errno = ERANGE; +#endif + } else if (!any) { +noconv: +#ifdef DBUS_WINCE + SetLastError (ERROR_INVALID_PARAMETER); +#else + errno = EINVAL; +#endif + } else if (neg) + acc = -acc; + if (endptr != NULL) + *endptr = (char *)(any ? s - 1 : nptr); + return (acc); +} |