AC_PREREQ(2.63)
-AC_INIT([systemd],[11],[systemd-devel@lists.freedesktop.org])
+AC_INIT([systemd],[24],[systemd-devel@lists.freedesktop.org])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
+AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
+ test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
+ [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
AM_SILENT_RULES([yes])
AC_PROG_GCC_TRADITIONAL
AC_USE_SYSTEM_EXTENSIONS
+AC_CHECK_TOOL(OBJCOPY, objcopy)
+AC_CHECK_TOOL(STRINGS, strings)
+
CC_CHECK_CFLAGS_APPEND([ \
-pipe \
-Wall \
have_selinux=no
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
if test "x$enable_selinux" != "xno"; then
- # not using PKG_CHECK_MODULES as for some reason libselinux didn't
- # install any pkg-config modules here
- AC_SEARCH_LIBS([getcon], [selinux],
- [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELINUX is available]) have_selinux=yes],
- have_selinux=no)
+ PKG_CHECK_MODULES(SELINUX, [ libselinux ],
+ [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
AC_SUBST(SELINUX_CFLAGS)
AC_SUBST(SELINUX_LIBS)
if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
- AC_MSG_ERROR([*** selinux support requested but libraries not found])
+ AC_MSG_ERROR([*** SELinux support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
AC_SUBST(LIBCRYPTSETUP_CFLAGS)
AC_SUBST(LIBCRYPTSETUP_LIBS)
if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
- AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
+ AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
have_gtk=no
AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
if test "x$enable_gtk" != "xno"; then
- PKG_CHECK_MODULES(GTK, [ gtk+-2.0 gio-unix-2.0 ],
+ PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 ],
[AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then
- AC_MSG_ERROR([*** gtk support requested but libraries not found])
+ AC_MSG_ERROR([*** gtk support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"])
if test "$have_gtk" = "yes"; then
- PKG_CHECK_MODULES(DBUSGLIB, [ dbus-glib-1 ])
- AC_SUBST(DBUSGLIB_CFLAGS)
- AC_SUBST(DBUSGLIB_LIBS)
-
PKG_CHECK_MODULES(LIBNOTIFY, [ libnotify ])
+ PKG_CHECK_EXISTS([ libnotify >= 0.7.0 ], [ libnotify07=yes ])
+
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_SUBST(LIBNOTIFY_LIBS)
fi
+AM_CONDITIONAL(LIBNOTIFY07, [ test "$libnotify07" = "yes" ])
-AM_PROG_VALAC([0.9])
+AM_PROG_VALAC([0.10])
AC_SUBST(VAPIDIR)
AM_CONDITIONAL(HAVE_VALAC, test x"$VALAC" != x)
AC_PATH_PROG([M4], [m4])
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware or other]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux or other]))
if test "z$with_distro" = "z"; then
if test "$cross_compiling" = yes; then
AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
else
- AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
- AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
+ test -f "/etc/redhat-release" && with_distro="fedora"
+ test -f "/etc/SuSE-release" && with_distro="suse"
+ test -f "/etc/debian_version" && with_distro="debian"
+ test -f "/etc/arch-release" && with_distro="arch"
+ test -f "/etc/gentoo-release" && with_distro="gentoo"
+ test -f "/etc/slackware-version" && with_distro="slackware"
+ test -f "/etc/frugalware-release" && with_distro="frugalware"
+ test -f "/etc/altlinux-release" && with_distro="altlinux"
+ test -f "/etc/mandriva-release" && with_distro="mandriva"
if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
with_distro="ubuntu"
fi
- AC_CHECK_FILE(/etc/arch-release,with_distro="arch")
- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
- AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
fi
if test "z$with_distro" = "z"; then
with_distro=`uname -s`
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
-# Default generic names
-SPECIAL_SYSLOG_SERVICE=syslog.service
-
# Location of the init scripts as mandated by LSB
SYSTEM_SYSVINIT_PATH=/etc/init.d
+SYSTEM_SYSVRCND_PATH=/etc/rc.d
M4_DISTRO_FLAG=
case $with_distro in
fedora)
SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
- SYSTEM_SYSVRCND_PATH=/etc/rc.d
-
- # A little background why we define this special unit
- # names here in configure.ac: SysV services currently
- # cannot have aliases. As long as syslog is started
- # via a SysV init script we hence define this name to
- # the actual SysV name here. Later on when SysV init
- # scripts are not used anymore it is advisable to use
- # the generic name instead and use symlinks in the
- # unit directories to point to the right native unit
- # file.
-
- SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
M4_DISTRO_FLAG=-DTARGET_FEDORA=1
+ have_plymouth=true
;;
suse)
SYSTEM_SYSVRCND_PATH=/etc/init.d
AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
M4_DISTRO_FLAG=-DTARGET_SUSE=1
+ have_plymouth=true
;;
debian)
SYSTEM_SYSVRCND_PATH=/etc
- SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
M4_DISTRO_FLAG=-DTARGET_DEBIAN=1
;;
ubuntu)
SYSTEM_SYSVRCND_PATH=/etc
- SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
M4_DISTRO_FLAG=-DTARGET_UBUNTU=1
;;
arch)
SYSTEM_SYSVINIT_PATH=/etc/rc.d
SYSTEM_SYSVRCND_PATH=/etc
- SPECIAL_SYSLOG_SERVICE=syslog-ng.service
AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
M4_DISTRO_FLAG=-DTARGET_ARCH=1
;;
gentoo)
SYSTEM_SYSVINIT_PATH=
SYSTEM_SYSVRCND_PATH=
- SPECIAL_SYSLOG_SERVICE=syslog-ng.service
AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
M4_DISTRO_FLAG=-DTARGET_GENTOO=1
;;
slackware)
SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
- SYSTEM_SYSVRCND_PATH=/etc/rc.d
AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
M4_DISTRO_FLAG=-DTARGET_SLACKWARE=1
;;
+ frugalware)
+ SYSTEM_SYSVINIT_PATH=/etc/rc.d
+ AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
+ M4_DISTRO_FLAG=-DTARGET_FRUGALWARE=1
+ ;;
+ altlinux)
+ SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
+ AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
+ M4_DISTRO_FLAG=-DTARGET_ALTLINUX=1
+ have_plymouth=true
+ ;;
+ mandriva)
+ SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
+ AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
+ M4_DISTRO_FLAG=-DTARGET_MANDRIVA=1
+ have_plymouth=true
+ ;;
other)
- AS_IF([test "x$with_syslog_service" = "x"],
- [AC_MSG_ERROR([With --distro=other, you must pass --with-syslog-service= to configure])])
;;
*)
AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, SysV init scripts could not be found! (patches welcome); you can specify --with-distro=other to skip this check])
[SYSTEM_SYSVRCND_PATH="$withval"],
[])
-AC_ARG_WITH([syslog-service],
- [AS_HELP_STRING([--with-syslog-service=UNIT],
- [Specify the name of the special syslog service @<:@default=based on distro@:>@])],
- [SPECIAL_SYSLOG_SERVICE="$withval"],
- [])
-
AC_SUBST(SYSTEM_SYSVINIT_PATH)
AC_SUBST(SYSTEM_SYSVRCND_PATH)
-AC_SUBST(SPECIAL_SYSLOG_SERVICE)
AC_SUBST(M4_DISTRO_FLAG)
if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
SYSTEM_SYSV_COMPAT="no"
fi
+AC_ARG_WITH([tty-gid],
+ [AS_HELP_STRING([--with-tty-gid=GID],
+ [Specify the numeric GID of the 'tty' group])],
+ [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
+ [])
+
AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
+AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
+AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
+AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
-AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$SPECIAL_SYSLOG_SERVICE"], [Syslog service name])
+AM_CONDITIONAL(HAVE_PLYMOUTH, test -n "$have_plymouth")
+AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
SysV compatibility: ${SYSTEM_SYSV_COMPAT}
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
- Syslog service: ${SPECIAL_SYSLOG_SERVICE}
Gtk: ${have_gtk}
libcryptsetup: ${have_libcryptsetup}
tcpwrap: ${have_tcpwrap}