chiark / gitweb /
build-sys: make path of loadkeys/setfont configurable in configure
[elogind.git] / configure.ac
index 393c7ce88efa21acb0835c77a1e2ad8c57b7fc8a..2f457fc8cf8105f3f55173e74883bc9dd8d313b3 100644 (file)
@@ -232,6 +232,25 @@ if test "x${have_ima}" != xno ; then
         AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
 fi
 
+# ------------------------------------------------------------------------------
+have_chkconfig=yes
+AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
+                [case "${enableval}" in
+                        yes) have_chkconfig=yes ;;
+                        no) have_chkconfig=no ;;
+                        *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
+                esac],
+                [AC_PATH_PROG(CHKCONFIG, chkconfig)
+                if test -z "$CHKCONFIG"; then
+                        have_chkconfig=no
+                else
+                        have_chkconfig=yes
+                fi])
+
+if test "x${have_chkconfig}" != xno ; then
+        AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
+fi
+
 # ------------------------------------------------------------------------------
 have_selinux=no
 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
@@ -588,6 +607,44 @@ if test "x$enable_coredump" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
 
+# ------------------------------------------------------------------------------
+AC_ARG_WITH(rc-local-script-path-start,
+        AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
+                [Path to /etc/rc.local]),
+        [RC_LOCAL_SCRIPT_PATH_START="$withval"],
+        [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
+
+AC_ARG_WITH(rc-local-script-path-stop,
+        AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
+                [Path to /sbin/halt.local]),
+        [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
+        [RC_LOCAL_SCRIPT_PATH_STOP="/sbin/halt.local"])
+
+AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
+AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /sbin/halt.local script])
+
+AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
+AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
+
+# ------------------------------------------------------------------------------
+AC_ARG_WITH(kbd-loadkeys,
+        AS_HELP_STRING([--with-kbd-loadkeys=PATH],
+                [Path to loadkeys]),
+        [KBD_LOADKEYS="$withval"],
+        [KBD_LOADKEYS="/usr/bin/loadkeys"])
+
+AC_ARG_WITH(kbd-setfont,
+        AS_HELP_STRING([--with-kbd-setfont=PATH],
+                [Path to setfont]),
+        [KBD_SETFONT="$withval"],
+        [KBD_SETFONT="/usr/bin/setfont"])
+
+AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
+AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
+
+AC_SUBST(KBD_LOADKEYS)
+AC_SUBST(KBD_SETFONT)
+
 # ------------------------------------------------------------------------------
 AC_ARG_WITH(firmware-path,
        AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
@@ -640,7 +697,7 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
 
 # ------------------------------------------------------------------------------
 
-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, mandriva, mageia, angstrom or other]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, slackware, altlinux, mandriva, mageia, angstrom 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)])
@@ -676,11 +733,6 @@ case $with_distro in
                 AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
                 M4_DEFINES=-DTARGET_DEBIAN=1
                 ;;
-        ubuntu)
-                SYSTEM_SYSVRCND_PATH=/etc
-                AC_DEFINE(TARGET_UBUNTU, [], [Target is Ubuntu])
-                M4_DEFINES=-DTARGET_UBUNTU=1
-                ;;
         arch)
                 SYSTEM_SYSVINIT_PATH=
                 SYSTEM_SYSVRCND_PATH=
@@ -765,8 +817,6 @@ AC_ARG_WITH([tty-gid],
 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_UBUNTU, test x"$with_distro" = xubuntu)
-AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
 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)
@@ -861,6 +911,7 @@ AC_MSG_RESULT([
         GCRYPT:                  ${have_gcrypt}
         QRENCODE:                ${have_qrencode}
         MICROHTTPD:              ${have_microhttpd}
+        CHKCONFIG:               ${have_chkconfig}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
         readahead:               ${have_readahead}
@@ -896,6 +947,8 @@ AC_MSG_RESULT([
         Split /usr:              ${enable_split_usr}
         man pages:               ${have_manpages}
         gtk-doc:                 ${enable_gtk_doc}
+        Extra start script:      ${RC_LOCAL_SCRIPT_PATH_START}
+        Extra stop script:       ${RC_LOCAL_SCRIPT_PATH_STOP}
 
         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
         CPPLAGS:                 ${OUR_CPPFLAGS} ${CPPFLAGS}