configure.ac revision 56cf987fe74270bde4e16c7ec9e0414a9030723b
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# This file is part of systemd.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# Copyright 2010 Lennart Poettering
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# systemd is free software; you can redistribute it and/or modify it
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# under the terms of the GNU General Public License as published by
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# the Free Software Foundation; either version 2 of the License, or
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# (at your option) any later version.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# systemd is distributed in the hope that it will be useful, but
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# WITHOUT ANY WARRANTY; without even the implied warranty of
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# General Public License for more details.
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# You should have received a copy of the GNU General Public License
671242f350d172e106580348e24bab66b0d7e6a5vboxsync# along with systemd; If not, see <http://www.gnu.org/licenses/>.
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_PREREQ(2.63)
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_INIT([systemd],[4],[systemd-devel@lists.freedesktop.org])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_CONFIG_SRCDIR([src/main.c])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_CONFIG_MACRO_DIR([m4])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_CONFIG_HEADERS([config.h])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects dist-bzip2])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/wiki/Software/systemd])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_CANONICAL_HOST
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAM_SILENT_RULES([yes])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_CHECK_PROG([STOW], [stow], [yes], [no])
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
671242f350d172e106580348e24bab66b0d7e6a5vboxsync AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
671242f350d172e106580348e24bab66b0d7e6a5vboxsync ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_PROG_MKDIR_P
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_PROG_LN_S
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_PROG_CC_C99
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAM_PROG_CC_C_O
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_PROG_GCC_TRADITIONAL
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncAC_USE_SYSTEM_EXTENSIONS
671242f350d172e106580348e24bab66b0d7e6a5vboxsyncCC_CHECK_CFLAGS_APPEND([ \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -Wno-inline \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -Wformat=2 \
671242f350d172e106580348e24bab66b0d7e6a5vboxsync -Wlogical-op \
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])
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@:>@])],
[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])