Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / lib / pic16 / configure.ac
blobba01cd3db89b03472bb0b95ab0ae939f966d88ee
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.71])
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])
10 AM_MAINTAINER_MODE
12 # SDCC setup
13 case $srcdir in
14     [\\/]*|?:[\\/]*) abs_srcdir="$srcdir";
15         ;;
16     *) abs_srcdir="$ac_pwd/$srcdir";
17         ;;
18 esac
19 case $ac_top_build_prefix in
20     [\\/]*|?:[\\/]*)
21         abs_top_builddir="$ac_top_build_prefix";
22         ;;
23     *) abs_top_builddir="$ac_pwd/$ac_top_build_prefix";
24         ;;
25 esac
27 libdir=$libdir/pic16
29 AC_SUBST([USE_FLOATS], ["-DUSE_FLOATS=0"])
30 AC_ARG_ENABLE(
31     [floats],
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
49     *:::*)
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.])
52         ;;
53 esac;
55 mCCAS="$CCAS";
56 mLD="$LD";
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
65 AC_SUBST(RANLIB, [:])
66 AC_SUBST(OBJEXT, [o])
68 _AM_DEPENDENCIES(CC)
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
84                  libdev/Makefile])
85 AC_OUTPUT