chiark / gitweb /
Remove .h files from _SOURCES
[elogind.git] / configure.ac
index f4e10367e01425f683075b0687a538c00576d3ce..c37ab0c9177791923d9c33acb4ff657162fd749b 100644 (file)
@@ -49,6 +49,8 @@ AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library no
 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
 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])
 PKG_CHECK_MODULES(UDEV, [ libudev ])
 AC_SUBST(UDEV_CFLAGS)
 AC_SUBST(UDEV_LIBS)
@@ -85,10 +87,10 @@ PKG_CHECK_MODULES( CGROUP, [ libcgroup >= 0.35 ], [],
 AC_SUBST(CGROUP_CFLAGS)
 AC_SUBST(CGROUP_LIBS)
 
-AM_PROG_VALAC()
+AM_PROG_VALAC([0.7])
 AC_SUBST(VAPIDIR)
 
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, or none]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, or none]))
 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)])
@@ -97,6 +99,7 @@ if test "z$with_distro" = "z"; then
                 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")
         fi
         if test "z$with_distro" = "z"; then
                 with_distro=`uname -s`
@@ -123,7 +126,7 @@ case $with_distro in
                 SYSTEM_SYSVINIT_PATH=/etc/init.d
                 SYSTEM_SYSVRCND_PATH=/etc
                 special_dbus_service=dbus.service
-                special_syslog_service=sysklogd.service
+                special_syslog_service=rsyslog.service
                 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian/Ubuntu])
                 ;;
         arch)
@@ -133,6 +136,13 @@ case $with_distro in
                 special_syslog_service=syslog-ng.service
                 AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
                 ;;
+        gentoo)
+                SYSTEM_SYSVINIT_PATH=/etc/init.d
+                SYSTEM_SYSVRCND_PATH=/etc
+                special_dbus_service=dbus.service
+                special_syslog_service=syslog-ng.service
+                AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
+                ;;
         none)
                 SYSTEM_SYSVINIT_PATH=/fix/the/configure/script
                 SYSTEM_SYSVRCND_PATH=/fix/the/configure/script
@@ -151,6 +161,7 @@ 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)
 
 AC_DEFINE_UNQUOTED(SPECIAL_DBUS_SERVICE, ["$special_dbus_service"], [D-Bus service name])
 AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$special_syslog_service"], [syslog service name])