2 # configure.in - input script to autoconf to
5 # This file is part of the GNU PIC Library.
7 # Originally written by
8 # Vangelis Rokas <vrokas@otenet.gr>
10 # Adopted for the SDCC/pic14 library by
11 # Raphael Neider <rneider AT web.de>
16 # Process this file with autoconf to produce a configure script.
22 AC_DEFUN([AC_CONFIG_SRCDIR])
23 #AC_DEFUN(AC_CONFIG_FILES)
25 # Checks for programs.
26 AC_CHECK_PROG(GPASM, gpasm, gpasm, :)
27 AC_CHECK_PROG(GPLINK, gplink, gplink, :)
28 AC_CHECK_PROG(GPLIB, gplib, gplib, :)
30 AC_CHECK_PROG(RM, rm, [rm -f], :)
31 AC_CHECK_PROG(CP, cp, cp, :)
32 AC_CHECK_PROG(MV, mv, mv, :)
33 AC_CHECK_PROG(LS, ls, ls, :)
34 AC_CHECK_PROG(SED, sed, sed, :)
36 AC_CHECK_PROG(MKDIR, mkdir, [mkdir -p], :)
37 AC_CHECK_PROG(RMDIR, rmdir, rmdir, :)
39 case ":$GPASM:$GPLINK:$GPLIB" in
41 AC_MSG_ERROR([gputils (gpasm, gplink, and gplib) are required but not found.
42 Either install gputils or reconfigure with --disable-pic14-port and --disable-pic16-port.])
50 AC_MSG_CHECKING([devices supported by gputils])
53 CHECK=".checkdevices/check";
54 RESULT="pics.supported";
57 mkdir -p ".checkdevices";
59 for i in "${srcdir}/libdev/pic1"*.c; do
62 P=$(echo "$p" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ);
63 printf " include \"p%s.inc\"\n END" "$p" > "${CHECK}.asm";
64 if "$mCCAS" -p "$p" -o "${CHECK}.o" -c "${CHECK}.asm" >/dev/null 2>&1 && "$mLD" "${CHECK}.o" >/dev/null 2>&1; then
65 GOOD_PICS="$GOOD_PICS $p";
66 N_GOOD=`expr $N_GOOD + 1`;
67 echo "$P" >> "$RESULT";
69 BAD_PICS="$BAD_PICS $p";
70 N_BAD=`expr $N_BAD + 1`;
73 AC_MSG_RESULT([[$N_GOOD devices ($GOOD_PICS)]])
76 if test -n "$BAD_PICS"; then
78 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
80 !!! WARNING: The installed gputils do not support all
81 !!! PIC devices currently supported by SDCC.
82 !!! If you continue to build SDCC, library files for the
83 !!! following devices will not be built, and you will
84 !!! not be able to compile any projects for these devices:
88 ==> $N_BAD devices are *not* supported
89 $N_GOOD devices are supported
92 !!! Please update your gputils to a recent snapshot and
93 !!! run configure again using the updated gputils. Make
94 !!! sure to have them in PATH prior to the previously
95 !!! found ones (or remove the older version completely).
97 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
101 echo "Continuing in $d seconds ...";
106 # Checks for libraries.
108 # Checks for header files.
110 # Checks for typedefs, structures, and compiler characteristics.
112 # Checks for library functions.
114 AC_CONFIG_FILES([Makefile