configure.ac revision 68ce1b7f2d70db4a248b62e602086d7420a99e3b
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# This file is part of systemd.
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# Copyright 2010 Lennart Poettering
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# systemd is free software; you can redistribute it and/or modify it
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# under the terms of the GNU General Public License as published by
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# the Free Software Foundation; either version 2 of the License, or
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# (at your option) any later version.
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# systemd is distributed in the hope that it will be useful, but
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# WITHOUT ANY WARRANTY; without even the implied warranty of
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# General Public License for more details.
5430f7f2bc7330f3088b894166bf3524a067e3d8Lennart Poettering# You should have received a copy of the GNU General Public License
340d89e06e503836de9c124d650845f4889f8c2cLennart Poettering# along with systemd; If not, see <http://www.gnu.org/licenses/>.
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAC_PREREQ(2.63)
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAC_INIT([systemd],[11],[systemd-devel@lists.freedesktop.org])
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAC_CONFIG_SRCDIR([src/main.c])
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAC_CONFIG_MACRO_DIR([m4])
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAC_CONFIG_HEADERS([config.h])
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects dist-bzip2])
340d89e06e503836de9c124d650845f4889f8c2cLennart PoetteringAC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/wiki/Software/systemd])
AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
[libaudit.h],
AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, slackware or other]))
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)])
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")
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")
SPECIAL_SYSLOG_SERVICE=syslog.service
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
# names here in configure.ac: SysV services currently
SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
SYSTEM_SYSVRCND_PATH=/etc/init.d
AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian/Ubuntu])
SYSTEM_SYSVINIT_PATH=/etc/rc.d
SPECIAL_SYSLOG_SERVICE=syslog-ng.service
SPECIAL_SYSLOG_SERVICE=syslog-ng.service
SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
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])
[Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
[with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
[with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
[with_udevrulesdir=`pkg-config --variable=udevdir udev`/rules.d])