2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([pic16lib],[0.3],[tecodev AT users sourceforge net])
6 AM_INIT_AUTOMAKE([foreign])
7 AC_CONFIG_SRCDIR([libdev/pic18f13k50.c])
8 AC_CONFIG_HEADERS([config.h])
14 [\\/]*|?:[\\/]*) abs_srcdir="$srcdir";
16 *) abs_srcdir="$ac_pwd/$srcdir";
19 case $ac_top_build_prefix in
21 abs_top_builddir="$ac_top_build_prefix";
23 *) abs_top_builddir="$ac_pwd/$ac_top_build_prefix";
29 AC_SUBST([USE_FLOATS], ["-DUSE_FLOATS=0"])
32 AS_HELP_STRING([--enable-floats], [Enable output of float-values via printf().]),
33 [if test "yes" = $enableval; then USE_FLOATS="-DUSE_FLOATS=1"; fi]
36 # Checks for programs.
38 # The default architecture can be selected at configure time by setting the
39 # environment variable ARCH to the desired device (18fxxx).
40 AC_SUBST(ARCH, [${ARCH:-18f452}])
42 # We cannot use AC_PROG_CC(sdcc) as sdcc might not be built at configure-time...
43 AC_SUBST(CC, [\'$abs_top_builddir/../../../../bin/sdcc\'])
44 AC_PATH_PROG(CCAS, gpasm, :)
45 AC_PATH_PROG(LD, gplink, :)
46 AC_PATH_PROG(AR, gplib, :)
48 case ":$CCAS:$LD:$AR:" in
50 AC_MSG_ERROR([gputils (gpasm, gplink, and gplib) are required but not found.
51 Either install gputils or reconfigure with --disable-pic14-port and --disable-pic16-port.])
57 AC_SUBST(CFLAGS, ["-mpic16 -p$ARCH"])
58 AC_SUBST(CCASFLAGS, ["-p$ARCH"])
59 AC_SUBST(ARFLAGS, [-c])
60 AC_SUBST(CCAS, [\'$CCAS\'])
61 AC_SUBST(LD, [\'$LD\'])
62 AC_SUBST(AR, [\'$AR\'])
64 # $RANLIB is called by the autotools but not provided nor required
69 _AM_DEPENDENCIES(CCAS)
71 LIBDEV="${srcdir}/libdev"
72 m4_include([supported-devices.ac])
73 m4_include([processors.ac])
75 # Checks for libraries.
77 # Checks for header files.
79 # Checks for typedefs, structures, and compiler characteristics.
81 # Checks for library functions.
83 AC_CONFIG_FILES([Makefile