From: Uwe Hermann Date: Sun, 17 Mar 2013 13:40:33 +0000 (+0100) Subject: Abort configure if the required tools are not found. X-Git-Tag: sigrok-firmware-fx2lafw-0.1.1~7 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=471fe66134dec39680b6abc7dbe457b20c1df073;p=sigrok-firmware-fx2lafw.git Abort configure if the required tools are not found. --- diff --git a/configure.ac b/configure.ac index 13018f68..0735adee 100644 --- a/configure.ac +++ b/configure.ac @@ -37,9 +37,18 @@ AC_PROG_LN_S # On Fedora, all sdcc tools have an 'sdcc-' prefix in the filename. AC_CHECK_PROGS([SDCC], [sdcc sdcc-sdcc]) +if test "x$SDCC" == "x"; then + AC_MSG_ERROR([cannot find sdcc.]) +fi AC_CHECK_PROGS([SDCCLIB], [sdcclib sdcc-sdcc]) +if test "x$SDCCLIB" == "x"; then + AC_MSG_ERROR([cannot find sdcclib.]) +fi AC_CHECK_PROGS([OBJCOPY], [objcopy]) AC_CHECK_PROGS([MAKEBIN], [makebin sdcc-makebin]) +if test "x$OBJCOPY" == "x" && test "x$MAKEBIN" == "x"; then + AC_MSG_ERROR([cannot find objcopy or makebin.]) +fi AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != "x"]) AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != "x"]) @@ -51,6 +60,9 @@ AM_COND_IF([FOUND_MAKEBIN], [AC_SUBST(FOUND_MAKEBIN, "yes")]) # Newer sdcc, Fedora: sdcc-sdas8051 # Older sdcc: asx8051 AC_CHECK_PROGS([SDAS8051], [sdas8051 sdcc-sdas8051 asx8051]) +if test "x$SDAS8051" == "x"; then + AC_MSG_ERROR([cannot find sdas8051.]) +fi AC_SUBST(SDCC_FLAGS, "--code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl\"-b DSCR_AREA=0x1e00\" -Wl\"-b INT2JT=0x1f00\"") AC_SUBST(FIRMWARE_DIR, "$datadir/sigrok-firmware")