clean up device backend detection, should never error now

SVN revision: 48936
This commit is contained in:
Mike Blumenkrantz 2010-05-17 04:22:49 +00:00
parent bfbd5f09d2
commit b8b2d32962
1 changed files with 6 additions and 16 deletions

View File

@ -234,34 +234,24 @@ if test "[${e_cv_enable_files}]" = yes; then
fi
AC_MSG_RESULT([$e_cv_enable_files])
device_backend="ehal"
AC_MSG_CHECKING([which device backend to use])
AC_ARG_ENABLE([device-hal],
AS_HELP_STRING([--enable-device-hal],[enable hal device backend @<:@default=enabled@:>@]),
[e_cv_want_device_hal=$enableval]
AC_CACHE_VAL([e_cv_want_device_hal], [e_cv_want_device_hal=yes]))
if test "x$e_cv_want_device_hal" != "xno";then
PKG_CHECK_EXISTS([ehal], e_cv_want_device_hal=yes,e_cv_want_device_hal=no)
else
e_cv_want_device_hal=no
fi
AC_ARG_ENABLE([device-udev],
AS_HELP_STRING([--enable-device-udev],[enable udev support @<:@default=disabled@:>@]),
[e_cv_want_device_udev=$enableval],
AC_CACHE_VAL([e_cv_want_device_udev], [e_cv_want_device_udev=no]))
if test "x$e_cv_want_device_udev" = "xyes";then
PKG_CHECK_EXISTS([eeze_udev], e_cv_want_device_udev=yes,e_cv_want_device_udev=no)
device_backend=eeze_udev
AC_DEFINE_UNQUOTED([HAVE_EEZE_UDEV],[1],[enable udev support])
else
e_cv_want_device_udev=no
device_backend=ehal
fi
AS_IF(
[test "x$e_cv_want_device_hal" = "xyes" && test "x$e_cv_want_device_udev" != "xyes"],
[device_backend="ehal"],
[test "x$e_cv_want_device_udev" = "xyes"],
[device_backend="eeze_udev"]
AC_DEFINE_UNQUOTED([HAVE_EEZE_UDEV],[1],[enable udev support]),
AC_MSG_ERROR(No usable device backend (eeze_udev/ehal) found, or attempted to disable hal support!)
)
AC_MSG_RESULT($device_backend)
# doxygen program for documentation building