+AC_ARG_WITH([newlib-nano],
+ [AS_HELP_STRING([--with-newlib-nano],
+ [Root of newlib nano install])],
+ [],
+ [with_newlib_nano=auto])
+
+HAVE_NEWLIB_NANO=no
+if test "x$with_newlib_nano" != "xno"; then
+ if test "x$with_newlib_nano" = "xauto"; then
+ for d in /usr/local/lib/newlib-nano /usr/lib/newlib-nano; do
+ if test "x$with_newlib_nano" = "xauto" -a -d "$d"; then
+ with_newlib_nano="$d"
+ HAVE_NEWLIB_NANO=yes
+ fi
+ done
+ else
+ HAVE_NEWLIB_NANO=yes
+ fi
+fi
+
+if test "x$HAVE_NEWLIB_NANO" = "xno"; then
+ AC_MSG_WARN([No newlib-nano library found, ARM binaries will not be built])
+ HAVE_ARM_M3_CC=no
+ HAVE_ARM_M0_CC=no
+else
+ NEWLIB_NANO="$with_newlib_nano"
+fi
+
+AC_SUBST(HAVE_NEWLIB_NANO)
+AC_SUBST(NEWLIB_NANO)
+