~jamesodhunt/ubuntu/vivid/upstart/bug-1447756

1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
1
# Process this file with autoconf to produce a configure script.
2
767 by Scott James Remnant
* configure.ac: Bump Autoconf dependency to 2.61 to match libnih
3
AC_PREREQ(2.61)
1182.135.138 by Dimitri John Ledkov
Revert changelog changes
4
AC_INIT([upstart], [1.13.2], [upstart-devel@lists.ubuntu.com])
1182.135.74 by James Hunt
* NEWS: Begin new release.
5
NIH_COPYRIGHT([[Copyright © 2006-2014 Canonical Ltd., 2011 Scott James Remnant]])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
6
AC_CONFIG_SRCDIR([init/main.c])
7
AC_CONFIG_MACRO_DIR([m4])
8
256 by Scott James Remnant
* configure.ac: Expand AC_GNU_SOURCE so we get _GNU_SOURCE and so
9
AC_GNU_SOURCE
10
1453 by Dmitrijs Ledkovs
* Upload to saucy.
11
AM_INIT_AUTOMAKE([1.10 gnu nostdinc check-news color-tests silent-rules serial-tests])
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
12
AM_SILENT_RULES([yes])
13
AM_MAINTAINER_MODE([enable])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
14
1034 by Scott James Remnant
* configure.ac: Matching libnih, we now mandate libtool 2.2.x
15
LT_PREREQ(2.2.4)
16
LT_INIT
17
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
18
AM_GNU_GETTEXT_VERSION([0.17])
1182.114.4 by James Hunt
* Makefile.am: Remove intl directory.
19
AM_GNU_GETTEXT([external])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
20
21
# Checks for programs.
22
AC_PROG_CC
1182.135.32 by Dmitrijs Ledkovs
Introduce TAP output, mark failing tests as TODO, unset environment
23
AC_PROG_CC_C99
24
AM_PROG_CC_C_O
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
25
PKG_PROG_PKG_CONFIG([0.22])
26
27
AC_PATH_PROG([NIH_DBUS_TOOL], [nih-dbus-tool])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
28
29
# Checks for libraries.
1182.1.55 by Scott James Remnant
* configure.ac: Replace the --with-local-libnih code with an
30
NIH_WITH_LOCAL_LIBNIH
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
31
1182.1.56 by Scott James Remnant
* configure.ac: Bump the requirement of libnih to 1.0.2 after
32
PKG_CHECK_MODULES([NIH], [libnih >= 1.0.2])
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
33
PKG_CHECK_MODULES([NIH_DBUS], [libnih-dbus >= 1.0.0])
34
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.2.16])
1182.127.7 by James Hunt
* Sync with lp:upstart.
35
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.36], [have_gio=yes], [have_gio=no])
1182.11.1 by Scott James Remnant
Import the udev bridge from Ubuntu
36
PKG_CHECK_MODULES([UDEV], [libudev >= 146], [have_udev=yes], [have_udev=no])
1182.127.1 by Stéphane Graber
Super early implementation of an upstart-dconf-bridge.
37
PKG_CHECK_MODULES([DCONF], [dconf >= 0.14], [have_dconf=yes], [have_dconf=no])
1182.125.1 by James Hunt
* configure.ac:
38
1182.135.14 by Dmitrijs Ledkovs
Add options to disable local & socket bridges.
39
AC_CHECK_HEADER([sys/epoll.h], [have_epoll=yes], [have_epoll=no])
40
1182.125.1 by James Hunt
* configure.ac:
41
AC_ARG_ENABLE([udev-bridge],
42
	AS_HELP_STRING([--disable-udev-bridge],
43
		[Disable building of upstart-udev-bridge even if required dependencies available]),
44
		[udev_bridge=no], [udev_bridge=yes])
45
46
AM_CONDITIONAL([ENABLE_UDEV_BRIDGE], [test "$have_udev" = yes && test "$udev_bridge" = yes])
1182.127.11 by James Hunt
* {configure.ac,Makefile.am}: Allow upstart-dconf-bridge to be disabled
47
1182.135.14 by Dmitrijs Ledkovs
Add options to disable local & socket bridges.
48
AC_ARG_ENABLE([socket-bridge],
49
	AS_HELP_STRING([--disable-socket-bridge],
50
		[Disable building of upstart-socket-bridge even if required dependencies available]),
51
		[socket_bridge=no], [socket_bridge=yes])
