fi
+AC_ARG_ENABLE(dummy,
+ AS_HELP_STRING([--enable-dummy], [Enable building the dummy port driver]),
+ [build_dummy=$enableval], [build_dummy=no])
+
AC_ARG_ENABLE(parport,
AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
[build_parport=$enableval], [build_parport=no])
-AC_ARG_ENABLE(dummy,
- AS_HELP_STRING([--enable-dummy], [Enable building the dummy port driver]),
- [build_dummy=$enableval], [build_dummy=no])
-
-case "${host_cpu}" in
- i?86|x86*)
- AC_ARG_ENABLE(parport_ppdev,
- AS_HELP_STRING([--enable-parport_ppdev], [Enable use of ppdev (/dev/parportN) for parport]),
- [parport_use_ppdev=$enableval], [parport_use_ppdev=no])
- ;;
- *)
- parport_use_ppdev=yes
- ;;
-esac
+AC_ARG_ENABLE(parport_ppdev,
+ AS_HELP_STRING([--disable-parport-ppdev],
+ [Disable use of ppdev (/dev/parportN) for parport (for x86 only)]),
+ [parport_use_ppdev=$enableval], [parport_use_ppdev=])
+AC_ARG_ENABLE(parport_giveio,
+ AS_HELP_STRING([--enable-parport-giveio],
+ [Enable use of giveio for parport (for CygWin only)]),
+ [parport_use_giveio=$enableval], [parport_use_giveio=])
+
AC_ARG_ENABLE(ft2232_libftdi,
AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver, opensource alternate of FTD2XX]),
[build_ft2232_libftdi=$enableval], [build_ft2232_libftdi=no])
AC_MSG_RESULT([yes])
fi
+case "${host_cpu}" in
+ i?86|x86*)
+ ;;
+ *)
+ if test x$parport_use_ppdev = xno; then
+ AC_MSG_WARN([--disable-parport-ppdev is not supported by the host CPU])
+ fi
+ parport_use_ppdev=yes
+ ;;
+esac
case $host in
*-cygwin*)
is_win32=yes
- AC_ARG_ENABLE(parport_giveio,
- AS_HELP_STRING([--enable-parport_giveio], [Enable use of giveio for parport instead of ioperm]),
- [parport_use_giveio=$enableval], [parport_use_giveio=no])
-
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),[is_mingw=yes],[is_mingw=no])
if test $is_mingw = yes; then
AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
+ if test x$parport_use_giveio = xno; then
+ AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
+ fi
parport_use_giveio=yes
is_cygwin=no
else
is_mingw=yes
is_win32=yes
+ if test x$parport_use_giveio = xno; then
+ AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
+ fi
parport_use_giveio=yes
AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
*darwin*)
is_darwin=yes
+ if test x$parport_use_giveio = xyes; then
+ AC_MSG_WARN([--enable-parport-giveio cannot be used by Darwin hosts])
+ fi
parport_use_giveio=no
AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
AC_DEFINE(IS_DARWIN, 1, [1 if building for Darwin.])
;;
*)
- parport_use_giveio=no
+ if test x$parport_use_giveio = xyes; then
+ AC_MSG_WARN([--enable-parport-giveio cannot be used by ]$host[ hosts])
+ fi
+ parport_use_giveio=no
AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
AC_DEFINE(BUILD_AT91RM9200, 0, [0 if you don't want at91rm9200.])
fi
-if test $parport_use_ppdev = yes; then
+if test x$parport_use_ppdev = xyes; then
AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
else
AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
fi
-if test $parport_use_giveio = yes; then
+if test x$parport_use_giveio = xyes; then
AC_DEFINE(PARPORT_USE_GIVEIO, 1, [1 if you want parport to use giveio.])
else
AC_DEFINE(PARPORT_USE_GIVEIO, 0, [0 if you don't want parport to use giveio.])
AM_CONDITIONAL(RELEASE, test $build_release = yes)
AM_CONDITIONAL(PARPORT, test $build_parport = yes)
AM_CONDITIONAL(DUMMY, test $build_dummy = yes)
-AM_CONDITIONAL(GIVEIO, test $parport_use_giveio = yes)
+AM_CONDITIONAL(GIVEIO, test x$parport_use_giveio = xyes)
AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes)
AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes)