diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 55cad162..6aa1d2fb 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,7 @@ +2010-08-14 Mike Frysinger + + * configure.ac: Add autodetection of inpout32. + 2010-08-11 Mike Frysinger * src/tap/cable/ice100.c: Add version check and firmware upgrade information diff --git a/urjtag/configure.ac b/urjtag/configure.ac index 6f633588..390ec7bd 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -339,18 +339,25 @@ dnl http://www.highrez.co.uk/Downloads/InpOut32/default.htm AC_ARG_WITH([inpout32], [AS_HELP_STRING([--with-inpout32], [use InpOut32.dll for parallel port access on Windows])], - [], [with_inpout32=no]) + [], [with_inpout32=auto]) case $host in *cygwin*|*mingw*) ;; *) with_inpout32=no ;; esac -AS_IF([test "x$with_inpout32" = xyes], [ - HAVE_INPOUTXX=yes - AC_DEFINE(HAVE_INPOUTXX, 1, [define if you have inpout32.dll]) -],[ - HAVE_INPOUTXX=no +HAVE_INPOUTXX=no +AS_IF([test "x$with_inpout32" != xno], [ + AC_CHECK_HEADER([inpout32.h], [ + HAVE_INPOUTXX=yes + AC_DEFINE(HAVE_INPOUTXX, 1, [define if you have inpout32.dll]) + ],[:],[ + #include + #include + ]) + AS_IF([test "x$with_inpout32$HAVE_INPOUTXX" = "xyesno"], [ + AC_MSG_ERROR([inpout32 support requested, but not found]) + ]) ]) AM_CONDITIONAL(HAVE_INPOUTXX, [test "x$HAVE_INPOUTXX" = xyes])