52
53
AM_CONDITIONAL([ENABLE_SOCKET_BRIDGE], [test "$have_epoll" = yes && test "$socket_bridge" = yes])
54
55
AC_ARG_ENABLE([local-bridge],
56
	AS_HELP_STRING([--disable-local-bridge],
57
		[Disable building of upstart-local-bridge even if required dependencies available]),
58
		[local_bridge=no], [local_bridge=yes])
59
60
AM_CONDITIONAL([ENABLE_LOCAL_BRIDGE], [test "$local_bridge" = yes])
61
62
1182.127.11 by James Hunt
* {configure.ac,Makefile.am}: Allow upstart-dconf-bridge to be disabled
63
AC_ARG_ENABLE([dconf-bridge],
64
	AS_HELP_STRING([--disable-dconf-bridge],
65
		[Disable building of upstart-dconf-bridge even if required dependencies available]),
66
		[dconf_bridge=no], [dconf_bridge=yes])
67
68
AM_CONDITIONAL([ENABLE_DCONF_BRIDGE], [test "$have_dconf" = yes &&
69
                                test "$have_gio" = yes &&
70
				test "$dconf_bridge" = yes])
1182.11.1 by Scott James Remnant
Import the udev bridge from Ubuntu
71
1182.135.34 by Dmitrijs Ledkovs
Merge lp:~jamesodhunt/upstart/cleanup-test-xdg-dirs
72
#AC_CHECK_DECL([TEST_PLAN],[
73
#have_tap=yes
74
#AC_REQUIRE_AUX_FILE([tap-driver.sh])
75
#AC_DEFINE([NIH_TAP_OUTPUT], [1], [Do not abort on test failure])
76
#],[have_tap=no],[[#include <nih/test.h>]])
77
have_tap=no
1182.135.32 by Dmitrijs Ledkovs
Introduce TAP output, mark failing tests as TODO, unset environment
78
AM_CONDITIONAL([ENABLE_TAP_OUTPUT], [test "$have_tap" = "yes"])
79
1182.193.1 by James Hunt
* Disable cgmanager integration.
80
AC_ARG_ENABLE([cgroups],
81
	AS_HELP_STRING([--disable-cgroups],
82
		[Disable support for Linux cgroups]),
83
		[enable_cgroups=no], [enable_cgroups=yes])
84
PKG_CHECK_MODULES([CGMANAGER], [libcgmanager], [have_cgmanager=yes], [have_cgmanager=no])
85
AM_CONDITIONAL([ENABLE_CGROUPS], [test "$enable_cgroups" = yes && test "$have_cgmanager" = yes])
86
87
if test "$enable_cgroups" = yes && test "$have_cgmanager" = yes; then
88
	AC_DEFINE([ENABLE_CGROUPS], [1], [Build with Cgroup CGManager support])
89
fi
1182.135.32 by Dmitrijs Ledkovs
Introduce TAP output, mark failing tests as TODO, unset environment
90
1182.40.17 by James Hunt
Hopefully, we've now resolved any 64-bit type headaches.
91
# Reasons for requiring this library version:
92
#
93
# 1) RFC 4627, the JSON "memo" (it is *NOT* a standard!) helpfully fails
94
#    to specify the maximum size of an integer type. And yet, JSON is
95
#    supposedly a subset of ECMA-262, which specifies a Number type to
96
#    be 64-bits.
97
#
98
#    The loose JSON "memo" might expalain why older versions of JSON-C encode
99
#    a JSON Number in sizoef(int) bytes which is only 32-bits on 32-bit
100
#    systems. This is not acceptable for Upstart which needs to be able
101
#    to encode 'size_t' and 'unsigned long' types which can be larger
102
#    than 'int'.
103
#
104
# 2) New json_tokener_parse_verbose() function required to detect invalid
105
#    JSON (!)
106
#
1182.116.1 by Colin Watson
* configure.ac: Use json-c rather than json if available.
107
PKG_CHECK_MODULES([JSON], [json-c], [],
108
	[PKG_CHECK_MODULES([JSON], [json >= 0.10])])
1182.40.3 by James Hunt
Tue Jun 19 17:40:37 BST 2012
109
1182.107.4 by James Hunt
* configure.ac: Add --disable-abi-check option to allow ABI check to be
110
AC_ARG_ENABLE([abi-check],
111
	AS_HELP_STRING([--disable-abi-check],
112
		[Disable libupstart ABI check performed if abi-compliance-checker available]),
113
		[abi_check=no], [abi_check=yes])
114
115
if test x$abi_check = xyes; then
116
	AC_CHECK_PROGS([ABI_COMPLIANCE_CHECKER],[abi-compliance-checker])
117
	AC_SUBST([ABI_COMPLIANCE_CHECKER])
