=== modified file 'configure.ac' --- configure.ac 2008-11-11 12:27:08 +0000 +++ configure.ac 2008-11-11 12:28:01 +0000 @@ -117,15 +117,23 @@ AC_SUBST(APP_LDFLAGS) AC_SUBST(WARN_CFLAGS) -dnl Get distro name from /etc/issue -if test -r /etc/issue; then - AC_MSG_CHECKING([distro name]) - DISTRO=`sed -e "s/.[0-9][0-9;]*[mJH]//g" < /etc/issue|tr "\n" " " | sed -e "s/(\\\\?\\\\\\\\.*//" -e "s/ */ /g" -e "s/^ //" -e "s/ $//"` - AC_MSG_RESULT("$DISTRO") - AC_SUBST(DISTRO) - AC_DEFINE(HAVE_DISTRO, 1, [1 if DISTRO is defined]) - have_distro=yes +AC_ARG_WITH(distro, + AC_HELP_STRING([--with-distro=distro], + [Provide distribution name, by default will try to grep /etc/issue])) + +if test "$with_distro" != "no"; then + DISTRO=$with_distro +else + dnl Get distro name from /etc/issue + if test -r /etc/issue; then + AC_MSG_CHECKING([distro name]) + DISTRO=`sed -e "s/.[0-9][0-9;]*[mJH]//g" < /etc/issue|tr "\n" " " | sed -e "s/(\\\\?\\\\\\\\.*//" -e "s/ */ /g" -e "s/^ //" -e "s/ $//"` + AC_MSG_RESULT("$DISTRO") + fi fi +AC_SUBST(DISTRO) +AC_DEFINE(HAVE_DISTRO, 1, [1 if DISTRO is defined]) +have_distro=yes AM_CONDITIONAL(HAVE_DISTRO, test x$have_distro = xyes) dnl Check for system dependent features.