From 185d89c2cda956a71d4213a874a9fc5d05e88003 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 15 Aug 2010 01:19:29 +0000 Subject: [PATCH] autodetect inpout32 support by default git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1823 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 4 ++++ urjtag/configure.ac | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) 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])