118
fi
119
1182.150.2 by Dmitrijs Ledkovs
quote shell variables
120
AM_CONDITIONAL([HAVE_ABI_CHECKER], [test ! -z "$ABI_COMPLIANCE_CHECKER" && test -e "$srcdir"/lib/abi/"$host_cpu"-"$host_os"/*.abi])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
121
0.8.53 by Steve Langasek
Merge new upstream release 1.10
122
AC_ARG_ENABLE(selinux,
123
	      AS_HELP_STRING([--enable-selinux], [enable SELinux support]),
124
	      [], [enable_selinux=no])
125
126
if test "x$enable_selinux" = "xyes" ; then
127
	PKG_CHECK_MODULES(SELINUX, [libselinux])
128
	AC_DEFINE(HAVE_SELINUX, 1, [Define if we have SELinux])
129
fi
130
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
131
# Checks for header files.
1182.59.5 by Stéphane Graber
Skip prctl on systems that don't have it. Also do an explicit define of PR_SET_CHILD_SUBREAPER for systems with older headers. In the case where the kernel doesn't support it, child-subreaper-failed will simply be emitted.
132
AC_CHECK_HEADERS([valgrind/valgrind.h, sys/prctl.h])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
133
134
# Checks for typedefs, structures, and compiler characteristics.
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
135
NIH_C_THREAD
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
136
1182.40.45 by James Hunt
* configure.ac: Replaced AC_CHECK_SIZEOF() calls as still required for
137
AC_CHECK_SIZEOF(int)
138
AC_CHECK_SIZEOF(uid_t)
139
AC_CHECK_SIZEOF(pid_t)
140
AC_CHECK_SIZEOF(time_t)
141
AC_CHECK_SIZEOF(mode_t)
142
AC_CHECK_SIZEOF(size_t)
143
AC_CHECK_SIZEOF(ssize_t)
144
1182.40.17 by James Hunt
Hopefully, we've now resolved any 64-bit type headaches.
145
# Unlikely to hit this limit for a while, but it pays to be safe.
146
for type in int uid_t pid_t time_t mode_t size_t ssize_t
147
do
148
	eval value="\$ac_cv_sizeof_${type}"
149
	test "$value" -gt 8 && AC_MSG_ERROR([type $type is $value bytes, larger than JSON-C can represent])
150
done
151
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
152
# Checks for library functions.
153
154
# Other checks
842 by Scott James Remnant
* configure.ac: Compare the evaluated $sbindir against the common
155
AC_MSG_CHECKING([whether to include sbindir in PATH])
156
eval upstart_sbindir=\"$sbindir\"
157
case $upstart_sbindir in
1182.93.1 by James Hunt
* configure.ac: Only add sbin to path if exec_prefix specified
158
    /sbin|NONE/sbin|//sbin|/usr/sbin|/usr/local/sbin)
842 by Scott James Remnant
* configure.ac: Compare the evaluated $sbindir against the common
159
    	AC_MSG_RESULT([no])
160
	;;
161
    *)
162
    	AC_MSG_RESULT([yes])
163
	AC_DEFINE_UNQUOTED([EXTRA_PATH], ["$upstart_sbindir"],
164
			   [Directory to append to path.])
165
	;;
166
esac
167
1182.1.24 by Scott James Remnant
libnih is now released as its own project, so rather than expecting
168
NIH_COMPILER_WARNINGS
169
NIH_COMPILER_OPTIMISATIONS
170
NIH_COMPILER_COVERAGE
171
172
NIH_LINKER_OPTIMISATIONS
173
174
1182.56.109 by Dmitrijs Ledkovs
Remove remaining piece of non-external gettext. Fixing FTBFS.
175
AC_CONFIG_FILES([ Makefile
1185.1.13 by Steve Langasek
Import upstream version 1.3
176
		  dbus/Makefile init/Makefile util/Makefile conf/Makefile
1182.14.48 by James Hunt
Merge of lp:~jamesodhunt/upstart/upstream-udev+socket-bridges.
177
		  extra/Makefile doc/Makefile contrib/Makefile po/Makefile.in
1182.107.1 by James Hunt
* Added libupstart library, built from auto-generated
178
		  scripts/Makefile scripts/data/Makefile
1182.56.110 by James Hunt
* Perform 2-pass generation of libupstart.pc to ensure library version
179
		  test/Makefile lib/Makefile lib/libupstart.pc.in ])
1 by Scott James Remnant
* ChangeLog: Initial project infrastructure created.
180
AC_CONFIG_HEADERS([config.h])
181
AC_OUTPUT