- 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")
- AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
- AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
- AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
- AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
+ 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")
+ AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
+ AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
+ AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
+ AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
+ fi