From c8af09dc4d39aa22271a58736977a888b4e67491 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Nov 2009 23:53:46 +0000 Subject: [PATCH] create a helper macro for summary output to unify duplicate code git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1677 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 2 ++ urjtag/configure.ac | 45 ++++++++++++++------------------------------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 7e3d5ce3..9de37306 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -2,6 +2,8 @@ * configure.ac: Use pkg-config for libusb/libftdi by default. + * configure.ac: Create a helper macro for user summary display. + 2009-10-28 Arnim Laeuger * src/svf/svf.h, src/svf/svf_bison.y, src/svf/svf_flex.l: diff --git a/urjtag/configure.ac b/urjtag/configure.ac index 15bf1f5c..626a15c6 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -665,36 +665,19 @@ AC_OUTPUT dnl dnl Configuration summary dnl -AS_IF([test ${HAVELIBFTDI:-no} != no], [ - FLAG_HAVELIBFTDI=yes -], [ - FLAG_HAVELIBFTDI=no -]) -AS_IF([test ${HAVELIBUSB:-no} != no], [ - FLAG_HAVELIBUSB=yes -], [ - FLAG_HAVELIBUSB=no -]) -AS_IF([test ${HAVELIBFTD2XX:-no} != no], [ - FLAG_HAVELIBFTD2XX=yes -], [ - FLAG_HAVELIBFTD2XX=no -]) -AS_IF([test ${HAVEINPOUTXX:-no} != no], [ - FLAG_HAVEINPOUTXX=yes -], [ - FLAG_HAVEINPOUTXX=no -]) -AS_IF([test ${svf:-false} != false], [ - FLAG_SVF=yes -], [ - FLAG_SVF=no -]) -AS_IF([test ${bsdl:-false} != false], [ - FLAG_BSDL=yes -], [ - FLAG_BSDL=no +AC_DEFUN([MAKE_YESNO_VAR],[dnl + AS_IF([test ${$1:-$2} != $2], [dnl + FLAG_$1=yes + ], [dnl + FLAG_$1=no + ]) ]) +MAKE_YESNO_VAR([HAVELIBFTDI], [no]) +MAKE_YESNO_VAR([HAVELIBUSB], [no]) +MAKE_YESNO_VAR([HAVELIBFTD2XX], [no]) +MAKE_YESNO_VAR([HAVEINPOUTXX], [no]) +MAKE_YESNO_VAR([svf], [false]) +MAKE_YESNO_VAR([bsdl], [false]) AC_MSG_NOTICE([ jtag is now configured for @@ -703,8 +686,8 @@ jtag is now configured for Detected libftdi : $FLAG_HAVELIBFTDI Detected libftd2xx : $FLAG_HAVELIBFTD2XX Detected inpout32 : $FLAG_HAVEINPOUTXX - Build SVF player : $FLAG_SVF - Build BSDL subsystem : $FLAG_BSDL + Build SVF player : $FLAG_svf + Build BSDL subsystem : $FLAG_bsdl Bus drivers : $enabled_bus_drivers Cable drivers : $enabled_cable_drivers Lowlevel drivers : $enabled_lowlevel_drivers