# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-#
-# The (generated) configure script should be called with
-# --build=<your-build-system> --target=pic16
-# to force cross-compilation mode; rather use the wrapper
-# ./configure.gnu instead of ./configure directly.
-#
-
AC_PREREQ(2.61)
AC_INIT([pic16lib], [0.3], [tecodev AT users sourceforge net])
AM_INIT_AUTOMAKE
libdir=$libdir/pic16
+AC_SUBST([USE_FLOATS], ["-DUSE_FLOATS=0"])
+AC_ARG_ENABLE(
+ [floats],
+ AS_HELP_STRING([--enable-floats], [Enable output of float-values via printf().]),
+ [if test "yes" = $enableval; then USE_FLOATS="-DUSE_FLOATS=1"; fi]
+)
+
# Checks for programs.
# The default architecture can be selected at configure time by setting the
# environment variable ARCH to the desired device (18fxxx).
-AC_SUBST(ARCH, [${ARCH-18f452}])
+AC_SUBST(ARCH, [${ARCH:-18f452}])
# We cannot use AC_PROG_CC(sdcc) as sdcc might not be built at configure-time...
-AC_SUBST(CC, [${CC-$abs_top_builddir/../../../bin/sdcc}])
+AC_SUBST(CC, [\'$abs_top_builddir/../../../bin/sdcc\'])
AC_SUBST(CFLAGS, ["-mpic16 -p$ARCH"])
AC_PATH_PROG(CCAS, gpasm, :)
+AC_SUBST(CCAS, [\'$CCAS\'])
AC_SUBST(CCASFLAGS, ["-p$ARCH"])
AC_PATH_PROG(LD, gplink, :)
+AC_SUBST(LD, [\'$LD\'])
AC_PATH_PROG(AR, gplib, :)
+AC_SUBST(AR, [\'$AR\'])
AC_SUBST(ARFLAGS, [-c])
# $RANLIB is called by the autotools but not provided nor required