2 # Process this file with autoconf to produce a configure script.
5 # The (generated) configure script should be called with
6 # --build=<your-build-system> --target=pic16
7 # to force cross-compilation mode; rather use the wrapper
8 # ./configure.gnu instead of ./configure directly.
12 AC_INIT([pic16lib], [0.3], [tecodev AT users sourceforge net])
14 AC_CONFIG_SRCDIR([debug/gstack/gstack.c])
15 AC_CONFIG_HEADER([config.h])
20 [\\/]*|?:[\\/]*) abs_srcdir="$srcdir";
22 *) abs_srcdir="$ac_pwd/$srcdir";
25 case $ac_top_build_prefix in
27 abs_top_builddir="$ac_top_build_prefix";
29 *) abs_top_builddir="$ac_pwd/$ac_top_build_prefix";
35 # Checks for programs.
37 # The default architecture can be selected at configure time by setting the
38 # environment variable ARCH to the desired device (18fxxx).
39 AC_SUBST(ARCH, [${ARCH:-18f452}])
41 # We cannot use AC_PROG_CC(sdcc) as sdcc might not be built at configure-time...
42 AC_SUBST(CC, [\'$abs_top_builddir/../../../bin/sdcc\'])
43 AC_SUBST(CFLAGS, ["-mpic16 -p$ARCH"])
44 AC_PATH_PROG(CCAS, gpasm, :)
45 AC_SUBST(CCAS, [\'$CCAS\'])
46 AC_SUBST(CCASFLAGS, ["-p$ARCH"])
47 AC_PATH_PROG(LD, gplink, :)
48 AC_SUBST(LD, [\'$LD\'])
49 AC_PATH_PROG(AR, gplib, :)
50 AC_SUBST(AR, [\'$AR\'])
51 AC_SUBST(ARFLAGS, [-c])
53 # $RANLIB is called by the autotools but not provided nor required
58 _AM_DEPENDENCIES(CCAS)
60 # Checks for libraries.
62 # Checks for header files.
64 # Checks for typedefs, structures, and compiler characteristics.
66 # Checks for library functions.
68 case "$CCAS:$LD:$AR" in
70 AC_MSG_ERROR([gputils (gpasm, gplink, and gplib) are required but not found.])
74 AC_CONFIG_FILES([Makefile