]> git.meshlink.io Git - catta/blobdiff - configure.ac
add init script for LFS
[catta] / configure.ac
index b6e44b3ea715c37383e4d36e9ca0949a2ef83c73..404f283201bcb9c1c5273a7a169529c4dbe3c8e4 100644 (file)
@@ -244,11 +244,12 @@ AC_TRY_COMPILE([#include <netinet/in.h>], [
 #
 # Detecting the linux distribution for specific things like init scripts.
 #
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd, slackware or none]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of lfs, debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd, slackware 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)])
     else
+        AC_CHECK_FILE(/etc/lfs-release,with_distro="lfs")
         AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
         AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
         AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
@@ -264,7 +265,7 @@ fi
 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
 
 case $with_distro in
-    debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
+    lfs|debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
      ;;
     netbsd)
      AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
@@ -277,6 +278,7 @@ case $with_distro in
      ;;
 esac
 
+AM_CONDITIONAL(TARGET_LFS, test x"$with_distro" = xlfs)
 AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
 AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
@@ -1063,6 +1065,7 @@ initscript/gentoo/Makefile
 initscript/archlinux/Makefile
 initscript/suse/Makefile
 initscript/fedora/Makefile
+initscript/lfs/Makefile
 initscript/mandriva/Makefile
 initscript/darwin/Makefile
 initscript/freebsd/Makefile