oddjob-0.16-0/0000777000471600047240000000000010311657706010062 500000000000000oddjob-0.16-0/doc/0000777000471600047240000000000010311657707010630 500000000000000oddjob-0.16-0/doc/oddjob.html0000664000471600047240000005013210311657300012663 00000000000000oddjob: Threat or Menace?

oddjob: Threat or Menace?

Nalin Dahyabhai

Red Hat, Inc.

Abstract

The oddjob package provides a means for unprivileged applications to invoke and take limited control of privileged applications by issuing requests using the D-BUS system message bus.


Table of Contents

Background
oddjob
An Example
D-BUS Configuration
oddjobd Configuration
Configuring oddjobd

Background

In many applications, particularly those which perform some sort of administrative task, it becomes useful to separate the presentation (which needn't have any special privileges, and frequently shouldn't) from the logic which actually performs the task (which frequently needs privileges).

In these situations, the unprivileged application typically accomplishes the privileged task either by running a setuid helper application or by connecting to a long-running process and issuing a request.

Of the two options, the setuid helper approach offers the advantage of requiring less configuration beforehand, but can be undesirable in the context of libraries or demand-loaded modules, when the direct caller may be unaware of the state of the calling application with regard to signal handling, which must be taken into account if the caller expects to wait for the privileged child process to complete its task. Additionally, certain attributes of the unprivileged process which are inherited by the privileged helper (current directory, other open file handles, environment variables) may be manipulated to become vectors for attack by malicious users.

The alternative, the use of a long-running process which services these requests, becomes attractive for these reasons. The primary objections to this approach are frequently:

  • that it adds yet another long-running resource-consuming process to the system

  • that the long-running process must be installed properly to ensure that it is started and stopped at system boot and shutdown

  • an entire protocol for encoding communications between the client and server must be invented

A third option has recently become available: the D-BUS system message bus. The system message bus provides an interprocess communication mechanism to processes on the system. The bus carries three types of messages:

  • events, which are broadcast and for which no response is expected

  • method calls, which are unicast and for which a response is usually expected

  • method responses, which are unicast and which are sent in response to a method call

Method call and response messages which are sent over the system message bus provide a loosely coupled object-oriented RPC mechanism.

The D-BUS libraries also provide a means of encoding, transmitting, listening for, receiving, and parsing messages which are sent over the bus. Using D-BUS as the mechanism for a long-running process reduces the time required to implement both a long-running server and its clients. Because the implementation of the bus protocols is designed to be reused, it also offers the opportunity to have one privileged process service a potentially large number of clients.

The oddjob package implements such a server.

oddjob

The server provided by oddjob, oddjobd, provides services which appear to be indistinguishable from other services provided through D-BUS, but in an unconventional manner. Before continuing, it is instructive to look at how clients and servers interact over the bus.

The fundamental unit of communication over the system bus is the message. For practical purposes, a message is composed of the addressing information which is needed to route that message to the proper recipient, and one of:

  • information about the event being broadcast (the sender, additional information)

  • the method being called (the caller, the provider, method arguments)

  • the method being responded to (the caller, the provider, results)

More specifically, each message includes the address of its sender. Method call and response messages should also include the address of the intended recipient. A bus address uniquely identifies a process which is connected to the message bus. Generally, a single process will have exactly one open connection to the message bus.

A message also includes an object path, which allows multiple client sessions to be serviced by the same server. Each object can provide multiple interfaces, which are groups of related methods.

The function of the oddjobd daemon is to allow arbitrary services to be provided over the message bus with a minimum of "glue". Services provided by oddjobd can be implemented very simply. This simplicity of implementation is gained at the cost of some robustness, but for certain applications this is an acceptable tradeoff.

An analogous comparison can be made between applications which are implemented on web servers using scripting engines and applications which are implemented using the Common Gateway Interface (CGI).

An Example

Take for example, a service which is provided by the well-known address "com.example.system_manager". This management service controls multiple systems, each of which is represented as a different object with a name of the form "/com/example/Systems/server1". Each object offers multiple interfaces, such as the com.example.power interface, which provides methods such as reboot and poweroff.

Conventionally, the implementation of the "com.example.system_manager" service would require a long-running server process which would need to include logic for connecting to the system message bus, receiving requests, and issuing replies, in addition to its core functionality.

Using oddjobd, the entire implementation can be synthesized by providing the proper configuration files and shell scripts.

D-BUS Configuration

The D-BUS system bus enforces restrictions on which applications can reserve well-known bus addresses. It bases this restriction on the UID under which a client process is executing when it requests the reservation. Additionally, the system message bus can impose access controls on the ability to send or receive messages to or from a particular service/object/interface/method set using the bus. This example allows processes running as "root" to reserve the name "com.example.system_manager", and allows any user to call its reboot and poweroff methods.

Tip

The message bus daemon itself has no specific use for object paths and interface and method names beyond allowing their use in access control statements. It is your application which gives the names their meanings.

<!DOCTYPE busconfig PUBLIC
	  "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
	  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">

<busconfig>

	<!-- Only root can own the system manager service. -->
	<policy user="root">
		<allow own="com.example.system_manager">
	</policy>

	<!-- Allow anyone to call the reboot and poweroff
	     methods.  This is probably a bad idea. -->
	<policy context="default">
		<allow send_destination="com.example.system_manager"
		       send_path="/com/example/Systems/server1"
		       send_interface="com.example.power"
		       send_member="reboot"/>
		<allow send_destination="com.example.system_manager"
		       send_path="/com/example/Systems/server1"
		       send_interface="com.example.power"
		       send_member="poweroff"/>
	</policy>

</busconfig>

oddjobd Configuration

The oddjobd daemon provides services which are implemented by external helper applications. The helpers are executed with superuser privileges, and receive their arguments as strings, as the configuration dictates, either as command-line parameters or via stdin. The exit status of the helpers, along with any text they print, is returned to the caller. This example configures oddjobd to provide a "com.example.system_manager" service which provides a "/com/example/Systems/server1" object which implements the com.example.power interface, which provides methods named reboot and poweroff, and allows the superuser to invoke either method.

<?xml version="1.0"?>
<oddjobconfig>
	<service name="com.example.system_manager">
		<object name="/com/example/Systems/server1">
			<interface name="com.example.power">
				<method name="reboot">
					<helper exec="/sbin/reboot"
						arguments="0"
						prepend_user_name="no"/>
					<!-- Only root and jimbo can use this -->
					<allow user="root"/>
					<allow user="jimbo"/>
				</method>
				<method name="poweroff">
					<helper exec="/sbin/poweroff"
						arguments="0"
						prepend_user_name="no"/>
					<!-- Only root and jimbo can use this -->
					<allow user="root"/>
					<allow user="jimbo"/>
				</method>
			</interface>
		</object>
	</service>
</oddjobconfig>

Configuring oddjobd

The oddjobd configuration is normally read from /etc/oddjobd.conf, but in most deployments it will direct the daemon to read all of the configuration files from /etc/oddjobd.conf.d, taking the union of the contents of all of the configuration files as its configuration.

Tip

When installing your application, dropping a new configuration file into this directory is recommended over editing the existing configuration files.

Each configuration file includes an <oddjobconfig> element. An <oddjobconfig> element contains <include> elements, <service> elements, <allow> elements, and <deny> elements.

An <include> element names a file which should also be scanned for configuration data, and optionally defines an attribute named "ignore_missing", which if set to "yes" will cause failure to read the named file to be treated as a non-fatal error.

A <service> element names a D-BUS service address at which services defined within the scope of this element will be provided by oddjobd. The service address is given as the value of its "name" attribute, and it may contain <object> elements, <allow> elements, and <deny> elements.

Tip

The service name should be unique to your application.

An <object> element names a D-BUS object path which provides one or more interfaces to client processes. The object path is given as the value of its "name" attribute, and it may contain <interface> elements. Its name may include wildcards, in which case any request to an object whose name matches the wildcard will be considered to match this element.

Caution

If a single client request matches multiple different <object> elements, the behavior of oddjobd becomes undefined.

The <object> element may also contain <allow> and <deny> elements.

An <interface> element names a group of related methods which oddjobd will provide at the containing <object>'s path. The interface name is given as the value of its "name" attribute. It may contain <method>, <allow>, and <deny> elements.

An <method> element names a specific method which oddjobd will provide as part of the containing <interface> at the containing <object>'s path. The method name is given as the value of its "name" attribute, and it may contain <helper>, <allow>, and <deny> elements.

An <helper> element specifies that a method is implemented as an external helper (oddjobd itself implements a limited number of methods internally). It includes a number of attributes:

  • "exec", the path of the binary to run

  • "arguments", the number of arguments which a client is expected to supply to the method

  • "prepend_user_name", whether or not the calling user's name should be prepended to the list of arguments before they are passed to the helper

  • "argument_passing_method", either "stdin" (the default) or "cmdline", specifying that method arguments should be passed in on stdin, one parameter per line, or as command-line arguments

An <allow> or <deny> element specifies an entry in an access control list (ACL) which controls whether or not oddjobd will attempt to fulfill client requests.

Each entry defines a set of values for attributes of a client request. If a specific request provides these values, the access control list entry is considered to match it. Attributes which are not specified as part of an access control entry are ignored when checking if a request matches that entry. The defined attributes are:

  • "user", the client's user name

  • "min_uid", a UID which the user's UID must be greater than or equal to

  • "max_uid", a UID which the user's UID must be less than or equal to

  • "selinux_enforcing", "yes" or "no", corresponding to whether SELinux is enabled and in enforcing mode

  • "selinux_context", the SELinux context of the client process

  • "selinux_user", the SELinux user of the client process

  • "selinux_role", the SELinux role of the client process

  • "selinux_type", the SELinux type of the client process

The process of checking the ACL for any method is simple:

  1. First, if the ACL contains a <deny> element which matches the request, access is denied.

  2. Second, if the ACL contains an <allow> element which matches the request, access is allowed.

  3. If no entry in the ACL matches the request, the check continues on to the containing <interface> element's ACL. If no match is found, the containing <object> element's ACL is consulted, then that of the containing <service> element. Lastly, the ACL of the top-level <oddjobconfig> element is scanned. If, after all of these checks, no match was found, access is denied.

The helpers themselves are executed with superuser privileges and with these variables set in the environment:

  • "ODDJOB_SERVICE_NAME", the name of the called service

  • "ODDJOB_OBJECT_PATH", the name of the called object

  • "ODDJOB_INTERFACE_NAME", the name of the called interface

  • "ODDJOB_METHOD_NAME", the name of the called method

Caution

Helpers must treat arguments as untrusted data to avoid escalating a compromise of an account which would be allowed to call the method to a compromise of the superuser account. The oddjobd server performs no other authentication.

oddjob-0.16-0/doc/Makefile.am0000664000471600047240000000023110302721336012564 00000000000000EXTRA_FILES = oddjob.xml.in noinst_DATA = oddjob.html if REFORMAT_XML_DOCS XMLTO = @PATH_XMLTO@ oddjob.html: oddjob.xml $(XMLTO) html-nochunks $^ endif oddjob-0.16-0/doc/Makefile.in0000664000471600047240000002432310311657646012621 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/oddjob.xml.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = oddjob.xml SOURCES = DIST_SOURCES = DATA = $(noinst_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_FILES = oddjob.xml.in noinst_DATA = oddjob.html @REFORMAT_XML_DOCS_TRUE@XMLTO = @PATH_XMLTO@ all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh oddjob.xml: $(top_builddir)/config.status $(srcdir)/oddjob.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am @REFORMAT_XML_DOCS_TRUE@oddjob.html: oddjob.xml @REFORMAT_XML_DOCS_TRUE@ $(XMLTO) html-nochunks $^ # 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: oddjob-0.16-0/doc/oddjob.xml.in0000664000471600047240000004426010305160432013127 00000000000000
<package>oddjob</package>: Threat or Menace? 2005 Red Hat, Inc. Nalin Dahyabhai Red Hat, Inc. nalin@redhat.com The oddjob package provides a means for unprivileged applications to invoke and take limited control of privileged applications by issuing requests using the D-BUS system message bus.
Background In many applications, particularly those which perform some sort of administrative task, it becomes useful to separate the presentation (which needn't have any special privileges, and frequently shouldn't) from the logic which actually performs the task (which frequently needs privileges). In these situations, the unprivileged application typically accomplishes the privileged task either by running a setuid helper application or by connecting to a long-running process and issuing a request. Of the two options, the setuid helper approach offers the advantage of requiring less configuration beforehand, but can be undesirable in the context of libraries or demand-loaded modules, when the direct caller may be unaware of the state of the calling application with regard to signal handling, which must be taken into account if the caller expects to wait for the privileged child process to complete its task. Additionally, certain attributes of the unprivileged process which are inherited by the privileged helper (current directory, other open file handles, environment variables) may be manipulated to become vectors for attack by malicious users. The alternative, the use of a long-running process which services these requests, becomes attractive for these reasons. The primary objections to this approach are frequently: that it adds yet another long-running resource-consuming process to the system that the long-running process must be installed properly to ensure that it is started and stopped at system boot and shutdown an entire protocol for encoding communications between the client and server must be invented A third option has recently become available: the D-BUS system message bus. The system message bus provides an interprocess communication mechanism to processes on the system. The bus carries three types of messages: events, which are broadcast and for which no response is expected method calls, which are unicast and for which a response is usually expected method responses, which are unicast and which are sent in response to a method call Method call and response messages which are sent over the system message bus provide a loosely coupled object-oriented RPC mechanism. The D-BUS libraries also provide a means of encoding, transmitting, listening for, receiving, and parsing messages which are sent over the bus. Using D-BUS as the mechanism for a long-running process reduces the time required to implement both a long-running server and its clients. Because the implementation of the bus protocols is designed to be reused, it also offers the opportunity to have one privileged process service a potentially large number of clients. The oddjob package implements such a server.
oddjob The server provided by oddjob, oddjobd, provides services which appear to be indistinguishable from other services provided through D-BUS, but in an unconventional manner. Before continuing, it is instructive to look at how clients and servers interact over the bus. The fundamental unit of communication over the system bus is the message. For practical purposes, a message is composed of the addressing information which is needed to route that message to the proper recipient, and one of: information about the event being broadcast (the sender, additional information) the method being called (the caller, the provider, method arguments) the method being responded to (the caller, the provider, results) More specifically, each message includes the address of its sender. Method call and response messages should also include the address of the intended recipient. A bus address uniquely identifies a process which is connected to the message bus. Generally, a single process will have exactly one open connection to the message bus. A message also includes an object path, which allows multiple client sessions to be serviced by the same server. Each object can provide multiple interfaces, which are groups of related methods. The function of the oddjobd daemon is to allow arbitrary services to be provided over the message bus with a minimum of "glue". Services provided by oddjobd can be implemented very simply. This simplicity of implementation is gained at the cost of some robustness, but for certain applications this is an acceptable tradeoff. An analogous comparison can be made between applications which are implemented on web servers using scripting engines and applications which are implemented using the Common Gateway Interface (CGI).
An Example Take for example, a service which is provided by the well-known address "com.example.system_manager". This management service controls multiple systems, each of which is represented as a different object with a name of the form "/com/example/Systems/server1". Each object offers multiple interfaces, such as the com.example.power interface, which provides methods such as reboot and poweroff. Conventionally, the implementation of the "com.example.system_manager" service would require a long-running server process which would need to include logic for connecting to the system message bus, receiving requests, and issuing replies, in addition to its core functionality. Using oddjobd, the entire implementation can be synthesized by providing the proper configuration files and shell scripts.
<package>D-BUS</package> Configuration The D-BUS system bus enforces restrictions on which applications can reserve well-known bus addresses. It bases this restriction on the UID under which a client process is executing when it requests the reservation. Additionally, the system message bus can impose access controls on the ability to send or receive messages to or from a particular service/object/interface/method set using the bus. This example allows processes running as "root" to reserve the name "com.example.system_manager", and allows any user to call its reboot and poweroff methods. TipThe message bus daemon itself has no specific use for object paths and interface and method names beyond allowing their use in access control statements. It is your application which gives the names their meanings. ]]>
<command>oddjobd</command> Configuration The oddjobd daemon provides services which are implemented by external helper applications. The helpers are executed with superuser privileges, and receive their arguments as strings, as the configuration dictates, either as command-line parameters or via stdin. The exit status of the helpers, along with any text they print, is returned to the caller. This example configures oddjobd to provide a "com.example.system_manager" service which provides a "/com/example/Systems/server1" object which implements the com.example.power interface, which provides methods named reboot and poweroff, and allows the superuser to invoke either method. ]]>
Configuring <command>oddjobd</command> The oddjobd configuration is normally read from /etc/oddjobd.conf, but in most deployments it will direct the daemon to read all of the configuration files from /etc/oddjobd.conf.d, taking the union of the contents of all of the configuration files as its configuration. TipWhen installing your application, dropping a new configuration file into this directory is recommended over editing the existing configuration files. Each configuration file includes an ]]> element. An ]]> element contains ]]> elements, ]]> elements, ]]> elements, and ]]> elements. An ]]> element names a file which should also be scanned for configuration data, and optionally defines an attribute named "ignore_missing", which if set to "yes" will cause failure to read the named file to be treated as a non-fatal error. A ]]> element names a D-BUS service address at which services defined within the scope of this element will be provided by oddjobd. The service address is given as the value of its "name" attribute, and it may contain ]]> elements, ]]> elements, and ]]> elements. TipThe service name should be unique to your application. An ]]> element names a D-BUS object path which provides one or more interfaces to client processes. The object path is given as the value of its "name" attribute, and it may contain ]]> elements. Its name may include wildcards, in which case any request to an object whose name matches the wildcard will be considered to match this element. CautionIf a single client request matches multiple different ]]> elements, the behavior of oddjobd becomes undefined. The ]]> element may also contain ]]> and ]]> elements. An ]]> element names a group of related methods which oddjobd will provide at the containing ]]>'s path. The interface name is given as the value of its "name" attribute. It may contain ]]>, ]]>, and ]]> elements. An ]]> element names a specific method which oddjobd will provide as part of the containing ]]> at the containing ]]>'s path. The method name is given as the value of its "name" attribute, and it may contain ]]>, ]]>, and ]]> elements. An ]]> element specifies that a method is implemented as an external helper (oddjobd itself implements a limited number of methods internally). It includes a number of attributes: "exec", the path of the binary to run "arguments", the number of arguments which a client is expected to supply to the method "prepend_user_name", whether or not the calling user's name should be prepended to the list of arguments before they are passed to the helper "argument_passing_method", either "stdin" (the default) or "cmdline", specifying that method arguments should be passed in on stdin, one parameter per line, or as command-line arguments An ]]> or ]]> element specifies an entry in an access control list (ACL) which controls whether or not oddjobd will attempt to fulfill client requests. Each entry defines a set of values for attributes of a client request. If a specific request provides these values, the access control list entry is considered to match it. Attributes which are not specified as part of an access control entry are ignored when checking if a request matches that entry. The defined attributes are: "user", the client's user name "min_uid", a UID which the user's UID must be greater than or equal to "max_uid", a UID which the user's UID must be less than or equal to @SELINUX_ACLS_XML_START@ "selinux_enforcing", "yes" or "no", corresponding to whether SELinux is enabled and in enforcing mode "selinux_context", the SELinux context of the client process "selinux_user", the SELinux user of the client process "selinux_role", the SELinux role of the client process "selinux_type", the SELinux type of the client process @SELINUX_ACLS_XML_END@ The process of checking the ACL for any method is simple: First, if the ACL contains a ]]> element which matches the request, access is denied. Second, if the ACL contains an ]]> element which matches the request, access is allowed. If no entry in the ACL matches the request, the check continues on to the containing ]]> element's ACL. If no match is found, the containing ]]> element's ACL is consulted, then that of the containing ]]> element. Lastly, the ACL of the top-level ]]> element is scanned. If, after all of these checks, no match was found, access is denied. The helpers themselves are executed with superuser privileges and with these variables set in the environment: "ODDJOB_SERVICE_NAME", the name of the called service "ODDJOB_OBJECT_PATH", the name of the called object "ODDJOB_INTERFACE_NAME", the name of the called interface "ODDJOB_METHOD_NAME", the name of the called method CautionHelpers must treat arguments as untrusted data to avoid escalating a compromise of an account which would be allowed to call the method to a compromise of the superuser account. The oddjobd server performs no other authentication.
oddjob-0.16-0/sample/0000777000471600047240000000000010311657706011343 500000000000000oddjob-0.16-0/sample/Makefile.am0000664000471600047240000000060410302471477013314 00000000000000EXTRA_DIST = \ $(PACKAGE)d-sample.conf.in \ $(PACKAGE)-sample.conf \ $(PACKAGE)-sample.sh daemonconfdir = $(sysconfdir)/$(PACKAGE)d.conf.d systemdbusdir = $(sysconfdir)/@DBUS_PACKAGE@/system.d pkglibexecdir = $(libexecdir)/$(PACKAGE) if INSTALL_SAMPLE daemonconf_DATA = $(PACKAGE)d-sample.conf systemdbus_DATA = $(PACKAGE)-sample.conf pkglibexec_SCRIPTS = $(PACKAGE)-sample.sh endif oddjob-0.16-0/sample/Makefile.in0000664000471600047240000003360110311657647013335 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = sample DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/oddjob-sample.conf.in $(srcdir)/oddjob-sample.sh.in \ $(srcdir)/oddjobd-sample.conf.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = oddjobd-sample.conf oddjob-sample.conf \ oddjob-sample.sh am__installdirs = "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(daemonconfdir)" "$(DESTDIR)$(systemdbusdir)" pkglibexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(pkglibexec_SCRIPTS) 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 = `echo $$p | sed -e 's|^.*/||'`; daemonconfDATA_INSTALL = $(INSTALL_DATA) systemdbusDATA_INSTALL = $(INSTALL_DATA) DATA = $(daemonconf_DATA) $(systemdbus_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ $(PACKAGE)d-sample.conf.in \ $(PACKAGE)-sample.conf \ $(PACKAGE)-sample.sh daemonconfdir = $(sysconfdir)/$(PACKAGE)d.conf.d systemdbusdir = $(sysconfdir)/@DBUS_PACKAGE@/system.d pkglibexecdir = $(libexecdir)/$(PACKAGE) @INSTALL_SAMPLE_TRUE@daemonconf_DATA = $(PACKAGE)d-sample.conf @INSTALL_SAMPLE_TRUE@systemdbus_DATA = $(PACKAGE)-sample.conf @INSTALL_SAMPLE_TRUE@pkglibexec_SCRIPTS = $(PACKAGE)-sample.sh all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sample/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign sample/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh oddjobd-sample.conf: $(top_builddir)/config.status $(srcdir)/oddjobd-sample.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjob-sample.conf: $(top_builddir)/config.status $(srcdir)/oddjob-sample.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjob-sample.sh: $(top_builddir)/config.status $(srcdir)/oddjob-sample.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-pkglibexecSCRIPTS: $(pkglibexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(pkglibexecdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibexecdir)" @list='$(pkglibexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(pkglibexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ $(pkglibexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibexecdir)/$$f"; \ else :; fi; \ done uninstall-pkglibexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkglibexecdir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-daemonconfDATA: $(daemonconf_DATA) @$(NORMAL_INSTALL) test -z "$(daemonconfdir)" || $(mkdir_p) "$(DESTDIR)$(daemonconfdir)" @list='$(daemonconf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(daemonconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(daemonconfdir)/$$f'"; \ $(daemonconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(daemonconfdir)/$$f"; \ done uninstall-daemonconfDATA: @$(NORMAL_UNINSTALL) @list='$(daemonconf_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(daemonconfdir)/$$f'"; \ rm -f "$(DESTDIR)$(daemonconfdir)/$$f"; \ done install-systemdbusDATA: $(systemdbus_DATA) @$(NORMAL_INSTALL) test -z "$(systemdbusdir)" || $(mkdir_p) "$(DESTDIR)$(systemdbusdir)" @list='$(systemdbus_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(systemdbusDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(systemdbusdir)/$$f'"; \ $(systemdbusDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(systemdbusdir)/$$f"; \ done uninstall-systemdbusDATA: @$(NORMAL_UNINSTALL) @list='$(systemdbus_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(systemdbusdir)/$$f'"; \ rm -f "$(DESTDIR)$(systemdbusdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(daemonconfdir)" "$(DESTDIR)$(systemdbusdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-daemonconfDATA install-systemdbusDATA install-exec-am: install-pkglibexecSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-daemonconfDATA uninstall-info-am \ uninstall-pkglibexecSCRIPTS uninstall-systemdbusDATA .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-daemonconfDATA install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-pkglibexecSCRIPTS install-strip \ install-systemdbusDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-daemonconfDATA \ uninstall-info-am uninstall-pkglibexecSCRIPTS \ uninstall-systemdbusDATA # 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: oddjob-0.16-0/sample/oddjob-sample.conf.in0000664000471600047240000000136110302471477015255 00000000000000 oddjob-0.16-0/sample/oddjob-sample.sh.in0000775000471600047240000000012010302471477014735 00000000000000#!/bin/sh echo "[env]" env | grep ^ODDJOB echo "[id]" id echo "[vmstat]" vmstat oddjob-0.16-0/sample/oddjobd-sample.conf.in0000664000471600047240000000067310304732163015420 00000000000000 oddjob-0.16-0/sample/oddjob-sample.conf0000664000471600047240000000131410311657673014652 00000000000000 oddjob-0.16-0/sample/oddjob-sample.sh0000664000471600047240000000012010311657673014331 00000000000000#!/bin/sh echo "[env]" env | grep ^ODDJOB echo "[id]" id echo "[vmstat]" vmstat oddjob-0.16-0/scripts/0000777000471600047240000000000010311657706011551 500000000000000oddjob-0.16-0/scripts/Makefile.am0000664000471600047240000000012310233236723013512 00000000000000EXTRA_DIST = oddjobd.in initdir = $(sysconfdir)/rc.d/init.d init_SCRIPTS = oddjobd oddjob-0.16-0/scripts/Makefile.in0000664000471600047240000002604510311657647013547 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = scripts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/oddjobd.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = oddjobd am__installdirs = "$(DESTDIR)$(initdir)" initSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(init_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = oddjobd.in initdir = $(sysconfdir)/rc.d/init.d init_SCRIPTS = oddjobd all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign scripts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh oddjobd: $(top_builddir)/config.status $(srcdir)/oddjobd.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-initSCRIPTS: $(init_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(initdir)" || $(mkdir_p) "$(DESTDIR)$(initdir)" @list='$(init_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(initSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(initdir)/$$f'"; \ $(initSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(initdir)/$$f"; \ else :; fi; \ done uninstall-initSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(init_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(initdir)/$$f'"; \ rm -f "$(DESTDIR)$(initdir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(initdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-initSCRIPTS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-initSCRIPTS .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-initSCRIPTS install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am uninstall-initSCRIPTS # 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: oddjob-0.16-0/scripts/oddjobd.in0000664000471600047240000000326410233236723013424 00000000000000#!/bin/bash # # oddjobd This shell script takes care of starting and stopping # oddjobd. # # chkconfig: - 98 02 # description: oddjobd provides support for unprivileged applications which \ # require one of a set of specified privileged operations to be \ # performed on their behalf. prefix=@prefix@ exec_prefix=@exec_prefix@ sbindir=@sbindir@ sysconfdir=@sysconfdir@ prog=oddjobd oddjobd=${sbindir}/${prog} # Source function library. . /etc/rc.d/init.d/functions [ -f $oddjobd ] || exit 0 start() { # Start daemons. echo -n $"Starting $prog: " daemon ${oddjobd} -p /var/run/${prog}.pid 2>/dev/null RETVAL=$? echo if [ $RETVAL -eq 0 ]; then touch /var/lock/subsys/oddjobd if [ -x /usr/bin/logger ]; then /usr/bin/logger -t oddjobd 'oddjobd startup succeeded' fi; else if [ -x /usr/bin/logger ]; then /usr/bin/logger -t oddjobd 'oddjobd startup failed' fi; fi return $RETVAL } stop() { # Stop daemons. echo -n $"Shutting down $prog: " killproc ${oddjobd} RETVAL=$? echo if [ $RETVAL -eq 0 ]; then rm -f /var/lock/subsys/oddjobd if [ -x /usr/bin/logger ]; then /usr/bin/logger -t oddjobd 'oddjobd shutdown succeeded' fi; else if [ -x /usr/bin/logger ]; then /usr/bin/logger -t oddjobd 'oddjobd shutdown failed' fi; fi return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload) stop start RETVAL=$? ;; condrestart) if [ -f /var/lock/subsys/oddjobd ]; then stop start RETVAL=$? fi ;; status) status oddjobd RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $RETVAL oddjob-0.16-0/src/0000777000471600047240000000000010311657706010651 500000000000000oddjob-0.16-0/src/oddjob.h0000664000471600047240000000440610303404176012175 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_h #define oddjob_h const char *oddjob_dbus_get_default_service(void); const char *oddjob_dbus_get_default_object(void); const char *oddjob_dbus_get_default_interface(void); int oddjob_dbus_call_methodv(DBusBusType bus, const char *service, const char *object_path, const char *interface, const char *method, int *result, char *output, size_t output_length, char *error, size_t error_length, char **argv); int oddjob_dbus_call_method(DBusBusType bus, const char *service, const char *object_path, const char *interface, const char *method, int *result, char *output, size_t output_length, char *error, size_t error_length, ...); #endif oddjob-0.16-0/src/Makefile.am0000664000471600047240000000552610302471477012632 00000000000000EXTRA_DIST = oddjob.conf.in oddjob.pc.in userfstab \ exit1.sh \ printenv.sh.in \ sanity.sh \ sigint.sh \ sleep30.sh AM_CFLAGS = @DBUS_CFLAGS@ @XML_CFLAGS@ @SELINUX_CFLAGS@ SUBDIRS = . lookup bin_PROGRAMS = oddjob_request sbin_PROGRAMS = oddjobd sysconf_DATA = oddjobd.conf man_MANS = oddjob_request.1 oddjob.conf.5 oddjobd.conf.5 oddjobd.8 pam_oddjob_mkhomedir.8 noinst_MANS = pam_oddjob_mounthomedir.8 install-data-hook: $(INSTALL) -d -m755 $(DESTDIR)/$(sysconfdir)/oddjobd.conf.d $(INSTALL) -d -m755 $(DESTDIR)/$(sysconfdir)/$(PACKAGE) pkgsysconfdir = $(sysconfdir)/$(PACKAGE) noinst_DATA = userfstab systemdbusdir = $(sysconfdir)/@DBUS_PACKAGE@/system.d systemdbus_DATA = oddjob.conf pkglibexecdir = $(libexecdir)/$(PACKAGE) pkglibexec_PROGRAMS = mkhomedir noinst_PROGRAMS = mounthomedir oddjob-launch-dbus-service pkglibexec_SCRIPTS = sanity.sh libsecuritydir = $(libdir)/security libsecurity_LTLIBRARIES = pam_oddjob_mkhomedir.la noinst_LTLIBRARIES = pam_oddjob_mounthomedir.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = oddjob.pc pkginclude_HEADERS = oddjob.h lib_LTLIBRARIES = liboddjob.la noinst_LTLIBRARIES += liboddcommon.la libodddbus.la liboddselinux.la liboddjob_la_SOURCES = \ common.h \ buffer.c buffer.h \ util.h util.c \ oddjob_dbus.h oddjob_dbus.c \ mainloop.h mainloop.c liboddjob_la_LDFLAGS = -export-symbols-regex "oddjob_dbus_call_method.*" liboddcommon_la_SOURCES = \ buffer.c buffer.h \ util.c \ util.h \ common.h libodddbus_la_SOURCES = \ oddjob_dbus.c \ oddjob_dbus.h \ mainloop.c \ mainloop.h \ common.h liboddselinux_la_SOURCES = \ selinux.h \ selinux.c \ common.h mkhomedir_SOURCES = \ common.h \ handlers.h \ selinux.h \ mkhomedir.c mkhomedir_LDADD = liboddcommon.la liboddselinux.la @SELINUX_LIBS@ mounthomedir_SOURCES = \ common.h \ handlers.h \ selinux.h \ mounthomedir.c mounthomedir_LDADD = liboddcommon.la liboddselinux.la @SELINUX_LIBS@ oddjob_launch_dbus_service_SOURCES = \ common.h \ handlers.h \ launch.c oddjob_launch_dbus_service_LDADD = liboddcommon.la pam_oddjob_mkhomedir_la_SOURCES = \ common.h \ oddjob_dbus.c \ oddjob_dbus.h \ mainloop.c \ mainloop.h \ pam_oddjob_mkhomedir.c pam_oddjob_mkhomedir_la_LIBADD = liboddcommon.la @DBUS_LIBS@ pam_oddjob_mkhomedir_la_LDFLAGS = -module -avoid-version -export-symbols-regex "pam_sm_.*" pam_oddjob_mounthomedir_la_SOURCES = \ common.h \ oddjob_dbus.c \ oddjob_dbus.h \ mainloop.c \ mainloop.h \ pam_oddjob_mounthomedir.c pam_oddjob_mounthomedir_la_LIBADD = liboddcommon.la @DBUS_LIBS@ pam_oddjob_mounthomedir_la_LDFLAGS = -module -avoid-version -export-symbols-regex "pam_sm_.*" oddjob_request_SOURCES = \ common.h \ oddjob_request.c oddjob_request_LDADD = liboddjob.la @DBUS_LIBS@ oddjobd_SOURCES = \ common.h \ handlers.h \ util.h \ oddjobd.c oddjobd_LDADD = libodddbus.la liboddselinux.la liboddcommon.la @DBUS_LIBS@ @XML_LIBS@ @SELINUX_LIBS@ oddjob-0.16-0/src/Makefile.in0000664000471600047240000013054010311657650012635 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = oddjob_request$(EXEEXT) sbin_PROGRAMS = oddjobd$(EXEEXT) pkglibexec_PROGRAMS = mkhomedir$(EXEEXT) noinst_PROGRAMS = mounthomedir$(EXEEXT) \ oddjob-launch-dbus-service$(EXEEXT) subdir = src DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/oddjob.conf.5.in \ $(srcdir)/oddjob.conf.in $(srcdir)/oddjob.pc.in \ $(srcdir)/oddjob_request.1.in $(srcdir)/oddjobd-local.conf.in \ $(srcdir)/oddjobd.8.in $(srcdir)/oddjobd.conf.5.in \ $(srcdir)/oddjobd.conf.in $(srcdir)/pam_oddjob_mkhomedir.8.in \ $(srcdir)/pam_oddjob_mounthomedir.8.in \ $(srcdir)/printenv.sh.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = oddjob.pc oddjob.conf oddjob.conf.5 oddjobd.conf \ oddjobd.conf.5 oddjobd-local.conf oddjob_request.1 oddjobd.8 \ pam_oddjob_mkhomedir.8 pam_oddjob_mounthomedir.8 printenv.sh am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libsecuritydir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(systemdbusdir)" \ "$(DESTDIR)$(pkgincludedir)" libLTLIBRARIES_INSTALL = $(INSTALL) libsecurityLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(libsecurity_LTLIBRARIES) \ $(noinst_LTLIBRARIES) liboddcommon_la_LIBADD = am_liboddcommon_la_OBJECTS = buffer.lo util.lo liboddcommon_la_OBJECTS = $(am_liboddcommon_la_OBJECTS) libodddbus_la_LIBADD = am_libodddbus_la_OBJECTS = oddjob_dbus.lo mainloop.lo libodddbus_la_OBJECTS = $(am_libodddbus_la_OBJECTS) liboddjob_la_LIBADD = am_liboddjob_la_OBJECTS = buffer.lo util.lo oddjob_dbus.lo mainloop.lo liboddjob_la_OBJECTS = $(am_liboddjob_la_OBJECTS) liboddselinux_la_LIBADD = am_liboddselinux_la_OBJECTS = selinux.lo liboddselinux_la_OBJECTS = $(am_liboddselinux_la_OBJECTS) pam_oddjob_mkhomedir_la_DEPENDENCIES = liboddcommon.la am_pam_oddjob_mkhomedir_la_OBJECTS = oddjob_dbus.lo mainloop.lo \ pam_oddjob_mkhomedir.lo pam_oddjob_mkhomedir_la_OBJECTS = \ $(am_pam_oddjob_mkhomedir_la_OBJECTS) pam_oddjob_mounthomedir_la_DEPENDENCIES = liboddcommon.la am_pam_oddjob_mounthomedir_la_OBJECTS = oddjob_dbus.lo mainloop.lo \ pam_oddjob_mounthomedir.lo pam_oddjob_mounthomedir_la_OBJECTS = \ $(am_pam_oddjob_mounthomedir_la_OBJECTS) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) pkglibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(pkglibexec_PROGRAMS) \ $(sbin_PROGRAMS) am_mkhomedir_OBJECTS = mkhomedir.$(OBJEXT) mkhomedir_OBJECTS = $(am_mkhomedir_OBJECTS) mkhomedir_DEPENDENCIES = liboddcommon.la liboddselinux.la am_mounthomedir_OBJECTS = mounthomedir.$(OBJEXT) mounthomedir_OBJECTS = $(am_mounthomedir_OBJECTS) mounthomedir_DEPENDENCIES = liboddcommon.la liboddselinux.la am_oddjob_launch_dbus_service_OBJECTS = launch.$(OBJEXT) oddjob_launch_dbus_service_OBJECTS = \ $(am_oddjob_launch_dbus_service_OBJECTS) oddjob_launch_dbus_service_DEPENDENCIES = liboddcommon.la am_oddjob_request_OBJECTS = oddjob_request.$(OBJEXT) oddjob_request_OBJECTS = $(am_oddjob_request_OBJECTS) oddjob_request_DEPENDENCIES = liboddjob.la am_oddjobd_OBJECTS = oddjobd.$(OBJEXT) oddjobd_OBJECTS = $(am_oddjobd_OBJECTS) oddjobd_DEPENDENCIES = libodddbus.la liboddselinux.la liboddcommon.la pkglibexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(pkglibexec_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(liboddcommon_la_SOURCES) $(libodddbus_la_SOURCES) \ $(liboddjob_la_SOURCES) $(liboddselinux_la_SOURCES) \ $(pam_oddjob_mkhomedir_la_SOURCES) \ $(pam_oddjob_mounthomedir_la_SOURCES) $(mkhomedir_SOURCES) \ $(mounthomedir_SOURCES) $(oddjob_launch_dbus_service_SOURCES) \ $(oddjob_request_SOURCES) $(oddjobd_SOURCES) DIST_SOURCES = $(liboddcommon_la_SOURCES) $(libodddbus_la_SOURCES) \ $(liboddjob_la_SOURCES) $(liboddselinux_la_SOURCES) \ $(pam_oddjob_mkhomedir_la_SOURCES) \ $(pam_oddjob_mounthomedir_la_SOURCES) $(mkhomedir_SOURCES) \ $(mounthomedir_SOURCES) $(oddjob_launch_dbus_service_SOURCES) \ $(oddjob_request_SOURCES) $(oddjobd_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) pkgconfigDATA_INSTALL = $(INSTALL_DATA) sysconfDATA_INSTALL = $(INSTALL_DATA) systemdbusDATA_INSTALL = $(INSTALL_DATA) DATA = $(noinst_DATA) $(pkgconfig_DATA) $(sysconf_DATA) \ $(systemdbus_DATA) pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = oddjob.conf.in oddjob.pc.in userfstab \ exit1.sh \ printenv.sh.in \ sanity.sh \ sigint.sh \ sleep30.sh AM_CFLAGS = @DBUS_CFLAGS@ @XML_CFLAGS@ @SELINUX_CFLAGS@ SUBDIRS = . lookup sysconf_DATA = oddjobd.conf man_MANS = oddjob_request.1 oddjob.conf.5 oddjobd.conf.5 oddjobd.8 pam_oddjob_mkhomedir.8 noinst_MANS = pam_oddjob_mounthomedir.8 pkgsysconfdir = $(sysconfdir)/$(PACKAGE) noinst_DATA = userfstab systemdbusdir = $(sysconfdir)/@DBUS_PACKAGE@/system.d systemdbus_DATA = oddjob.conf pkglibexecdir = $(libexecdir)/$(PACKAGE) pkglibexec_SCRIPTS = sanity.sh libsecuritydir = $(libdir)/security libsecurity_LTLIBRARIES = pam_oddjob_mkhomedir.la noinst_LTLIBRARIES = pam_oddjob_mounthomedir.la liboddcommon.la \ libodddbus.la liboddselinux.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = oddjob.pc pkginclude_HEADERS = oddjob.h lib_LTLIBRARIES = liboddjob.la liboddjob_la_SOURCES = \ common.h \ buffer.c buffer.h \ util.h util.c \ oddjob_dbus.h oddjob_dbus.c \ mainloop.h mainloop.c liboddjob_la_LDFLAGS = -export-symbols-regex "oddjob_dbus_call_method.*" liboddcommon_la_SOURCES = \ buffer.c buffer.h \ util.c \ util.h \ common.h libodddbus_la_SOURCES = \ oddjob_dbus.c \ oddjob_dbus.h \ mainloop.c \ mainloop.h \ common.h liboddselinux_la_SOURCES = \ selinux.h \ selinux.c \ common.h mkhomedir_SOURCES = \ common.h \ handlers.h \ selinux.h \ mkhomedir.c mkhomedir_LDADD = liboddcommon.la liboddselinux.la @SELINUX_LIBS@ mounthomedir_SOURCES = \ common.h \ handlers.h \ selinux.h \ mounthomedir.c mounthomedir_LDADD = liboddcommon.la liboddselinux.la @SELINUX_LIBS@ oddjob_launch_dbus_service_SOURCES = \ common.h \ handlers.h \ launch.c oddjob_launch_dbus_service_LDADD = liboddcommon.la pam_oddjob_mkhomedir_la_SOURCES = \ common.h \ oddjob_dbus.c \ oddjob_dbus.h \ mainloop.c \ mainloop.h \ pam_oddjob_mkhomedir.c pam_oddjob_mkhomedir_la_LIBADD = liboddcommon.la @DBUS_LIBS@ pam_oddjob_mkhomedir_la_LDFLAGS = -module -avoid-version -export-symbols-regex "pam_sm_.*" pam_oddjob_mounthomedir_la_SOURCES = \ common.h \ oddjob_dbus.c \ oddjob_dbus.h \ mainloop.c \ mainloop.h \ pam_oddjob_mounthomedir.c pam_oddjob_mounthomedir_la_LIBADD = liboddcommon.la @DBUS_LIBS@ pam_oddjob_mounthomedir_la_LDFLAGS = -module -avoid-version -export-symbols-regex "pam_sm_.*" oddjob_request_SOURCES = \ common.h \ oddjob_request.c oddjob_request_LDADD = liboddjob.la @DBUS_LIBS@ oddjobd_SOURCES = \ common.h \ handlers.h \ util.h \ oddjobd.c oddjobd_LDADD = libodddbus.la liboddselinux.la liboddcommon.la @DBUS_LIBS@ @XML_LIBS@ @SELINUX_LIBS@ all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh oddjob.pc: $(top_builddir)/config.status $(srcdir)/oddjob.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjob.conf: $(top_builddir)/config.status $(srcdir)/oddjob.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjob.conf.5: $(top_builddir)/config.status $(srcdir)/oddjob.conf.5.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjobd.conf: $(top_builddir)/config.status $(srcdir)/oddjobd.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjobd.conf.5: $(top_builddir)/config.status $(srcdir)/oddjobd.conf.5.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjobd-local.conf: $(top_builddir)/config.status $(srcdir)/oddjobd-local.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjob_request.1: $(top_builddir)/config.status $(srcdir)/oddjob_request.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ oddjobd.8: $(top_builddir)/config.status $(srcdir)/oddjobd.8.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pam_oddjob_mkhomedir.8: $(top_builddir)/config.status $(srcdir)/pam_oddjob_mkhomedir.8.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ pam_oddjob_mounthomedir.8: $(top_builddir)/config.status $(srcdir)/pam_oddjob_mounthomedir.8.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ printenv.sh: $(top_builddir)/config.status $(srcdir)/printenv.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done install-libsecurityLTLIBRARIES: $(libsecurity_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libsecuritydir)" || $(mkdir_p) "$(DESTDIR)$(libsecuritydir)" @list='$(libsecurity_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libsecurityLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libsecuritydir)/$$f'"; \ $(LIBTOOL) --mode=install $(libsecurityLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libsecuritydir)/$$f"; \ else :; fi; \ done uninstall-libsecurityLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(libsecurity_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libsecuritydir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libsecuritydir)/$$p"; \ done clean-libsecurityLTLIBRARIES: -test -z "$(libsecurity_LTLIBRARIES)" || rm -f $(libsecurity_LTLIBRARIES) @list='$(libsecurity_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liboddcommon.la: $(liboddcommon_la_OBJECTS) $(liboddcommon_la_DEPENDENCIES) $(LINK) $(liboddcommon_la_LDFLAGS) $(liboddcommon_la_OBJECTS) $(liboddcommon_la_LIBADD) $(LIBS) libodddbus.la: $(libodddbus_la_OBJECTS) $(libodddbus_la_DEPENDENCIES) $(LINK) $(libodddbus_la_LDFLAGS) $(libodddbus_la_OBJECTS) $(libodddbus_la_LIBADD) $(LIBS) liboddjob.la: $(liboddjob_la_OBJECTS) $(liboddjob_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(liboddjob_la_LDFLAGS) $(liboddjob_la_OBJECTS) $(liboddjob_la_LIBADD) $(LIBS) liboddselinux.la: $(liboddselinux_la_OBJECTS) $(liboddselinux_la_DEPENDENCIES) $(LINK) $(liboddselinux_la_LDFLAGS) $(liboddselinux_la_OBJECTS) $(liboddselinux_la_LIBADD) $(LIBS) pam_oddjob_mkhomedir.la: $(pam_oddjob_mkhomedir_la_OBJECTS) $(pam_oddjob_mkhomedir_la_DEPENDENCIES) $(LINK) -rpath $(libsecuritydir) $(pam_oddjob_mkhomedir_la_LDFLAGS) $(pam_oddjob_mkhomedir_la_OBJECTS) $(pam_oddjob_mkhomedir_la_LIBADD) $(LIBS) pam_oddjob_mounthomedir.la: $(pam_oddjob_mounthomedir_la_OBJECTS) $(pam_oddjob_mounthomedir_la_DEPENDENCIES) $(LINK) $(pam_oddjob_mounthomedir_la_LDFLAGS) $(pam_oddjob_mounthomedir_la_OBJECTS) $(pam_oddjob_mounthomedir_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(pkglibexecdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibexecdir)" @list='$(pkglibexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(pkglibexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(pkglibexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(pkglibexecdir)/$$f" || exit 1; \ else :; fi; \ done uninstall-pkglibexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkglibexecdir)/$$f"; \ done clean-pkglibexecPROGRAMS: @list='$(pkglibexec_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ rm -f "$(DESTDIR)$(sbindir)/$$f"; \ done clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done mkhomedir$(EXEEXT): $(mkhomedir_OBJECTS) $(mkhomedir_DEPENDENCIES) @rm -f mkhomedir$(EXEEXT) $(LINK) $(mkhomedir_LDFLAGS) $(mkhomedir_OBJECTS) $(mkhomedir_LDADD) $(LIBS) mounthomedir$(EXEEXT): $(mounthomedir_OBJECTS) $(mounthomedir_DEPENDENCIES) @rm -f mounthomedir$(EXEEXT) $(LINK) $(mounthomedir_LDFLAGS) $(mounthomedir_OBJECTS) $(mounthomedir_LDADD) $(LIBS) oddjob-launch-dbus-service$(EXEEXT): $(oddjob_launch_dbus_service_OBJECTS) $(oddjob_launch_dbus_service_DEPENDENCIES) @rm -f oddjob-launch-dbus-service$(EXEEXT) $(LINK) $(oddjob_launch_dbus_service_LDFLAGS) $(oddjob_launch_dbus_service_OBJECTS) $(oddjob_launch_dbus_service_LDADD) $(LIBS) oddjob_request$(EXEEXT): $(oddjob_request_OBJECTS) $(oddjob_request_DEPENDENCIES) @rm -f oddjob_request$(EXEEXT) $(LINK) $(oddjob_request_LDFLAGS) $(oddjob_request_OBJECTS) $(oddjob_request_LDADD) $(LIBS) oddjobd$(EXEEXT): $(oddjobd_OBJECTS) $(oddjobd_DEPENDENCIES) @rm -f oddjobd$(EXEEXT) $(LINK) $(oddjobd_LDFLAGS) $(oddjobd_OBJECTS) $(oddjobd_LDADD) $(LIBS) install-pkglibexecSCRIPTS: $(pkglibexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(pkglibexecdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibexecdir)" @list='$(pkglibexec_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(pkglibexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ $(pkglibexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibexecdir)/$$f"; \ else :; fi; \ done uninstall-pkglibexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkglibexecdir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mainloop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkhomedir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mounthomedir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oddjob_dbus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oddjob_request.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oddjobd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_oddjob_mkhomedir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pam_oddjob_mounthomedir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selinux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-man5: $(man5_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)" @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ done uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ done install-man8: $(man8_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.8*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ *) ext='8' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ done uninstall-man8: @$(NORMAL_UNINSTALL) @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.8*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 8*) ;; \ *) ext='8' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ done install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" @list='$(sysconf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ done uninstall-sysconfDATA: @$(NORMAL_UNINSTALL) @list='$(sysconf_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ done install-systemdbusDATA: $(systemdbus_DATA) @$(NORMAL_INSTALL) test -z "$(systemdbusdir)" || $(mkdir_p) "$(DESTDIR)$(systemdbusdir)" @list='$(systemdbus_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(systemdbusDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(systemdbusdir)/$$f'"; \ $(systemdbusDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(systemdbusdir)/$$f"; \ done uninstall-systemdbusDATA: @$(NORMAL_UNINSTALL) @list='$(systemdbus_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(systemdbusdir)/$$f'"; \ rm -f "$(DESTDIR)$(systemdbusdir)/$$f"; \ done install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libsecuritydir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(systemdbusdir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libsecurityLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ clean-pkglibexecPROGRAMS clean-sbinPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-libsecurityLTLIBRARIES install-man \ install-pkgconfigDATA install-pkgincludeHEADERS \ install-systemdbusDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ install-pkglibexecPROGRAMS install-pkglibexecSCRIPTS \ install-sbinPROGRAMS install-sysconfDATA install-info: install-info-recursive install-man: install-man1 install-man5 install-man8 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ uninstall-libLTLIBRARIES uninstall-libsecurityLTLIBRARIES \ uninstall-man uninstall-pkgconfigDATA \ uninstall-pkgincludeHEADERS uninstall-pkglibexecPROGRAMS \ uninstall-pkglibexecSCRIPTS uninstall-sbinPROGRAMS \ uninstall-sysconfDATA uninstall-systemdbusDATA uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libsecurityLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ clean-pkglibexecPROGRAMS clean-recursive clean-sbinPROGRAMS \ ctags ctags-recursive distclean distclean-compile \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-data-hook install-exec install-exec-am \ install-info install-info-am install-libLTLIBRARIES \ install-libsecurityLTLIBRARIES install-man install-man1 \ install-man5 install-man8 install-pkgconfigDATA \ install-pkgincludeHEADERS install-pkglibexecPROGRAMS \ install-pkglibexecSCRIPTS install-sbinPROGRAMS install-strip \ install-sysconfDATA install-systemdbusDATA installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am \ uninstall-libLTLIBRARIES uninstall-libsecurityLTLIBRARIES \ uninstall-man uninstall-man1 uninstall-man5 uninstall-man8 \ uninstall-pkgconfigDATA uninstall-pkgincludeHEADERS \ uninstall-pkglibexecPROGRAMS uninstall-pkglibexecSCRIPTS \ uninstall-sbinPROGRAMS uninstall-sysconfDATA \ uninstall-systemdbusDATA install-data-hook: $(INSTALL) -d -m755 $(DESTDIR)/$(sysconfdir)/oddjobd.conf.d $(INSTALL) -d -m755 $(DESTDIR)/$(sysconfdir)/$(PACKAGE) # 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: oddjob-0.16-0/src/oddjob.conf.5.in0000664000471600047240000000070710302711533013440 00000000000000.TH oddjob.conf 5 "25 April 2005" "oddjob Manual" .SH NAME oddjob.conf .SH DESCRIPTION The @mysysconfdir@/@DBUS_PACKAGE@/system.d/\fIoddjob.conf\fR configuration file specifies D-BUS-level access controls for the \fI@NAMESPACE@.oddjob\fR service, in particular which users can invoke methods provided by the service. For more information, please see the D-BUS documentation. .SH SEE ALSO \fBoddjob_request\fR(1) \fBoddjobd.conf\fR(5) \fBoddjobd\fR(8) oddjob-0.16-0/src/oddjob.conf.in0000664000471600047240000000504310302711533013273 00000000000000 oddjob-0.16-0/src/oddjob.pc.in0000664000471600047240000000036110302711533012746 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: oddjob Requires: dbus-1 Description: oddjob Client D-Bus Library Wrapper Version: @PACKAGE_VERSION@ Libs: -L${libdir} -loddjob Cflags: -I${includedir} oddjob-0.16-0/src/oddjob_request.1.in0000664000471600047240000000211610303404176014257 00000000000000.TH oddjob_request 1 "25 April 2005" "oddjob Manual" .SH NAME oddjob_request .SH SYNOPSIS oddjob_request [-s service] [-o object] [-i interface] [-S] [request [arg1 ...]] .SH DESCRIPTION The \fIoddjob_request\fR application is a simple \fIoddjob\fR client application which can be used to invoke a particular method provided by the \fIoddjobd\fR server. If no request is given as a command-line argument, \fIoddjob_request\fR will attempt to invoke the \fIlist\fR method, which should list all methods for which the invoking user is authorized. .SH ARGUMENTS .TP \fB\-S\fR Connect to the session bus instead of the system bus. This option is primarily intended for use in testing. \fI@NAMESPACE@.@PACKAGE@\fR. .TP \fB\-s\fR service The object is provided by the named service instead of \fI@NAMESPACE@.@PACKAGE@\fR. .TP \fB\-o\fR object Invoke a method on the named object instead of \fI@NAMESPACEPATH@/@PACKAGE@\fR. .TP \fB\-i\fR interface The method is part of the named interface instead of \fI@NAMESPACE@.@PACKAGE@\fR. .SH SEE ALSO \fBoddjob.conf\fR(5) \fBoddjobd.conf\fR(5) \fBoddjobd\fR(8) oddjob-0.16-0/src/oddjobd-local.conf.in0000664000471600047240000000320710302717325014534 00000000000000 oddjob-0.16-0/src/oddjobd.8.in0000664000471600047240000000165010303404176012664 00000000000000.TH oddjobd 8 "25 April 2005" "oddjob Manual" .SH NAME oddjobd .SH SYNOPSIS oddjobd [-n] [-d] [-p pidfile] [-c configfile] [-S] .SH DESCRIPTION The \fIoddjobd\fR daemon provides the @NAMESPACE@.oddjob service on the system-wide message bus. Each facility which \fIoddjobd\fR provides is provided as a separate D-BUS method. Any method can be invoked by name by any user, subject to access controls enforced by both D-BUS and \fIoddjobd\fR. Most methods are implemented as helper programs. .SH OPTIONS .TP -n Do not fork and become a daemon process. .TP -d Print debugging messages to stderr. Implies \fB-n\fR. .TP -p pidfile Store the daemon's process ID in the named file. .TP -c @mysysconfdir@/oddjobd.conf Read the daemon's configuration from the named file. .TP -S Connect to the session bus instead of the system bus. Used for testing only. .SH SEE ALSO \fBoddjob_request\fR(1) \fBoddjob.conf\fR(5) \fBoddjobd.conf\fR(5) oddjob-0.16-0/src/oddjobd.conf.5.in0000664000471600047240000000767710304732163013625 00000000000000.TH oddjobd.conf 5 "22 August 2005" "oddjob Manual" .SH NAME oddjobd.conf .SH DESCRIPTION The \fB@mysysconfdir@/oddjobd.conf\fR configuration file specifies which services the \fIoddjobd\fR server provides over the D-BUS, and authorization rules which are enforced in addition to those enforced by the system message bus. The configuration file is an XML document. The top-level element type is \fI\fR, which contains one or more \fI\fR elements. Each \fI\fR describes a service which will be provided on the system-wide message bus. Each \fI\fR describes an object path which will will be recognized by the specified service. The object path may include wildcards, in which case any call to an object with a path name which matches the specified path will be accepted. An object contains one or more \fI\fR elements, each of which describes a group of methods described in \fI\fP elements. Each \fI\fR element must specify the method name as a value for its \fIname\fR attribute and may include a \fI element which the name of an executable to run as its \fIexec\fR attribute and the number of arguments which will be passed to the helper as its \fIargument\fR attribute. A \fI\fR may also include attributes indicating whether or not the invoking user's name should be prepended to that argument list, and whether that argument list should be passed in to the helper via stdin (the default) or on its command line. Each \fI\fR, \fI\fR, \fI\fR, \fI\fR, or \fI\fR element may also include authorization elements \fI\fR and \fI\fR. Each \fI\fR or \fI\fR rule specifies some combination of a user name and/or a UID range which the invoking user must match for the rule to apply. @SELINUX_ACLS_MAN_SPECIFIC@A rule can also specify the caller's SELinux context, @SELINUX_ACLS_MAN_SPECIFIC@user, role, or execution domain, and be applied or @SELINUX_ACLS_MAN_SPECIFIC@not based on whether or not policy is being enforced. All \fI\fR rules for the method are checked first, followed by all of its \fI\fR rules. If no matches are found, the \fI\fR rules for the containing \fI\fR element are checked, followed by its \fI\fP rules, and so on. If all ACLs are searched and no matches turn up, access is denied. The configuration file may also indicate that the contents of other files should be read by the configuration parser, using an \fI\fR element. .SH EXAMPLES Here is an example file: Another: /etc/oddjobd-local.conf /etc/oddjobd.conf.d/*.conf And another: .SH SEE ALSO \fBoddjob_request\fR(1) \fBoddjob.conf\fR(5) \fBoddjobd\fR(8) oddjob-0.16-0/src/oddjobd.conf.in0000664000471600047240000001047310302472160013442 00000000000000 @mysysconfdir@/oddjobd.conf.d/*.conf @mysysconfdir@/oddjobd-local.conf oddjob-0.16-0/src/pam_oddjob_mkhomedir.8.in0000664000471600047240000000171510302711533015413 00000000000000.TH pam_oddjob_mkhomedir 8 "25 April 2005" "oddjob Manual" .SH NAME pam_oddjob_mkhomedir.so .SH SYNOPSIS session optional /lib/security/pam_oddjob_mkhomedir.so .SH DESCRIPTION The \fIpam_oddjob_mkhomedir.so\fR module invokes the \fImkhomedirfor\fR method of the \fI@NAMESPACE@.oddjob\fR service for the \fBPAM_USER\fR if the module is running with superuser privileges. Otherwise, it invokes the \fImkmyhomedir\fR method. If \fID-BUS\fR has not been configured to allow the calling application to invoke these methods of the \fI@NAMESPACEPATH@/oddjob\fR object provided by the \fI@NAMESPACE@.oddjob\fR service, then \fIoddjobd\fR will not receive the request and an error will be returned by \fID-BUS\fR. If \fIoddjobd\fR has not been configured to provide these methods, or the user is not authorized to use them, then \fIoddjobd\fR will ignore the module's requests. .SH SEE ALSO \fBoddjob_request\fR(1) \fBoddjob.conf\fR(5) \fBoddjobd.conf\fR(5) \fBoddjobd\fR(8) oddjob-0.16-0/src/pam_oddjob_mounthomedir.8.in0000664000471600047240000000206210302711533016142 00000000000000.TH pam_oddjob_mounthomedir 8 "25 April 2005" "oddjob Manual" .SH NAME pam_oddjob_mounthomedir.so .SH SYNOPSIS session optional /lib/security/pam_oddjob_mounthomedir.so .SH DESCRIPTION The \fIpam_oddjob_mounthomedir.so\fR module invokes the \fImounthomedirfor\fR method of the \fI@NAMESPACE@.oddjob\fR service for the \fBPAM_USER\fR if the module is running with superuser privileges, or the \fImountmyhomedir\fR method if the module is not. The requested action, either "mount" or "umount", is also passed as an argument. If \fID-BUS\fR has not been configured to allow the calling application to invoke these methods of the \fI@NAMESPACEPATH@/oddjob\fR object provided by the \fI@NAMESPACE@.oddjob\fR service, then \fIoddjobd\fR will not receive the request and an error will be returned by \fID-BUS\fR. If \fIoddjobd\fR has not been configured to provide these methods, or the user is not authorized to use them, then \fIoddjobd\fR will ignore the module's requests. .SH SEE ALSO \fBoddjob_request\fR(1) \fBoddjob.conf\fR(5) \fBoddjobd.conf\fR(5) \fBoddjobd\fR(8) oddjob-0.16-0/src/printenv.sh.in0000664000471600047240000000012310263332301013354 00000000000000#!/bin/sh env | grep '^@PACKAGE_NAME_CAPS@' | sed -e s,=,=\",g -e s,\$,\",g exit 0 oddjob-0.16-0/src/buffer.c0000664000471600047240000000657310267236064012217 00000000000000/* * Copyright 2005 Red Hat, Inc. * * 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; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA * */ #include "../config.h" #include #include #include #include #include #include #include "buffer.h" struct oddjob_buffer { unsigned char *data; size_t size, spare, used; }; struct oddjob_buffer * oddjob_buffer_new(size_t initial_size) { struct oddjob_buffer *ret; ret = malloc(sizeof(struct oddjob_buffer)); if (initial_size < 1024) { initial_size = 1024; } if (ret != NULL) { ret->data = malloc(initial_size); if (ret->data != NULL) { ret->size = initial_size; ret->spare = 0; ret->used = 0; ret->data[ret->spare + ret->used] = '\0'; } else { free(ret); ret = NULL; } } return ret; } static void oddjob_buffer_assure_avail(struct oddjob_buffer *buf, size_t minimum_size) { unsigned char *data; size_t would_be_nice; if (buf->spare + buf->used + minimum_size > buf->size) { would_be_nice = (howmany(buf->spare + buf->used + minimum_size, 1024) + 1) * 1024; data = malloc(would_be_nice); if (data == NULL) { fprintf(stderr, "Out of memory\n"); _exit(1); } memcpy(data, buf->data, buf->spare + buf->used); free(buf->data); buf->data = data; buf->size = would_be_nice; } } void oddjob_buffer_prepend(struct oddjob_buffer *buf, const unsigned char *bytes, size_t length) { if (length == (size_t) -1) { length = strlen((const char *)bytes); } if (buf->spare > length) { memcpy(buf->data + buf->spare - length, bytes, length); buf->spare -= length; } else { oddjob_buffer_assure_avail(buf, length + 1); memmove(buf->data + buf->spare + length, buf->data + buf->spare, buf->used); memcpy(buf->data + buf->spare, bytes, length); buf->used += length; } } void oddjob_buffer_append(struct oddjob_buffer *buf, const unsigned char *bytes, size_t length) { if (length == (size_t) -1) { length = strlen((const char *)bytes); } oddjob_buffer_assure_avail(buf, length + 1); memmove(buf->data + buf->spare + buf->used, bytes, length); buf->used += length; buf->data[buf->spare + buf->used] = '\0'; } void oddjob_buffer_consume(struct oddjob_buffer *buf, size_t length) { if (length < buf->used) { buf->spare += length; buf->used -= length; } else { buf->used = 0; } } void oddjob_buffer_clear(struct oddjob_buffer *buf) { buf->used = 0; } void oddjob_buffer_free(struct oddjob_buffer *buf) { free(buf->data); buf->data = NULL; buf->size = 0; buf->used = 0; buf->spare = 0; free(buf); } size_t oddjob_buffer_length(struct oddjob_buffer *buf) { return buf->used; } const unsigned char * oddjob_buffer_data(struct oddjob_buffer *buf) { return buf->data + buf->spare; } oddjob-0.16-0/src/buffer.h0000664000471600047240000000266110267236064012216 00000000000000/* * Copyright 2005 Red Hat, Inc. * * 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; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA * */ #ifndef oddjob_buffer_h #define oddjob_buffer_h #include struct oddjob_buffer; struct oddjob_buffer *oddjob_buffer_new(size_t initial_size); void oddjob_buffer_prepend(struct oddjob_buffer *buf, const unsigned char *bytes, size_t length); void oddjob_buffer_append(struct oddjob_buffer *buf, const unsigned char *bytes, size_t length); void oddjob_buffer_consume(struct oddjob_buffer *buf, size_t length); void oddjob_buffer_clear(struct oddjob_buffer *buf); void oddjob_buffer_free(struct oddjob_buffer *buf); size_t oddjob_buffer_length(struct oddjob_buffer *buf); const unsigned char *oddjob_buffer_data(struct oddjob_buffer *buf); #endif oddjob-0.16-0/src/util.c0000664000471600047240000001575410311656023011713 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include /* Write to a file, handling transient errors. */ ssize_t retry_write(int fd, unsigned char *buf, size_t length) { size_t start; ssize_t i; start = 0; while (start < length) { i = write(fd, buf + start, length - start); switch (i) { case 0: return start; break; case -1: switch (errno) { case EAGAIN: continue; default: return -1; } break; default: start += i; break; } } return start; } void * oddjob_malloc(size_t size) { void *ret; ret = malloc(size); if (ret == NULL) { fprintf(stderr, "Out of memory!\n"); _exit(1); } return ret; } void * oddjob_malloc0(size_t size) { void *ret; ret = oddjob_malloc(size); memset(ret, 0, size); return ret; } void oddjob_free(void *p) { free(p); } void oddjob_freev(void **p) { int i; for (i = 0; (p != NULL) && (p[i] != NULL); i++) { oddjob_free(p[i]); } oddjob_free(p); } char * oddjob_strdup(const char *s) { char *r; r = oddjob_malloc0(strlen(s) + 1); strcpy(r, s); return r; } char * oddjob_strdup_printf(const char *s, ...) { char *r, buf[1]; va_list va; int i; va_start(va, s); i = vsnprintf(buf, 1, s, va); va_end(va); r = oddjob_malloc0(i + 1); va_start(va, s); vsnprintf(r, i + 1, s, va); va_end(va); return r; } char * oddjob_strndup(const char *s, int n) { char *r, *end; int len; end = memchr(s, '\0', n); if ((end == NULL) || (end - s > n)) { len = n; } else { len = end - s; } r = oddjob_malloc0(len + 1); memmove(r, s, len); return r; } void oddjob_resize_array(void **array, size_t element_size, size_t current_n_elements, size_t want_n_elements) { void *p; if (want_n_elements > 0xffff) { fprintf(stderr, "Internal limit exceeded.\n"); _exit(1); } if (element_size > 0xffff) { fprintf(stderr, "Internal limit exceeded.\n"); _exit(1); } p = NULL; if ((element_size > 0) && (want_n_elements > 0)) { p = oddjob_malloc0(element_size * want_n_elements); } if ((current_n_elements > 0) && (want_n_elements > 0)) { memmove(p, *array, element_size * current_n_elements); memset(*array, 0, element_size * current_n_elements); } oddjob_free(*array); *array = p; } char ** oddjob_collect_args(FILE *fp) { char **ret, *thisline, *p; char buf[BUFSIZ]; size_t l, m, arraysize; ret = NULL; thisline = NULL; arraysize = 0; while (fgets(buf, sizeof(buf), fp) != NULL) { char *tmp; l = thisline ? strlen(thisline) : 0; m = strlen(buf); tmp = oddjob_malloc0(l + m + 1); if (l > 0) { strcpy(tmp, thisline); } memmove(tmp + l, buf, m); oddjob_free(thisline); thisline = tmp; p = strpbrk(thisline, "\r\n"); if (p != NULL) { *p = '\0'; oddjob_resize_array((void**) &ret, sizeof(char*), arraysize, arraysize + 2); ret[arraysize] = thisline; arraysize++; thisline = NULL; } } if (thisline != NULL) { oddjob_resize_array((void**) &ret, sizeof(char*), arraysize, arraysize ? arraysize + 1 : arraysize + 2); ret[arraysize] = thisline; arraysize = arraysize ? arraysize + 1 : arraysize + 2; thisline = NULL; } return ret; } void oddjob_free_args(char **args) { int i; if (args != NULL) { for (i = 0; args[i] != NULL; i++) { oddjob_free(args[i]); args[i] = NULL; } oddjob_free(args); } } char ** oddjob_parse_args(const char *cmdline, const char **error) { const char *p; char *q, *bigbuf; char **argv; int sqlevel, dqlevel, escape, word; size_t buffersize, words; buffersize = strlen(cmdline) * 3; bigbuf = oddjob_malloc0(buffersize); sqlevel = dqlevel = escape = 0; word = 0; p = cmdline; q = bigbuf; while (*p != '\0') { switch (*p) { case '\\': if ((dqlevel != 0) || (sqlevel != 0) || escape) { *q++ = *p++; escape = 0; } else { escape = 1; p++; } break; case '\'': switch (sqlevel) { case 0: if (escape || (dqlevel > 0)) { *q++ = *p++; escape = 0; } else { sqlevel = 1; p++; } break; case 1: sqlevel = 0; p++; break; default: break; } break; case '"': switch (dqlevel) { case 0: if (escape || (sqlevel > 0)) { *q++ = *p++; escape = 0; } else { dqlevel = 1; p++; } break; case 1: dqlevel = 0; p++; break; default: break; } break; case '\r': case '\n': case '\t': case ' ': if (escape || (dqlevel > 0) || (sqlevel > 0)) { *q++ = *p; } else { *q++ = '\0'; } p++; break; default: *q++ = *p++; break; } } if (error) { *error = NULL; } if (dqlevel > 0) { if (error) { *error = "Unmatched \""; } oddjob_free(bigbuf); return NULL; } if (sqlevel > 0) { if (error) { *error = "Unmatched '"; } oddjob_free(bigbuf); return NULL; } if (escape) { if (error) { *error = "Attempt to escape end-of-command"; } oddjob_free(bigbuf); return NULL; } p = NULL; words = 0; for (q = bigbuf; q < bigbuf + buffersize; q++) { if (*q != '\0') { if (p == NULL) { p = q; } } else { if (p != NULL) { words++; p = NULL; } } } argv = oddjob_malloc0(sizeof(char*) * (words + 1)); p = NULL; words = 0; for (q = bigbuf; q < bigbuf + buffersize; q++) { if (*q != '\0') { if (p == NULL) { p = q; } } else { if (p != NULL) { argv[words++] = oddjob_strdup(p); p = NULL; } } } oddjob_free(bigbuf); return argv; } oddjob-0.16-0/src/util.h0000664000471600047240000000422310305157444011713 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_util_h #define oddjob_util_h ssize_t retry_write(int fd, unsigned char *buf, size_t length); void *oddjob_malloc(size_t size); void *oddjob_malloc0(size_t size); void oddjob_free(void *p); void oddjob_freev(void *p); char *oddjob_strdup(const char *s); char *oddjob_strdup_printf(const char *s, ...); char *oddjob_strndup(const char *s, int n); void oddjob_resize_array(void **array, size_t element_size, size_t current_n_elements, size_t want_n_elements); char **oddjob_collect_args(FILE *fp); char **oddjob_parse_args(const char *cmdline, const char **error); void oddjob_free_args(char **args); #endif oddjob-0.16-0/src/common.h0000664000471600047240000000730210305144136012221 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_common_h #define oddjob_common_h #include "../config.h" #define ODDJOB_SERVICE_NAME ODDJOB_NAMESPACE "." PACKAGE_NAME #define ODDJOB_OBJECT_PATH ODDJOB_NAMESPACE_PATH "/" PACKAGE_NAME #define ODDJOB_INTERFACE_NAME ODDJOB_NAMESPACE "." PACKAGE_NAME #define ODDJOB_LIST_REQUESTS_METHOD "list" #define ODDJOB_SERVICE_ENV_VAR PACKAGE_NAME_CAPS "_SERVICE_NAME" #define ODDJOB_OBJECT_ENV_VAR PACKAGE_NAME_CAPS "_OBJECT_PATH" #define ODDJOB_INTERFACE_ENV_VAR PACKAGE_NAME_CAPS "_INTERFACE_NAME" #define ODDJOB_METHOD_ENV_VAR PACKAGE_NAME_CAPS "_METHOD_NAME" #define ODDJOB_USER_FNMATCH_FLAGS (FNM_NOESCAPE) #define ODDJOB_OBJECT_FNMATCH_FLAGS (FNM_PATHNAME | FNM_NOESCAPE) #define ODDJOB_SECONTEXT_FNMATCH_FLAGS (FNM_NOESCAPE) #define ODDJOB_SEUSER_FNMATCH_FLAGS (FNM_NOESCAPE) #define ODDJOB_SEROLE_FNMATCH_FLAGS (FNM_NOESCAPE) #define ODDJOB_SETYPE_FNMATCH_FLAGS (FNM_NOESCAPE) #define ODDJOB_SERANGE_FNMATCH_FLAGS (FNM_NOESCAPE) #define ODDJOB_ERROR_ACL ODDJOB_INTERFACE_NAME ".Error.ACL" #define ODDJOB_ERROR_EXEC ODDJOB_INTERFACE_NAME ".Error.Exec" #define ODDJOB_ERROR_INTERNAL ODDJOB_INTERFACE_NAME ".Error.Internal" #define ODDJOB_ERROR_UNKNOWN_SENDER ODDJOB_INTERFACE_NAME ".Error.UnknownSender" #define ODDJOB_ERROR_UNKNOWN_USER ODDJOB_INTERFACE_NAME ".Error.UnknownUser" #define ODDJOB_ERROR_INVALID_CALL ODDJOB_INTERFACE_NAME ".Error.InvalidCall" #define ODDJOB_ERROR_NO_OBJECT ODDJOB_INTERFACE_NAME ".Error.NoObject" #define ODDJOB_ERROR_NO_INTERFACE ODDJOB_INTERFACE_NAME ".Error.NoInterface" #define ODDJOB_ERROR_NO_METHOD ODDJOB_INTERFACE_NAME ".Error.NoMethod" #ifndef DBUS_MAJOR_VERSION #define DBUS_MAJOR_VERSION ODDJOB_DBUS_MAJOR_VERSION #endif #ifndef DBUS_MINOR_VERSION #define DBUS_MINOR_VERSION ODDJOB_DBUS_MINOR_VERSION #endif #ifndef DBUS_CHECK_VERSION #define DBUS_CHECK_VERSION(_major,_minor) ((DBUS_MAJOR_VERSION > _major) || ((DBUS_MAJOR_VERSION == _major) && (DBUS_MINOR_VERSION >= _minor))) #endif #ifndef DBUS_SERVICE_DBUS #define DBUS_SERVICE_DBUS "org.freedesktop.DBus" #endif #ifndef DBUS_PATH_DBUS #define DBUS_PATH_DBUS "/org/freedesktop/DBus" #endif #ifndef DBUS_INTERFACE_DBUS #define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" #endif #endif oddjob-0.16-0/src/oddjob_dbus.c0000664000471600047240000006437010305144136013212 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include #include "buffer.h" #include "common.h" #include "mainloop.h" #include "oddjob_dbus.h" #include "util.h" struct oddjob_dbus_context { DBusConnection *conn; dbus_bool_t registered; struct oddjob_dbus_service { char *name; struct oddjob_dbus_object { char *path; struct oddjob_dbus_interface { char *interface; struct oddjob_dbus_method { char *method; int n_arguments; oddjob_dbus_handler *handler; void *data; } *methods; int n_methods; } *interfaces; int n_interfaces; } *objects; int n_objects; } *services; int n_services; }; struct oddjob_dbus_message { DBusConnection *conn; DBusMessage *msg; int32_t result; int n_args; char **args; char *selinux_context; }; static DBusHandlerResult oddjob_dbus_filter(DBusConnection *conn, DBusMessage *message, void *user_data); static int oddjob_dbus_bind(DBusConnection *conn, const char *service_name) { #if DBUS_CHECK_VERSION(0,30) return dbus_bus_request_name(conn, service_name, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, NULL); #elif DBUS_CHECK_VERSION(0,20) return dbus_bus_acquire_service(conn, service_name, DBUS_SERVICE_FLAG_PROHIBIT_REPLACEMENT, NULL); #else #error "Don't know how to set service names for your version of D-BUS!" return FALSE; #endif } struct oddjob_dbus_context * oddjob_dbus_listener_new(DBusBusType bustype) { DBusError err; DBusConnection *conn; struct oddjob_dbus_context *ctx; memset(&err, 0, sizeof(err)); conn = dbus_bus_get(bustype, &err); if (conn == NULL) { return NULL; } ctx = oddjob_malloc0(sizeof(struct oddjob_dbus_context)); if (ctx == NULL) { return NULL; } ctx->conn = conn; dbus_connection_ref(ctx->conn); /* Request all messages which we're allowed to see. */ dbus_bus_add_match(ctx->conn, "", &err); ctx->n_services = 0; ctx->services = NULL; return ctx; } void oddjob_dbus_listener_free(struct oddjob_dbus_context *ctx) { int i, j, k, l; if (ctx == NULL) { return; } for (i = 0; i < ctx->n_services; i++) { /* Clean up this service. */ for (j = 0; j < ctx->services[i].n_objects; j++) { /* Clean up this object. */ for (k = 0; k < ctx->services[i].objects[j].n_interfaces; k++) { /* Clean up this interface. */ for (l = 0; l < ctx->services[i].objects[j].interfaces[k].n_methods; l++) { /* Clean up this method. */ oddjob_free(ctx->services[i].objects[j].interfaces[k].methods[l].method); ctx->services[i].objects[j].interfaces[k].methods[l].method = NULL; ctx->services[i].objects[j].interfaces[k].methods[l].n_arguments = 0; ctx->services[i].objects[j].interfaces[k].methods[l].handler = NULL; ctx->services[i].objects[j].interfaces[k].methods[l].data = NULL; } oddjob_free(ctx->services[i].objects[j].interfaces[k].methods); ctx->services[i].objects[j].interfaces[k].methods = NULL; oddjob_free(ctx->services[i].objects[j].interfaces[k].interface); ctx->services[i].objects[j].interfaces[k].interface = NULL; } oddjob_free(ctx->services[i].objects[j].interfaces); ctx->services[i].objects[j].interfaces = NULL; oddjob_free(ctx->services[i].objects[j].path); ctx->services[i].objects[j].path = NULL; } oddjob_free(ctx->services[i].name); ctx->services[i].name = NULL; oddjob_free(ctx->services[i].objects); ctx->services[i].objects = NULL; } /* Clean up this service. */ oddjob_free(ctx->services); ctx->services = NULL; ctx->n_services = 0; dbus_connection_remove_filter(ctx->conn, oddjob_dbus_filter, NULL); ctx->registered = FALSE; dbus_connection_unref(ctx->conn); ctx->conn = NULL; oddjob_free(ctx); } const char * oddjob_dbus_message_get_selinux_context(struct oddjob_dbus_message *msg) { return msg->selinux_context; } #ifdef SELINUX_ACLS static char * oddjob_dbus_get_selinux_context(DBusConnection *conn, const char *client_bus_name) { DBusMessage *query, *reply; char *ret; int length, length2; DBusMessageIter iter, array; DBusError err; query = dbus_message_new_method_call(DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "GetConnectionSELinuxSecurityContext"); #if DBUS_CHECK_VERSION(0,30) dbus_message_append_args(query, DBUS_TYPE_STRING, &client_bus_name, DBUS_TYPE_INVALID); #elif DBUS_CHECK_VERSION(0,20) dbus_message_append_args(query, DBUS_TYPE_STRING, client_bus_name, DBUS_TYPE_INVALID); #else #error "Don't know how to set message arguments with your version of D-BUS!" #endif memset(&err, 0, sizeof(err)); reply = dbus_connection_send_with_reply_and_block(conn, query, -1, &err); ret = NULL; if (dbus_error_is_set(&err)) { if ((strcmp(err.name, DBUS_ERROR_NAME_HAS_NO_OWNER) != 0) && (strcmp(err.name, DBUS_ERROR_NO_REPLY) != 0)) { fprintf(stderr, "Error %s: %s.\n", err.name, err.message); } } if (reply != NULL) { if (dbus_message_iter_init(reply, &iter)) { switch (dbus_message_iter_get_arg_type(&iter)) { case DBUS_TYPE_ARRAY: #if DBUS_CHECK_VERSION(0,34) /* We can sanity check the length. */ dbus_message_iter_recurse(&iter, &array); length = dbus_message_iter_get_array_len(&array); dbus_message_iter_get_fixed_array(&array, &ret, &length2); if (length2 != length) { /* Aaarg! D-BUS screwed us! */ abort(); } ret = oddjob_strndup(ret, length); #elif DBUS_CHECK_VERSION(0,33) /* We can't sanity check the length. */ dbus_message_iter_recurse(&iter, &array); dbus_message_iter_get_fixed_array(&array, &ret, &length); if (ret != NULL) { ret = oddjob_strndup(ret, length); } #elif DBUS_CHECK_VERSION(0,20) #if 1 #error "Don't know how to retrieve message arguments with your version of D-BUS!" #else /* FIXME: check if this is correct */ /* We can't sanity check the length. */ dbus_message_iter_get_byte_array(&iter, (unsigned char **) &ret, &length); if (ret != NULL) { ret = oddjob_strndup(ret, length); } #endif #else #error "Don't know how to retrieve message arguments with your version of D-BUS!" #endif break; case DBUS_TYPE_INVALID: break; default: break; } } } dbus_message_unref(query); if (reply != NULL) { dbus_message_unref(reply); } return ret; } #else static char * oddjob_dbus_get_selinux_context(DBusConnection *conn, const char *client_bus_name) { return NULL; } #endif static void oddjob_dbus_message_set_selinux_context(struct oddjob_dbus_message *msg, char *context_str) { if (msg->selinux_context != NULL) { oddjob_free(msg->selinux_context); msg->selinux_context = NULL; } if (context_str != NULL) { msg->selinux_context = oddjob_strdup(context_str); } } static struct oddjob_dbus_message * oddjob_dbus_message_from_message(DBusConnection *conn, DBusMessage *message, dbus_bool_t expect_an_int) { struct oddjob_dbus_message *msg; char *p, *context_str; const char *client_bus_name; dbus_bool_t more; DBusMessageIter iter; int32_t i; msg = oddjob_malloc0(sizeof(struct oddjob_dbus_message)); msg->conn = conn; dbus_connection_ref(msg->conn); msg->msg = message; if (msg->msg != NULL) { dbus_message_ref(msg->msg); if (dbus_message_iter_init(message, &iter)) { if (expect_an_int) { if (dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_INT32) { #if DBUS_CHECK_VERSION(0,30) dbus_message_iter_get_basic(&iter, &i); msg->result = i; #elif DBUS_CHECK_VERSION(0,20) i = dbus_message_iter_get_int32(&iter); msg->result = i; #else #error "Don't know how to retrieve message arguments with your version of D-BUS!" #endif } else { msg->result = -1; } } more = TRUE; while (more) { switch (dbus_message_iter_get_arg_type(&iter)) { case DBUS_TYPE_STRING: oddjob_resize_array((void**) &msg->args, sizeof(char*), msg->n_args, msg->n_args + 1); #if DBUS_CHECK_VERSION(0,30) dbus_message_iter_get_basic(&iter, &p); msg->args[msg->n_args] = oddjob_strdup(p); #elif DBUS_CHECK_VERSION(0,20) p = dbus_message_iter_get_string(&iter); msg->args[msg->n_args] = oddjob_strdup(p); dbus_free(p); #else #error "Don't know how to retrieve message arguments with your version of D-BUS!" #endif msg->n_args++; break; case DBUS_TYPE_INVALID: more = FALSE; break; default: break; } if (!dbus_message_iter_has_next(&iter) || !dbus_message_iter_next(&iter)) { more = FALSE; } } } client_bus_name = dbus_message_get_sender(msg->msg); if (client_bus_name != NULL) { context_str = oddjob_dbus_get_selinux_context(msg->conn, client_bus_name); oddjob_dbus_message_set_selinux_context(msg, context_str); if (context_str != NULL) { oddjob_free(context_str); } } } return msg; } struct oddjob_dbus_message * oddjob_dbus_message_dup(struct oddjob_dbus_message *input) { struct oddjob_dbus_message *msg; int i; msg = oddjob_malloc0(sizeof(struct oddjob_dbus_message)); msg->conn = input->conn; dbus_connection_ref(msg->conn); msg->msg = input->msg; if (msg->msg != NULL) { dbus_message_ref(msg->msg); } msg->result = input->result; msg->n_args = input->n_args; msg->args = NULL; oddjob_resize_array((void **) &msg->args, sizeof(char *), 0, msg->n_args); for (i = 0; i < msg->n_args; i++) { msg->args[i] = oddjob_strdup(input->args[i]); } if (input->selinux_context != NULL) { oddjob_dbus_message_set_selinux_context(msg, input->selinux_context); } return msg; } void oddjob_dbus_message_free(struct oddjob_dbus_message *msg) { int i; if (msg != NULL) { oddjob_dbus_message_set_selinux_context(msg, NULL); if (msg->args != NULL) { for (i = 0; i < msg->n_args; i++) { oddjob_free(msg->args[i]); } oddjob_free(msg->args); } msg->args = NULL; msg->n_args = 0; msg->result = -1; if (msg->msg != NULL) { dbus_message_unref(msg->msg); msg->msg = NULL; } if (msg->conn != NULL) { dbus_connection_unref(msg->conn); msg->conn = NULL; } oddjob_free(msg); } } static DBusHandlerResult oddjob_dbus_filter(DBusConnection *conn, DBusMessage *message, void *user_data) { struct oddjob_dbus_context *ctx; struct oddjob_dbus_service *srv; struct oddjob_dbus_object *obj; struct oddjob_dbus_interface *interface; struct oddjob_dbus_message *msg; char n_args[LINE_MAX]; const char *client_bus_name; const char *called_service, *called_path, *called_interface, *called_method; unsigned long uid; struct passwd *pwd; int i, j; ctx = user_data; /* We only care about method calls to our services, so check that it's a * method call to one of our well-known names. */ called_service = dbus_message_get_destination(message); called_path = dbus_message_get_path(message); called_interface = dbus_message_get_interface(message); called_method = dbus_message_get_member(message); /* Get the called service name and find the service. */ for (i = 0; (called_service != NULL) && (i < ctx->n_services); i++) { if (strcmp(ctx->services[i].name, called_service) == 0) { break; } } if (i >= ctx->n_services) { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } srv = &ctx->services[i]; /* Check that the message is a method call. */ if ((called_interface != NULL) && (called_method != NULL)) { if (!(dbus_message_is_method_call(message, called_interface, called_method))) { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } } /* Build our stable message structure. */ msg = oddjob_dbus_message_from_message(conn, message, FALSE); if (msg == NULL) { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } /* Find the bus address of the message sender. */ client_bus_name = dbus_message_get_sender(message); if (client_bus_name == NULL) { oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_UNKNOWN_SENDER, n_args); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } /* Get the called object path and find the object. */ for (i = 0; (called_path != NULL) && (i < srv->n_objects); i++) { if (fnmatch(srv->objects[i].path, called_path, ODDJOB_OBJECT_FNMATCH_FLAGS) == 0) { break; } } if (i >= srv->n_objects) { oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_NO_OBJECT, called_path ? called_path : ""); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } obj = &srv->objects[i]; /* Get the called interface and find the interface. */ for (i = 0; (called_interface != NULL) && (i < obj->n_interfaces); i++) { if (strcmp(obj->interfaces[i].interface, called_interface) == 0) { break; } } if (i >= obj->n_interfaces) { oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_NO_INTERFACE, called_interface ? called_interface : ""); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } interface = &obj->interfaces[i]; /* Search for the method. */ for (i = 0; (called_method != NULL) && (i < interface->n_methods); i++) { if (strcmp(interface->methods[i].method, called_method) == 0) { break; } } if (i >= interface->n_methods) { oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_NO_METHOD, called_method ? called_method : ""); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } /* Get the UID of the sending user and resolve it to a name. */ uid = dbus_bus_get_unix_user(conn, client_bus_name, NULL); pwd = getpwuid(uid); if ((pwd == NULL) || (pwd->pw_uid != uid)) { snprintf(n_args, sizeof(n_args), "UID=%lu", uid); oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_UNKNOWN_USER, n_args); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } /* Check the arguments for verboten chars. */ for (j = 0; j < msg->n_args; j++) { if (strpbrk(msg->args[j], "\r\n") != NULL) { break; } } if (j < msg->n_args) { oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INVALID_CALL, "invalid invocation"); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } /* Check the number of arguments. */ if (msg->n_args != interface->methods[i].n_arguments) { snprintf(n_args, sizeof(n_args), "wrong number of arguments: " "expected %d, called with %d", interface->methods[i].n_arguments, msg->n_args); oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INVALID_CALL, n_args); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } /* Actually call the handler. */ interface->methods[i].handler(ctx, msg, called_service, called_path, called_interface, called_method, pwd->pw_name, uid, interface->methods[i].data); oddjob_dbus_message_free(msg); return DBUS_HANDLER_RESULT_HANDLED; } dbus_bool_t oddjob_dbus_listener_add_method(struct oddjob_dbus_context *ctx, const char *service_name, const char *object_path, const char *interface, const char *method, int n_arguments, oddjob_dbus_handler *handler, void *data) { int i; struct oddjob_dbus_service *srv; struct oddjob_dbus_object *obj; struct oddjob_dbus_interface *interf; struct oddjob_dbus_method *meth; /* find the service, creating it if it doesn't already exist. */ for (i = 0; i < ctx->n_services; i++) { if ((ctx->services[i].name != NULL) && (strcmp(service_name, ctx->services[i].name) == 0)) { break; } } if (i >= ctx->n_services) { /* Try to set ourselves up with the specified well-known * service name. If it fails, there may already be another * copy running, but that's not our problem to solve. */ if (!oddjob_dbus_bind(ctx->conn, service_name)) { fprintf(stderr, "Error binding to service name " "\"%s\"!\n", service_name); return FALSE; } oddjob_resize_array((void**)&ctx->services, sizeof(ctx->services[0]), ctx->n_services, i + 1); ctx->services[i].name = oddjob_strdup(service_name); ctx->services[i].objects = NULL; ctx->services[i].n_objects = 0; ctx->n_services = i + 1; } srv = &ctx->services[i]; /* find the object, creating it if it doesn't already exist. */ for (i = 0; i < srv->n_objects; i++) { if ((srv->objects[i].path != NULL) && (strcmp(object_path, srv->objects[i].path) == 0)) { break; } } if (i >= srv->n_objects) { oddjob_resize_array((void**)&srv->objects, sizeof(srv->objects[0]), srv->n_objects, i + 1); srv->objects[i].path = oddjob_strdup(object_path); srv->objects[i].interfaces = NULL; srv->objects[i].n_interfaces = 0; srv->n_objects = i + 1; } obj = &srv->objects[i]; /* find the interface, creating it if it doesn't already exist. */ for (i = 0; i < obj->n_interfaces; i++) { if ((obj->interfaces[i].interface != NULL) && (strcmp(interface, obj->interfaces[i].interface) == 0)) { break; } } if (i >= obj->n_interfaces) { oddjob_resize_array((void**)&obj->interfaces, sizeof(obj->interfaces[0]), obj->n_interfaces, i + 1); obj->interfaces[i].interface = oddjob_strdup(interface); obj->n_interfaces = i + 1; } interf = &obj->interfaces[i]; /* find the method, creating it if it doesn't already exist */ for (i = 0; i < interf->n_methods; i++) { if ((interf->methods[i].method != NULL) && (strcmp(method, interf->methods[i].method) == 0)) { break; } } if (i >= interf->n_methods) { oddjob_resize_array((void**)&interf->methods, sizeof(interf->methods[0]), interf->n_methods, i + 1); interf->methods[i].method = oddjob_strdup(method); interf->n_methods = i + 1; } /* set the method's pointers */ meth = &interf->methods[i]; meth->n_arguments = n_arguments; meth->handler = handler; meth->data = data; /* last step - if we haven't added a filter yet, do that */ if (!ctx->registered) { ctx->registered = dbus_connection_add_filter(ctx->conn, oddjob_dbus_filter, ctx, NULL); } return TRUE; } int oddjob_dbus_message_get_n_args(struct oddjob_dbus_message *msg) { return msg->n_args; } const char * oddjob_dbus_message_get_arg(struct oddjob_dbus_message *msg, int n) { if (n >= msg->n_args) { return NULL; } return msg->args[n]; } void oddjob_dbus_send_message_response_text(struct oddjob_dbus_message *msg, int result_code, const char *text) { DBusMessage *message; const char *empty = ""; int32_t result; message = dbus_message_new_method_return(msg->msg); result = result_code; #if DBUS_CHECK_VERSION(0,30) dbus_message_append_args(message, DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID); #else dbus_message_append_args(message, DBUS_TYPE_INT32, result, DBUS_TYPE_INVALID); #endif #if DBUS_CHECK_VERSION(0,30) dbus_message_append_args(message, DBUS_TYPE_STRING, text ? &text : &empty, DBUS_TYPE_INVALID); #elif DBUS_CHECK_VERSION(0,20) dbus_message_append_args(message, DBUS_TYPE_STRING, text ? text : empty, DBUS_TYPE_INVALID); #else #error "Don't know how to set message arguments with your version of D-BUS!" #endif #if DBUS_CHECK_VERSION(0,30) dbus_message_append_args(message, DBUS_TYPE_STRING, &empty, DBUS_TYPE_INVALID); #elif DBUS_CHECK_VERSION(0,20) dbus_message_append_args(message, DBUS_TYPE_STRING, empty, DBUS_TYPE_INVALID); #else #error "Don't know how to set message arguments with your version of D-BUS!" #endif dbus_connection_send(msg->conn, message, NULL); dbus_message_unref(message); } void oddjob_dbus_send_message_response_success(struct oddjob_dbus_message *msg, int result_code, struct oddjob_buffer *outc, struct oddjob_buffer *errc) { DBusMessage *message; const char *p; int32_t result; message = dbus_message_new_method_return(msg->msg); result = result_code; #if DBUS_CHECK_VERSION(0,30) dbus_message_append_args(message, DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID); #else dbus_message_append_args(message, DBUS_TYPE_INT32, result, DBUS_TYPE_INVALID); #endif if ((oddjob_buffer_length(outc) > 0) && (oddjob_buffer_data(outc)[oddjob_buffer_length(outc)] != '\0')) { abort(); } #if DBUS_CHECK_VERSION(0,30) p = (const char *) oddjob_buffer_data(outc); dbus_message_append_args(message, DBUS_TYPE_STRING, &p, DBUS_TYPE_INVALID); p = (const char *) oddjob_buffer_data(errc); dbus_message_append_args(message, DBUS_TYPE_STRING, &p, DBUS_TYPE_INVALID); #elif DBUS_CHECK_VERSION(0,20) p = (const char *) oddjob_buffer_data(outc); dbus_message_append_args(message, DBUS_TYPE_STRING, p, DBUS_TYPE_INVALID); p = (const char *) oddjob_buffer_data(errc); dbus_message_append_args(message, DBUS_TYPE_STRING, p, DBUS_TYPE_INVALID); #else #error "Don't know how to set message arguments with your version of D-BUS!" #endif dbus_connection_send(msg->conn, message, NULL); dbus_message_unref(message); } void oddjob_dbus_send_message_response_error(struct oddjob_dbus_message *msg, const char *error, const char *text) { DBusMessage *message; message = dbus_message_new_error(msg->msg, error, text); dbus_connection_send(msg->conn, message, NULL); dbus_message_unref(message); } int oddjob_dbus_call_bus_methodv(DBusBusType bus, const char *service, const char *object_path, const char *interface, const char *method, int *result, char *output, size_t output_length, char *error, size_t error_length, char **argv) { DBusConnection *conn; DBusMessage *message, *reply; DBusError err; struct oddjob_dbus_message *msg; int ret, i; const char *p; if (output != NULL) { memset(output, '\0', output_length); } memset(&err, 0, sizeof(err)); dbus_error_init(&err); conn = dbus_bus_get(bus, &err); if (conn == NULL) { if (dbus_error_is_set(&err) && (output != NULL)) { snprintf(output, output_length, "%s: %s", err.name, err.message); } dbus_error_free(&err); return -2; } dbus_connection_ref(conn); message = dbus_message_new_method_call(service, object_path, interface, method); for (i = 0; (argv != NULL) && (argv[i] != NULL); i++) { p = argv[i]; #if DBUS_CHECK_VERSION(0,30) dbus_message_append_args(message, DBUS_TYPE_STRING, &p, DBUS_TYPE_INVALID); #elif DBUS_CHECK_VERSION(0,20) dbus_message_append_args(message, DBUS_TYPE_STRING, p, DBUS_TYPE_INVALID); #else #error "Don't know how to set message arguments with your version of D-BUS!" #endif } reply = dbus_connection_send_with_reply_and_block(conn, message, -1, &err); msg = oddjob_dbus_message_from_message(conn, reply, TRUE); if (result) { *result = msg->result; } if (output_length > 0) { memset(output, '\0', output_length); if (msg->n_args > 0) { strncpy(output, msg->args[0], output_length - 1); } } if (error_length > 0) { memset(error, '\0', error_length); if (msg->n_args > 1) { strncpy(error, msg->args[1], error_length - 1); } } if (dbus_error_is_set(&err)) { if (output != NULL) { snprintf(output, output_length, "%s: %s", err.name, err.message); } if (error != NULL) { snprintf(error, error_length, "%s: %s", err.name, err.message); } dbus_error_free(&err); ret = -1; } else { ret = 0; } oddjob_dbus_message_free(msg); if (reply != NULL) { dbus_message_unref(reply); } dbus_message_unref(message); dbus_connection_unref(conn); return ret; } int oddjob_dbus_call_method(DBusBusType bus, const char *service, const char *object_path, const char *interface, const char *method, int *result, char *output, size_t output_length, char *error, size_t error_length, ...) { va_list ap; char **argv; char *p; int i; argv = NULL; i = 0; va_start(ap, error_length); while ((p = va_arg(ap, char*)) != NULL) { oddjob_resize_array((void **) &argv, sizeof(char*), i, i + 2); argv[i] = p; i++; } va_end(ap); i = oddjob_dbus_call_bus_methodv(bus, service, object_path, interface, method, result, output, output_length, error, error_length, argv); oddjob_free(argv); return i; } void oddjob_dbus_main_init(struct oddjob_dbus_context *ctx) { mainloop_reset_signal_handlers(); mainloop_init(ctx->conn); } void oddjob_dbus_main_done(struct oddjob_dbus_context *ctx) { mainloop_done(ctx->conn); } int oddjob_dbus_main_iterate(struct oddjob_dbus_context *ctx) { return mainloop_iterate(ctx->conn); } const char * oddjob_dbus_get_default_service(void) { return ODDJOB_NAMESPACE "." PACKAGE_NAME; } const char * oddjob_dbus_get_default_object(void) { return ODDJOB_NAMESPACE_PATH "/" PACKAGE_NAME; } const char * oddjob_dbus_get_default_interface(void) { return ODDJOB_NAMESPACE "." PACKAGE_NAME; } oddjob-0.16-0/src/oddjob_dbus.h0000664000471600047240000000675710303404176013225 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_dbus_h #define oddjob_dbus_h #include "../config.h" #include #include "buffer.h" struct oddjob_dbus_context; struct oddjob_dbus_message; /* Server */ struct oddjob_dbus_context *oddjob_dbus_listener_new(DBusBusType bus); void oddjob_dbus_listener_free(struct oddjob_dbus_context *ctx); typedef void (oddjob_dbus_handler)(struct oddjob_dbus_context *ctx, struct oddjob_dbus_message *msg, const char *service_name, const char *object_path, const char *interface_name, const char *method_name, const char *user, unsigned long uid, void *data); dbus_bool_t oddjob_dbus_listener_add_method(struct oddjob_dbus_context *ctx, const char *service_name, const char *object_path, const char *interface, const char *method, int n_arguments, oddjob_dbus_handler *handler, void *data); int oddjob_dbus_message_get_n_args(struct oddjob_dbus_message *msg); const char *oddjob_dbus_message_get_arg(struct oddjob_dbus_message *msg, int n); const char *oddjob_dbus_message_get_selinux_context(struct oddjob_dbus_message *msg); struct oddjob_dbus_message *oddjob_dbus_message_dup(struct oddjob_dbus_message *message); void oddjob_dbus_message_free(struct oddjob_dbus_message *msg); void oddjob_dbus_send_message_response_text(struct oddjob_dbus_message *msg, int result_code, const char *text); void oddjob_dbus_send_message_response_success(struct oddjob_dbus_message *msg, int result_code, struct oddjob_buffer *outc, struct oddjob_buffer *errc); void oddjob_dbus_send_message_response_error(struct oddjob_dbus_message *msg, const char *error, const char *text); void oddjob_dbus_main_init(struct oddjob_dbus_context *ctx); void oddjob_dbus_main_done(struct oddjob_dbus_context *ctx); int oddjob_dbus_main_iterate(struct oddjob_dbus_context *ctx); /* Clients */ #include "oddjob.h" #endif oddjob-0.16-0/src/mainloop.c0000664000471600047240000003334110273472505012554 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include "common.h" #include "mainloop.h" #include "util.h" #ident "$Id: mainloop.c,v 1.6 2005/08/01 19:17:25 nalin Exp $" /* Our approximation of a main loop, for use by D-BUS. */ static struct watch_list { enum watch_type { watch_dbus, watch_oddjob } type; DBusWatch *dwatch; struct OddjobWatch { int fd; DBusWatchFlags flags; OddjobWatchFn *fn; void *data; } owatch; struct watch_list *next; } *watch_list; static struct timeout_list { enum timeout_type { timeout_dbus } type; DBusTimeout *dtimeout; struct timeval start; struct timeout_list *next; } *timeout_list; static struct pid_list { pid_t pid; OddjobPidFn *fn; void *data; struct pid_list *next; } *pid_list; dbus_bool_t mainloop_pid_add(pid_t pid, OddjobPidFn *fn, void *data) { struct pid_list *l; for (l = pid_list; l != NULL; l = l->next) { if (l->pid == pid) { return TRUE; } } l = malloc(sizeof(struct pid_list)); if (l == NULL) { return FALSE; } memset(l, 0, sizeof(*l)); l->pid = pid; l->fn = fn; l->data = data; l->next = pid_list; pid_list = l; return TRUE; } void mainloop_pid_remove(pid_t pid) { struct pid_list *l, *pred; for (l = pid_list, pred = NULL; l != NULL; l = l->next) { if (l->pid == pid) { if (pred == NULL) { pid_list = l->next; free(l); } else { pred->next = l->next; free(l); } break; } pred = l; } } dbus_bool_t mainloop_oddjob_watch_add(int fd, DBusWatchFlags flags, OddjobWatchFn *fn, void *data) { struct watch_list *l; for (l = watch_list; l != NULL; l = l->next) { if ((l->type == watch_oddjob) && (l->owatch.fd == fd)) { return TRUE; } } l = malloc(sizeof(struct watch_list)); if (l == NULL) { return FALSE; } memset(l, 0, sizeof(*l)); l->type = watch_oddjob; l->owatch.fd = fd; l->owatch.flags = flags; l->owatch.fn = fn; l->owatch.data = data; l->next = watch_list; watch_list = l; return TRUE; } void mainloop_oddjob_watch_remove(int fd, DBusWatchFlags flags) { struct watch_list *l, *pred; for (l = watch_list, pred = NULL; l != NULL; l = l->next) { if ((l->type == watch_oddjob) && (l->owatch.fd == fd)) { if (pred == NULL) { watch_list = l->next; l->owatch.fd = -1; l->next = NULL; memset(l, 0, sizeof(*l)); oddjob_free(l); } else { pred->next = l->next; l->owatch.fd = -1; l->next = NULL; memset(l, 0, sizeof(*l)); oddjob_free(l); } break; } pred = l; } } /* Add a watch item to the list. If it's already there, don't add it again. */ static dbus_bool_t watch_dbus_add(DBusWatch *watch, void *data) { struct watch_list *l; for (l = watch_list; l != NULL; l = l->next) { if ((l->type == watch_dbus) && (l->dwatch == watch)) { return TRUE; } } l = malloc(sizeof(struct watch_list)); if (l == NULL) { return FALSE; } memset(l, 0, sizeof(*l)); l->type = watch_dbus; l->dwatch = watch; l->next = watch_list; watch_list = l; return TRUE; } /* Remove a watch item from the list. */ static void watch_dbus_remove(DBusWatch *watch, void *data) { struct watch_list *l, *pred; for (l = watch_list, pred = NULL; l != NULL; l = l->next) { if ((l->type == watch_dbus) && (l->dwatch == watch)) { l->dwatch = NULL; if (pred == NULL) { watch_list = l->next; l->next = NULL; memset(l, 0, sizeof(*l)); oddjob_free(l); } else { pred->next = l->next; l->next = NULL; memset(l, 0, sizeof(*l)); oddjob_free(l); } break; } pred = l; } } /* Toggle whether or not a watch item is enabled. */ static void watch_dbus_toggle(DBusWatch *watch, void *data) { } /* Add a timeout item to the timeout list. */ static dbus_bool_t timeout_dbus_add(DBusTimeout *timeout, void *data) { struct timeout_list *l; struct timeval tv; for (l = timeout_list; l != NULL; l = l->next) { if ((l->type == timeout_dbus) && (l->dtimeout == timeout)) { return TRUE; } } if (gettimeofday(&tv, NULL) == -1) { /* aargh! */ return FALSE; } l = malloc(sizeof(struct timeout_list)); if (l == NULL) { return FALSE; } memset(l, 0, sizeof(*l)); l->type = timeout_dbus; l->dtimeout = timeout; memcpy(&l->start, &tv, sizeof(l->start)); l->next = timeout_list; timeout_list = l; return TRUE; } /* Remove a timeout item from the timeout list. */ static void timeout_dbus_remove(DBusTimeout *timeout, void *data) { struct timeout_list *l, *pred; for (l = timeout_list, pred = NULL; l != NULL; l = l->next) { if ((l->type == timeout_dbus) && (l->dtimeout == timeout)) { if (pred == NULL) { timeout_list = l->next; memset(l, 0, sizeof(*l)); oddjob_free(l); } else { pred->next = l->next; memset(l, 0, sizeof(*l)); oddjob_free(l); } break; } pred = l; } } /* Toggle whether or not a timeout is enabled. */ static void timeout_dbus_toggle(DBusTimeout *timeout, void *data) { } /* Set up arguments for select() using data from the watch and timeout lists. */ static void prepare(int *maxfd, fd_set *rfds, fd_set *wfds, fd_set *efds, dbus_bool_t *use_tv, struct timeval *tv) { struct watch_list *wl; struct timeout_list *tl; int fd, current_interval, this_interval; DBusWatchFlags flags; struct timeval now; FD_ZERO(rfds); FD_ZERO(wfds); FD_ZERO(efds); wl = watch_list; *maxfd = -1; while (wl != NULL) { switch (wl->type) { case watch_dbus: if (dbus_watch_get_enabled(wl->dwatch)) { fd = dbus_watch_get_fd(wl->dwatch); flags = dbus_watch_get_flags(wl->dwatch); if (flags & (DBUS_WATCH_READABLE | DBUS_WATCH_HANGUP)) { FD_SET(fd, rfds); *maxfd = (*maxfd > fd ? *maxfd : fd); } if (flags & DBUS_WATCH_WRITABLE) { FD_SET(fd, wfds); *maxfd = (*maxfd > fd ? *maxfd : fd); } if (flags & DBUS_WATCH_ERROR) { FD_SET(fd, efds); *maxfd = (*maxfd > fd ? *maxfd : fd); } } break; case watch_oddjob: if (wl->owatch.flags & (DBUS_WATCH_READABLE | DBUS_WATCH_HANGUP)) { FD_SET(wl->owatch.fd, rfds); *maxfd = (*maxfd > wl->owatch.fd ? *maxfd : wl->owatch.fd); } if (wl->owatch.flags & DBUS_WATCH_WRITABLE) { FD_SET(wl->owatch.fd, wfds); *maxfd = (*maxfd > wl->owatch.fd ? *maxfd : wl->owatch.fd); } if (wl->owatch.flags & DBUS_WATCH_ERROR) { FD_SET(wl->owatch.fd, efds); *maxfd = (*maxfd > wl->owatch.fd ? *maxfd : wl->owatch.fd); } default: break; } wl = wl->next; } *use_tv = FALSE; memset(tv, 0, sizeof(*tv)); if (pid_list != NULL) { *use_tv = TRUE; tv->tv_sec = 1; } tl = timeout_list; while (tl != NULL) { if (gettimeofday(&now, NULL) == 0) { *use_tv = TRUE; } if (!*use_tv) { break; } switch (tl->type) { case timeout_dbus: if (dbus_timeout_get_enabled(tl->dtimeout)) { current_interval = tv->tv_sec * 1000 + tv->tv_usec / 1000; this_interval = dbus_timeout_get_interval(tl->dtimeout); this_interval -= 1000 * (now.tv_sec - tl->start.tv_sec); if ((tl == timeout_list) || (this_interval < current_interval)) { tv->tv_sec = this_interval / 1000; tv->tv_usec = (this_interval % 1000) * 1000; } } break; default: break; } tl = tl->next; } } /* For each descriptor with its bit set in one of the fd_set items, call * dbus_watch_handle with the right flag to process any pending I/O. */ static void handle(fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv) { struct watch_list *wl, *wlnext; struct timeout_list *tl, *tlnext; struct pid_list *pl, *plnext, *pred; int fd, i; DBusWatch *dwatch; DBusTimeout *dtimeout; DBusWatchFlags flags; struct { DBusWatch *watch; DBusWatchFlags flags; } *dwatches; size_t dwatch_count; wl = watch_list; fd = -1; dwatches = NULL; dwatch_count = 0; while (wl != NULL) { wlnext = wl->next; switch (wl->type) { case watch_dbus: dwatch = wl->dwatch; if (dbus_watch_get_enabled(dwatch)) { fd = dbus_watch_get_fd(dwatch); flags = 0; if (FD_ISSET(fd, rfds)) { flags |= DBUS_WATCH_READABLE; } if (FD_ISSET(fd, wfds)) { flags |= DBUS_WATCH_WRITABLE; } if (FD_ISSET(fd, efds)) { flags |= DBUS_WATCH_ERROR; } if (flags != 0) { for (i = 0; i < dwatch_count; i++) { if (dwatches[i].watch == dwatch) { dwatches[i].flags |= flags; break; } } if (i >= dwatch_count) { oddjob_resize_array((void **)&dwatches, sizeof(dwatches[0]), dwatch_count, i + 1); dwatches[i].watch = dwatch; dwatches[i].flags = flags; dwatch_count = i + 1; } } } break; case watch_oddjob: flags = 0; if (FD_ISSET(wl->owatch.fd, rfds)) { flags |= DBUS_WATCH_READABLE; } if (FD_ISSET(wl->owatch.fd, wfds)) { flags |= DBUS_WATCH_WRITABLE; } if (FD_ISSET(wl->owatch.fd, efds)) { flags |= DBUS_WATCH_ERROR; } if (flags != 0) { if (wl->owatch.fn(wl->owatch.fd, flags, wl->owatch.data)) { mainloop_oddjob_watch_remove(wl->owatch.fd, wl->owatch.flags); } } break; } wl = wlnext; } for (i = 0; i < dwatch_count; i++) { dbus_watch_handle(dwatches[i].watch, dwatches[i].flags); } oddjob_free(dwatches); /* PROBABLY WRONG */ if (fd != -1) { tl = timeout_list; while (tl != NULL) { tlnext = tl->next; switch (tl->type) { case timeout_dbus: dtimeout = tl->dtimeout; if (dbus_timeout_get_enabled(dtimeout)) { dbus_timeout_handle(dtimeout); } break; } tl = tlnext; } } pl = pid_list; pred = NULL; while (pl != NULL) { int status; plnext = pl->next; if (waitpid(pl->pid, &status, WNOHANG) == pl->pid) { pl->fn(pl->pid, status, pl->data); mainloop_pid_remove(pl->pid); } pl = plnext; } } /* Connect our callbacks for the D-BUS connection. */ void mainloop_init(DBusConnection *conn) { dbus_connection_set_watch_functions(conn, watch_dbus_add, watch_dbus_remove, watch_dbus_toggle, NULL, NULL); dbus_connection_set_timeout_functions(conn, timeout_dbus_add, timeout_dbus_remove, timeout_dbus_toggle, NULL, NULL); } void mainloop_done(DBusConnection *conn) { dbus_connection_set_watch_functions(conn, NULL, NULL, NULL, NULL, NULL); dbus_connection_set_timeout_functions(conn, NULL, NULL, NULL, NULL, NULL); } /* Process I/O for the connection, dispatch messages, and then flush any * pending output. Return the number of descriptors which we serviced. Note * that if we got a timeout, 0 is a *successful* return code. */ int mainloop_iterate(DBusConnection *conn) { int i, max_fd; dbus_bool_t use_tv; fd_set rfds, efds, wfds; struct timeval tv; prepare(&max_fd, &rfds, &wfds, &efds, &use_tv, &tv); i = select(max_fd + 1, &rfds, &wfds, &efds, use_tv ? &tv : NULL); if (i != -1) { handle(&rfds, &wfds, &efds, &tv); while (dbus_connection_get_dispatch_status(conn) == DBUS_DISPATCH_DATA_REMAINS) { dbus_connection_dispatch(conn); } #if DBUS_CHECK_VERSION(0,30) while (dbus_connection_has_messages_to_send(conn)) { dbus_connection_flush(conn); } #elif DBUS_CHECK_VERSION(0,20) while (dbus_connection_get_outgoing_size(conn) > 0) { dbus_connection_flush(conn); } #else #error "Don't know how to check if messages need to be flushed!" #endif } return i; } /* Set the handler for an arbitrary set of signals to SIG_DFL. */ void mainloop_reset_signal_handlers(void) { #ifdef SIGALRM signal(SIGALRM, SIG_DFL); #endif #ifdef SIGHUP signal(SIGHUP, SIG_DFL); #endif #ifdef SIGINT signal(SIGINT, SIG_DFL); #endif #ifdef SIGQUIT signal(SIGQUIT, SIG_DFL); #endif #ifdef SIGILL signal(SIGILL, SIG_DFL); #endif #ifdef SIGABRT signal(SIGABRT, SIG_DFL); #endif #ifdef SIGKILL signal(SIGKILL, SIG_DFL); #endif #ifdef SIGSEGV signal(SIGSEGV, SIG_DFL); #endif #ifdef SIGPIPE signal(SIGPIPE, SIG_IGN); #endif #ifdef SIGTERM signal(SIGTERM, SIG_DFL); #endif #ifdef SIGCHLD signal(SIGCHLD, SIG_DFL); #endif #ifdef SIGCONT signal(SIGCONT, SIG_DFL); #endif #ifdef SIGSTOP signal(SIGSTOP, SIG_DFL); #endif } oddjob-0.16-0/src/mainloop.h0000664000471600047240000000427010267235773012567 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_mainloop_h #define oddjob_mainloop_h typedef dbus_bool_t (OddjobWatchFn)(int fd, DBusWatchFlags flags, void *data); typedef void (OddjobPidFn)(pid_t pid, int status, void *data); dbus_bool_t mainloop_oddjob_watch_add(int fd, DBusWatchFlags flags, OddjobWatchFn *fn, void *data); void mainloop_oddjob_watch_remove(int fd, DBusWatchFlags flags); dbus_bool_t mainloop_pid_add(pid_t pid, OddjobPidFn *fn, void *data); void mainloop_pid_remove(pid_t pid); void mainloop_init(DBusConnection *conn); void mainloop_done(DBusConnection *conn); int mainloop_iterate(DBusConnection *conn); void mainloop_reset_signal_handlers(void); #endif oddjob-0.16-0/src/selinux.h0000664000471600047240000000345710260106015012421 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_selinux_h #define oddjob_selinux_h void oddjob_set_selinux_file_creation_context(const char *path, mode_t mode); void oddjob_unset_selinux_file_creation_context(void); int oddjob_selinux_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); #endif oddjob-0.16-0/src/selinux.c0000664000471600047240000001244010302715620012411 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include "handlers.h" #include "selinux.h" #ident "$Id: selinux.c,v 1.7 2005/08/23 21:56:32 nalin Exp $" #ifdef SELINUX_LABELS #include #ifndef HAVE_MATCHPATHCON_INIT static void matchpathcon_init(const char *path) { } #endif static dbus_bool_t oddjob_check_selinux_enabled(void) { static int selinux_enabled = -1; if (selinux_enabled == -1) { selinux_enabled = is_selinux_enabled(); if (selinux_enabled == 1) { matchpathcon_init(NULL); } } return (selinux_enabled == 1); } void oddjob_set_selinux_file_creation_context(const char *path, mode_t mode) { security_context_t context; if (!oddjob_check_selinux_enabled()) { return; } context = NULL; if (matchpathcon(path, mode, &context) == 0) { if (context != NULL) { if (strcmp(context, "<>") == 0) { oddjob_unset_selinux_file_creation_context(); } else { setfscreatecon(context); } freecon(context); } else { oddjob_unset_selinux_file_creation_context(); } } } void oddjob_unset_selinux_file_creation_context(void) { if (!oddjob_check_selinux_enabled()) { return; } setfscreatecon(NULL); } #else void oddjob_set_selinux_file_creation_context(const char *path, mode_t mode) { } void oddjob_unset_selinux_file_creation_context(void) { } #endif /* Create a directory with the given permissions, and create leading * directories as well. Any directories which are created will have contexts * set as matchpathcon() dictates. The directory itself will be owned by the * supplied uid and gid. */ int oddjob_selinux_mkdir(const char *newpath, mode_t mode, uid_t uid, gid_t gid) { char path[PATH_MAX + 1], tmp[PATH_MAX + 1]; const char *p; char *q; int i; struct stat st; /* Collapse instances of "//" to "/". */ if (strlen(newpath) < sizeof(tmp)) { strcpy(tmp, newpath); for (q = tmp; *q != '\0'; q++) { while ((q[0] == '/') && ((q[1] == '/') || (q[1] == '\0'))) { memmove(q, q + 1, strlen(q)); } } newpath = tmp; } if (strlen(newpath) < sizeof(path)) { /* Walk the path name. */ memset(path, '\0', sizeof(path)); for (p = newpath; *p != '\0'; p++) { /* If the path so far non-empty, and the next char * would be a directory separator, create the leading * directory. Accept EEXIST as the only okay error. */ if ((p > newpath) && (*p == '/')) { /* Skip it if the directory exists. */ if ((stat(path, &st) == 0) && (st.st_mode & S_IFDIR)) { path[p - newpath] = *p; continue; } /* Create the directory. */ oddjob_set_selinux_file_creation_context(path, S_IRWXU | S_IXGRP | S_IXOTH | S_IFDIR); i = mkdir(path, S_IRWXU | S_IXGRP | S_IXOTH); oddjob_unset_selinux_file_creation_context(); if ((i == -1) && (errno != EEXIST)) { syslog(LOG_ERR, "error creating %s: %m", path); return HANDLER_FAILURE; } } path[p - newpath] = *p; } /* Now create the directory itself. */ oddjob_set_selinux_file_creation_context(path, mode | S_IFDIR); i = mkdir(path, mode); oddjob_unset_selinux_file_creation_context(); if ((i == -1) && (errno != EEXIST)) { syslog(LOG_ERR, "error creating %s: %m", path); return HANDLER_FAILURE; } if ((uid != (uid_t)-1) && (gid != (uid_t)-1)) { if (chown(path, uid, gid) != 0) { syslog(LOG_ERR, "error setting permissions on " "%s: %m", path); rmdir(path); return HANDLER_FAILURE; } } return 0; } else { errno = EINVAL; syslog(LOG_ERR, "pathname (%s) is too long", newpath); return HANDLER_INVALID_INVOCATION; } } oddjob-0.16-0/src/pam_oddjob_mkhomedir.c0000664000471600047240000001134610303404176015065 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include "common.h" #include "oddjob_dbus.h" #ident "$Id: pam_oddjob_mkhomedir.c,v 1.7 2005/08/25 18:05:50 nalin Exp $" static void conv_text_info(pam_handle_t *pamh, const char *info) { struct pam_conv *conv; int i; conv = NULL; if ((pam_get_item(pamh, PAM_CONV, (const void**) &conv) == PAM_SUCCESS) && (conv != NULL)) { const struct pam_message message = { .msg_style = PAM_TEXT_INFO, .msg = info, }; const struct pam_message *messages[] = { &message, NULL, }; struct pam_response *responses; if (conv->conv != NULL) { responses = NULL; i = conv->conv(1, messages, &responses, conv->appdata_ptr); if ((i == PAM_SUCCESS) && (responses != NULL)) { if (responses->resp != NULL) { free(responses->resp); } free(responses); } } } } static void send_pam_oddjob_mkhomedir_request(pam_handle_t *pamh) { const char *user; char *buf, reply[8192]; size_t bufsize; struct passwd pwd, *pw; int ret, result; user = NULL; strcpy(reply, ""); if ((pam_get_user(pamh, &user, "login: ") == PAM_SUCCESS) && (user != NULL) && (strlen(user) > 0)) { /* Attempt to look up information about the user. */ bufsize = 4; do { pw = NULL; buf = malloc(bufsize); if (buf == NULL) { break; } ret = getpwnam_r(user, &pwd, buf, bufsize, &pw); if ((ret != 0) || (pw != &pwd)) { pw = NULL; free(buf); buf = NULL; if (errno == ERANGE) { bufsize += 4; } else { break; } } } while ((ret != 0) && (errno == ERANGE)); if (pw != NULL) { /* If we're running with the user's privileges, then * call the "mkmyhomedir" method. */ if ((getuid() == pw->pw_uid) && (geteuid() == pw->pw_uid) && (getgid() == pw->pw_gid) && (getegid() == pw->pw_gid)) { ret = oddjob_dbus_call_method(DBUS_BUS_SYSTEM, ODDJOB_SERVICE_NAME, ODDJOB_OBJECT_PATH, ODDJOB_INTERFACE_NAME, "mkmyhomedir", &result, reply, sizeof(reply), NULL, 0, NULL); } else { /* Otherwise, attempt to have a directory * created for the user by calling the * "mkhomedirfor" method. */ ret = oddjob_dbus_call_method(DBUS_BUS_SYSTEM, ODDJOB_SERVICE_NAME, ODDJOB_OBJECT_PATH, ODDJOB_INTERFACE_NAME, "mkhomedirfor", &result, reply, sizeof(reply), NULL, 0, user, NULL); } } if (buf != NULL) { free(buf); } } if (strlen(reply) > 0) { conv_text_info(pamh, reply); } } int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { send_pam_oddjob_mkhomedir_request(pamh); return PAM_IGNORE; } int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { return PAM_IGNORE; } int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv) { send_pam_oddjob_mkhomedir_request(pamh); return PAM_IGNORE; } oddjob-0.16-0/src/pam_oddjob_mounthomedir.c0000664000471600047240000001215710303404176015621 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include "common.h" #include "oddjob_dbus.h" #ident "$Id: pam_oddjob_mounthomedir.c,v 1.5 2005/08/25 18:05:50 nalin Exp $" static void conv_text_info(pam_handle_t *pamh, const char *info) { struct pam_conv *conv; int i; conv = NULL; if ((pam_get_item(pamh, PAM_CONV, (const void**) &conv) == PAM_SUCCESS) && (conv != NULL)) { const struct pam_message message = { .msg_style = PAM_TEXT_INFO, .msg = info, }; const struct pam_message *messages[] = { &message, NULL, }; struct pam_response *responses; if (conv->conv != NULL) { responses = NULL; i = conv->conv(1, messages, &responses, conv->appdata_ptr); if ((i == PAM_SUCCESS) && (responses != NULL)) { if (responses->resp != NULL) { free(responses->resp); } free(responses); } } } } static void send_pam_oddjob_mounthomedir_request(pam_handle_t *pamh, const char *action) { const char *user, *authtok; char *buf, reply[8192]; size_t bufsize; struct passwd pwd, *pw; int ret; user = NULL; strcpy(reply, ""); if ((pam_get_user(pamh, &user, "login: ") == PAM_SUCCESS) && (user != NULL) && (strlen(user) > 0)) { /* Attempt to look up information about the user. */ bufsize = 4; do { pw = NULL; buf = malloc(bufsize); if (buf == NULL) { break; } ret = getpwnam_r(user, &pwd, buf, bufsize, &pw); if ((ret != 0) || (pw != &pwd)) { pw = NULL; free(buf); buf = NULL; if (errno == ERANGE) { bufsize += 4; } else { break; } } } while ((ret != 0) && (errno == ERANGE)); if (pw != NULL) { /* Retrieve the user's authentication token, which * might be a password which we need. */ ret = pam_get_item(pamh, PAM_AUTHTOK, (const void**) &authtok); if ((ret != PAM_SUCCESS) || (authtok == NULL)) { authtok = ""; } /* If we're running with the user's privileges, then * call the "mountmyhomedir" method. */ if ((getuid() == pw->pw_uid) && (geteuid() == pw->pw_uid) && (getgid() == pw->pw_gid) && (getegid() == pw->pw_gid)) { ret = oddjob_dbus_call_method(DBUS_BUS_SYSTEM, ODDJOB_SERVICE_NAME, ODDJOB_OBJECT_PATH, ODDJOB_INTERFACE_NAME, "mountmyhomedir", NULL, reply, sizeof(reply), NULL, 0, authtok, action, NULL); } else { /* Otherwise, attempt to have a directory * created for the user by calling the * "mounthomedirfor" method. */ ret = oddjob_dbus_call_method(DBUS_BUS_SYSTEM, ODDJOB_SERVICE_NAME, ODDJOB_OBJECT_PATH, ODDJOB_INTERFACE_NAME, "mounthomedirfor", NULL, reply, sizeof(reply), NULL, 0, user, authtok, action, NULL); } } if (buf != NULL) { free(buf); } } if (strlen(reply) > 0) { conv_text_info(pamh, reply); } } int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { send_pam_oddjob_mounthomedir_request(pamh, "mount"); return PAM_IGNORE; } int pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv) { send_pam_oddjob_mounthomedir_request(pamh, "umount"); return PAM_IGNORE; } int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv) { return PAM_IGNORE; } oddjob-0.16-0/src/handlers.h0000664000471600047240000000323610260106015012525 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_handlers_h #define oddjob_handlers_h #define HANDLER_FAILURE 1 #define HANDLER_INVALID_INVOCATION 2 #endif oddjob-0.16-0/src/mkhomedir.c0000664000471600047240000001734110260106015012701 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "handlers.h" #include "selinux.h" #include "util.h" #define _(_x) _x #ident "$Id: mkhomedir.c,v 1.9 2005/06/27 23:30:21 nalin Exp $" static const char *skel; static struct passwd *pwd; #define FLAG_POPULATE (1 << 0) #define FLAG_QUIET (1 << 1) /* Given the path of an item somewhere in the skeleton directory, create as * identical as possible a copy in the destination tree. */ static int copy_single_item(const char *source, const struct stat *sb, int flag, struct FTW *s) { int sfd, dfd, i; char target[PATH_MAX + 1], newpath[PATH_MAX + 1]; unsigned char buf[BUFSIZ]; /* Generate the name of the new item. */ if (snprintf(newpath, sizeof(newpath), "%s%s", pwd->pw_dir, source + strlen(skel)) > (int) sizeof(newpath)) { /* The path would be too long(!), so give up. */ syslog(LOG_ERR, "pathname (%s%s) would be too long", pwd->pw_dir, source + strlen(skel)); return HANDLER_INVALID_INVOCATION; } switch (flag) { case FTW_SL: /* It's a symlink. Read its target and create a copy. */ memset(&target, '\0', sizeof(target)); if (readlink(source, target, sizeof(target) - 1)) { oddjob_set_selinux_file_creation_context(newpath, sb->st_mode | S_IFLNK); if (symlink(target, newpath) == 0) { if (lchown(newpath, pwd->pw_uid, pwd->pw_gid) == -1) { syslog(LOG_ERR, "error setting owner of \"%s\": " "%m", newpath); unlink(newpath); return HANDLER_FAILURE; } } else { oddjob_unset_selinux_file_creation_context(); syslog(LOG_ERR, "error creating %s: %m", target); return HANDLER_FAILURE; } oddjob_unset_selinux_file_creation_context(); return 0; } break; case FTW_F: /* It's a file. Make a copy. */ sfd = open(source, O_RDONLY); if (sfd != -1) { oddjob_set_selinux_file_creation_context(newpath, sb->st_mode | S_IFREG); dfd = open(newpath, O_WRONLY | O_CREAT | O_EXCL, sb->st_mode); if (dfd != -1) { while ((i = read(sfd, buf, sizeof(buf))) > 0) { retry_write(dfd, buf, i); } if (fchown(dfd, pwd->pw_uid, pwd->pw_gid) == -1) { syslog(LOG_ERR, "error setting owner of \"%s\": " "%m", newpath); unlink(newpath); close(sfd); close(dfd); return HANDLER_FAILURE; } else { if (fchmod(dfd, sb->st_mode) == -1) { unlink(newpath); syslog(LOG_ERR, "error setting mode of " "\"%s\": %m", newpath); unlink(newpath); close(sfd); close(dfd); return HANDLER_FAILURE; } } close(dfd); } else { if (errno != EEXIST) { syslog(LOG_ERR, "error creating %s: %m", newpath); close(sfd); return HANDLER_FAILURE; } } close(sfd); oddjob_unset_selinux_file_creation_context(); } else { syslog(LOG_ERR, "error opening %s: %m", source); return HANDLER_FAILURE; } return 0; case FTW_D: /* It's a directory. Make one with the same name and * permissions, but owned by the target user. */ if ((oddjob_selinux_mkdir(newpath, sb->st_mode, pwd->pw_uid, pwd->pw_gid) != 0) && (errno != EEXIST)) { return HANDLER_FAILURE; } return 0; case FTW_NS: default: return 0; } return 0; } /* * get_skel_dir * * Returns: the location on the filesystem where the contents of a new user's * home directory should be found. FIXME: consult /etc/default/useradd. * */ static const char * get_skel_dir(void) { return "/etc/skel"; } /* Create a copy of /etc/skel in the named user's home directory. */ static int mkhomedir(const char *user, int flags) { struct stat st; /* Now make sure that the user a) exists b) has a home directory specified which is 1) an absolute pathname 2) not an empty string 3) not already there */ pwd = getpwnam(user); if (pwd == NULL) { syslog(LOG_ERR, "could not look up location of home directory " "for %s", user); return HANDLER_INVALID_INVOCATION; } if (pwd->pw_dir == NULL) { syslog(LOG_ERR, "user %s has NULL home directory", user); return HANDLER_INVALID_INVOCATION; } if ((strlen(pwd->pw_dir) == 0) || (pwd->pw_dir[0] != '/')) { syslog(LOG_ERR, "user %s has weird home directory (%s)", user, pwd->pw_dir); return HANDLER_INVALID_INVOCATION; } if ((lstat(pwd->pw_dir, &st) == -1) && (errno == ENOENT)) { /* Figure out which location we're using as a * template. */ skel = get_skel_dir(); if (skel != NULL) { /* Set the text of the result message. */ if (!(flags & FLAG_QUIET)) { printf(_("Creating home directory for %s."), user); } /* Walk the template tree and make a copy. */ if (flags & FLAG_POPULATE) { return nftw(get_skel_dir(), copy_single_item, 5, FTW_PHYS); } else { if (stat(skel, &st) != 0) { st.st_mode = S_IRWXU; } if ((oddjob_selinux_mkdir(pwd->pw_dir, st.st_mode, pwd->pw_uid, pwd->pw_gid) != 0) && (errno != EEXIST)) { syslog(LOG_ERR, "error creating \"%s\": %m", pwd->pw_dir); return HANDLER_FAILURE; } } } } return 0; } int main(int argc, char **argv) { char **args; int i, flags = FLAG_POPULATE; openlog(PACKAGE "-mkhomedir", LOG_PID, LOG_DAEMON); while ((i = getopt(argc, argv, "nq")) != -1) { switch (i) { case 'n': flags &= ~FLAG_POPULATE; break; case 'q': flags |= FLAG_QUIET; break; default: fprintf(stderr, "Valid options:\n" "-n\tDo not populate home directories, " "just create them.\n" "-q\tDo not print messages when creating " "a directory.\n"); return 1; } } args = oddjob_collect_args(stdin); for (i = 0; (args != NULL) && (args[i] != NULL); i++) { if (strlen(args[i]) > 0) { i = mkhomedir(args[i], flags); oddjob_free_args(args); closelog(); return i; } } oddjob_free_args(args); syslog(LOG_ERR, "invoked with no non-empty arguments"); closelog(); return HANDLER_INVALID_INVOCATION; } oddjob-0.16-0/src/mounthomedir.c0000664000471600047240000002564710260106015013444 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "handlers.h" #include "selinux.h" #include "util.h" #define SEP " \t" #define MYLOCKDIR LOCKDIR "/" PACKAGE "-mounthomedir" #ident "$Id: mounthomedir.c,v 1.10 2005/06/27 23:30:21 nalin Exp $" struct usecountlock { struct flock lock; char *path; int fd; int32_t count; }; static void * lock_get(const char *path) { struct usecountlock *lock; unsigned int i; char buf[PATH_MAX + 1]; struct stat st; mode_t mode; lock = oddjob_malloc0(sizeof(struct usecountlock)); lock->path = oddjob_malloc0(strlen(MYLOCKDIR) + 1 + strlen(path) + 1); snprintf(lock->path, strlen(MYLOCKDIR) + 1 + strlen(path) + 1, "%s/%s", MYLOCKDIR, path); for (i = strlen(MYLOCKDIR) + 1; lock->path[i] != '\0'; i++) { if (lock->path[i] == '/') { lock->path[i] = '>'; } } for (i = 0; (lock->path[i] != '\0') && (i < sizeof(buf) - 1); i++) { if ((i > 0) && (lock->path[i] == '/')) { memset(buf, '\0', sizeof(buf)); memcpy(buf, lock->path, i); if ((stat(buf, &st) == -1) && (errno == ENOENT)) { mode = S_IRWXU | S_IXGRP | S_IXOTH; oddjob_set_selinux_file_creation_context(buf, mode | S_IFDIR); if ((mkdir(buf, mode) == -1) && (errno != EEXIST)) { syslog(LOG_ERR, "unable to create directory " "\"%s\": %s", buf, strerror(errno)); oddjob_free(lock->path); oddjob_free(lock); oddjob_unset_selinux_file_creation_context(); return NULL; } oddjob_unset_selinux_file_creation_context(); } } } lock->fd = open(lock->path, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); if ((lock->fd == -1) && (errno == EEXIST)) { lock->fd = open(lock->path, O_RDWR); } if (fcntl(lock->fd, F_SETFD, FD_CLOEXEC) == -1) { syslog(LOG_ERR, "error setting close-on-exec flag on lock file \"%s\": " "%s", lock->path, strerror(errno)); oddjob_free(lock->path); oddjob_free(lock); return NULL; } if (lock->fd == -1) { syslog(LOG_ERR, "error opening lock file \"%s\": %s", lock->path, strerror(errno)); oddjob_free(lock->path); oddjob_free(lock); return NULL; } memset(&lock->lock, 0, sizeof(lock->lock)); lock->lock.l_type = F_WRLCK; lock->lock.l_whence = SEEK_SET; lock->lock.l_start = 0; lock->lock.l_len = 0; if (fcntl(lock->fd, F_SETLKW, &lock->lock) != 0) { syslog(LOG_ERR, "error locking lock file \"%s\": %s", lock->path, strerror(errno)); close(lock->fd); oddjob_free(lock->path); oddjob_free(lock); return NULL; } read(lock->fd, &lock->count, sizeof(lock->count)); return lock; } static int lock_read(void *lck) { struct usecountlock *lock; lock = lck; return lock->count; } static void lock_manipulate(void *lck, int increment) { struct usecountlock *lock; lock = lck; if (lseek(lock->fd, 0, SEEK_SET) == 0) { lock->count += increment; if (write(lock->fd, &lock->count, sizeof(lock->count)) != sizeof(lock->count)) { lock->count -= increment; } } } static void lock_release(void *lck) { struct usecountlock *lock; lock = lck; close(lock->fd); oddjob_free(lock->path); oddjob_free(lock); } enum action_type { action_mount, action_umount, }; static int fork_exec_wait(const char **argv) { pid_t pid; int status; pid = fork(); switch (pid) { case -1: syslog(LOG_ERR, "fork() error: %m"); return -1; case 0: execvp(argv[0], (char **) argv); syslog(LOG_ERR, "execvp(\"%s\") error: %m", argv[0]); _exit(1); return -1; default: waitpid(pid, &status, 0); if (WIFEXITED(status) && (WEXITSTATUS(status) == 0)) { return 0; } return status; break; } } static void userfstab_mount(const char *user, const char *authtok, const char *fstype, const char *source, const char *dest, enum action_type action, uid_t uid, gid_t gid) { void *lock; const char *argv[8]; char filename[PATH_MAX + 1], options[LINE_MAX]; int fd; /* obtain the lock file for this mountpoint */ lock = lock_get(dest); if (lock == NULL) { syslog(LOG_ERR, "unable to lock refcount file for \"%s\"", dest); return; } /* if the task is an unmount, just do it */ if (action == action_umount) { argv[0] = PATH_UMOUNT; argv[1] = dest; argv[2] = NULL; if (lock_read(lock) == 1) { fork_exec_wait(argv); } if (lock_read(lock) > 0) { lock_manipulate(lock, -1); } lock_release(lock); return; } if ((strcmp(fstype, "nfs") == 0) || (strcmp(fstype, "nfs4") == 0) || (strcmp(fstype, "ext2") == 0) || (strcmp(fstype, "ext3") == 0) || (strcmp(fstype, "shmfs") == 0) || (strcmp(fstype, "tmpfs") == 0) || (strcmp(fstype, "ramfs") == 0) || (strcmp(fstype, "iso9660") == 0)) { argv[0] = PATH_MOUNT; argv[1] = "-t"; argv[2] = fstype; argv[3] = source; argv[4] = dest; argv[5] = NULL; if (lock_read(lock) == 0) { if (oddjob_selinux_mkdir(dest, S_IRWXU, uid, gid) == 0) { fork_exec_wait(argv); } } lock_manipulate(lock, 1); lock_release(lock); return; } if ((strcmp(fstype, "vfat") == 0) || (strcmp(fstype, "fat") == 0)) { argv[0] = PATH_MOUNT; argv[1] = "-t"; argv[2] = fstype; argv[3] = "-o"; argv[4] = options; argv[5] = source; argv[6] = dest; argv[7] = NULL; snprintf(options, sizeof(options), "uid=%lu,gid=%lu,umask=%03o", (unsigned long) uid, (unsigned long) gid, 077); if (lock_read(lock) == 0) { if (oddjob_selinux_mkdir(dest, S_IRWXU, uid, gid) == 0) { fork_exec_wait(argv); } } lock_manipulate(lock, 1); lock_release(lock); return; } if (strcmp(fstype, "cifs") == 0) { strcpy(filename, "/tmp/mounthomedirXXXXXX"); fd = mkstemp(filename); if (fd == -1) { lock_release(lock); return; } argv[0] = PATH_MOUNT; argv[1] = "-t"; argv[2] = fstype; argv[3] = "-o"; argv[4] = options; argv[5] = source; argv[6] = dest; argv[7] = NULL; snprintf(options, sizeof(options), "credentials=%s,uid=%lu,gid=%lu", filename, (unsigned long) uid, (unsigned long) gid); write(fd, "username=", strlen("username=")); write(fd, user, strlen(user)); write(fd, "\npassword=", strlen("\npassword=")); write(fd, authtok, strlen(authtok)); write(fd, "\n", strlen("\n")); close(fd); if (lock_read(lock) == 0) { if (oddjob_selinux_mkdir(dest, S_IRWXU, uid, gid) == 0) { fork_exec_wait(argv); } } lock_manipulate(lock, 1); unlink(filename); lock_release(lock); return; } } static void userfstab(const char *filename, const char *user, const char *authtok, enum action_type action, const char *homedir, uid_t uid, gid_t gid) { FILE *fp; int i; const char *p, *q; char *fstype, *source, path[PATH_MAX + 1], *matchuser, **entries; fp = fopen(filename, "r"); if (fp == NULL) { return; } if (fcntl(fileno(fp), F_SETFD, FD_CLOEXEC) == -1) { fclose(fp); return; } entries = oddjob_collect_args(fp); for (i = 0; (entries != NULL) && (entries[i] != NULL); i++) { /* isolate the first token (user name) */ p = entries[i] + strspn(entries[i], SEP); q = p + strcspn(p, SEP); /* is it a comment? */ if (strchr("#;", *p) != NULL) { continue; } /* does it match the user name? */ matchuser = oddjob_strndup(p, q - p); if (fnmatch(matchuser, user, FNM_NOESCAPE) != 0) { oddjob_free(matchuser); continue; } oddjob_free(matchuser); /* isolate the filesystem type */ p = q + strspn(q, SEP); q = p + strcspn(p, SEP); fstype = oddjob_strndup(p, q - p); /* isolate the filesystem source */ p = q + strspn(q, SEP); q = p + strcspn(p, SEP); source = oddjob_strndup(p, q - p); /* build a path relative to the user's home directory */ p = q + strspn(q, SEP); if (path + snprintf(path, sizeof(path), "%s/%s", homedir, p) >= path + sizeof(path)) { syslog(LOG_ERR, "derived path %s/%s would be too long", homedir, p); oddjob_free(source); oddjob_free(fstype); continue; } /* actually do the mount/umount */ userfstab_mount(user, authtok, fstype, source, path, action, uid, gid); oddjob_free(source); oddjob_free(fstype); } oddjob_free_args(entries); fclose(fp); } int main(int argc, char **argv) { char **args; struct passwd *pwd; enum action_type action; int i; while ((i = getopt(argc, argv, "")) != -1) { switch (i) { default: fprintf(stderr, "No recognized options.\n"); return 1; } } openlog(PACKAGE "-mounthomedir", LOG_PID, LOG_DAEMON); args = oddjob_collect_args(stdin); for (i = 0; (args != NULL) && (args[i] != NULL); i++) { continue; } if (i != 3) { syslog(LOG_ERR, "invoked with %d arguments, expected 3", i); return HANDLER_INVALID_INVOCATION; } if ((strcmp(args[2], "mount") != 0) && (strcmp(args[2], "umount") != 0)) { syslog(LOG_ERR, "third argument was neither \"mount\" nor \"umount\""); return HANDLER_INVALID_INVOCATION; } if (strcmp(args[2], "mount") == 0) { action = action_mount; } else { if (strcmp(args[2], "umount") == 0) { action = action_umount; } } pwd = getpwnam(args[0]); if (pwd == NULL) { syslog(LOG_ERR, "no such user as \"%s\"", args[0]); return HANDLER_INVALID_INVOCATION; } userfstab(SYSCONFDIR "/" PACKAGE "/userfstab", args[0], args[1], action, pwd->pw_dir, pwd->pw_uid, pwd->pw_gid); oddjob_free_args(args); closelog(); return 0; } oddjob-0.16-0/src/launch.c0000664000471600047240000001644510305163551012210 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "handlers.h" #include "util.h" #ident "$Id: launch.c,v 1.6 2005/08/30 23:10:33 nalin Exp $" static int run(const char *service, const char *command) { pid_t pid; int exec_status[2], daemon_status[2]; char **argv; const char *error, *argv0; char c; int i; error = NULL; argv = oddjob_parse_args(command, &error); if (argv == NULL) { fprintf(stderr, "Error starting \"%s\": %s", service, error ? error : "Unknown error"); return 1; } printf("Trying to start \"%s\" service (", service); for (i = 0; argv[i] != NULL; i++) { printf("%s\"%s\"", i > 0 ? ", " : "", argv[i]); } printf(")\n"); /* Create two status pipes. */ if (pipe(exec_status) != 0) { fprintf(stderr, "Error at pipe(): %s\n", strerror(errno)); return 1; } if (pipe(daemon_status) != 0) { fprintf(stderr, "Error at pipe(): %s\n", strerror(errno)); close(exec_status[0]); close(exec_status[1]); return 1; } if (fcntl(exec_status[1], F_SETFD, FD_CLOEXEC) != 0) { fprintf(stderr, "Error at fcntl(): %s\n", strerror(errno)); close(exec_status[0]); close(exec_status[1]); close(daemon_status[0]); close(daemon_status[1]); return 1; } if (fcntl(daemon_status[1], F_SETFD, FD_CLOEXEC) != 0) { fprintf(stderr, "Error at fcntl(): %s\n", strerror(errno)); close(exec_status[0]); close(exec_status[1]); close(daemon_status[0]); close(daemon_status[1]); return 1; } /* Fork a child to start the new daemon. */ pid = fork(); switch (pid) { case -1: fprintf(stderr, "Error at fork(): %s\n", strerror(errno)); close(daemon_status[0]); close(daemon_status[1]); close(exec_status[0]); close(exec_status[1]); break; default: /* we are the child, close the read ends and continue */ close(exec_status[0]); close(daemon_status[0]); /* if we can't detach, notify of error */ if (daemon(0, 0) != 0) { c = errno; write(daemon_status[1], &c, 1); _exit(1); } close(daemon_status[1]); /* if we can't exec, notify of error */ argv0 = argv[0]; if (strchr(argv0, '/') != NULL) { argv0 = strrchr(argv0, '/') + 1; } execvp(argv0, argv); c = errno; write(exec_status[1], &c, 1); _exit(1); break; case 0: /* we are the parent, close the write ends */ close(exec_status[1]); close(daemon_status[1]); /* read the daemon() result */ if (read(daemon_status[0], &c, 1) == 1) { close(daemon_status[0]); fprintf(stderr, "Error at daemon(): %s\n", strerror(c)); close(exec_status[0]); _exit(1); } close(daemon_status[0]); /* read the daemon() result */ if (read(exec_status[0], &c, 1) == 1) { close(exec_status[0]); fprintf(stderr, "Error at exec(): %s\n", strerror(c)); _exit(1); } /* good to go! */ break; } return 0; } /* Given a service name, scan the .desktop files and locate the binary which * should implement that service. */ static int launch(const char *service) { glob_t globbed; char command[PATH_MAX + 1], names[8192], buf[8192], *p; struct { const char key[7]; size_t keylen; char *buf; size_t bufsize; } vars[] = { {"Names=", sizeof("Names=") - 1, names, sizeof(names)}, {"Name=", sizeof("Name=") - 1, names, sizeof(names)}, {"Exec=", sizeof("Exec=") - 1, command, sizeof(command)}, }; FILE *fp; unsigned i, j, span; const char *section = "[D-BUS Service]"; dbus_bool_t found, in_section, dupe; i = glob(DATADIR "/" DBUS_PACKAGE "/services/*.service", 0, NULL, &globbed); if (i != 0) { return -1; } found = dupe = FALSE; for (i = 0; i < globbed.gl_pathc; i++) { in_section = FALSE; fp = fopen(globbed.gl_pathv[i], "r"); if (fp != NULL) { strcpy(command, ""); strcpy(names, ""); while (fgets(buf, sizeof(buf), fp) != NULL) { /* If it looks like a section start, check if * it's the section we need to heed. */ if (buf[0] == '[') { in_section = (strncmp(buf, section, strlen(section)) == 0) && (strchr("\r\n", buf[strlen(section)]) != NULL); continue; } if (!in_section) { continue; } /* Parse out variables about which we care. */ for (j = 0; j < sizeof(vars) / sizeof(vars[0]); j++) { if (vars[j].keylen <= 0) { vars[j].keylen = strlen(vars[j].key); } if (strncmp(buf, vars[j].key, vars[j].keylen) == 0) { snprintf(vars[j].buf, vars[j].bufsize, "%s", buf + vars[j].keylen); /* Snip of trailing CR/LFs. */ span = strcspn(vars[j].buf, "\r\n"); if (span > 0) { vars[j].buf[span] = '\0'; } break; } } } /* If we got a path and names, check if we have a match * on the service name. */ if ((strlen(command) > 0) && (strlen(names) > 0)) { p = names; while (*p == ';') { p++; } while (*p != '\0') { span = strcspn(p, ";\r\n"); if (span > 0) { if (strncmp(service, p, span) == 0) { if (found) { /* Duplicate! */ dupe = TRUE; } found = TRUE; break; } } p += span; p += strspn(p, ";\r\n"); } } fclose(fp); } } globfree(&globbed); /* If we got a match, run it. */ if (found && !dupe) { return run(service, command); } return HANDLER_FAILURE; } int main(int argc, char **argv) { char arg[LINE_MAX]; int i; openlog(PACKAGE "-dbus-launch", LOG_PID, LOG_DAEMON); if (fgets(arg, sizeof(arg), stdin) != NULL) { i = strcspn(arg, "\r\n"); arg[i] = '\0'; if (strlen(arg) > 0) { i = launch(arg); closelog(); return i; } } closelog(); return HANDLER_INVALID_INVOCATION; } oddjob-0.16-0/src/oddjob_request.c0000664000471600047240000000753610303404176013747 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include "common.h" #include "oddjob.h" #define EXPECTED_ERROR "org.freedesktop.DBus.Error.ServiceUnknown" #ident "$Id: oddjob_request.c,v 1.9 2005/08/25 18:05:50 nalin Exp $" int main(int argc, char **argv) { int i, arg, c, result; char outbuf[8192], errbuf[8192]; const char *service, *object, *interface; const char *usage = "Usage: oddjob_request " "[-S] [-s service] [-o object] [-i interface] " "[request [arg1 [arg2 [arg3 [arg4]]]]]"; DBusBusType bus; /* If we got any options, assume that the user doesn't know how to call * the program. */ service = ODDJOB_SERVICE_NAME; object = ODDJOB_OBJECT_PATH; interface = ODDJOB_INTERFACE_NAME; bus = DBUS_BUS_SYSTEM; while ((c = getopt(argc, argv, "i:o:s:S")) != -1) { switch (c) { case 'i': interface = optarg; break; case 'o': object = optarg; break; case 's': service = optarg; break; case 'S': bus = DBUS_BUS_SESSION; break; default: printf("%s\n", usage); exit(1); break; } } /* If we got no arguments, assume that they need help on using the * program. */ if (argc == optind) { printf("%s\n", usage); } /* Send the request as the user requested. If they specified no * request, then run the "list" method. */ arg = optind; i = oddjob_dbus_call_method(bus, service, object, interface, (argc > arg) ? argv[arg] : "list", &result, outbuf, sizeof(outbuf), errbuf, sizeof(errbuf), (argc > (arg + 1)) ? argv[arg + 1] : NULL, (argc > (arg + 2)) ? argv[arg + 2] : NULL, (argc > (arg + 3)) ? argv[arg + 3] : NULL, (argc > (arg + 4)) ? argv[arg + 4] : NULL); if (i == 0) { /* If we ran the "list" method, and we got a response string, * display it to the user. */ if (argc == optind) { if (strlen(outbuf) > 0) { printf("Recognized requests: %s\n", outbuf); } } else { /* Otherwise, if we got a result of any kind, display * it to the user. */ if (strlen(outbuf) > 0) { printf("%s", outbuf); } if (strlen(errbuf) > 0) { fprintf(stderr, "%s", errbuf); } } } else { fprintf(stderr, "%s\n", outbuf); } return result; } oddjob-0.16-0/src/oddjobd.c0000664000471600047240000017475310305157444012356 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef SELINUX_ACLS #include #include #include #endif #include "buffer.h" #include "common.h" #include "handlers.h" #include "mainloop.h" #include "oddjob_dbus.h" #include "util.h" #ident "$Id: oddjobd.c,v 1.31 2005/08/30 22:35:16 nalin Exp $" /* A structure which we use to keep track of outstanding requests. */ struct oddjob_async_task { pid_t pid; int stdin_fd, stdout_fd, stderr_fd; struct oddjob_buffer *stdin_buffer, *stdout_buffer, *stderr_buffer; struct oddjob_dbus_message *msg; char *service, *path, *interface, *method, **argv; }; /* ACL entries. */ struct oddjob_acl { enum oddjob_acl_sense { oddjob_acl_default, oddjob_acl_allow, oddjob_acl_deny } sense; dbus_bool_t apply_user; char *user; dbus_bool_t apply_min_uid; unsigned long min_uid; dbus_bool_t apply_max_uid; unsigned long max_uid; #ifdef SELINUX_ACLS dbus_bool_t apply_selinux_enforcing; dbus_bool_t selinux_enforcing; dbus_bool_t apply_selinux_context; char *selinux_context; dbus_bool_t apply_selinux_user; char *selinux_user; dbus_bool_t apply_selinux_role; char *selinux_role; dbus_bool_t apply_selinux_type; char *selinux_type; dbus_bool_t apply_selinux_range; char *selinux_range; #endif struct oddjob_acl *next; }; /* A structure which we use to keep track of configured methods. */ static struct { /* ACL for everything */ struct oddjob_acl *acl; struct service { /* A well-known address / service name */ char *name; /* ACL for the service */ struct oddjob_acl *acl; struct object { /* An object path */ char *name; struct service *service; /* ACL for the object */ struct oddjob_acl *acl; struct interface { /* An interface name */ char *name; struct object *object; /* ACL for the interface */ struct oddjob_acl *acl; struct method { /* A method name */ char *name; struct interface *interface; /* ACL for the method */ struct oddjob_acl *acl; /* Method type -- internal function, or * external (call a helper) */ enum method_type { method_invalid, method_internal, method_external, } type; int n_arguments; /* Function to call when the dbus layer * passes us a method call */ oddjob_dbus_handler *handler; /* Path of helper to exec, whether or * not we prepend the caller's name to * the list of arguments, and how we * supply arguments, only applies to * external methods */ char **argv; dbus_bool_t prepend_user; enum oddjob_argument_passing_method { oddjob_argument_passing_invalid = 0, oddjob_argument_passing_stdin = 1, oddjob_argument_passing_cmdline = 2, } argument_passing_method; } *methods; int n_methods; } *interfaces; int n_interfaces; } *objects; int n_objects; } *services; int n_services; /* flags */ int debug; int quit; #ifdef SELINUX_ACLS dbus_bool_t selinux_enabled, selinux_enforcing; #endif } globals = { .services = NULL, .n_services = 0, .debug = 0, .quit = 0, #ifdef SELINUX_ACLS .selinux_enabled = FALSE, .selinux_enforcing = FALSE, #endif }; static void oddjobd_exec_method(struct oddjob_dbus_context *ctx, struct oddjob_dbus_message *msg, const char *service_name, const char *object_path, const char *interface_name, const char *method_name, const char *user, unsigned long uid, void *data); static dbus_bool_t load_config(const char *file, dbus_bool_t ignore_missing); static void check_selinux_applicable(void); #ifdef SELINUX_ACLS /* Check if we have an SELinux match with the fields defined in this AC entry. * Assumes that check_selinux_applicable() was called at least relatively * recently, because one of those clauses matches whether or not we're in * enforcing mode. */ static dbus_bool_t check_one_ac_selinux(struct oddjob_acl *acl, const char *selinux_context) { char *ctx; const char *user, *role, *type, *range; dbus_bool_t ret; context_t context; /* If the ACL doesn't specify that we have to be in enforcing mode, and * we're either in non-SELinux or permissive mode, then go ahead and * return a success. */ if (!acl->apply_selinux_enforcing && (!globals.selinux_enabled || !globals.selinux_enforcing)) { return TRUE; } /* Break the context up. */ if (selinux_context != NULL) { context = context_new(selinux_context); ctx = context_str(context); user = context_user_get(context); role = context_role_get(context); type = context_type_get(context); range = context_range_get(context); } else { context = NULL; ctx = NULL; user = NULL; role = NULL; type = NULL; range = NULL; } /* Check all that apply. */ ret = ((!acl->apply_selinux_enforcing) || (!acl->selinux_enforcing == !globals.selinux_enforcing)) && ((!acl->apply_selinux_context) || ((ctx != NULL) && (fnmatch(acl->selinux_context, ctx, ODDJOB_SECONTEXT_FNMATCH_FLAGS) == 0))) && ((!acl->apply_selinux_user) || ((user != NULL) && (fnmatch(acl->selinux_user, user, ODDJOB_SEUSER_FNMATCH_FLAGS) == 0))) && ((!acl->apply_selinux_role) || ((role != NULL) && (fnmatch(acl->selinux_role, role, ODDJOB_SEROLE_FNMATCH_FLAGS) == 0))) && ((!acl->apply_selinux_type) || ((type != NULL) && (fnmatch(acl->selinux_type, type, ODDJOB_SETYPE_FNMATCH_FLAGS) == 0))) && ((!acl->apply_selinux_range) || ((range != NULL) && (fnmatch(acl->selinux_range, range, ODDJOB_SERANGE_FNMATCH_FLAGS) == 0))); /* Free the decomposed context. The other strings are "owned" by this * structure. */ if (context != NULL) { context_free(context); } return ret; } #else /* Ignore SELinux rules, no matter what. */ static dbus_bool_t check_one_ac_selinux(struct oddjob_acl *acl, const char *selinux_context) { return TRUE; } #endif /* Check if a single AC entry matches the given user and UID. */ static dbus_bool_t check_one_ac_match(struct oddjob_acl *acl, const char *user, unsigned long uid, const char *selinux_context) { return ((!acl->apply_user) || (fnmatch(acl->user, user, ODDJOB_USER_FNMATCH_FLAGS) == 0)) && ((!acl->apply_min_uid) || (uid >= acl->min_uid)) && ((!acl->apply_max_uid) || (uid <= acl->max_uid)) && check_one_ac_selinux(acl, selinux_context); } /* Check if there is a match for the given user, UID, and/or security context * somewhere in the given ACL, returning "allow" if there's an access rule * which allows the user acces, "deny" if there's a specific deny rule, and * "default" if there is neither. */ static enum oddjob_acl_sense check_acl(struct oddjob_acl *acl, const char *user, unsigned long uid, const char *selinux_context) { struct oddjob_acl *i; /* Process ALL of the denial rules first. */ for (i = acl; i != NULL; i = i->next) { if (i->sense == oddjob_acl_deny) { if (check_one_ac_match(i, user, uid, selinux_context)) { if (globals.debug) { fprintf(stderr, "Matched deny rule ("); if (i->apply_user) { fprintf(stderr, " user=%s ", i->user); } if (i->apply_min_uid) { fprintf(stderr, " min_uid=%lu ", i->min_uid); } if (i->apply_max_uid) { fprintf(stderr, " max_uid=%lu ", i->max_uid); } #ifdef SELINUX_ACLS if (i->apply_selinux_enforcing) { fprintf(stderr, " seenforcing=%s ", i->selinux_enforcing ? "yes" : "no"); } if (i->apply_selinux_context) { fprintf(stderr, " secontext=%s ", i->selinux_context); } if (i->apply_selinux_user) { fprintf(stderr, " seuser=%s ", i->selinux_user); } if (i->apply_selinux_role) { fprintf(stderr, " serole=%s ", i->selinux_role); } if (i->apply_selinux_type) { fprintf(stderr, " setype=%s ", i->selinux_type); } if (i->apply_selinux_range) { fprintf(stderr, " serange=%s ", i->selinux_range); } #endif fprintf(stderr, ")\n"); } return oddjob_acl_deny; } } } /* Now process the allow rules as a group. */ for (i = acl; i != NULL; i = i->next) { if (i->sense == oddjob_acl_allow) { if (check_one_ac_match(i, user, uid, selinux_context)) { if (globals.debug) { fprintf(stderr, "Matched allow rule ("); if (i->apply_user) { fprintf(stderr, " user=%s ", i->user); } if (i->apply_min_uid) { fprintf(stderr, " min_uid=%lu ", i->min_uid); } if (i->apply_max_uid) { fprintf(stderr, " max_uid=%lu ", i->max_uid); } #ifdef SELINUX_ACLS if (i->apply_selinux_enforcing) { fprintf(stderr, " enforcing=%s ", i->selinux_enforcing ? "yes" : "no"); } if (i->apply_selinux_context) { fprintf(stderr, " context=%s ", i->selinux_context); } if (i->apply_selinux_user) { fprintf(stderr, " user=%s ", i->selinux_user); } if (i->apply_selinux_role) { fprintf(stderr, " role=%s ", i->selinux_role); } if (i->apply_selinux_type) { fprintf(stderr, " type=%s ", i->selinux_type); } if (i->apply_selinux_range) { fprintf(stderr, " range=%s ", i->selinux_range); } #endif fprintf(stderr, ")\n"); } return oddjob_acl_allow; } } } return oddjob_acl_default; } /* Check the ACL associated with a specific method for a particular client. If * there is no match, proceed up to its containing interface, object, and * service, and lastly try the global ACL. If, after all of that, there's no * match, return a failure code. */ static enum oddjob_acl_sense check_method_acl(struct method *method, const char *user, unsigned long uid, const char *selinux_context) { struct oddjob_acl *acl; check_selinux_applicable(); acl = method->acl; if (globals.debug) { fprintf(stderr, "Checking method ACL (%s:%s:%s:%s).\n", method->interface->object->service->name, method->interface->object->name, method->interface->name, method->name); } switch (check_acl(acl, user, uid, selinux_context)) { case oddjob_acl_allow: return oddjob_acl_allow; case oddjob_acl_deny: return oddjob_acl_deny; default: break; } if (globals.debug) { fprintf(stderr, "Checking interface ACL (%s:%s:%s).\n", method->interface->object->service->name, method->interface->object->name, method->interface->name); } acl = method->interface->acl; switch (check_acl(acl, user, uid, selinux_context)) { case oddjob_acl_allow: return oddjob_acl_allow; case oddjob_acl_deny: return oddjob_acl_deny; default: break; } if (globals.debug) { fprintf(stderr, "Checking object ACL (%s:%s).\n", method->interface->object->service->name, method->interface->object->name); } acl = method->interface->object->acl; switch (check_acl(acl, user, uid, selinux_context)) { case oddjob_acl_allow: return oddjob_acl_allow; case oddjob_acl_deny: return oddjob_acl_deny; default: break; } if (globals.debug) { fprintf(stderr, "Checking service ACL (%s).\n", method->interface->object->service->name); } acl = method->interface->object->service->acl; switch (check_acl(acl, user, uid, selinux_context)) { case oddjob_acl_allow: return oddjob_acl_allow; case oddjob_acl_deny: return oddjob_acl_deny; default: break; } if (globals.debug) { fprintf(stderr, "Checking global ACL.\n"); } acl = globals.acl; switch (check_acl(acl, user, uid, selinux_context)) { case oddjob_acl_allow: return oddjob_acl_allow; default: if (globals.debug) { fprintf(stderr, "Fell through all ACLs.\n"); } /* fall through */ case oddjob_acl_deny: return oddjob_acl_deny; break; } } /* Check if we are in SELinux enforcing mode. */ static void check_selinux_applicable(void) { #ifdef SELINUX_ACLS globals.selinux_enabled = (is_selinux_enabled() != 0); if (globals.selinux_enabled) { globals.selinux_enforcing = (security_getenforce() != 0); } else { globals.selinux_enforcing = FALSE; } #endif } /* Convenience functions for reading attributes and contents of XML nodes. */ static dbus_bool_t load_config_xml_node_name_is(xmlNodePtr node, const char *name) { return (node->name != NULL) && (xmlStrcmp(node->name, (xmlChar*) name) == 0); } static dbus_bool_t load_config_xml_attr_name_is(xmlAttrPtr attr, const char *name) { return (attr->name != NULL) && (xmlStrcmp(attr->name, (xmlChar*) name) == 0); } static const char * load_config_xml_attr_data(xmlAttrPtr attr) { xmlNodePtr child; for (child = attr->children; child != NULL; child = child->next) { if ((child->type == XML_TEXT_NODE) && (child->content != NULL)) { return (const char *) child->content; } } return ""; } static const char * load_config_xml_node_data(xmlNodePtr node) { xmlNodePtr child; for (child = node->children; child != NULL; child = child->next) { if ((child->type == XML_TEXT_NODE) && (child->content != NULL)) { return (const char *) child->content; } } return ""; } /* Load an ACL entry from the configuration file. */ static dbus_bool_t load_config_oddjobconfig_oddjob_access(xmlNodePtr cur, struct oddjob_acl **acls, enum oddjob_acl_sense sense) { xmlAttrPtr attr; struct oddjob_acl *ac, *acl; const char *p; char *q; ac = oddjob_malloc(sizeof(*ac)); if (ac == NULL) { fprintf(stderr, "Out of memory\n"); return FALSE; } memset(ac, 0, sizeof(*ac)); ac->sense = sense; if (globals.debug) { fprintf(stderr, "Add new %s%s rule ( ", sense == oddjob_acl_allow ? "allow" : "", sense == oddjob_acl_deny ? "deny" : ""); } for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "user")) { ac->apply_user = TRUE; ac->user = oddjob_strdup(load_config_xml_attr_data(attr)); if (globals.debug) { fprintf(stderr, "user=\"%s\" ", ac->user); } } else if (load_config_xml_attr_name_is(attr, "min_uid")) { p = load_config_xml_attr_data(attr); ac->min_uid = strtoul(p, &q, 0); if ((*p != '\0') && (q != NULL) && (*q == '\0')) { ac->apply_min_uid = TRUE; if (globals.debug) { fprintf(stderr, "min_uid=\"%lu\" ", ac->min_uid); } } } else if (load_config_xml_attr_name_is(attr, "max_uid")) { p = load_config_xml_attr_data(attr); ac->max_uid = strtoul(p, &q, 0); if ((*p != '\0') && (q != NULL) && (*q == '\0')) { ac->apply_max_uid = TRUE; if (globals.debug) { fprintf(stderr, "max_uid=\"%lu\" ", ac->max_uid); } } #ifdef SELINUX_ACLS } else if (load_config_xml_attr_name_is(attr, "selinux_enforcing")) { const char *enforcing; ac->apply_selinux_enforcing = TRUE; ac->selinux_enforcing = TRUE; enforcing = load_config_xml_attr_data(attr); if (enforcing != NULL) { if (strcmp(enforcing, "no") == 0) { ac->selinux_enforcing = FALSE; } else if (strcmp(enforcing, "yes") == 0) { ac->selinux_enforcing = TRUE; } else { fprintf(stderr, "Invalid selinux_enforcing " "\"%s\" (expected \"yes\" or " "\"no\")!\n", enforcing); return FALSE; } } if (globals.debug) { fprintf(stderr, "selinux_enforcing=\"%s\" ", ac->selinux_enforcing ? "yes" : "no"); } } else if (load_config_xml_attr_name_is(attr, "selinux_context")) { ac->apply_selinux_context = TRUE; ac->selinux_context = oddjob_strdup(load_config_xml_attr_data(attr)); if (globals.debug) { fprintf(stderr, "selinux_context=\"%s\" ", ac->selinux_context); } } else if (load_config_xml_attr_name_is(attr, "selinux_user")) { ac->apply_selinux_user = TRUE; ac->selinux_user = oddjob_strdup(load_config_xml_attr_data(attr)); if (globals.debug) { fprintf(stderr, "selinux_user=\"%s\" ", ac->selinux_user); } } else if (load_config_xml_attr_name_is(attr, "selinux_role")) { ac->apply_selinux_role = TRUE; ac->selinux_role = oddjob_strdup(load_config_xml_attr_data(attr)); if (globals.debug) { fprintf(stderr, "selinux_role=\"%s\" ", ac->selinux_role); } } else if (load_config_xml_attr_name_is(attr, "selinux_type")) { ac->apply_selinux_type = TRUE; ac->selinux_type = oddjob_strdup(load_config_xml_attr_data(attr)); if (globals.debug) { fprintf(stderr, "selinux_type=\"%s\" ", ac->selinux_type); } } else if (load_config_xml_attr_name_is(attr, "selinux_range")) { ac->apply_selinux_range = TRUE; ac->selinux_range = oddjob_strdup(load_config_xml_attr_data(attr)); if (globals.debug) { fprintf(stderr, "selinux_range=\"%s\" ", ac->selinux_range); } #endif } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " "<%s%s> element\n", attr->name, (sense == oddjob_acl_allow) ? "allow" : "", (sense == oddjob_acl_deny) ? "deny" : ""); return FALSE; } } } if (globals.debug) { fprintf(stderr, ").\n"); } if (*acls != NULL) { /* Append this AC to the list. */ acl = *acls; while (acl->next != NULL) { acl = acl->next; } acl->next = ac; } else { /* Make this AC the list. */ *acls = ac; } return TRUE; } /* Load the configuration file specified in an node. */ static dbus_bool_t load_config_oddjobconfig_include(xmlNodePtr cur) { xmlAttrPtr attr; dbus_bool_t ignore_missing, okay; glob_t globbed; unsigned int i; ignore_missing = FALSE; if (globals.debug) { fprintf(stderr, "Include("); } /* Check if we need to ignore missing or mismatch files. */ for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "ignore_missing")) { if (globals.debug) { fprintf(stderr, "ignore_missing=\"%s\",", load_config_xml_attr_data(attr)); } if (strcmp(load_config_xml_attr_data(attr), "yes") == 0) { ignore_missing = TRUE; } } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " " element\n", attr->name); return FALSE; } } } if (globals.debug) { fprintf(stderr, "\"%s\").\n", load_config_xml_node_data(cur)); } /* Glob for the filename to allow wildcards to work. */ memset(&globbed, 0, sizeof(globbed)); if (glob(load_config_xml_node_data(cur), GLOB_NOCHECK, NULL, &globbed) != 0) { if (globals.debug) { fprintf(stderr, "glob: %s: %s.\n", load_config_xml_node_data(cur), strerror(errno)); } return FALSE; } /* Load each one, but only return success if all succeed. */ for (i = 0, okay = TRUE; i < globbed.gl_pathc; i++) { okay = load_config(globbed.gl_pathv[i], ignore_missing) && okay; } globfree(&globbed); return okay; } /* Load a element of a and initialize its fields. */ static dbus_bool_t load_config_oddjobconfig_oddjob_helper(xmlNodePtr cur, struct method *method) { xmlAttrPtr attr; int n_arguments; const char *execpath, *arguments, *prepend, *arg_method, *parse_error; char *p, **argv; dbus_bool_t prepend_user; enum oddjob_argument_passing_method arg_passing_method; /* Sanity check -- don't let people define helpers for internal * methods. */ if (method->type != method_invalid) { fprintf(stderr, "Error, node not allowed within a " " describing an internal method.\n"); return FALSE; } /* Pull out the attributes. */ execpath = NULL; arguments = NULL; prepend = NULL; arg_method = NULL; arg_passing_method = oddjob_argument_passing_stdin; for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "exec")) { execpath = load_config_xml_attr_data(attr); } else if (load_config_xml_attr_name_is(attr, "arguments")) { arguments = load_config_xml_attr_data(attr); } else if (load_config_xml_attr_name_is(attr, "prepend_user_name")) { prepend = load_config_xml_attr_data(attr); } else if (load_config_xml_attr_name_is(attr, "argument_passing_method")) { arg_method = load_config_xml_attr_data(attr); } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " " element\n", attr->name); return FALSE; } } } /* Sanity check them as best we can. */ if (execpath == NULL) { fprintf(stderr, "Required attribute \"exec\" not given!\n"); return FALSE; } parse_error = NULL; argv = oddjob_parse_args(execpath, &parse_error); if (argv == NULL) { fprintf(stderr, "Error parsing command \"%s\": %s\n", execpath, parse_error ? parse_error : "Unknown error"); return FALSE; } if (argv[0][0] != '/') { fprintf(stderr, "\"exec\" value \"%s\" is not " "an absolute path!\n", argv[0]); return FALSE; } n_arguments = 0; if (arguments != NULL) { n_arguments = strtol(arguments, &p, 0); if ((*arguments == '\0') || (p == NULL) || (*p != '\0')) { fprintf(stderr, "Invalid argument count \"%s\"!\n", arguments); return FALSE; } } prepend_user = FALSE; if (prepend != NULL) { if (strcmp(prepend, "yes") == 0) { prepend_user = TRUE; } else if (strcmp(prepend, "no") == 0) { prepend_user = FALSE; } else { fprintf(stderr, "Invalid prepend_user_name " "\"%s\" (expected \"yes\" or \"no\")!\n", arg_method); return FALSE; } } arg_passing_method = oddjob_argument_passing_stdin; if (arg_method != NULL) { if (strcmp(arg_method, "stdin") == 0) { arg_passing_method = oddjob_argument_passing_stdin; } else if (strcmp(arg_method, "cmdline") == 0) { arg_passing_method = oddjob_argument_passing_cmdline; } else { fprintf(stderr, "Invalid argument_passing_method " "\"%s\" (expected \"stdin\" or \"cmdline\")!\n", arg_method); return FALSE; } } method->type = method_external; method->n_arguments = n_arguments; method->argv = argv; method->handler = oddjobd_exec_method; method->prepend_user = prepend_user; method->argument_passing_method = arg_passing_method; return TRUE; } /* Add a method with the specified name to the list maintained in the specified * interface structure. Leave its owner pointer unset, because it may yet be * moved. Also assume that the named method isn't already in the list. */ static struct method * method_add(struct interface *interface, const char *name) { struct method *method; oddjob_resize_array((void **) &interface->methods, sizeof(interface->methods[0]), interface->n_methods, interface->n_methods + 1); method = &interface->methods[interface->n_methods]; method->name = oddjob_strdup(name); method->acl = NULL; method->type = method_invalid; method->n_arguments = 0; method->handler = NULL; method->argv = NULL; method->prepend_user = FALSE; method->argument_passing_method = oddjob_argument_passing_invalid; interface->n_methods++; return method; } /* Handle a element. */ static dbus_bool_t load_config_oddjobconfig_method(xmlNodePtr cur, struct interface *interface) { xmlAttrPtr attr; xmlNodePtr child; const char *name; dbus_bool_t parsed; struct method *method; int i; /* Require a "name" attribute. */ name = NULL; for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "name")) { name = load_config_xml_attr_data(attr); } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " " element\n", attr->name); return FALSE; } } } if (name == NULL) { fprintf(stderr, " node in \"%s\" interface of \"%s\" " "object has no \"name\" attribute!\n", interface->name, interface->object->name); return FALSE; } /* Find the method. */ for (i = 0; i < interface->n_methods; i++) { method = &interface->methods[i]; if (strcmp(method->name, name) == 0) { break; } } /* If the method doesn't exist, create it. */ if (i >= interface->n_methods) { method = method_add(interface, name); } /* Parse child nodes. */ parsed = TRUE; for (child = cur->children; child != NULL; child = child->next) { if (load_config_xml_node_name_is(child, "helper")) { parsed = load_config_oddjobconfig_oddjob_helper(child, method) && parsed; } else if (load_config_xml_node_name_is(child, "deny")) { load_config_oddjobconfig_oddjob_access(child, &method->acl, oddjob_acl_deny); } else if (load_config_xml_node_name_is(child, "allow")) { load_config_oddjobconfig_oddjob_access(child, &method->acl, oddjob_acl_allow); } else if (load_config_xml_node_name_is(child, "text")) { /* nothing */ } else { if (globals.debug) { fprintf(stderr, "unknown element \"%s\" within " " element\n", child->name); return FALSE; } } } return parsed; } /* Create a new interface in the list maintained for the object. Assume that * one doesn't already exist, and leave the owner pointer unset. */ static struct interface * interface_add(struct object *object, const char *name) { struct interface *interface; oddjob_resize_array((void **) &object->interfaces, sizeof(object->interfaces[0]), object->n_interfaces, object->n_interfaces + 1); interface = &object->interfaces[object->n_interfaces]; interface->name = oddjob_strdup(name); interface->methods = NULL; interface->n_methods = 0; interface->acl = NULL; object->n_interfaces++; return interface; } /* Handle an tag. */ static dbus_bool_t load_config_oddjobconfig_interface(xmlNodePtr cur, struct object *object) { xmlAttrPtr attr; xmlNodePtr child; const char *name; struct interface *interface; int i; dbus_bool_t parsed = TRUE; /* Require a "name" attribute. */ name = NULL; for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "name")) { name = load_config_xml_attr_data(attr); } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " " element\n", attr->name); return FALSE; } } } if (name == NULL) { fprintf(stderr, " node in object \"%s\" has no " "\"name\" attribute!\n", object->name); return FALSE; } /* Search for the interface. */ for (i = 0; i < object->n_interfaces; i++) { interface = &object->interfaces[i]; if (strcmp(interface->name, name) == 0) { break; } } /* Create the interface if it doesn't already exist. */ if (i >= object->n_interfaces) { interface = interface_add(object, name); } /* Parse the child nodes. */ for (child = cur->children; child != NULL; child = child->next) { if (load_config_xml_node_name_is(child, "method")) { parsed = load_config_oddjobconfig_method(child, interface) && parsed; } else if (load_config_xml_node_name_is(child, "allow")) { load_config_oddjobconfig_oddjob_access(child, &interface->acl, oddjob_acl_allow); } else if (load_config_xml_node_name_is(child, "deny")) { load_config_oddjobconfig_oddjob_access(child, &interface->acl, oddjob_acl_deny); } else if (load_config_xml_node_name_is(child, "text")) { /* nothing */ } else { if (globals.debug) { fprintf(stderr, "unknown element \"%s\" within " " element\n", child->name); return FALSE; } } } return parsed; } /* Add an object to the service, assuming such an object doesn't already exist, * and leave its owner pointer blank as well. */ static struct object * object_add(struct service *service, const char *name) { struct object *object; oddjob_resize_array((void **) &service->objects, sizeof(service->objects[0]), service->n_objects, service->n_objects + 1); object = &service->objects[service->n_objects]; object->name = oddjob_strdup(name); object->interfaces = NULL; object->n_interfaces = 0; object->acl = NULL; service->n_objects++; return object; } /* Handle an element. */ static dbus_bool_t load_config_oddjobconfig_object(xmlNodePtr cur, struct service *service) { xmlAttrPtr attr; xmlNodePtr child; const char *name; struct object *object; int i; dbus_bool_t parsed = TRUE; /* Require a "name" attribute. */ name = NULL; for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "name")) { name = load_config_xml_attr_data(attr); } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " " element\n", attr->name); return FALSE; } } } if (name == NULL) { fprintf(stderr, " node has no \"name\" " "attribute!\n"); return FALSE; } /* Search for the object. */ for (i = 0; i < service->n_objects; i++) { object = &service->objects[i]; if (strcmp(object->name, name) == 0) { break; } } /* Create the object node if it doesn't already exist. */ if (i >= service->n_objects) { object = object_add(service, name); } /* Parse the child nodes. */ for (child = cur->children; child != NULL; child = child->next) { if (load_config_xml_node_name_is(child, "interface")) { parsed = load_config_oddjobconfig_interface(child, object) && parsed; } else if (load_config_xml_node_name_is(child, "allow")) { load_config_oddjobconfig_oddjob_access(child, &object->acl, oddjob_acl_allow); } else if (load_config_xml_node_name_is(child, "deny")) { load_config_oddjobconfig_oddjob_access(child, &object->acl, oddjob_acl_deny); } else if (load_config_xml_node_name_is(child, "text")) { /* nothing */ } else { if (globals.debug) { fprintf(stderr, "unknown element \"%s\" within " " element\n", child->name); return FALSE; } } } return parsed; } /* Add a service to the global service list, assuming that there isn't already * one there, that is. */ static struct service * service_add(const char *name) { struct service *service; oddjob_resize_array((void **) &globals.services, sizeof(globals.services[0]), globals.n_services, globals.n_services + 1); service = &globals.services[globals.n_services]; service->name = oddjob_strdup(name); service->objects = NULL; service->n_objects = 0; service->acl = NULL; globals.n_services++; return service; } /* Handle a node. */ static dbus_bool_t load_config_oddjobconfig_service(xmlNodePtr cur) { xmlNodePtr child; xmlAttrPtr attr; dbus_bool_t parsed; parsed = TRUE; const char *name; struct service *service; int i; /* Require a "name" attribute. */ name = NULL; for (attr = cur->properties; attr != NULL; attr = attr->next) { if (load_config_xml_attr_name_is(attr, "name")) { name = load_config_xml_attr_data(attr); } else { if (globals.debug) { fprintf(stderr, "unknown attribute \"%s\" in " " element\n", attr->name); return FALSE; } } } if (name == NULL) { fprintf(stderr, " node has no \"name\" " "attribute!\n"); return FALSE; } /* Look for the service node. */ for (i = 0; i < globals.n_services; i++) { service = &globals.services[i]; if (strcmp(service->name, name) == 0) { break; } } /* Create the service node if it doesn't already exist. */ if (i >= globals.n_services) { service = service_add(name); } /* Parse the child nodes. */ for (child = cur->children; child != NULL; child = child->next) { if (load_config_xml_node_name_is(child, "object")) { parsed = load_config_oddjobconfig_object(child, service) && parsed; } else if (load_config_xml_node_name_is(child, "allow")) { load_config_oddjobconfig_oddjob_access(child, &service->acl, oddjob_acl_allow); } else if (load_config_xml_node_name_is(child, "deny")) { load_config_oddjobconfig_oddjob_access(child, &service->acl, oddjob_acl_deny); } else if (load_config_xml_node_name_is(child, "text")) { /* nothing */ } else { if (globals.debug) { fprintf(stderr, "unknown element \"%s\" within " " element\n", child->name); return FALSE; } } } return parsed; } /* Handle a node. */ static dbus_bool_t load_config_oddjobconfig(xmlNodePtr cur) { xmlNodePtr child; dbus_bool_t parsed; parsed = TRUE; for (child = cur->children; child != NULL; child = child->next) { if (load_config_xml_node_name_is(child, "include")) { parsed = load_config_oddjobconfig_include(child) && parsed; } else if (load_config_xml_node_name_is(child, "service")) { parsed = load_config_oddjobconfig_service(child) && parsed; } else if (load_config_xml_node_name_is(child, "allow")) { load_config_oddjobconfig_oddjob_access(child, &globals.acl, oddjob_acl_allow); } else if (load_config_xml_node_name_is(child, "deny")) { load_config_oddjobconfig_oddjob_access(child, &globals.acl, oddjob_acl_deny); } else if (load_config_xml_node_name_is(child, "text")) { /* nothing */ } else { if (globals.debug) { fprintf(stderr, "unknown element \"%s\" within " " element\n", child->name); return FALSE; } } } return parsed; } /* Load the contents of a configuration file. */ static dbus_bool_t load_config(const char *filename, dbus_bool_t ignore_missing) { xmlDocPtr doc; xmlNodePtr cur; struct stat st; dbus_bool_t parsed; if (filename == NULL) { filename = SYSCONFDIR "/" PACKAGE "d.conf"; } if (ignore_missing && (stat(filename, &st) == -1) && (errno == ENOENT)) { if (globals.debug) { fprintf(stderr, "Ignoring missing file \"%s\".\n", filename); } return TRUE; } if (globals.debug) { fprintf(stderr, "Parsing configuration file \"%s\".\n", filename); } xmlInitGlobals(); doc = xmlParseFile(filename); if (doc == NULL) { fprintf(stderr, "Error parsing configuration from \"%s\".\n", filename); return FALSE; } parsed = FALSE; cur = xmlDocGetRootElement(doc); if (cur != NULL) { if (load_config_xml_node_name_is(cur, "oddjobconfig")) { parsed = load_config_oddjobconfig(cur); } else { if (globals.debug) { fprintf(stderr, "unknown root element \"%s\" ", cur->name); return FALSE; } } } xmlFreeDoc(doc); xmlCleanupGlobals(); return parsed; } static void free_acl(struct oddjob_acl *acl) { struct oddjob_acl *tofree; while (acl != NULL) { tofree = acl; acl = acl->next; #ifdef SELINUX_ACLS oddjob_free(tofree->selinux_context); oddjob_free(tofree->selinux_user); oddjob_free(tofree->selinux_role); oddjob_free(tofree->selinux_type); #endif oddjob_free(tofree->user); oddjob_free(tofree); } } static void unload_config(void) { struct service *service; struct object *object; struct interface *interface; struct method *method; int i, j, k, l; free_acl(globals.acl); globals.acl = NULL; for (i = 0; i < globals.n_services; i++) { service = &globals.services[i]; oddjob_free(service->name); service->name = NULL; free_acl(service->acl); service->acl = NULL; for (j = 0; j < service->n_objects; j++) { object = &service->objects[j]; oddjob_free(object->name); object->name = NULL; object->service = NULL; free_acl(object->acl); object->acl = NULL; for (k = 0; k < object->n_interfaces; k++) { interface = &object->interfaces[k]; oddjob_free(interface->name); interface->name = NULL; interface->object = NULL; free_acl(interface->acl); interface->acl = NULL; for (l = 0; l < interface->n_methods; l++) { method = &interface->methods[l]; oddjob_free(method->name); method->name = NULL; method->interface = NULL; free_acl(method->acl); method->acl = NULL; oddjob_free_args(method->argv); method->argv = NULL; } oddjob_free(interface->methods); interface->methods = NULL; interface->n_methods = 0; } oddjob_free(object->interfaces); object->interfaces = NULL; object->n_interfaces = 0; } oddjob_free(service->objects); service->objects = NULL; service->n_objects = 0; } oddjob_free(globals.services); globals.services = NULL; globals.n_services = 0; } /* Callback for mainloop waitpid() checks. */ static void oddjob_pid_service(pid_t pid, int status, void *data) { struct oddjob_async_task *task; char outbuf[LINE_MAX]; task = data; /* If the child exited on a signal, return an error. */ if (WIFSIGNALED(status)) { snprintf(outbuf, sizeof(outbuf), "Child exited on signal %d.", WTERMSIG(status)); if (globals.debug) { fprintf(stderr, "%s\n", outbuf); } oddjob_dbus_send_message_response_error(task->msg, ODDJOB_ERROR_EXEC, outbuf); } /* If the child exited normally, even in error, return the result. */ if (WIFEXITED(status)) { if (globals.debug) { fprintf(stderr, "Child completed its task " "(status=%d, %ld bytes on stdout, " "%ld on stderr).\n", WEXITSTATUS(status), (long)oddjob_buffer_length(task->stdout_buffer), (long)oddjob_buffer_length(task->stderr_buffer)); } oddjob_dbus_send_message_response_success(task->msg, WEXITSTATUS(status), task->stdout_buffer, task->stderr_buffer); } /* Free the task. */ task->pid = -1; oddjob_buffer_free(task->stdin_buffer); oddjob_buffer_free(task->stdout_buffer); oddjob_buffer_free(task->stderr_buffer); oddjob_dbus_message_free(task->msg); oddjob_free(task->service); oddjob_free(task->path); oddjob_free(task->interface); oddjob_free(task->method); oddjob_free(task->argv); oddjob_free(task); } /* Handle descriptor-ready status. */ static dbus_bool_t oddjob_watch_service(int fd, DBusWatchFlags flags, void *data) { struct oddjob_async_task *task; dbus_bool_t stop_watching; int i, *fdp, invalid_fd; struct oddjob_buffer *manip_buffer; char buf[LINE_MAX]; task = data; stop_watching = FALSE; invalid_fd = -1; fdp = &invalid_fd; manip_buffer = NULL; /* Reduce the fd to a buffer and a pointer to its fd. */ if (fd == task->stdin_fd) { fdp = &task->stdin_fd; manip_buffer = task->stdin_buffer; } if ((fd == task->stdout_fd) || (fd == task->stderr_fd)) { if (fd == task->stdout_fd) { fdp = &task->stdout_fd; manip_buffer = task->stdout_buffer; } else { fdp = &task->stderr_fd; manip_buffer = task->stderr_buffer; } } /* Based on the flags, do I/O and buffer management. */ if (flags & DBUS_WATCH_READABLE) { i = read(*fdp, buf, sizeof(buf)); switch (i) { case -1: case 0: close(*fdp); *fdp = -1; stop_watching = TRUE; break; default: oddjob_buffer_append(manip_buffer, (const unsigned char *)buf, i); break; } } if (flags & DBUS_WATCH_WRITABLE) { if (oddjob_buffer_length(manip_buffer) == 0) { close(*fdp); *fdp = -1; stop_watching = TRUE; } else { i = write(*fdp, oddjob_buffer_data(manip_buffer), oddjob_buffer_length(manip_buffer)); switch (i) { case -1: close(*fdp); *fdp = -1; stop_watching = TRUE; break; default: oddjob_buffer_consume(manip_buffer, i); if (oddjob_buffer_length(manip_buffer) == 0) { close(*fdp); *fdp = -1; stop_watching = TRUE; } break; } } } if (flags & DBUS_WATCH_ERROR) { close(*fdp); *fdp = -1; stop_watching = TRUE; } /* If we're done, then add this task to the PID watch list. */ if ((task->stdin_fd == -1) && (task->stdout_fd == -1) && (task->stderr_fd == -1)) { mainloop_pid_add(task->pid, oddjob_pid_service, data); } return stop_watching; } /* Run an external helper. */ static void oddjobd_exec_method(struct oddjob_dbus_context *ctx, struct oddjob_dbus_message *msg, const char *service_name, const char *object_path, const char *interface_name, const char *method_name, const char *user, unsigned long uid, void *data) { struct method *method; int exec_status[2], child_in[2], child_out[2], child_err[2], null[3], i; unsigned int n; unsigned char exec_errno; char buf[PATH_MAX]; int status; const char *arg; struct oddjob_async_task *task; method = data; if (globals.debug) { fprintf(stderr, "Received request for \"%s:%s:%s:%s\" from %s.\n", service_name, object_path, interface_name, method_name, user); } if (check_method_acl(method, user, uid, oddjob_dbus_message_get_selinux_context(msg)) != oddjob_acl_allow) { if (globals.debug) { fprintf(stderr, "Request for \"%s\" denied to %s.\n", method->name, user); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_ACL, "ACL does not allow access"); return; } /* Open /dev/null three times, just in case stdio aren't already set. */ if (globals.debug) { fprintf(stderr, "Opening /dev/null 3 times.\n"); } for (n = 0; n < sizeof(null) / sizeof(null[0]); n++) { null[n] = open("/dev/null", O_RDWR); if (null[n] == -1) { snprintf(buf, sizeof(buf), "Error at open(/dev/null) %d: %s.", n + 1, strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); /* Clean up any /dev/null descriptors which we've * already opened. */ i = n - 1; while (i >= 0) { close(null[i]); i--; } return; } } /* Create a pipe for returning the exec() failure code. */ if (pipe(exec_status) == -1) { close(null[0]); close(null[1]); close(null[2]); snprintf(buf, sizeof(buf), "Error at pipe(1): %s.", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; } /* Create a trio of pipes for stdio. */ if (pipe(child_in) == -1) { close(exec_status[0]); close(exec_status[1]); close(null[0]); close(null[1]); close(null[2]); snprintf(buf, sizeof(buf), "Error at pipe(2): %s.", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; } if (pipe(child_out) == -1) { close(child_in[0]); close(child_in[1]); close(exec_status[0]); close(exec_status[1]); close(null[0]); close(null[1]); close(null[2]); snprintf(buf, sizeof(buf), "Error at pipe(3): %s.", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; } if (pipe(child_err) == -1) { close(child_out[0]); close(child_out[1]); close(child_in[0]); close(child_in[1]); close(exec_status[0]); close(exec_status[1]); close(null[0]); close(null[1]); close(null[2]); snprintf(buf, sizeof(buf), "Error at pipe(4): %s.", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; } if ((fcntl(child_out[0], F_SETFL, O_NONBLOCK) == -1) || (fcntl(child_err[0], F_SETFL, O_NONBLOCK) == -1)) { close(child_err[0]); close(child_err[1]); close(child_out[0]); close(child_out[1]); close(child_in[0]); close(child_in[1]); close(exec_status[0]); close(exec_status[1]); close(null[0]); close(null[1]); close(null[2]); snprintf(buf, sizeof(buf), "Error at fcntl(): %s.", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; } /* At this point we *know* that none of pipes are on stdio, so we no * longer need null[]. */ close(null[0]); close(null[1]); close(null[2]); /* Here's where the heavy lifting starts. Do all of the memory * allocation which might fail in the child. */ task = malloc(sizeof(struct oddjob_async_task)); if (task == NULL) { close(child_err[0]); close(child_err[1]); close(child_out[0]); close(child_out[1]); close(child_in[0]); close(child_in[1]); close(exec_status[0]); close(exec_status[1]); snprintf(buf, sizeof(buf), "Out of memory: %s.", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; } /* Allocate space for a copy of the calling message, the child's * arguments, our environment variables, and I/O buffers. */ task->msg = oddjob_dbus_message_dup(msg); task->stdin_buffer = oddjob_buffer_new(LINE_MAX); task->stdout_buffer = oddjob_buffer_new(LINE_MAX); task->stderr_buffer = oddjob_buffer_new(LINE_MAX); switch (method->argument_passing_method) { case oddjob_argument_passing_cmdline: for (i = 1; method->argv[i] != NULL; i++) { continue; } n = (i + 3 + oddjob_dbus_message_get_n_args(msg)) * sizeof(char *); task->argv = oddjob_malloc0(n); n = 0; if (strchr(method->argv[0], '/') != NULL) { task->argv[n++] = strrchr(method->argv[0], '/') + 1; } else { task->argv[n++] = method->argv[0]; } if (method->prepend_user) { task->argv[n++] = (char *) user; } for (i = 1; method->argv[i] != NULL; i++) { arg = method->argv[i]; task->argv[n++] = (char *) arg; } for (i = 0; i < method->n_arguments; i++) { arg = oddjob_dbus_message_get_arg(msg, i); task->argv[n++] = (char *) arg; } break; case oddjob_argument_passing_stdin: for (i = 1; method->argv[i] != NULL; i++) { continue; } n = (i + 3) * sizeof(char *); task->argv = oddjob_malloc0(n); n = 0; if (strchr(method->argv[0], '/') != NULL) { task->argv[n++] = strrchr(method->argv[0], '/') + 1; } else { task->argv[n++] = method->argv[0]; } for (i = 1; method->argv[i] != NULL; i++) { arg = method->argv[i]; task->argv[n++] = (char *) arg; } if (method->prepend_user) { oddjob_buffer_append(task->stdin_buffer, (const unsigned char *) user, -1); oddjob_buffer_append(task->stdin_buffer, (const unsigned char *) "\n", 1); } for (i = 0; i < method->n_arguments; i++) { arg = oddjob_dbus_message_get_arg(msg, i); oddjob_buffer_append(task->stdin_buffer, (const unsigned char *) arg, -1); oddjob_buffer_append(task->stdin_buffer, (const unsigned char *) "\n", 1); } break; case oddjob_argument_passing_invalid: break; } task->service = oddjob_strdup_printf("%s=%s", ODDJOB_SERVICE_ENV_VAR, service_name); task->path = oddjob_strdup_printf("%s=%s", ODDJOB_OBJECT_ENV_VAR, object_path); task->interface = oddjob_strdup_printf("%s=%s", ODDJOB_INTERFACE_ENV_VAR, interface_name); task->method = oddjob_strdup_printf("%s=%s", ODDJOB_METHOD_ENV_VAR, method_name); /* Make a note of which descriptors matter. */ task->stdin_fd = child_in[1]; task->stdout_fd = child_out[0]; task->stderr_fd = child_err[0]; /* All of that done, we can actually start a child. */ task->pid = fork(); switch (task->pid) { case -1: close(exec_status[0]); close(exec_status[1]); close(child_in[0]); close(child_in[1]); close(child_out[0]); close(child_out[1]); close(child_err[0]); close(child_err[1]); oddjob_buffer_free(task->stdin_buffer); oddjob_buffer_free(task->stdout_buffer); oddjob_buffer_free(task->stderr_buffer); oddjob_dbus_message_free(task->msg); oddjob_free(task->argv); oddjob_free(task->service); oddjob_free(task->path); oddjob_free(task->interface); oddjob_free(task->method); oddjob_free(task); snprintf(buf, sizeof(buf), "Error at fork(): %s.\n", strerror(errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_INTERNAL, buf); return; break; case 0: if (globals.debug) { fprintf(stderr, "Child preparing to exec %s", method->argv[0]); for (i = 0; method->argv[i] != NULL; i++) { fprintf(stderr, "%s %s\"%s\"%s", (i > 0) ? "," : "", (i == 0) ? "(" : "", method->argv[i], (method->argv[i + 1] == NULL) ? ")" : ""); } fprintf(stderr, "\n"); } /* We're the child -- close the read end of the error pipe, and * mark its write end to be closed on successful exec(). */ close(exec_status[0]); fcntl(exec_status[1], F_SETFD, FD_CLOEXEC); /* Set up stdio. */ close(child_in[1]); close(child_out[0]); close(child_err[0]); dup2(child_in[0], 0); dup2(child_out[1], 1); dup2(child_err[1], 2); /* Close any open descriptors which aren't the exec status pipe * or stdio. */ for (i = sysconf(_SC_OPEN_MAX) - 1; i > 2; i--) { if (i != exec_status[1]) { close(i); } } /* set up the environment */ putenv(task->service); putenv(task->path); putenv(task->interface); putenv(task->method); #ifdef SELINUX_ACLS /* Set up the SELinux execution context. */ if (globals.selinux_enabled) { const char *client_secontext; security_context_t helper_context, exec_context; client_secontext = oddjob_dbus_message_get_selinux_context(msg); if (client_secontext == NULL) { /* Wha....? */ exec_errno = 0xff; write(exec_status[1], &exec_errno, 1); _exit(-1); } if (getfilecon(method->argv[0], &helper_context) == -1) { /* No label? */ exec_errno = errno; write(exec_status[1], &exec_errno, 1); _exit(-1); } if (security_compute_create((char *) client_secontext, helper_context, SECCLASS_PROCESS, &exec_context) != 0) { /* Failed to compute exec context? */ exec_errno = 0xfe; write(exec_status[1], &exec_errno, 1); _exit(-1); } if (setexeccon(exec_context) == -1) { /* Failed to set exec context? */ exec_errno = 0xfc; write(exec_status[1], &exec_errno, 1); _exit(-1); } } #endif /* run the helper */ execv(method->argv[0], task->argv); /* uh-oh. send errno to the caller and bail */ exec_errno = errno; write(exec_status[1], &exec_errno, 1); _exit(-1); break; default: break; } /* We're the parent -- no need for things which only the child, uh, * needs. */ oddjob_free(task->argv); task->argv = NULL; oddjob_free(task->service); task->service = NULL; oddjob_free(task->path); task->path = NULL; oddjob_free(task->interface); task->interface = NULL; oddjob_free(task->method); task->method = NULL; /* Check the exec() status, hoping that the child actually gets to run * within a reasonable time. */ close(exec_status[1]); close(child_in[0]); close(child_out[1]); close(child_err[1]); while ((i = (read(exec_status[0], &exec_errno, 1))) == -1) { continue; } close(exec_status[0]); /* If we actually got a byte, then it's an exec() errno. */ if (i == 1) { close(task->stdin_fd); close(task->stdout_fd); close(task->stderr_fd); waitpid(task->pid, &status, 0); snprintf(buf, sizeof(buf), "Child signalled exec() error: %s.", strerror(exec_errno)); if (globals.debug) { fprintf(stderr, "%s\n", buf); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_EXEC, buf); task->pid = getpid(); oddjob_buffer_free(task->stdin_buffer); oddjob_buffer_free(task->stdout_buffer); oddjob_buffer_free(task->stderr_buffer); oddjob_dbus_message_free(task->msg); oddjob_free(task->service); oddjob_free(task->path); oddjob_free(task->interface); oddjob_free(task->method); oddjob_free(task->argv); oddjob_free(task); return; } /* Exec() succeeded -- hook up the buffers to the main loop and wait * for something interesting to happen. */ mainloop_oddjob_watch_add(task->stdin_fd, DBUS_WATCH_WRITABLE | DBUS_WATCH_ERROR, oddjob_watch_service, task); mainloop_oddjob_watch_add(task->stdout_fd, DBUS_WATCH_READABLE | DBUS_WATCH_ERROR, oddjob_watch_service, task); mainloop_oddjob_watch_add(task->stderr_fd, DBUS_WATCH_READABLE | DBUS_WATCH_ERROR, oddjob_watch_service, task); } /* Get a list of the available methods. */ static void oddjobd_list_method(struct oddjob_dbus_context *ctx, struct oddjob_dbus_message *msg, const char *service_name, const char *object_path, const char *interface_name, const char *method_name, const char *user, unsigned long uid, void *data) { int i, j, k, l; char *result, *t; char fmt[] = "(service=\"%s\",object=\"%s\"," "interface=\"%s\",method=\"%s\")"; struct service *service; struct object *object; struct interface *interface; struct method *method; const char *client_secontext; client_secontext = oddjob_dbus_message_get_selinux_context(msg); /* First check the list method. */ method = data; if (globals.debug) { fprintf(stderr, "Received request for \"%s:%s:%s:%s\" from %s.\n", service_name, object_path, interface_name, method_name, user); } if (check_method_acl(method, user, uid, client_secontext) != oddjob_acl_allow) { if (globals.debug) { fprintf(stderr, "Request for \"%s\" denied.\n", method->name); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_ACL, "ACL does not allow access"); return; } result = NULL; for (i = 0; i < globals.n_services; i++) { service = &globals.services[i]; for (j = 0; j < service->n_objects; j++) { object = &service->objects[j]; for (k = 0; k < object->n_interfaces; k++) { interface = &object->interfaces[k]; for (l = 0; l < interface->n_methods; l++) { method = &interface->methods[l]; if (check_method_acl(method, user, uid, client_secontext) == oddjob_acl_allow) { if (result == NULL) { t = oddjob_malloc0(strlen(fmt) + 2 + strlen(service->name) + 1 + strlen(object->name) + 1 + strlen(interface->name) + 1 + strlen(method->name) + 1); sprintf(t, fmt, service->name, object->name, interface->name, method->name); result = t; } else { t = oddjob_malloc0(strlen(result) + 1 + strlen(fmt) + 2 + strlen(service->name) + 1 + strlen(object->name) + 1 + strlen(interface->name) + 1 + strlen(method->name) + 1); strcpy(t, result); strcat(t, ","); sprintf(t + strlen(t), fmt, service->name, object->name, interface->name, method->name); oddjob_free(result); result = t; } } } } } } oddjob_dbus_send_message_response_text(msg, 0, result); oddjob_free(result); } /* Cause the server to shut down. */ static void oddjobd_quit_method(struct oddjob_dbus_context *ctx, struct oddjob_dbus_message *msg, const char *service_name, const char *object_path, const char *interface_name, const char *method_name, const char *user, unsigned long uid, void *data) { struct method *method; const char *client_secontext; client_secontext = oddjob_dbus_message_get_selinux_context(msg); method = data; if (globals.debug) { fprintf(stderr, "Received request for \"%s:%s:%s:%s\" from %s.\n", service_name, object_path, interface_name, method_name, user); } if (check_method_acl(method, user, uid, client_secontext) != oddjob_acl_allow) { if (globals.debug) { fprintf(stderr, "Request for \"%s\" denied to %s.\n", method->name, user); } oddjob_dbus_send_message_response_error(msg, ODDJOB_ERROR_ACL, "ACL does not allow access"); return; } if (globals.debug) { fprintf(stderr, "Shutting down.\n"); } oddjob_dbus_send_message_response_text(msg, 0, ""); globals.quit++; } static void method_add_internal(const char *service_name, const char *object_name, const char *interface_name, const char *method_name, oddjob_dbus_handler handler) { int i; struct service *service; struct object *object; struct interface *interface; struct method *method; for (i = 0; i < globals.n_services; i++) { service = &globals.services[i]; if (strcmp(service->name, service_name) == 0) { break; } } if (i >= globals.n_services) { service = service_add(service_name); } for (i = 0; i < service->n_objects; i++) { object = &service->objects[i]; if (strcmp(object->name, object_name) == 0) { break; } } if (i >= service->n_objects) { object = object_add(service, object_name); } for (i = 0; i < object->n_interfaces; i++) { interface = &object->interfaces[i]; if (strcmp(interface->name, interface_name) == 0) { break; } } if (i >= object->n_interfaces) { interface = interface_add(object, interface_name); } for (i = 0; i < interface->n_methods; i++) { method = &interface->methods[i]; if (strcmp(method->name, method_name) == 0) { break; } } if (i >= interface->n_methods) { method = method_add(interface, method_name); } if (method->type != method_invalid) { abort(); } method->type = method_internal; method->n_arguments = 0; method->handler = handler; method->argv = NULL; method->prepend_user = FALSE; method->argument_passing_method = oddjob_argument_passing_invalid; } int main(int argc, char **argv) { struct oddjob_dbus_context *ctx; FILE *pidfile; gid_t gid; int c, i, j, k, l, pidfd; const char *basename, *usage; struct service *service; struct object *object; struct interface *interface; struct method *method; struct { dbus_bool_t nofork; const char *pidfile; const char *config; DBusBusType bus; } options = { .nofork = FALSE, .pidfile = NULL, .config = NULL, .bus = DBUS_BUS_SYSTEM, }; dbus_bool_t registered; /* If we need to provide a usage message, then we need the basename of * the binary. */ basename = argv[0]; if (strchr(basename, '/')) { basename = strrchr(basename, '/') + 1; } /* Process command-line options. */ usage = "Usage: %s [-d] [-n] [-p pidfile] [-c configfile] [-S]\n"; while ((c = getopt(argc, argv, "dnp:c:S")) != -1) { switch (c) { case 'd': globals.debug++; /* fall through */ case 'n': options.nofork = TRUE; break; case 'p': options.pidfile = optarg; break; case 'c': options.config = optarg; break; case 'S': options.bus = DBUS_BUS_SESSION; break; default: printf(usage, basename); return 1; break; } } if ((argc - optind) > 0) { printf(usage, basename); return 1; } /* Add our built-in handlers to the list of methods which we need to * register. */ method_add_internal(ODDJOB_SERVICE_NAME, ODDJOB_OBJECT_PATH, ODDJOB_INTERFACE_NAME, "quit", oddjobd_quit_method); method_add_internal(ODDJOB_SERVICE_NAME, ODDJOB_OBJECT_PATH, ODDJOB_INTERFACE_NAME, ODDJOB_LIST_REQUESTS_METHOD, oddjobd_list_method); /* Read in ACLs and definitions for external handlers. */ if (!load_config(options.config, FALSE)) { fprintf(stderr, "Error loading configuration!\n"); return 1; } /* Open a connection to the message bus. */ ctx = oddjob_dbus_listener_new(options.bus); if (ctx == NULL) { fprintf(stderr, "Error connecting to D-BUS!\n"); return 2; } /* Now add our handlers to the list which our D-BUS layer knows. */ for (i = 0; i < globals.n_services; i++) { service = &globals.services[i]; for (j = 0; j < service->n_objects; j++) { object = &service->objects[j]; object->service = service; for (k = 0; k < object->n_interfaces; k++) { interface = &object->interfaces[k]; interface->object = object; for (l = 0; l < interface->n_methods; l++) { method = &interface->methods[l]; method->interface = interface; /* If the handler used NULL, give it * the method structure address, which * wasn't fixed until now. */ registered = oddjob_dbus_listener_add_method(ctx, service->name, object->name, interface->name, method->name, method->n_arguments, method->handler, method); if (!registered) { fprintf(stderr, "Error initializing service \"%s\"!\n", service->name); return 1; } } } } } /* Clear the supplemental group list. We assume that we were started * with the right UID/GID values, but there should be no need to keep * the rest of the group memberships if we're a system-wide service. */ if (options.bus == DBUS_BUS_SYSTEM) { gid = getgid(); if (setgroups(1, &gid) == -1) { fprintf(stderr, "Error clearing supplemental group " "list!\n"); return 1; } } /* Create a pidfile. */ pidfd = -1; if (options.pidfile != NULL) { pidfd = open(options.pidfile, O_CREAT | O_WRONLY | O_TRUNC, S_IRUSR | S_IWUSR); if (pidfd == -1) { fprintf(stderr, "Error creating pidfile!\n"); return 1; } } /* Change the working directory to the root directory. */ if (chdir("/") == -1) { fprintf(stderr, "Error changing working directory to \"/\"!\n"); return 1; } /* Become a daemon, changing the working directory to the root, * dissociating from the controlling terminal (if there is one), * calling fork(), and letting the parent exit. */ if (!options.nofork) { if (daemon(0, 0) != 0) { fprintf(stderr, "Error becoming a daemon!\n"); if (options.pidfile != NULL) { unlink(options.pidfile); } return 1; } } /* Store our PID in the pidfile. */ pidfile = fdopen(pidfd, "w"); if (pidfile != NULL) { fprintf(pidfile, "%lu", (long) getpid()); fclose(pidfile); } /* Now sit! */ oddjob_dbus_main_init(ctx); globals.quit = 0; while (globals.quit == 0) { oddjob_dbus_main_iterate(ctx); } oddjob_dbus_main_done(ctx); /* Clean up and exit. */ unload_config(); oddjob_dbus_listener_free(ctx); if (options.pidfile != NULL) { unlink(options.pidfile); } /* Last ditch effort. */ dbus_connection_disconnect(dbus_bus_get(options.bus, NULL)); return 0; } oddjob-0.16-0/src/userfstab0000664000471600047240000000005410240260563012477 00000000000000# user fstype source [relative-destination] oddjob-0.16-0/src/exit1.sh0000775000471600047240000000002110263055433012144 00000000000000#!/bin/sh exit 1 oddjob-0.16-0/src/sanity.sh0000775000471600047240000000042110263050311012413 00000000000000#!/bin/bash echo \[id\] id echo \[pwd\] pwd echo \[ls -l /proc/\$\$/fd\] ls -l /proc/$$/fd echo \[echo \$\*\] echo $* echo \[echo \`cat\`\] args= while read arg ; do args="${args:+$args }$arg" done echo "$args" echo \[cat /proc/\$\$/cmdline\] cat /proc/$$/cmdline echo "" oddjob-0.16-0/src/sigint.sh0000775000471600047240000000002710263055433012415 00000000000000#!/bin/sh kill -INT $$ oddjob-0.16-0/src/sleep30.sh0000775000471600047240000000002310263332362012366 00000000000000#!/bin/sh sleep 30 oddjob-0.16-0/src/lookup/0000777000471600047240000000000010311657706012162 500000000000000oddjob-0.16-0/src/lookup/Makefile.am0000664000471600047240000000047010260303161014117 00000000000000AM_CFLAGS = @KRB5_CFLAGS@ LDADD = liblookup.la ../liboddcommon.la @LDAP_LIBS@ @SASL_LIBS@ @KRB5_LIBS@ noinst_PROGRAMS = lookup noinst_LTLIBRARIES = liblookup.la liblookup_la_SOURCES = \ common.h \ ads.c \ cyrus.c cyrus.h \ scrape.c scrape.h \ plain.c plain.h \ gssapi.c gssapi.h lookup_SOURCES = lookup.c oddjob-0.16-0/src/lookup/Makefile.in0000664000471600047240000003672210311657650014155 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = lookup$(EXEEXT) subdir = src/lookup DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblookup_la_LIBADD = am_liblookup_la_OBJECTS = ads.lo cyrus.lo scrape.lo plain.lo gssapi.lo liblookup_la_OBJECTS = $(am_liblookup_la_OBJECTS) PROGRAMS = $(noinst_PROGRAMS) am_lookup_OBJECTS = lookup.$(OBJEXT) lookup_OBJECTS = $(am_lookup_OBJECTS) lookup_LDADD = $(LDADD) lookup_DEPENDENCIES = liblookup.la ../liboddcommon.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(liblookup_la_SOURCES) $(lookup_SOURCES) DIST_SOURCES = $(liblookup_la_SOURCES) $(lookup_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CFLAGS = @KRB5_CFLAGS@ LDADD = liblookup.la ../liboddcommon.la @LDAP_LIBS@ @SASL_LIBS@ @KRB5_LIBS@ noinst_LTLIBRARIES = liblookup.la liblookup_la_SOURCES = \ common.h \ ads.c \ cyrus.c cyrus.h \ scrape.c scrape.h \ plain.c plain.h \ gssapi.c gssapi.h lookup_SOURCES = lookup.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/lookup/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign src/lookup/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liblookup.la: $(liblookup_la_OBJECTS) $(liblookup_la_DEPENDENCIES) $(LINK) $(liblookup_la_LDFLAGS) $(liblookup_la_OBJECTS) $(liblookup_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done lookup$(EXEEXT): $(lookup_OBJECTS) $(lookup_DEPENDENCIES) @rm -f lookup$(EXEEXT) $(LINK) $(lookup_LDFLAGS) $(lookup_OBJECTS) $(lookup_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ads.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cyrus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrape.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: oddjob-0.16-0/src/lookup/common.h0000664000471600047240000000352210260303161013525 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_lookup_globals_h #define oddjob_lookup_globals_h struct globals { krb5_context ctx; krb5_ccache ccache; LDAP *ld; char domain_controller[HOST_NAME_MAX + 1]; char workgroup[HOST_NAME_MAX + 1]; char machine_name[HOST_NAME_MAX + 1]; char machine_password[HOST_NAME_MAX + 1]; }; #endif oddjob-0.16-0/src/lookup/ads.c0000664000471600047240000001711010311656023013002 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../../config.h" #include #include #include #include #include #include #include #include #include #include "../util.h" #include "cyrus.h" #include "gssapi.h" #include "plain.h" #include "scrape.h" #include "common.h" extern struct globals globals; #ifndef LDAP_OPT_RESULT_CODE #ifdef LDAP_OPT_ERROR_NUMBER #define LDAP_OPT_RESULT_CODE LDAP_OPT_ERROR_NUMBER #endif #endif void lookup_ads_cleanup(void) { if (globals.ld) { ldap_unbind(globals.ld); } globals.ld = NULL; if (globals.ccache && globals.ctx) { krb5_cc_destroy(globals.ctx, globals.ccache); } globals.ccache = NULL; if (globals.ctx) { krb5_free_context(globals.ctx); } globals.ctx = NULL; memset(&globals, 0, sizeof(globals)); } int lookup_ads_init(const char *detail) { int i; krb5_principal princ; krb5_creds creds; putenv("KRB5CCNAME=MEMORY:_krb5_cc_lookup_ads"); globals.ctx = NULL; if ((i = krb5_init_context(&globals.ctx)) != 0) { lookup_ads_cleanup(); return i; } globals.ccache = NULL; if ((i = krb5_cc_default(globals.ctx, &globals.ccache)) != 0) { lookup_ads_cleanup(); return i; } princ = NULL; if ((i = krb5_parse_name(globals.ctx, globals.machine_name, &princ)) != 0) { lookup_ads_cleanup(); return i; } if ((i = krb5_cc_initialize(globals.ctx, globals.ccache, princ) != 0)) { lookup_ads_cleanup(); return i; } memset(&creds, 0, sizeof(creds)); if ((i = krb5_get_init_creds_password(globals.ctx, &creds, princ, globals.machine_password, NULL, NULL, 0, NULL, NULL)) != 0) { lookup_ads_cleanup(); return i; } if (krb5_cc_store_cred(globals.ctx, globals.ccache, &creds) != 0) { krb5_free_cred_contents(globals.ctx, &creds); lookup_ads_cleanup(); return i; } krb5_free_cred_contents(globals.ctx, &creds); return 0; } char ** lookup_ads_search_text(LDAP *ld, const char *base, int scope, const char *attribute, const char *filterfmt, ...) { char filter[LINE_MAX]; va_list args; LDAPMessage *results, *e; int count, i; const char *attributes[2]; char **ret, **values, *dn; if ((filterfmt != NULL) && (strlen(filterfmt) > 0)) { va_start(args, filterfmt); vsnprintf(filter, sizeof(filter), filterfmt, args); va_end(args); } else { strcpy(filter, ""); } results = NULL; attributes[0] = attribute; attributes[1] = NULL; if ((i = ldap_search_ext_s(ld, base, scope, strlen(filter) ? filter : "(objectclass=*)", (char**) attributes, 0, NULL, NULL, NULL, LDAP_NO_LIMIT, &results)) != LDAP_SUCCESS) { char *msg; int error; if (ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &error) != LDAP_SUCCESS) { error = i; } if (ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &msg) != LDAP_SUCCESS) { msg = ""; } if (results == NULL) { return NULL; } } ret = NULL; count = 0; for (e = ldap_first_entry(ld, results); e != NULL; e = ldap_next_entry(ld, e)) { dn = ldap_get_dn(ld, e); if (dn != NULL) { ldap_memfree(dn); } values = ldap_get_values(ld, e, attribute); if (values != NULL) { oddjob_resize_array((void**) &ret, sizeof(char*), count, count + ldap_count_values(values) + 1); for (i = 0; i < ldap_count_values(values); i++) { ret[count + i] = oddjob_strdup(values[i]); } count += ldap_count_values(values); } } ldap_msgfree(e); return ret; } void lookup_ads_search_free(char **values) { oddjob_freev(values); } char * lookup_ads_lookup(const char *user, const char *attribute) { int i, j, version, referrals_set; LDAPControl *serverControls, *clientControls; char **namingcontexts, **values, *ret, *hostname, host[LINE_MAX]; void *referrals_requested; globals.ld = ldap_init(globals.domain_controller, LDAP_PORT); if (globals.ld == NULL) { return NULL; } serverControls = clientControls = NULL; if (ldap_get_option(globals.ld, LDAP_OPT_PROTOCOL_VERSION, &version) == 0) { if (version < 3) { version = 3; if (ldap_set_option(globals.ld, LDAP_OPT_PROTOCOL_VERSION, &version) != 0) { ldap_unbind(globals.ld); globals.ld = NULL; return NULL; } } } if (ldap_get_option(globals.ld, LDAP_OPT_REFERRALS, &referrals_set) == 0) { if (referrals_set != 0) { referrals_requested = LDAP_OPT_OFF; if (ldap_set_option(globals.ld, LDAP_OPT_REFERRALS, referrals_requested) != 0) { } } } if (ldap_get_option(globals.ld, LDAP_OPT_HOST_NAME, &hostname) == 0) { snprintf(host, sizeof(host), "%s", hostname); } else { snprintf(host, sizeof(host), "%s", globals.domain_controller); } i = strcspn(host, "."); host[i] = '\0'; #if 0 if ((i = bind_cyrus_sasl(globals.ld, host)) != 0) { ldap_unbind(globals.ld); globals.ld = NULL; return NULL; } #elif 1 if ((i = bind_gssapi(globals.ld, globals.machine_name, host)) != 0) { ldap_unbind(globals.ld); globals.ld = NULL; return NULL; } #else if ((i = bind_plain(globals.ld, globals.machine_name, NULL, globals.machine_password)) != 0) { ldap_unbind(globals.ld); globals.ld = NULL; return NULL; } #endif namingcontexts = lookup_ads_search_text(globals.ld, "", LDAP_SCOPE_BASE, "namingcontexts", NULL); ret = NULL; for (i = 0; (ret == NULL) && (namingcontexts != NULL) && (namingcontexts[i] != NULL); i++) { values = lookup_ads_search_text(globals.ld, namingcontexts[i], LDAP_SCOPE_SUBTREE, attribute, "(&" "(objectcategory=user)" "(samaccountname=%s)" ")", user); for (j = 0; (values != NULL) && (values[j] != NULL); j++) { ret = oddjob_strdup(values[j]); break; } lookup_ads_search_free(values); } lookup_ads_search_free(namingcontexts); ldap_unbind(globals.ld); globals.ld = NULL; return ret; } void lookup_ads_free_result(char *tofree) { oddjob_free(tofree); } int lookup_ads_done(void) { lookup_ads_cleanup(); return 0; } oddjob-0.16-0/src/lookup/cyrus.c0000664000471600047240000001651410311656023013407 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../../config.h" #include #include #include #include #include #include #include #include #include #include "../util.h" #include "cyrus.h" #ifndef LDAP_OPT_RESULT_CODE #ifdef LDAP_OPT_ERROR_NUMBER #define LDAP_OPT_RESULT_CODE LDAP_OPT_ERROR_NUMBER #endif #endif int bind_cyrus_sasl(LDAP *ld, const char *servername) { sasl_conn_t *conn; int i, authenticated, msgid, sasl_result, bind_result; unsigned int mech_index; char **mechanisms; const char *clientout, *chosen_mech; unsigned int clientoutlen; struct berval client_cred, *server_cred, temp_cred; LDAPMessage *results, *entry; const char *saslattrlist[] = {"supportedSASLmechanisms", NULL}; results = NULL; i = ldap_search_ext_s(ld, "", LDAP_SCOPE_BASE, "(objectclass=*)", (char **)saslattrlist, 0, NULL, NULL, NULL, LDAP_NO_LIMIT, &results); if (i != LDAP_SUCCESS) { /* Well, we're screwed now. */ return -1; } entry = ldap_first_entry(ld, results); if (entry == NULL) { /* No root DSE. (!) */ ldap_msgfree(results); return -1; } mechanisms = ldap_get_values(ld, entry, "supportedSASLmechanisms"); ldap_msgfree(results); if (mechanisms == NULL) { /* Well, that was a waste of time. */ return -1; } /* Start up Cyrus SASL. Only needs to be done once, but we don't check * on that for now. */ if (sasl_client_init(NULL) != SASL_OK) { ldap_value_free(mechanisms); return -1; } /* Create a new authentication context for the service. */ if (sasl_client_new("ldap", servername, NULL, NULL, NULL, 0, &conn) != SASL_OK) { ldap_value_free(mechanisms); return -1; } /* Try each supported mechanism in turn. */ for (mech_index = 0, authenticated = 0; (mechanisms[mech_index] != NULL) && (authenticated == 0); mech_index++) { /* First step. */ chosen_mech = NULL; sasl_result = sasl_client_start(conn, mechanisms[mech_index], NULL, &clientout, &clientoutlen, &chosen_mech); /* OK and CONTINUE are the only non-fatal return codes here. */ if ((sasl_result != SASL_OK) && (sasl_result != SASL_CONTINUE)) { continue; } do { /* Take whatever client data we have and send it to the * server. */ client_cred.bv_val = (unsigned char *) clientout; client_cred.bv_len = clientoutlen; i = ldap_sasl_bind(ld, NULL, chosen_mech, (client_cred.bv_len > 0) ? &client_cred : NULL, NULL, NULL, &msgid); if (i != LDAP_SUCCESS) { printf("Error sending sasl_bind request to " "the server!\n"); ldap_value_free(mechanisms); return -1; } /* Wait for a result message for this bind request. */ results = NULL; i = ldap_result(ld, msgid, LDAP_MSG_ALL, NULL, &results); if (i != LDAP_RES_BIND) { printf("Error while waiting for response to " "sasl_bind request!\n"); ldap_value_free(mechanisms); return -1; } /* Retrieve the result code for the bind request and * any data which the server sent. */ server_cred = NULL; i = ldap_parse_sasl_bind_result(ld, results, &server_cred, 0); ldap_msgfree(results); /* Okay, here's where things get tricky. Both * Mozilla's LDAP SDK and OpenLDAP store the result * code which was returned by the server in the * handle's ERROR_NUMBER option. Mozilla returns * LDAP_SUCCESS if the data was parsed correctly, even * if the result was an error, while OpenLDAP returns * the result code. I'm leaning toward Mozilla being * more correct. */ if (i == LDAP_SUCCESS) { /* Mozilla? */ if (ldap_get_option(ld, LDAP_OPT_RESULT_CODE, &bind_result) != LDAP_SUCCESS) { printf("Error retrieving response to " "sasl_bind request!\n"); break; } } else { /* OpenLDAP? */ switch (i) { case LDAP_SUCCESS: case LDAP_SASL_BIND_IN_PROGRESS: bind_result = i; break; default: printf("Error parsing response to " "sasl_bind request!\n"); break; } } /* If the server sent us something, then we'd better be * expecting it. */ i = ((server_cred != NULL) && (server_cred->bv_len > 0)) - (sasl_result == SASL_CONTINUE); if (i != 0) { if (sasl_result != SASL_CONTINUE) { printf("Server sent us response data, " "but we thought we were done!" "\n"); } else { printf("Server did not send us any " "data, but we needed some!\n"); } break; } /* If we need another round trip, process whatever we * received and prepare data to be transmitted back. */ if ((sasl_result == SASL_CONTINUE) && ((bind_result == LDAP_SUCCESS) || (bind_result == LDAP_SASL_BIND_IN_PROGRESS))) { if (server_cred != NULL) { temp_cred = *server_cred; } else { temp_cred.bv_len = 0; temp_cred.bv_val = NULL; } sasl_result = sasl_client_step(conn, temp_cred.bv_val, temp_cred.bv_len, NULL, &clientout, &clientoutlen); /* If we have data to send, then the server * had better be expecting it. (It's valid * to send the server no data with a request.) */ if ((clientoutlen > 0) && (bind_result != LDAP_SASL_BIND_IN_PROGRESS)) { printf("We have data for the server, " "but it thinks we are done!\n"); break; } } /* If the server says we succeeded, and the client * library says we succeeded, then we're done. */ if ((sasl_result == SASL_OK) && (bind_result == LDAP_SUCCESS)) { authenticated++; } } while ((bind_result == LDAP_SASL_BIND_IN_PROGRESS) || (sasl_result == SASL_CONTINUE)); } sasl_dispose(&conn); ldap_value_free(mechanisms); return (authenticated > 0) ? 0 : -1; } oddjob-0.16-0/src/lookup/cyrus.h0000664000471600047240000000323410260303161013402 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_lookup_cyrus_h #define oddjob_lookup_cyrus_h int bind_cyrus_sasl(LDAP *ld, const char *servername); #endif oddjob-0.16-0/src/lookup/scrape.c0000664000471600047240000002073210260303161013507 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../../config.h" #include #include #include #include #include #include #include #include #include "../util.h" #include "scrape.h" #define WHITESPACE " \t" #define NEWLINES "\r\n" struct scrape_arg { const char *key; char *buf; size_t buflen; }; void scrape_smbconf(const char *directive, ...) { pid_t pid; int pipefd[2], fd; unsigned int i; FILE *fp; char *line, *q, *section; const char *p; size_t n, n_args; va_list args; struct scrape_arg *scrape_args; if (directive == NULL) { return; } va_start(args, directive); n = 0; do { p = va_arg(args, char*); i = va_arg(args, size_t); n++; } while ((p = va_arg(args, const char*)) != NULL); va_end(args); n_args = n; oddjob_resize_array((void **)&scrape_args, sizeof(scrape_args[0]), 0, n_args); va_start(args, directive); scrape_args[0].key = directive; scrape_args[0].buf = va_arg(args, char*); scrape_args[0].buflen = va_arg(args, size_t); for (n = 1; n < n_args; n++) { scrape_args[n].key = va_arg(args, const char*); scrape_args[n].buf = va_arg(args, char*); scrape_args[n].buflen = va_arg(args, size_t); } va_end(args); if (pipe(pipefd) == -1) { free(scrape_args); return; } pid = fork(); switch (pid) { case -1: close(pipefd[0]); close(pipefd[1]); free(scrape_args); return; case 0: for (fd = 0; fd < sysconf(_SC_OPEN_MAX); fd++) { if (fd != pipefd[1]) { close(fd); } } if (pipefd[1] != STDOUT_FILENO) { dup2(pipefd[1], STDOUT_FILENO); close(pipefd[1]); } execl(PATH_TESTPARM, PATH_TESTPARM, "-sv", NULL); _exit(1); break; default: close(pipefd[1]); fp = fdopen(pipefd[0], "r"); if (fp != NULL) { line = NULL; n = 0; section = NULL; while (getline(&line, &n, fp) != -1) { /* Check if this is a section start. */ q = line + strspn(line, WHITESPACE); if (*q == '[') { free(section); section = strdup(q + 1); q = section + strcspn(section, "]"); *q = '\0'; continue; } /* If we're not in a section yet, then ignore * whatever this line is. */ if (section == NULL) { continue; } /* Iterate over each key we were given. */ for (i = 0; i < n_args; i++) { p = scrape_args[i].key; p += strspn(p, WHITESPACE); /* Check if this is the right section. * for the key. */ n = strlen(section); if ((strcspn(p, WHITESPACE "/") == n) && (strncmp(p, section, n) != 0)) { continue; } /* Skip to the section-specific key. */ p += strcspn(p, WHITESPACE "/"); p += strspn(p, WHITESPACE "/"); do { /* Compare it to the data, one * word at a time. */ n = strcspn(p, WHITESPACE); if ((strcspn(q, WHITESPACE "=") == n) && (strncasecmp(p, q, n) == 0)) { p += n; q += n; } else { break; } /* Skip over whitespace. */ p += strspn(p, WHITESPACE); q += strspn(q, WHITESPACE); } while ((*p != '\0') && (*q != '\0')); /* At this point the query string is * ended and the data string, if it * matched, starts with "=". */ if ((*p == '\0') && (*q == '=')) { /* Skip the "=" and spaces. */ q++; q += strspn(q, WHITESPACE); /* Copy the value to the * caller-supplied buffer. */ memset(scrape_args[i].buf, '\0', scrape_args[i].buflen); strncpy(scrape_args[i].buf, q, scrape_args[i].buflen - 1); /* Snip off any newlines. */ q = scrape_args[i].buf; q += strcspn(q, NEWLINES); *q = '\0'; } } } free(section); free(line); fclose(fp); } waitpid(pid, NULL, 0); break; } free(scrape_args); return; } static int hex2val(int hex) { switch (hex) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return hex - '0'; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': return hex - 'A'; break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': return hex - 'a'; break; default: return 0; break; } } void scrape_tdb(const char *path, ...) { pid_t pid; int i, pipefd[2]; FILE *fp; char *line, *q, *thiskey, *thisdata; const char *p; size_t n, n_args; struct scrape_arg *scrape_args; va_list args; va_start(args, path); n = 0; while ((p = va_arg(args, const char*)) != NULL) { p = va_arg(args, char*); i = va_arg(args, size_t); n++; } va_end(args); n_args = n; oddjob_resize_array((void **)&scrape_args, sizeof(scrape_args[0]), 0, n_args); va_start(args, path); for (n = 0; n < n_args; n++) { scrape_args[n].key = va_arg(args, const char*); scrape_args[n].buf = va_arg(args, char*); scrape_args[n].buflen = va_arg(args, size_t); } va_end(args); if (pipe(pipefd) == -1) { free(scrape_args); return; } pid = fork(); switch (pid) { case -1: close(pipefd[0]); close(pipefd[1]); free(scrape_args); return; case 0: for (i = 0; i < sysconf(_SC_OPEN_MAX); i++) { if (i != pipefd[1]) { close(i); } } if (pipefd[1] != STDOUT_FILENO) { dup2(pipefd[1], STDOUT_FILENO); close(pipefd[1]); } execl(PATH_TDBDUMP, PATH_TDBDUMP, path, NULL); _exit(1); break; default: close(pipefd[1]); fp = fdopen(pipefd[0], "r"); if (fp != NULL) { line = NULL; n = 0; thiskey = thisdata = NULL; while (getline(&line, &n, fp) != -1) { p = line + strspn(line, WHITESPACE); if ((strcspn(p, WHITESPACE "=") == 3) && (strncmp(p, "key", 3) == 0)) { p += 3; p += strspn(p, WHITESPACE "=\""); free(thiskey); thiskey = strdup(p); q = thiskey + strcspn(thiskey, "\""); *q = '\0'; } else if ((strcspn(p, WHITESPACE "=") == 4) && (strncmp(p, "data", 4) == 0)) { p += 4; p += strspn(p, WHITESPACE "=\""); free(thisdata); thisdata = strdup(p); q = thisdata + strcspn(thisdata, "\""); *q = '\0'; } else if (*p == '{') { free(thiskey); thiskey = NULL; free(thisdata); thisdata = NULL; } else if (*p == '}') { for (n = 0; (thiskey != NULL) && (n < n_args); n++) { if (strcmp(scrape_args[n].key, thiskey) != 0) { continue; } /* Copy the value to the * caller-supplied buffer. */ memset(scrape_args[n].buf, '\0', scrape_args[n].buflen); strncpy(scrape_args[n].buf, thisdata, scrape_args[n].buflen - 1); } } } free(thiskey); free(thisdata); free(line); fclose(fp); } waitpid(pid, NULL, 0); break; } for (n = 0; n < n_args; n++) { p = q = scrape_args[n].buf; while (*p != '\0') { switch (*p) { case '\\': if ((p[1] != '\0') && (p[2] != '\0')) { *q = hex2val(p[1]) * 16 + hex2val(p[2]); q++; p += 3; } else { p++; } break; default: *q++ = *p++; break; } } } free(scrape_args); return; } oddjob-0.16-0/src/lookup/scrape.h0000664000471600047240000000350310260303161013511 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_lookup_scrape_h #define oddjob_lookup_scrape_h #define PATH_TESTPARM "/usr/bin/testparm" #define PATH_TDBDUMP "/usr/bin/tdbdump" #define PATH_SECRETS "/etc/samba/secrets.tdb" void scrape_smbconf(const char *directive, ...); void scrape_tdb(const char *path, ...); #endif oddjob-0.16-0/src/lookup/plain.c0000664000471600047240000001100010311656023013326 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../../config.h" #include #include #include #include #include #include #include #include #include "../util.h" #include "plain.h" #ifndef LDAP_OPT_RESULT_CODE #ifdef LDAP_OPT_ERROR_NUMBER #define LDAP_OPT_RESULT_CODE LDAP_OPT_ERROR_NUMBER #endif #endif int bind_plain(LDAP *ld, const char *authn_user, const char *authz_user, const char *password) { unsigned char *buffer; LDAPMessage *results; struct berval client_cred; int i, msgid, bind_result; size_t buflen; /* Build the authenticator. */ buflen = 2; if (authz_user != NULL) { buflen += strlen(authz_user); } else { authz_user = ""; } if (authn_user != NULL) { buflen += strlen(authn_user); } else { authn_user = ""; } if (password != NULL) { buflen += strlen(password); } else { password = ""; } buffer = malloc(buflen + 1); if (buffer == NULL) { printf("Out of memory before sending " "PLAIN sasl_bind request!\n"); return -1; } memcpy(buffer, authz_user, strlen(authz_user) + 1); memcpy(buffer + strlen(authz_user) + 1, authn_user, strlen(authn_user) + 1); memcpy(buffer + strlen(authz_user) + 1 + strlen(authn_user) + 1, password, strlen(password) + 1); client_cred.bv_val = buffer; client_cred.bv_len = buflen; /* Take whatever client data we have and send it to the * server. */ i = ldap_sasl_bind(ld, NULL, "PLAIN", &client_cred, NULL, NULL, &msgid); free(buffer); if (i != LDAP_SUCCESS) { printf("Error sending PLAIN sasl_bind request to " "the server!\n"); return -1; } /* Wait for a result message for this bind request. */ results = NULL; i = ldap_result(ld, msgid, LDAP_MSG_ALL, NULL, &results); if (i != LDAP_RES_BIND) { printf("Error while waiting for response to " "PLAIN sasl_bind request (%d)!\n", i); return -1; } /* Retrieve the result code for the bind request. */ i = ldap_parse_sasl_bind_result(ld, results, NULL, 0); ldap_msgfree(results); /* Okay, here's where things get tricky. Both Mozilla's LDAP SDK and * OpenLDAP store the result code which was returned by the server in * the handle's ERROR_NUMBER option. Mozilla returns LDAP_SUCCESS if * the data was parsed correctly, even if the result was an error, * while OpenLDAP returns the result code. I lean toward Mozilla being * correct. */ if (i == LDAP_SUCCESS) { /* Mozilla? */ if (ldap_get_option(ld, LDAP_OPT_RESULT_CODE, &bind_result) != LDAP_SUCCESS) { printf("Error retrieving response to " "PLAIN sasl_bind request!\n"); } } else { /* OpenLDAP? */ switch (i) { case LDAP_SUCCESS: case LDAP_SASL_BIND_IN_PROGRESS: case LDAP_AUTH_METHOD_NOT_SUPPORTED: case LDAP_STRONG_AUTH_REQUIRED: case LDAP_INVALID_CREDENTIALS: bind_result = i; break; default: printf("Error parsing response to " "PLAIN sasl_bind request (%d)!\n", i); break; } } return (bind_result == LDAP_SUCCESS) ? 0 : -1; } oddjob-0.16-0/src/lookup/plain.h0000664000471600047240000000331510260303161013340 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_lookup_plain_h #define oddjob_lookup_plain_h int bind_plain(LDAP *ld, const char *authn_user, const char *authz_user, const char *password); #endif oddjob-0.16-0/src/lookup/gssapi.c0000664000471600047240000002122610260303161013517 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../../config.h" #include #include #include #include #include #include #include #include #include #if defined(HAVE_ET_COM_ERR_H) #include #elif defined(HAVE_COM_ERR_H) #include #endif #include "../util.h" #include "gssapi.h" #ifndef LDAP_OPT_RESULT_CODE #ifdef LDAP_OPT_ERROR_NUMBER #define LDAP_OPT_RESULT_CODE LDAP_OPT_ERROR_NUMBER #endif #endif int bind_gssapi(LDAP *ld, const char *myname, const char *servername) { gss_ctx_id_t context; OM_uint32 init_major, major, minor, flags, time_rec; gss_cred_id_t creds; gss_buffer_desc input_name, input_token, output_token; gss_name_t client_name, server_name; gss_OID mech_oid; gss_OID_set mech_oids, supported_oids; int i, msgid, sasl_result, bind_result, authenticated; unsigned int oid; struct berval client_cred, *server_cred, temp_cred; LDAPMessage *results, *entry; /* Import the service name for use as a GSSAPI name. */ input_name.length = strlen("ldap@") + strlen(servername); input_name.value = malloc(input_name.length + 1); if (input_name.value == NULL) { return -1; } sprintf(input_name.value, "ldap@%s", servername); server_name = GSS_C_NO_NAME; major = gss_import_name(&minor, &input_name, GSS_C_NT_HOSTBASED_SERVICE, &server_name); if (major != GSS_S_COMPLETE) { printf("import_name(1): %x\n", major); return -1; } free(input_name.value); #if 0 /* Figure out who we are. */ input_name.length = strlen(myname); input_name.value = malloc(input_name.length + 1); if (input_name.value == NULL) { return -1; } sprintf(input_name.value, "%s", myname); client_name = GSS_C_NO_NAME; major = gss_import_name(&minor, &input_name, GSS_C_NT_USER_NAME, &client_name); free(input_name.value); if (major != GSS_S_COMPLETE) { printf("import_name(2): %x\n", major); return -1; } #else client_name = GSS_C_NO_NAME; #endif /* Get a list of supported mechanisms. */ supported_oids = GSS_C_NO_OID_SET; major = gss_indicate_mechs(&minor, &supported_oids); if (major != GSS_S_COMPLETE) { printf("indicate_mechs: %x\n", major); return -1; } /* Get the credentials. */ creds = GSS_C_NO_CREDENTIAL; mech_oids = GSS_C_NO_OID_SET; major = gss_acquire_cred(&minor, &client_name, GSS_C_INDEFINITE, supported_oids, GSS_C_INITIATE, &creds, &mech_oids, &time_rec); if (major != GSS_S_COMPLETE) { printf("acquire_cred: %x/%x: %s\n", major, minor, error_message(minor)); return -1; } for (oid = 0; (mech_oids != NULL) && (oid < mech_oids->count); oid++) { /* Create a new authentication context for the service and * obtain the initial token. */ context = GSS_C_NO_CONTEXT; mech_oid = GSS_C_NO_OID; major = gss_init_sec_context(&minor, &creds, &context, server_name, &mech_oids->elements[oid], GSS_C_MUTUAL_FLAG, GSS_C_INDEFINITE, GSS_C_NO_CHANNEL_BINDINGS, GSS_C_NO_BUFFER, &mech_oid, &output_token, &flags, &time_rec); init_major = major; if ((init_major != GSS_S_COMPLETE) && ((init_major & GSS_S_CONTINUE_NEEDED) == 0)) { gss_release_name(&minor, server_name); printf("bad name %x/%x: %s\n", major, minor, error_message(minor)); return -1; } do { /* Take whatever client data we have and send it to the * server. */ client_cred.bv_val = output_token.value; client_cred.bv_len = output_token.length; i = ldap_sasl_bind(ld, NULL, "GSSAPI", &client_cred, NULL, NULL, &msgid); if (i != LDAP_SUCCESS) { printf("Error sending GSSAPI sasl_bind request " "to the server!\n"); gss_release_name(&minor, server_name); return -1; } /* Wait for a result message for this bind request. */ results = NULL; i = ldap_result(ld, msgid, LDAP_MSG_ALL, NULL, &results); if (i != LDAP_RES_BIND) { printf("Error while waiting for response to " "GSSAPI sasl_bind request!\n"); gss_release_name(&minor, server_name); return -1; } /* Retrieve the result code for the bind request and * any data which the server sent. */ server_cred = NULL; i = ldap_parse_sasl_bind_result(ld, results, &server_cred, 0); ldap_msgfree(results); /* Okay, here's where things get tricky. Both * Mozilla's LDAP SDK and OpenLDAP store the result * code which was returned by the server in the * handle's ERROR_NUMBER option. Mozilla returns * LDAP_SUCCESS if the data was parsed correctly, even * if the result was an error, while OpenLDAP returns * the result code. */ if (i == LDAP_SUCCESS) { /* Mozilla? */ if (ldap_get_option(ld, LDAP_OPT_RESULT_CODE, &bind_result) != LDAP_SUCCESS) { printf("Error retrieving response to " "GSSAPI sasl_bind request!\n"); break; } } else { /* OpenLDAP? */ switch (i) { case LDAP_SUCCESS: case LDAP_SASL_BIND_IN_PROGRESS: bind_result = i; break; default: printf("Error parsing response to " "GSSAPI sasl_bind request!\n"); break; } } /* If the server sent us something, then we'd better be * expecting it. */ i = ((server_cred != NULL) && (server_cred->bv_len > 0)) - (((init_major & GSS_S_CONTINUE_NEEDED) != 0)); if (i != 0) { if ((init_major & GSS_S_CONTINUE_NEEDED) == 0) { printf("Server sent us response data, " "but we thought we were done!" "\n"); } else { printf("Server did not send us any " "data, but we needed some!\n"); } break; } /* If we need another round trip, process whatever we * received and prepare data to be transmitted back. */ if (((init_major & GSS_S_CONTINUE_NEEDED) != 0) && ((bind_result == LDAP_SUCCESS) || (bind_result == LDAP_SASL_BIND_IN_PROGRESS))) { if (server_cred != NULL) { input_token.value = server_cred->bv_val; input_token.length = server_cred->bv_len; } else { input_token.value = NULL; input_token.length = 0; } major = gss_init_sec_context(&minor, &creds, &context, server_name, mech_oid, GSS_C_MUTUAL_FLAG, 0, GSS_C_NO_CHANNEL_BINDINGS, &input_token, &mech_oid, &output_token, &flags, &time_rec); init_major = major; /* If we have data to send, then the server had * better be expecting it. (It's valid to send * the server no data with a request.) */ if (((major & GSS_S_CONTINUE_NEEDED) != 0) && (bind_result != LDAP_SASL_BIND_IN_PROGRESS)) { printf("We have data for the server, " "but it thinks we are done!\n"); break; } } /* If the server says we succeeded, and the client * library says we succeeded, then we're done. */ if ((init_major == GSS_S_COMPLETE) && (bind_result == LDAP_SUCCESS)) { authenticated++; } } while ((init_major & GSS_S_CONTINUE_NEEDED) != 0); gss_delete_sec_context(&minor, &context, &output_token); } gss_release_name(&minor, server_name); return (authenticated > 0) ? 0 : -1; } oddjob-0.16-0/src/lookup/gssapi.h0000664000471600047240000000326210260303161013524 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef oddjob_lookup_gssapi_h #define oddjob_lookup_gssapi_h int bind_gssapi(LDAP *ld, const char *clientname, const char *servername); #endif oddjob-0.16-0/src/lookup/lookup.c0000664000471600047240000000530110260303161013536 00000000000000/* Copyright 2005 Red Hat, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Red Hat, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "../../config.h" #include #include #include #include #include #include #include #include #include #include "../util.h" #include "scrape.h" #include "common.h" struct globals globals; int main(int argc, char **argv) { int i; char *p, key[LINE_MAX]; scrape_smbconf("global/password server", &globals.domain_controller[0], sizeof(globals.domain_controller), "global/workgroup", &globals.workgroup[0], sizeof(globals.workgroup), "global/netbios name", &globals.machine_name[0], sizeof(globals.machine_name), NULL); snprintf(key, sizeof(key), "SECRETS/MACHINE_PASSWORD/%s", globals.workgroup); scrape_tdb(PATH_SECRETS, key, &globals.machine_password[0], sizeof(globals.machine_password), NULL); i = lookup_ads_init(NULL); if (i != 0) { printf("error initializing lookup, continuing anyway\n"); } for (i = 1; i + 1 < argc; i += 2) { p = lookup_ads_lookup(argv[i], argv[i + 1]); printf("%s.%s: %s\n", argv[i], argv[i + 1], p); lookup_ads_free_result(p); } lookup_ads_done(); return 0; } oddjob-0.16-0/tests/0000777000471600047240000000000010311657707011225 500000000000000oddjob-0.16-0/tests/006/0000777000471600047240000000000010311657674011535 500000000000000oddjob-0.16-0/tests/006/expected_stdout.in0000664000471600047240000000063710303415175015201 00000000000000[id -u] @currentuid@ [id -g] @currentgid@ [pwd] / [ls -l /proc/$$/fd] total 4 lr-x------ 1 @currentuser@ @currentgroup@ 0 -> pipe:[whatever] l-wx------ 1 @currentuser@ @currentgroup@ 1 -> pipe:[whatever] l-wx------ 1 @currentuser@ @currentgroup@ 2 -> pipe:[whatever] lr-x------ 1 @currentuser@ @currentgroup@ 255 -> $abs_builddir/sanity.sh [echo $*] [echo `cat`] @currentuser@ foo [cat /proc/$$/cmdline] /bin/bashoddjob-0.16-0/tests/006/CVS/0000777000471600047240000000000010311657623012162 500000000000000oddjob-0.16-0/tests/006/CVS/Root0000664000471600047240000000005310311657623012744 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/006/CVS/Repository0000664000471600047240000000002110311657623014173 00000000000000oddjob/tests/006 oddjob-0.16-0/tests/006/CVS/Entries0000664000471600047240000000035610311657623013440 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /expected_stdout.in/1.3/Thu Aug 25 19:22:37 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/006/CVS/Tag0000664000471600047240000000001710311657623012534 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/006/exit_status0000664000471600047240000000000210303404335013723 000000000000000 oddjob-0.16-0/tests/006/args0000664000471600047240000000010510303404242012304 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test sanity1 foo oddjob-0.16-0/tests/006/expected_stdout0000664000471600047240000000050310311657674014577 00000000000000[id -u] 2510 [id -g] 2516 [pwd] / [ls -l /proc/$$/fd] total 4 lr-x------ 1 nalin nalin 0 -> pipe:[whatever] l-wx------ 1 nalin nalin 1 -> pipe:[whatever] l-wx------ 1 nalin nalin 2 -> pipe:[whatever] lr-x------ 1 nalin nalin 255 -> $abs_builddir/sanity.sh [echo $*] [echo `cat`] nalin foo [cat /proc/$$/cmdline] /bin/bashoddjob-0.16-0/tests/006/expected_stderr0000664000471600047240000000000010303404242014526 00000000000000oddjob-0.16-0/tests/007/0000777000471600047240000000000010311657674011536 500000000000000oddjob-0.16-0/tests/007/expected_stdout.in0000664000471600047240000000063710303424200015167 00000000000000[id -u] @currentuid@ [id -g] @currentgid@ [pwd] / [ls -l /proc/$$/fd] total 4 lr-x------ 1 @currentuser@ @currentgroup@ 0 -> pipe:[whatever] l-wx------ 1 @currentuser@ @currentgroup@ 1 -> pipe:[whatever] l-wx------ 1 @currentuser@ @currentgroup@ 2 -> pipe:[whatever] lr-x------ 1 @currentuser@ @currentgroup@ 255 -> $abs_builddir/sanity.sh [echo $*] @currentuser@ foo [echo `cat`] [cat /proc/$$/cmdline] /bin/bashoddjob-0.16-0/tests/007/CVS/0000777000471600047240000000000010311657623012163 500000000000000oddjob-0.16-0/tests/007/CVS/Root0000664000471600047240000000005310311657623012745 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/007/CVS/Repository0000664000471600047240000000002110311657623014174 00000000000000oddjob/tests/007 oddjob-0.16-0/tests/007/CVS/Entries0000664000471600047240000000035610311657623013441 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /expected_stdout.in/1.2/Thu Aug 25 20:22:24 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/007/CVS/Tag0000664000471600047240000000001710311657623012535 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/007/exit_status0000664000471600047240000000000210303404335013724 000000000000000 oddjob-0.16-0/tests/007/args0000664000471600047240000000010510303404242012305 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test sanity2 foo oddjob-0.16-0/tests/007/expected_stdout0000664000471600047240000000050310311657674014600 00000000000000[id -u] 2510 [id -g] 2516 [pwd] / [ls -l /proc/$$/fd] total 4 lr-x------ 1 nalin nalin 0 -> pipe:[whatever] l-wx------ 1 nalin nalin 1 -> pipe:[whatever] l-wx------ 1 nalin nalin 2 -> pipe:[whatever] lr-x------ 1 nalin nalin 255 -> $abs_builddir/sanity.sh [echo $*] nalin foo [echo `cat`] [cat /proc/$$/cmdline] /bin/bashoddjob-0.16-0/tests/007/expected_stderr0000664000471600047240000000000010303404242014527 00000000000000oddjob-0.16-0/tests/Makefile.am0000664000471600047240000000036610311657300013171 00000000000000SUBDIRS = cmdparse EXTRA_DIST = sanity.sh.in printenv.sh test-oddjobd.conf.in test-oddjobd.sh \ 001 \ 002 \ 003 \ 004 \ 005 \ 006 \ 007 \ 008 \ 009 \ 010 \ 011 \ 012 \ 013 check: $(srcdir)/test-oddjobd.sh $(srcdir)/test-oddjobd.sh oddjob-0.16-0/tests/Makefile.in0000664000471600047240000003732510311657650013217 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/sanity.sh.in $(srcdir)/test-oddjobd.conf.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = test-oddjobd.conf sanity.sh SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = cmdparse EXTRA_DIST = sanity.sh.in printenv.sh test-oddjobd.conf.in test-oddjobd.sh \ 001 \ 002 \ 003 \ 004 \ 005 \ 006 \ 007 \ 008 \ 009 \ 010 \ 011 \ 012 \ 013 all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh test-oddjobd.conf: $(top_builddir)/config.status $(srcdir)/test-oddjobd.conf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ sanity.sh: $(top_builddir)/config.status $(srcdir)/sanity.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am check: $(srcdir)/test-oddjobd.sh $(srcdir)/test-oddjobd.sh # 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: oddjob-0.16-0/tests/sanity.sh.in0000775000471600047240000000074510303707170013413 00000000000000#!/bin/bash echo \[id -u\] id -u echo \[id -g\] id -g echo \[pwd\] pwd echo \[ls -l /proc/\$\$/fd\] ls -l /proc/$$/fd | awk '{$5 = $6 = $7 = $8 = "";print}' | sed -r -e 's,@abs_builddir@,\$abs_builddir,g' -e 's,pipe:\[.*\],pipe:\[whatever\],g' -e 's,[ ]+, ,g' -e 's,total 5,total 4,g' | grep -v '4 ->' echo \[echo \$\*\] echo $* echo \[echo \`cat\`\] args= while read arg ; do args="${args:+$args }$arg" done echo "$args" echo \[cat /proc/\$\$/cmdline\] cat /proc/$$/cmdline echo "" oddjob-0.16-0/tests/test-oddjobd.conf.in0000664000471600047240000000373110303404242014766 00000000000000 oddjob-0.16-0/tests/printenv.sh0000775000471600047240000000012010303404242013321 00000000000000#!/bin/sh env | grep '^ODDJOB' | sed -e s,=,=\",g -e s,\$,\",g | sort -d exit 0 oddjob-0.16-0/tests/test-oddjobd.sh0000775000471600047240000000455310303707170014062 00000000000000#!/bin/sh # # Start the session bus and arrange for it to be stopped when we exit. # DBUS_SESSION_BUS_PID= eval `dbus-launch --sh-syntax` if test -z "$DBUS_SESSION_BUS_PID" ; then echo Error starting session bus. exit 1 fi stopbus() { kill "$DBUS_SESSION_BUS_PID" } trap stopbus EXIT # # Now fix the PATH. # PATH=../src:${PATH} # # Process arguments. # monitor= post=: LD_PRELOAD= for arg in "$@" ; do case "$arg" in --efence) LD_PRELOAD=libefence.so export LD_PRELOAD ;; --memcheck) monitor="valgrind --tool=memcheck --leak-check=yes -v --show-reachable=yes --num-callers=30 --log-fd=3 --error-limit=no --time-stamp=yes" ;; --strace) post='strace -s2048 -f -o test-oddjobd.log -p ' ;; --sleep=*) sleep `echo x"$arg" | cut -f2- -d=` ;; esac done $monitor oddjobd -S -n -c test-oddjobd.conf -p test-oddjobd.pid 3> test-oddjobd.log & sleep 5 ODDJOBD_PID=`cat test-oddjobd.pid` if test "$post" != : ; then $post $ODDJOBD_PID & fi chmod +x sanity.sh printenv.sh for subdir in * ; do if test -d "$subdir" -a -e "$subdir"/args ; then if test -s "$subdir"/args ; then args=`cat "$subdir"/args 2> /dev/null` else args= fi sleep 1 oddjob_request -S $args > stdout 2> stderr status=$? expected_status=`cat "$subdir"/exit_status` exit_error=false if test $expected_status -ne $status ; then echo "$subdir": exit status mismatch: got ${status} instead of ${expected_status}. exit_error=true fi stdout_error=true for stdout in "$subdir"/expected_stdout* ; do case "$stdout" in *.in) continue;; esac if cmp -s stdout $stdout 2> /dev/null ; then stdout_error=false fi done if $stdout_error ; then for stdout in "$subdir"/expected_stdout* ; do case "$stdout" in *.in) continue;; esac if ! cmp -s stdout $stdout 2> /dev/null ; then diff -u $stdout stdout fi done fi stderr_error=true for stderr in "$subdir"/expected_stderr* ; do case "$stderr" in *.in) continue;; esac if cmp -s stderr $stderr 2> /dev/null ; then stderr_error=false fi done if $stderr_error ; then for stderr in "$subdir"/expected_stderr* ; do case "$stderr" in *.in) continue;; esac if ! cmp -s stderr $stderr 2> /dev/null ; then diff -u $stderr stderr fi done fi if $exit_error || $stdout_error || $stderr_error ; then break fi fi done oddjob_request -S quit exit 0 oddjob-0.16-0/tests/001/0000777000471600047240000000000010311657622011521 500000000000000oddjob-0.16-0/tests/001/CVS/0000777000471600047240000000000010311657622012154 500000000000000oddjob-0.16-0/tests/001/CVS/Root0000664000471600047240000000005310311657622012736 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/001/CVS/Repository0000664000471600047240000000002110311657622014165 00000000000000oddjob/tests/001 oddjob-0.16-0/tests/001/CVS/Entries0000664000471600047240000000035310311657622013427 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/001/CVS/Tag0000664000471600047240000000001710311657622012526 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/001/exit_status0000664000471600047240000000000210303404335013716 000000000000000 oddjob-0.16-0/tests/001/args0000664000471600047240000000000510303404242012276 00000000000000list oddjob-0.16-0/tests/001/expected_stderr0000664000471600047240000000000010303404242014521 00000000000000oddjob-0.16-0/tests/001/expected_stdout0000664000471600047240000000172610303404242014560 00000000000000(service="com.redhat.oddjob",object="/com/redhat/oddjob",interface="com.redhat.oddjob",method="quit"),(service="com.redhat.oddjob",object="/com/redhat/oddjob",interface="com.redhat.oddjob",method="list"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="sanity1"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="sanity2"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="printenv"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="exit1"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="sigint"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="sleep30"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="eightx"),(service="com.redhat.oddjob.test",object="/",interface="com.redhat.oddjob.test",method="ninex")oddjob-0.16-0/tests/002/0000777000471600047240000000000010311657622011522 500000000000000oddjob-0.16-0/tests/002/CVS/0000777000471600047240000000000010311657622012155 500000000000000oddjob-0.16-0/tests/002/CVS/Root0000664000471600047240000000005310311657622012737 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/002/CVS/Repository0000664000471600047240000000002110311657622014166 00000000000000oddjob/tests/002 oddjob-0.16-0/tests/002/CVS/Entries0000664000471600047240000000046310311657622013432 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr-0.2x/1.1/Thu Aug 25 19:05:47 2005//Toddjob-0_16-0 /expected_stderr-0.3x/1.1/Thu Aug 25 19:05:47 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/002/CVS/Tag0000664000471600047240000000001710311657622012527 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/002/exit_status0000664000471600047240000000000210303404335013717 000000000000000 oddjob-0.16-0/tests/002/args0000664000471600047240000000013010303404242012276 00000000000000-s com.redhat.oddjob.bogus -o /com/redhat/oddjob/bogus -i com.redhat.oddjob.bogus bogus oddjob-0.16-0/tests/002/expected_stderr-0.2x0000664000471600047240000000014110303413213015213 00000000000000org.freedesktop.DBus.Error.ServiceDoesNotExist: Service "com.redhat.oddjob.bogus" does not exist oddjob-0.16-0/tests/002/expected_stderr-0.3x0000664000471600047240000000016310303413213015220 00000000000000org.freedesktop.DBus.Error.ServiceUnknown: The name com.redhat.oddjob.bogus was not provided by any .service files oddjob-0.16-0/tests/002/expected_stdout0000664000471600047240000000000010303404242014541 00000000000000oddjob-0.16-0/tests/003/0000777000471600047240000000000010311657623011524 500000000000000oddjob-0.16-0/tests/003/CVS/0000777000471600047240000000000010311657623012157 500000000000000oddjob-0.16-0/tests/003/CVS/Root0000664000471600047240000000005310311657623012741 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/003/CVS/Repository0000664000471600047240000000002110311657623014170 00000000000000oddjob/tests/003 oddjob-0.16-0/tests/003/CVS/Entries0000664000471600047240000000035310311657623013432 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.3/Tue Aug 30 22:41:22 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/003/CVS/Tag0000664000471600047240000000001710311657623012531 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/003/exit_status0000664000471600047240000000000210303404335013720 000000000000000 oddjob-0.16-0/tests/003/args0000664000471600047240000000012710303404242012305 00000000000000-s com.redhat.oddjob.test -o /com/redhat/oddjob/bogus -i com.redhat.oddjob.bogus bogus oddjob-0.16-0/tests/003/expected_stderr0000664000471600047240000000007310305160222014534 00000000000000com.redhat.oddjob.Error.NoObject: /com/redhat/oddjob/bogus oddjob-0.16-0/tests/003/expected_stdout0000664000471600047240000000000010303404242014542 00000000000000oddjob-0.16-0/tests/004/0000777000471600047240000000000010311657623011525 500000000000000oddjob-0.16-0/tests/004/CVS/0000777000471600047240000000000010311657623012160 500000000000000oddjob-0.16-0/tests/004/CVS/Root0000664000471600047240000000005310311657623012742 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/004/CVS/Repository0000664000471600047240000000002110311657623014171 00000000000000oddjob/tests/004 oddjob-0.16-0/tests/004/CVS/Entries0000664000471600047240000000035310311657623013433 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.3/Tue Aug 30 22:41:22 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/004/CVS/Tag0000664000471600047240000000001710311657623012532 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/004/exit_status0000664000471600047240000000000210303404335013721 000000000000000 oddjob-0.16-0/tests/004/args0000664000471600047240000000010010303404242012275 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.bogus bogus oddjob-0.16-0/tests/004/expected_stderr0000664000471600047240000000007510305160222014537 00000000000000com.redhat.oddjob.Error.NoInterface: com.redhat.oddjob.bogus oddjob-0.16-0/tests/004/expected_stdout0000664000471600047240000000000010303404242014543 00000000000000oddjob-0.16-0/tests/005/0000777000471600047240000000000010311657623011526 500000000000000oddjob-0.16-0/tests/005/CVS/0000777000471600047240000000000010311657623012161 500000000000000oddjob-0.16-0/tests/005/CVS/Root0000664000471600047240000000005310311657623012743 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/005/CVS/Repository0000664000471600047240000000002110311657623014172 00000000000000oddjob/tests/005 oddjob-0.16-0/tests/005/CVS/Entries0000664000471600047240000000035310311657623013434 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.3/Tue Aug 30 22:41:22 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/005/CVS/Tag0000664000471600047240000000001710311657623012533 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/005/exit_status0000664000471600047240000000000210303404335013722 000000000000000 oddjob-0.16-0/tests/005/args0000664000471600047240000000007710303404242012313 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test bogus oddjob-0.16-0/tests/005/expected_stderr0000664000471600047240000000005010305160222014531 00000000000000com.redhat.oddjob.Error.NoMethod: bogus oddjob-0.16-0/tests/005/expected_stdout0000664000471600047240000000000010303404242014544 00000000000000oddjob-0.16-0/tests/008/0000777000471600047240000000000010311657623011531 500000000000000oddjob-0.16-0/tests/008/CVS/0000777000471600047240000000000010311657623012164 500000000000000oddjob-0.16-0/tests/008/CVS/Root0000664000471600047240000000005310311657623012746 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/008/CVS/Repository0000664000471600047240000000002110311657623014175 00000000000000oddjob/tests/008 oddjob-0.16-0/tests/008/CVS/Entries0000664000471600047240000000035310311657623013437 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/008/CVS/Tag0000664000471600047240000000001710311657623012536 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/008/exit_status0000664000471600047240000000000210303404335013725 000000000000000 oddjob-0.16-0/tests/008/args0000664000471600047240000000010210303404242012303 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test printenv oddjob-0.16-0/tests/008/expected_stderr0000664000471600047240000000000010303404242014530 00000000000000oddjob-0.16-0/tests/008/expected_stdout0000664000471600047240000000022110303404242014554 00000000000000ODDJOB_INTERFACE_NAME="com.redhat.oddjob.test" ODDJOB_METHOD_NAME="printenv" ODDJOB_OBJECT_PATH="/" ODDJOB_SERVICE_NAME="com.redhat.oddjob.test" oddjob-0.16-0/tests/009/0000777000471600047240000000000010311657623011532 500000000000000oddjob-0.16-0/tests/009/CVS/0000777000471600047240000000000010311657623012165 500000000000000oddjob-0.16-0/tests/009/CVS/Root0000664000471600047240000000005310311657623012747 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/009/CVS/Repository0000664000471600047240000000002110311657623014176 00000000000000oddjob/tests/009 oddjob-0.16-0/tests/009/CVS/Entries0000664000471600047240000000035310311657623013440 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/009/CVS/Tag0000664000471600047240000000001710311657623012537 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/009/exit_status0000664000471600047240000000000210303404335013726 000000000000001 oddjob-0.16-0/tests/009/args0000664000471600047240000000007710303404242012317 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test exit1 oddjob-0.16-0/tests/009/expected_stderr0000664000471600047240000000000010303404242014531 00000000000000oddjob-0.16-0/tests/009/expected_stdout0000664000471600047240000000000010303404242014550 00000000000000oddjob-0.16-0/tests/010/0000777000471600047240000000000010311657623011522 500000000000000oddjob-0.16-0/tests/010/CVS/0000777000471600047240000000000010311657623012155 500000000000000oddjob-0.16-0/tests/010/CVS/Root0000664000471600047240000000005310311657623012737 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/010/CVS/Repository0000664000471600047240000000002110311657623014166 00000000000000oddjob/tests/010 oddjob-0.16-0/tests/010/CVS/Entries0000664000471600047240000000035310311657623013430 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.2/Tue Aug 30 22:41:22 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/010/CVS/Tag0000664000471600047240000000001710311657623012527 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/010/exit_status0000664000471600047240000000000210303404335013716 000000000000000 oddjob-0.16-0/tests/010/args0000664000471600047240000000010010303404242012272 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test sigint oddjob-0.16-0/tests/010/expected_stderr0000664000471600047240000000007010305160222014527 00000000000000com.redhat.oddjob.Error.Exec: Child exited on signal 2. oddjob-0.16-0/tests/010/expected_stdout0000664000471600047240000000000010303404242014540 00000000000000oddjob-0.16-0/tests/011/0000777000471600047240000000000010311657623011523 500000000000000oddjob-0.16-0/tests/011/CVS/0000777000471600047240000000000010311657623012156 500000000000000oddjob-0.16-0/tests/011/CVS/Root0000664000471600047240000000005310311657623012740 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/011/CVS/Repository0000664000471600047240000000002110311657623014167 00000000000000oddjob/tests/011 oddjob-0.16-0/tests/011/CVS/Entries0000664000471600047240000000035310311657623013431 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/011/CVS/Tag0000664000471600047240000000001710311657623012530 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/011/exit_status0000664000471600047240000000000210303404335013717 000000000000000 oddjob-0.16-0/tests/011/args0000664000471600047240000000010010303404242012273 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test eightx oddjob-0.16-0/tests/011/expected_stderr0000664000471600047240000000000010303404242014522 00000000000000oddjob-0.16-0/tests/011/expected_stdout0000664000471600047240000000001010303404242014542 00000000000000XXXXXXXXoddjob-0.16-0/tests/012/0000777000471600047240000000000010311657623011524 500000000000000oddjob-0.16-0/tests/012/CVS/0000777000471600047240000000000010311657623012157 500000000000000oddjob-0.16-0/tests/012/CVS/Root0000664000471600047240000000005310311657623012741 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/012/CVS/Repository0000664000471600047240000000002110311657623014170 00000000000000oddjob/tests/012 oddjob-0.16-0/tests/012/CVS/Entries0000664000471600047240000000035310311657623013432 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.2/Tue Aug 30 22:41:22 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/012/CVS/Tag0000664000471600047240000000001710311657623012531 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/012/exit_status0000664000471600047240000000000210303404335013720 000000000000000 oddjob-0.16-0/tests/012/args0000664000471600047240000000007710303404242012311 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test ninex oddjob-0.16-0/tests/012/expected_stderr0000664000471600047240000000012710305160222014534 00000000000000com.redhat.oddjob.Error.Exec: Child signalled exec() error: No such file or directory. oddjob-0.16-0/tests/012/expected_stdout0000664000471600047240000000000010303404242014542 00000000000000oddjob-0.16-0/tests/013/0000777000471600047240000000000010311657623011525 500000000000000oddjob-0.16-0/tests/013/CVS/0000777000471600047240000000000010311657623012160 500000000000000oddjob-0.16-0/tests/013/CVS/Root0000664000471600047240000000005310311657623012742 00000000000000:ext:nalin@elvis.redhat.com:/usr/local/CVS oddjob-0.16-0/tests/013/CVS/Repository0000664000471600047240000000002110311657623014171 00000000000000oddjob/tests/013 oddjob-0.16-0/tests/013/CVS/Entries0000664000471600047240000000035310311657623013433 00000000000000/args/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 /exit_status/1.1/Thu Aug 25 18:07:25 2005//Toddjob-0_16-0 /expected_stderr/1.2/Tue Aug 30 22:41:22 2005//Toddjob-0_16-0 /expected_stdout/1.1/Thu Aug 25 18:06:26 2005//Toddjob-0_16-0 D oddjob-0.16-0/tests/013/CVS/Tag0000664000471600047240000000001710311657623012532 00000000000000Noddjob-0_16-0 oddjob-0.16-0/tests/013/exit_status0000664000471600047240000000000210303404335013721 000000000000000 oddjob-0.16-0/tests/013/args0000664000471600047240000000007610303404242012311 00000000000000-s com.redhat.oddjob.test -o / -i com.redhat.oddjob.test tenx oddjob-0.16-0/tests/013/expected_stderr0000664000471600047240000000006710305160222014540 00000000000000com.redhat.oddjob.Error.ACL: ACL does not allow access oddjob-0.16-0/tests/013/expected_stdout0000664000471600047240000000000010303404242014543 00000000000000oddjob-0.16-0/tests/cmdparse/0000777000471600047240000000000010311657707013023 500000000000000oddjob-0.16-0/tests/cmdparse/Makefile.am0000664000471600047240000000024210311657300014760 00000000000000noinst_PROGRAMS = cmdparse EXTRA_DIST = test-cmdparse.sh cmdparse_LDADD = ../../src/liboddcommon.la check: $(srcdir)/test-cmdparse.sh $(srcdir)/test-cmdparse.sh oddjob-0.16-0/tests/cmdparse/Makefile.in0000664000471600047240000003431710311657650015013 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = cmdparse$(EXEEXT) subdir = tests/cmdparse DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) cmdparse_SOURCES = cmdparse.c cmdparse_OBJECTS = cmdparse.$(OBJEXT) cmdparse_DEPENDENCIES = ../../src/liboddcommon.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = cmdparse.c DIST_SOURCES = cmdparse.c ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = test-cmdparse.sh cmdparse_LDADD = ../../src/liboddcommon.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/cmdparse/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/cmdparse/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done cmdparse$(EXEEXT): $(cmdparse_OBJECTS) $(cmdparse_DEPENDENCIES) @rm -f cmdparse$(EXEEXT) $(LINK) $(cmdparse_LDFLAGS) $(cmdparse_OBJECTS) $(cmdparse_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdparse.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am check: $(srcdir)/test-cmdparse.sh $(srcdir)/test-cmdparse.sh # 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: oddjob-0.16-0/tests/cmdparse/cmdparse.c0000664000471600047240000000123310311656023014670 00000000000000#include #include #include #include #include "../../src/util.h" int main(int argc, char **argv) { char buf[LINE_MAX], **args; const char *p; int i, line; line = 1; while (fgets(buf, sizeof(buf), stdin) != NULL) { buf[strcspn(buf, "\r\n")] = '\0'; if (strlen(buf) > 0) { fprintf(stdout, "%d -----\n", line++); } p = NULL; args = oddjob_parse_args(buf, &p); if (p != NULL) { fprintf(stderr, "%s\n", p); } else { if (args != NULL) { for (i = 0; args[i] != NULL; i++) { fprintf(stdout, "%s\n", args[i]); } } } if (args != NULL) { oddjob_free_args(args); } } return 0; } oddjob-0.16-0/tests/cmdparse/test-cmdparse.sh0000775000471600047240000000235410311656023016045 00000000000000#!/bin/bash tmpfile1=`mktemp ${TMPDIR:-/tmp}/cmdparseXXXXXX` if test -z "$tmpfile1" ; then echo "Error creating temporary file!" exit 1 fi tmpfile2=`mktemp ${TMPDIR:-/tmp}/cmdparseXXXXXX` if test -z "$tmpfile2" ; then echo "Error creating temporary file!" rm -f "$tmpfile1" exit 1 fi out1=`mktemp ${TMPDIR:-/tmp}/cmdparseXXXXXX` if test -z "$out1" ; then echo "Error creating temporary file!" rm -f "$tmpfile1" rm -f "$tmpfile2" exit 1 fi out2=`mktemp ${TMPDIR:-/tmp}/cmdparseXXXXXX` if test -z "$out2" ; then echo "Error creating temporary file!" rm -f "$out1" rm -f "$tmpfile1" rm -f "$tmpfile2" exit 1 fi trap 'rm -f "$out1" "$out2" "$tmpfile1" "$tmpfile2"' EXIT cat > $tmpfile1 << EOF abc def ghi "xyz" "abc" def 'ghi' "xyz" "a'bcdef'ghi" "xyz" 'a"bcdef"ghi' "xyz" 'a"bc'd'ef"ghi' "xyz" 'a\"bc'd'ef\"ghi' "xyz" 'a"bc\'d\'ef"ghi' "xyz" 'a\"bc\'d\'ef\"ghi' "xyz" 'a\\"bc\'d\'ef\\"ghi' "xyz" EOF awk '{ print "for a in ", $0 , " ; do echo $a >> '$out1'; done" }' $tmpfile1 > $tmpfile2 > $out1 i=1 while test $i -le `wc -l < $tmpfile2` ; do echo $i ----- >> $out1 tail -n +$i $tmpfile2 | head -n 1 | sh >> $out1 2> /dev/null i=`expr $i + 1` done > $out2 ./cmdparse < $tmpfile1 > $out2 2> /dev/null cmp $out1 $out2 || diff -u $out1 $out2 oddjob-0.16-0/configure.ac0000664000471600047240000002165110311656023012262 00000000000000AC_INIT(oddjob,0.16) AC_PREREQ(2.59) PACKAGE_NAME_CAPS=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'` AC_DEFINE_UNQUOTED(PACKAGE_NAME_CAPS,"$PACKAGE_NAME_CAPS",[Define to the package name, in caps.]) AC_SUBST(PACKAGE_NAME_CAPS) AM_INIT_AUTOMAKE([foreign]) AM_MAINTAINER_MODE AC_DEFINE(_GNU_SOURCE,1,[Use GNU libc extensions.]) AC_PROG_LIBTOOL DBUS_PACKAGE=dbus-1 PKG_CHECK_MODULES(DBUS,$DBUS_PACKAGE) PKG_CHECK_MODULES(XML,libxml-2.0) DBUS_VERSION=`pkg-config --modversion $DBUS_PACKAGE` DBUS_MAJOR_VERSION=`echo $DBUS_VERSION | cut -f1 -d.` DBUS_MINOR_VERSION=`echo $DBUS_VERSION | cut -f2 -d.` AC_DEFINE_UNQUOTED(ODDJOB_DBUS_MAJOR_VERSION,$DBUS_MAJOR_VERSION,[Define to the major version of D-BUS with which oddjob is being compiled.]) AC_DEFINE_UNQUOTED(ODDJOB_DBUS_MINOR_VERSION,$DBUS_MINOR_VERSION,[Define to the minor version of D-BUS with which oddjob is being compiled.]) AC_DEFINE_UNQUOTED(DBUS_API_SUBJECT_TO_CHANGE,"Then finish it!",[Define to allow use of dbus development versions.]) AC_CHECK_HEADERS(security/pam_modules.h) dnl Oh, for the clear management of OID arcs.... NAMESPACE=com.redhat AC_SUBST(NAMESPACE) NAMESPACEPATH=`echo "$NAMESPACE" | sed -e 's,^,/,' -e 's,\.,/,g'` AC_SUBST(NAMESPACEPATH) AC_DEFINE_UNQUOTED(ODDJOB_NAMESPACE,"$NAMESPACE",[Define to the namespace in which the oddjob service resides.]) AC_DEFINE_UNQUOTED(ODDJOB_NAMESPACE_PATH,"$NAMESPACEPATH",[Define to the prefix of the object paths used by oddjob.]) AC_ARG_ENABLE(sample, AS_HELP_STRING(--enable-sample,[Build and install a sample service.]), sample=$withval, sample=no) AM_CONDITIONAL(INSTALL_SAMPLE,test x$sample = xyes) selinux_labels=default AC_ARG_WITH(selinux-labels, AS_HELP_STRING(--with-selinux-labels,[Apply SELinux labels to files created by helpers.]), selinux_labels=$withval, selinux_labels=default) selinux_acls=default AC_ARG_WITH(selinux-acls, AS_HELP_STRING(--with-selinux-acls,[Recognize SELinux process attributes in oddjobd ACLs.]), selinux_acls=$withval, selinux_acls=default) if test x$selinux_acls = xdefault ; then if ! $PKG_CONFIG --exists 'dbus-1 >= 0.35.2' ; then AC_MSG_WARN([D-Bus prior to 0.35.2 did not provide GetConnectionSELinuxSecurityContext(), disabling SELinux ACL support.]) selinux_acls=no fi fi define_selinux_labels=false SELINUX_CFLAGS= SELINUX_LIBS= if test x$selinux_labels != xno ; then CFLAGsave="$CFLAGS" LIBsave="$LIBS" if test -d $withval ; then CFLAGS="-I$withval/include" LIBS="-L$withval/`basename $libdir`" fi AC_CHECK_HEADERS(selinux/selinux.h) if test x$ac_cv_header_selinux_selinux_h != xyes ; then if test x$selinux != default ; then AC_MSG_ERROR([Could not locate SELinux headers.]) else AC_MSG_WARN([Could not locate SELinux headers.]) fi fi AC_CHECK_FUNC(setfscreatecon,,AC_CHECK_LIB(selinux,setfscreatecon)) if test x$ac_cv_func_setfscreatecon != xyes ; then if test x$ac_cv_lib_selinux_setfscreatecon != xyes ; then if test x$selinux_labels != default ; then AC_MSG_ERROR([Could not locate SELinux library.]) else AC_MSG_WARN([Could not locate SELinux library.]) fi fi fi AC_CHECK_FUNCS(matchpathcon_init) if test x$ac_cv_header_selinux_selinux_h = xyes ; then if test x$ac_cv_func_setfscreatecon = xyes ; then define_selinux_labels=true fi if test x$ac_cv_lib_selinux_setfscreatecon = xyes ; then define_selinux_labels=true fi fi if $define_selinux_labels ; then AC_DEFINE(SELINUX_LABELS,1,[Define to build SELinux label-aware helpers.]) fi SELINUX_CFLAGS="$CFLAGS" SELINUX_LIBS="$LIBS" CFLAGS="$CFLAGsave" LIBS="$LIBsave" fi # # Even if we have libselinux, D-BUS itself might not be able to give us the # info we need for enforcing SELinux ACLS, so jump through a flaming hoop. # SELINUX_ACLS_XML_START="" SELINUX_ACLS_MAN_SPECIFIC=".\\ " if $define_selinux_labels ; then if test x$selinux_acls != xno ; then AC_DEFINE(SELINUX_ACLS,1,[Define if you want SELinux ACL support in oddjobd.]) SELINUX_ACLS_XML_START= SELINUX_ACLS_XML_END= SELINUX_ACLS_MAN_SPECIFIC= fi fi AC_SUBST(SELINUX_CFLAGS) AC_SUBST(SELINUX_LIBS) AC_SUBST(SELINUX_ACLS_XML_START) AC_SUBST(SELINUX_ACLS_XML_END) AC_SUBST(SELINUX_ACLS_MAN_SPECIFIC) python=default AC_ARG_WITH(python, AS_HELP_STRING(--with-python,[Build Python bindings for liboddjob.]), python=$withval, python=default) if test x$python != xno ; then AM_PATH_PYTHON(,,[ if test x$python = xyes ; then AC_MSG_ERROR([no suitable Python interpreter found]) else AC_MSG_WARN([no suitable Python interpreter found]) python=no fi ]) fi AM_CONDITIONAL(PYTHON,test x$python != xno) mysysconfdir=`eval echo "$sysconfdir" | sed s,^NONE,"$prefix",` mysysconfdir=`eval echo "$mysysconfdir" | sed s,^NONE,"$ac_default_prefix",` mydatadir=`eval echo "$datadir" | sed s,^NONE,"$prefix",` mydatadir=`eval echo "$mydatadir" | sed s,^NONE,"$ac_default_prefix",` mypkglibexecdir=`eval echo "$libexecdir/$PACKAGE" | sed s,^NONE,"$exec_prefix",` mypkglibexecdir=`eval echo "$mypkglibexecdir" | sed s,^NONE,"$prefix",` mypkglibexecdir=`eval echo "$mypkglibexecdir" | sed s,^NONE,"$ac_default_prefix",` mylocalstatedir=`eval echo "$localstatedir" | sed s,^NONE,"$prefix",` mylocalstatedir=`eval echo "$mylocalstatedir" | sed s,^NONE,"$ac_default_prefix",` AC_DEFINE_UNQUOTED(SYSCONFDIR,"$mysysconfdir",[Define to the directory in which oddjobd can find its configuration file.]) AC_DEFINE_UNQUOTED(PKGLIBEXECDIR,"$mypkglibexecdir",[Define to the directory in which oddjobd can find its helpers.]) AC_DEFINE_UNQUOTED(DATADIR,"$mydatadir",[Define to the directory in which shared data is stored.]) AC_DEFINE_UNQUOTED(LOCALSTATEDIR,"$mylocalstatedir",[Define to the directory in which local state information is stored.]) AC_DEFINE_UNQUOTED(LOCKDIR,"$mylocalstatedir/lock",[Define to the directory in which local lock information is kept.]) AC_SUBST(mypkglibexecdir) AC_SUBST(mysysconfdir) AC_SUBST(mydatadir) AC_PATH_PROGS(PATH_MOUNT,mount,/bin/mount) AC_PATH_PROGS(PATH_UMOUNT,umount,/bin/umount) AC_DEFINE_UNQUOTED(PATH_MOUNT,"$PATH_MOUNT", [Define to the path to the "mount" command.]) AC_DEFINE_UNQUOTED(PATH_UMOUNT,"$PATH_UMOUNT", [Define to the path to the "umount" command.]) libSAVE="$LIBS" AC_CHECK_HEADERS(ldap.h) if test x$ac_cv_header_ldap_h != xyes ; then AC_MSG_ERROR([Could not locate LDAP headers.]) fi AC_CHECK_FUNC(ldap_init,,AC_CHECK_LIB(ldap,ldap_init)) if test x$ac_cv_func_ldap_init != xyes ; then if test x$ac_cv_lib_ldap_ldap_init != xyes ; then AC_MSG_ERROR([Could not locate LDAP library.]) fi fi LDAP_LIBS="$LIBS" AC_SUBST(LDAP_LIBS) LIBS="$libSAVE" libSAVE="$LIBS" AC_CHECK_HEADERS(sasl/sasl.h) if test x$ac_cv_header_sasl_sasl_h != xyes ; then AC_MSG_ERROR([Could not locate Cyrus SASL 2.x headers.]) fi AC_CHECK_FUNC(sasl_client_init,,AC_CHECK_LIB(sasl2,sasl_client_init)) if test x$ac_cv_func_sasl_client_init != xyes ; then if test x$ac_cv_lib_sasl2_sasl_client_init != xyes ; then AC_MSG_ERROR([Could not locate Cyrus SASL 2.x library.]) fi fi SASL_LIBS="$LIBS" AC_SUBST(SASL_LIBS) LIBS="$libSAVE" libSAVE="$LIBS" AC_PATH_PROGS(KRB5_CONFIG,krb5-config,not-found) if test x$KRB5_CONFIG = xnot-found ; then AC_MSG_ERROR([Could not locate Kerberos libraries.]) fi AC_MSG_CHECKING([for Kerberos 5 headers]) KRB5_CFLAGS=`$KRB5_CONFIG --cflags` AC_MSG_RESULT($KRB5_CFLAGS) AC_SUBST(KRB5_CFLAGS) AC_MSG_CHECKING([for Kerberos 5 libraries]) KRB5_LIBS=`$KRB5_CONFIG --libs` AC_MSG_RESULT($KRB5_LIBS) AC_SUBST(KRB5_LIBS) LIBS="$libSAVE" cppflagsSAVE="$CPPFLAGS" CPPFLAGS="$KRB5_CFLAGS" AC_CHECK_HEADERS(et/com_err.h com_err.h) CPPFLAGS="$cppflagsSAVE" libSAVE="$LIBS" AC_MSG_CHECKING([for GSSAPI headers]) GSSAPI_CFLAGS=`$KRB5_CONFIG --cflags gssapi` AC_MSG_RESULT($GSSAPI_CFLAGS) AC_SUBST(GSSAPI_CFLAGS) AC_MSG_CHECKING([for GSSAPI libraries]) GSSAPI_LIBS=`$KRB5_CONFIG --libs gssapi` AC_MSG_RESULT($GSSAPI_LIBS) AC_SUBST(GSSAPI_LIBS) LIBS="$libSAVE" AC_SYS_LARGEFILE AC_CONFIG_HEADER(config.h) AC_SUBST(DBUS_PACKAGE) AC_DEFINE_UNQUOTED(DBUS_PACKAGE,"$DBUS_PACKAGE",[Define to the package name for D-BUS.]) AC_ARG_ENABLE(xml-docs, AS_HELP_STRING(--enable-xml-docs,[Reformat XML documentation.]), xml_docs=$withval, xml_docs=no) AM_CONDITIONAL(REFORMAT_XML_DOCS,test x$xml_docs = xyes) AC_PATH_PROGS(PATH_XMLTO,xmlto,:) AC_SUBST(PATH_XMLTO) currentuser=`id -un` AC_SUBST(currentuser) currentgroup=`id -gn` AC_SUBST(currentgroup) currentuid=`id -u` AC_SUBST(currentuid) currentgid=`id -g` AC_SUBST(currentgid) AC_PATH_PROGS(PATH_PWD,pwd,pwd) AC_PATH_PROGS(PATH_PWD,pwd,pwd) AC_OUTPUT([ Makefile src/Makefile scripts/Makefile scripts/oddjobd sample/Makefile src/oddjob.pc src/oddjob.conf src/oddjob.conf.5 src/oddjobd.conf src/oddjobd.conf.5 src/oddjobd-local.conf src/oddjob_request.1 src/oddjobd.8 src/pam_oddjob_mkhomedir.8 src/pam_oddjob_mounthomedir.8 src/lookup/Makefile src/printenv.sh python/Makefile oddjobconfig.dtd sample/oddjobd-sample.conf sample/oddjob-sample.conf sample/oddjob-sample.sh doc/Makefile doc/oddjob.xml tests/Makefile tests/test-oddjobd.conf tests/sanity.sh tests/006/expected_stdout tests/007/expected_stdout tests/cmdparse/Makefile ]) oddjob-0.16-0/oddjob.spec0000664000471600047240000000514310311656023012107 00000000000000%define build_sample 1 Name: oddjob Version: 0.16 Release: 0 Source: oddjob-%{version}-0.tar.gz Summary: A D-BUS service which runs odd jobs. License: BSD Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: dbus-devel >= 0.22, libselinux-devel, pam-devel, python-devel Prereq: /sbin/chkconfig %description oddjob is a D-BUS service which performs particular tasks for clients which connect to it and issue requests using the system-wide message bus. %package devel Group: Development/Libraries Summary: Files for developing oddjob clients. %description devel This package contains header files and static libraries which aid in the development of simple oddjob client applications. %package sample Group: System Environment/Daemons Summary: A sample oddjob service. Requires: %{name} = %{version}-%{release} %description sample This package contains a trivial sample oddjob service. %prep %setup -q -n %{name}-%{version}-0 %build %configure --without-selinux-acls --without-selinux-labels --without-python make all distclean sample_flag= %if %{build_sample} sample_flag=--enable-sample %endif %configure --with-selinux-acls=default --with-selinux-labels --with-python $sample_flag make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr "$RPM_BUILD_ROOT" make install DESTDIR="$RPM_BUILD_ROOT" rm "$RPM_BUILD_ROOT"/%{_libdir}/security/*.la rm "$RPM_BUILD_ROOT"/%{_libdir}/security/*.a if ! test -d "$RPM_BUILD_ROOT"/%{_lib}/security ; then mkdir -p "$RPM_BUILD_ROOT"/%{_lib}/security mv "$RPM_BUILD_ROOT"/%{_libdir}/security/*.so "$RPM_BUILD_ROOT"/%{_lib}/security/ fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr "$RPM_BUILD_ROOT" %files %defattr(-,root,root) %doc *.dtd COPYING python/sample.py doc/oddjob.html %config %{_initrddir}/oddjobd %{_bindir}/* %{_sbindir}/* %config %{_sysconfdir}/dbus-*/system.d/oddjob.conf %config %{_sysconfdir}/oddjobd.conf %dir %{_sysconfdir}/oddjobd.conf.d %dir %{_sysconfdir}/%{name} /%{_lib}/security/*.so %{_libexecdir}/%{name}/mkhomedir %{_libexecdir}/%{name}/sanity.sh %{_mandir}/*/*.* %{_libdir}/liboddjob.so.* %{_libdir}/python*/site-packages/* %files devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/pkgconfig/oddjob.pc %{_libdir}/liboddjob.la %{_libdir}/liboddjob.so %{_libdir}/liboddjob.a %if %{build_sample} %files sample %defattr(-,root,root) %{_libexecdir}/%{name}/oddjob-sample.sh %config %{_sysconfdir}/dbus-*/system.d/oddjob-sample.conf %config %{_sysconfdir}/oddjobd.conf.d/oddjobd-sample.conf %endif %post /sbin/chkconfig --add oddjobd /sbin/ldconfig %preun if [ $1 -eq 0 ] ; then /sbin/chkconfig --del oddjobd fi %postun /sbin/ldconfig oddjob-0.16-0/aclocal.m40000664000471600047240000100157610311657632011650 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$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 >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for *BSD 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` ;; 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 ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $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' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos 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" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; 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.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; 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 ;; 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 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /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 ;; 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*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided and an installed libltdl is not found, it is # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single # quotes!). If your package is not flat and you're not using automake, # define top_builddir and top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # --------------- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $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 < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* ) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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_ifval([$1], [$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then 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_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]) if test $pkg_failed = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met. Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables to avoid the need to call pkg-config. See the pkg-config man page for more details.])], [$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. Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # hexversion has been introduced in Python 1.5.2; it's probably not # worth to support older versions (1.5.1 was released on October 31, 1998). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR oddjob-0.16-0/Makefile.am0000664000471600047240000000256010303404242012021 00000000000000SUBDIRS = src scripts python sample tests doc EXTRA_DIST = oddjob.spec oddjobconfig.dtd.in QUICKSTART TODO doc/oddjob.html CONFIGURE_DEPENDENCIES = $(top_srcdir)/oddjob.spec VERSION=$(shell rpm -q --specfile $(top_srcdir)/oddjob.spec --qf '%{version}\n' | head -n1) RELEASE=$(shell rpm -q --specfile $(top_srcdir)/oddjob.spec --qf '%{release}\n' | head -n1) CVSTAG=oddjob-$(shell echo $(VERSION) | tr . _)-$(shell echo $(RELEASE) | tr . _) distdir=$(PACKAGE)-$(VERSION)-$(RELEASE) tag: cvs tag -c $(CVSTAG) force-tag: cvs tag -cF $(CVSTAG) CVSROOT=$(shell test -d CVS && cat CVS/Root) REPOSITORY=$(shell test -d CVS && cat CVS/Repository) ARCHIVEOUTDIR=$(shell cd $(top_srcdir) && pwd) archive: tmpdir=`mktemp -d /tmp/make_archive_XXXXXX`;\ if test -d "$$tmpdir" ; then \ cd $$tmpdir;\ cvs -d $(CVSROOT) co -d $(distdir) -r $(CVSTAG) $(REPOSITORY);\ cd $(distdir);\ ./autogen;\ make dist;\ mkdir -p $$tmpdir/rpm-build-top;\ rpmbuild \ --define "_topdir $$tmpdir/rpm-build-top" \ --define "_sourcedir $$tmpdir/rpm-build-top" \ --define "_specdir $$tmpdir/rpm-build-top" \ --define "_builddir $$tmpdir/rpm-build-top" \ --define "_srpmdir $$tmpdir/rpm-build-top" \ --define "_rpmdir $$tmpdir/rpm-build-top" \ --define "_rpmdir $$tmpdir/rpm-build-top" \ -tb $(distdir).tar.gz;\ cp -v $(distdir).tar.gz $(ARCHIVEOUTDIR)/;\ rm -fr $$tmpdir;\ fi oddjob-0.16-0/Makefile.in0000664000471600047240000005420210311657651012047 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/oddjobconfig.dtd.in $(top_srcdir)/configure \ $(top_srcdir)/tests/006/expected_stdout.in \ $(top_srcdir)/tests/007/expected_stdout.in COPYING TODO \ config.guess config.sub depcomp install-sh ltmain.sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = oddjobconfig.dtd tests/006/expected_stdout \ tests/007/expected_stdout SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_PACKAGE = @DBUS_PACKAGE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GSSAPI_CFLAGS = @GSSAPI_CFLAGS@ GSSAPI_LIBS = @GSSAPI_LIBS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SAMPLE_FALSE = @INSTALL_SAMPLE_FALSE@ INSTALL_SAMPLE_TRUE = @INSTALL_SAMPLE_TRUE@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_LIBS = @KRB5_LIBS@ LDAP_LIBS = @LDAP_LIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ NAMESPACE = @NAMESPACE@ NAMESPACEPATH = @NAMESPACEPATH@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME_CAPS = @PACKAGE_NAME_CAPS@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_MOUNT = @PATH_MOUNT@ PATH_PWD = @PATH_PWD@ PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_UMOUNT = @PATH_UMOUNT@ PATH_XMLTO = @PATH_XMLTO@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_FALSE = @PYTHON_FALSE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_TRUE = @PYTHON_TRUE@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ REFORMAT_XML_DOCS_FALSE = @REFORMAT_XML_DOCS_FALSE@ REFORMAT_XML_DOCS_TRUE = @REFORMAT_XML_DOCS_TRUE@ SASL_LIBS = @SASL_LIBS@ SELINUX_ACLS_MAN_SPECIFIC = @SELINUX_ACLS_MAN_SPECIFIC@ SELINUX_ACLS_XML_END = @SELINUX_ACLS_XML_END@ SELINUX_ACLS_XML_START = @SELINUX_ACLS_XML_START@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = $(shell rpm -q --specfile $(top_srcdir)/oddjob.spec --qf '%{version}\n' | head -n1) XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ currentgid = @currentgid@ currentgroup = @currentgroup@ currentuid = @currentuid@ currentuser = @currentuser@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ mydatadir = @mydatadir@ mypkglibexecdir = @mypkglibexecdir@ mysysconfdir = @mysysconfdir@ oldincludedir = @oldincludedir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src scripts python sample tests doc EXTRA_DIST = oddjob.spec oddjobconfig.dtd.in QUICKSTART TODO doc/oddjob.html CONFIGURE_DEPENDENCIES = $(top_srcdir)/oddjob.spec RELEASE = $(shell rpm -q --specfile $(top_srcdir)/oddjob.spec --qf '%{release}\n' | head -n1) CVSTAG = oddjob-$(shell echo $(VERSION) | tr . _)-$(shell echo $(RELEASE) | tr . _) distdir = $(PACKAGE)-$(VERSION)-$(RELEASE) CVSROOT = $(shell test -d CVS && cat CVS/Root) REPOSITORY = $(shell test -d CVS && cat CVS/Repository) ARCHIVEOUTDIR = $(shell cd $(top_srcdir) && pwd) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 oddjobconfig.dtd: $(top_builddir)/config.status $(srcdir)/oddjobconfig.dtd.in cd $(top_builddir) && $(SHELL) ./config.status $@ tests/006/expected_stdout: $(top_builddir)/config.status $(top_srcdir)/tests/006/expected_stdout.in cd $(top_builddir) && $(SHELL) ./config.status $@ tests/007/expected_stdout: $(top_builddir)/config.status $(top_srcdir)/tests/007/expected_stdout.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/doc $(distdir)/sample $(distdir)/scripts $(distdir)/src $(distdir)/tests $(distdir)/tests/006 $(distdir)/tests/007 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am tag: cvs tag -c $(CVSTAG) force-tag: cvs tag -cF $(CVSTAG) archive: tmpdir=`mktemp -d /tmp/make_archive_XXXXXX`;\ if test -d "$$tmpdir" ; then \ cd $$tmpdir;\ cvs -d $(CVSROOT) co -d $(distdir) -r $(CVSTAG) $(REPOSITORY);\ cd $(distdir);\ ./autogen;\ make dist;\ mkdir -p $$tmpdir/rpm-build-top;\ rpmbuild \ --define "_topdir $$tmpdir/rpm-build-top" \ --define "_sourcedir $$tmpdir/rpm-build-top" \ --define "_specdir $$tmpdir/rpm-build-top" \ --define "_builddir $$tmpdir/rpm-build-top" \ --define "_srpmdir $$tmpdir/rpm-build-top" \ --define "_rpmdir $$tmpdir/rpm-build-top" \ --define "_rpmdir $$tmpdir/rpm-build-top" \ -tb $(distdir).tar.gz;\ cp -v $(distdir).tar.gz $(ARCHIVEOUTDIR)/;\ rm -fr $$tmpdir;\ fi # 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: oddjob-0.16-0/config.h.in0000664000471600047240000000754410311657642012034 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to the directory in which shared data is stored. */ #undef DATADIR /* Define to allow use of dbus development versions. */ #undef DBUS_API_SUBJECT_TO_CHANGE /* Define to the package name for D-BUS. */ #undef DBUS_PACKAGE /* Define to 1 if you have the header file. */ #undef HAVE_COM_ERR_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ET_COM_ERR_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LDAP_H /* Define to 1 if you have the `ldap' library (-lldap). */ #undef HAVE_LIBLDAP /* Define to 1 if you have the `sasl2' library (-lsasl2). */ #undef HAVE_LIBSASL2 /* Define to 1 if you have the `selinux' library (-lselinux). */ #undef HAVE_LIBSELINUX /* Define to 1 if you have the `matchpathcon_init' function. */ #undef HAVE_MATCHPATHCON_INIT /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_SASL_SASL_H /* Define to 1 if you have the header file. */ #undef HAVE_SECURITY_PAM_MODULES_H /* Define to 1 if you have the header file. */ #undef HAVE_SELINUX_SELINUX_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the directory in which local state information is stored. */ #undef LOCALSTATEDIR /* Define to the directory in which local lock information is kept. */ #undef LOCKDIR /* Define to the major version of D-BUS with which oddjob is being compiled. */ #undef ODDJOB_DBUS_MAJOR_VERSION /* Define to the minor version of D-BUS with which oddjob is being compiled. */ #undef ODDJOB_DBUS_MINOR_VERSION /* Define to the namespace in which the oddjob service resides. */ #undef ODDJOB_NAMESPACE /* Define to the prefix of the object paths used by oddjob. */ #undef ODDJOB_NAMESPACE_PATH /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the package name, in caps. */ #undef PACKAGE_NAME_CAPS /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to the path to the "mount" command. */ #undef PATH_MOUNT /* Define to the path to the "umount" command. */ #undef PATH_UMOUNT /* Define to the directory in which oddjobd can find its helpers. */ #undef PKGLIBEXECDIR /* Define if you want SELinux ACL support in oddjobd. */ #undef SELINUX_ACLS /* Define to build SELinux label-aware helpers. */ #undef SELINUX_LABELS /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to the directory in which oddjobd can find its configuration file. */ #undef SYSCONFDIR /* Version number of package */ #undef VERSION /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Use GNU libc extensions. */ #undef _GNU_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES oddjob-0.16-0/oddjobconfig.dtd.in0000664000471600047240000000357010304732163013527 00000000000000 @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ @SELINUX_ACLS_XML_START@@SELINUX_ACLS_XML_END@ oddjob-0.16-0/configure0000775000471600047240000275334710311657641011732 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for oddjob 0.16. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # 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 before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, 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 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='oddjob' PACKAGE_TARNAME='oddjob' PACKAGE_VERSION='0.16' PACKAGE_STRING='oddjob 0.16' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE_NAME_CAPS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG ac_pt_PKG_CONFIG DBUS_CFLAGS DBUS_LIBS XML_CFLAGS XML_LIBS NAMESPACE NAMESPACEPATH INSTALL_SAMPLE_TRUE INSTALL_SAMPLE_FALSE SELINUX_CFLAGS SELINUX_LIBS SELINUX_ACLS_XML_START SELINUX_ACLS_XML_END SELINUX_ACLS_MAN_SPECIFIC PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir PYTHON_TRUE PYTHON_FALSE mypkglibexecdir mysysconfdir mydatadir PATH_MOUNT PATH_UMOUNT LDAP_LIBS SASL_LIBS KRB5_CONFIG KRB5_CFLAGS KRB5_LIBS GSSAPI_CFLAGS GSSAPI_LIBS DBUS_PACKAGE REFORMAT_XML_DOCS_TRUE REFORMAT_XML_DOCS_FALSE PATH_XMLTO currentuser currentgroup currentuid currentgid PATH_PWD LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS ac_env_PKG_CONFIG_set=${PKG_CONFIG+set} ac_env_PKG_CONFIG_value=$PKG_CONFIG ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set} ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG ac_env_DBUS_CFLAGS_set=${DBUS_CFLAGS+set} ac_env_DBUS_CFLAGS_value=$DBUS_CFLAGS ac_cv_env_DBUS_CFLAGS_set=${DBUS_CFLAGS+set} ac_cv_env_DBUS_CFLAGS_value=$DBUS_CFLAGS ac_env_DBUS_LIBS_set=${DBUS_LIBS+set} ac_env_DBUS_LIBS_value=$DBUS_LIBS ac_cv_env_DBUS_LIBS_set=${DBUS_LIBS+set} ac_cv_env_DBUS_LIBS_value=$DBUS_LIBS ac_env_XML_CFLAGS_set=${XML_CFLAGS+set} ac_env_XML_CFLAGS_value=$XML_CFLAGS ac_cv_env_XML_CFLAGS_set=${XML_CFLAGS+set} ac_cv_env_XML_CFLAGS_value=$XML_CFLAGS ac_env_XML_LIBS_set=${XML_LIBS+set} ac_env_XML_LIBS_value=$XML_LIBS ac_cv_env_XML_LIBS_set=${XML_LIBS+set} ac_cv_env_XML_LIBS_value=$XML_LIBS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures oddjob 0.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of oddjob 0.16:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-sample Build and install a sample service. --disable-largefile omit support for large files --enable-xml-docs Reformat XML documentation. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-selinux-labels Apply SELinux labels to files created by helpers. --with-selinux-acls Recognize SELinux process attributes in oddjobd ACLs. --with-python Build Python bindings for liboddjob. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config DBUS_LIBS linker flags for DBUS, overriding pkg-config XML_CFLAGS C compiler flags for XML, overriding pkg-config XML_LIBS linker flags for XML, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF oddjob configure 0.16 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by oddjob $as_me 0.16, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu PACKAGE_NAME_CAPS=`echo $PACKAGE_NAME | tr 'a-z' 'A-Z'` cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME_CAPS "$PACKAGE_NAME_CAPS" _ACEOF am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='oddjob' VERSION='0.16' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi; echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # 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' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | 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 ;; 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*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 3728 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err