m4_include([config_subdir.m4])dnl
+# check for makeinfo before calling AM_INIT_AUTOMAKE
+AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+if test "x$MAKEINFO" = "x"; then
+ MAKEINFO='echo makeinfo missing; true'
+ AC_MSG_WARN([Info documentation will not be built.])
+fi
+AC_SUBST([MAKEINFO])
+
AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip subdir-objects])
AC_CONFIG_HEADERS([config.h])
[[stlink], [ST-Link JTAG Programmer], [HLADAPTER_STLINK]],
[[ti_icdi], [TI ICDI JTAG Programmer], [HLADAPTER_ICDI]],
[[ulink], [Keil ULINK JTAG Programmer], [ULINK]],
- [[usb_blaster_2], [Altera USB-Blaster II Compatible], [USB_BLASTER_2]]])
+ [[usb_blaster_2], [Altera USB-Blaster II Compatible], [USB_BLASTER_2]],
+ [[vsllink], [Versaloon-Link JTAG Programmer], [VSLLINK]]])
m4_define([USB_ADAPTERS],
[[[jlink], [Segger J-Link JTAG Programmer], [JLINK]],
[[aice], [Andes JTAG Programmer], [AICE]]])
m4_define([USB0_ADAPTERS],
- [[[vsllink], [Versaloon-Link JTAG Programmer], [VSLLINK]],
- [[usbprog], [USBProg JTAG Programmer], [USBPROG]],
+ [[[usbprog], [USBProg JTAG Programmer], [USBPROG]],
[[rlink], [Raisonance RLink JTAG Programmer], [RLINK]],
[[armjtagew], [Olimex ARM-JTAG-EW Programmer], [ARMJTAGEW]]])
;;
esac
+if test $is_win32 = yes; then
+ AC_DEFINE([WIN32_LEAN_AND_MEAN], [1], [1 to exclude old conflicting definitions when building on Windows])
+fi
+
if test $build_parport = yes; then
build_bitbang=yes
AC_DEFINE([BUILD_PARPORT], [1], [1 if you want parport.])
CFLAGS="$CFLAGS $GCC_WARNINGS"
fi
-# Setup for compiling build tools
-AC_MSG_CHECKING([for a C compiler for build tools])
-if test $cross_compiling = yes; then
- AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
- CFLAGS_FOR_BUILD="-g -O2 $GCC_WARNINGS"
-else
- CC_FOR_BUILD=$CC
- CFLAGS_FOR_BUILD=$CFLAGS
-fi
-
-AC_MSG_RESULT([$CC_FOR_BUILD])
-AC_SUBST([CC_FOR_BUILD])
-AC_SUBST([CFLAGS_FOR_BUILD])
-
-AC_MSG_CHECKING([for suffix of executable build tools])
-if test $cross_compiling = yes; then
- cat >conftest.c <<\_______EOF
-int main ()
-{
- exit (0);
-}
-_______EOF
- for i in .exe ""; do
- compile="$CC_FOR_BUILD conftest.c -o conftest$i"
- if AC_TRY_EVAL(compile); then
- if (./conftest) 2>&AC_FD_CC; then
- EXEEXT_FOR_BUILD=$i
- break
- fi
- fi
- done
- rm -f conftest*
- if test "${EXEEXT_FOR_BUILD+set}" != set; then
- AC_MSG_ERROR([Cannot determine suffix of executable build tools])
- fi
-else
- EXEEXT_FOR_BUILD=$EXEEXT
-fi
-AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
-AC_SUBST([EXEEXT_FOR_BUILD])
-
AC_CONFIG_FILES([
Makefile
src/Makefile
echo OpenOCD configuration summary
echo --------------------------------------------------
m4_foreach([adapter], [USB1_ADAPTERS, USB_ADAPTERS, USB0_ADAPTERS, HIDAPI_ADAPTERS],
- [echo -n m4_format(["%-40s"], ADAPTER_DESC([adapter]))
+ [s=m4_format(["%-40s"], ADAPTER_DESC([adapter]))
case $ADAPTER_VAR([adapter]) in
auto)
- echo yes '(auto)'
+ echo "$s"yes '(auto)'
;;
yes)
- echo yes
+ echo "$s"yes
;;
no)
- echo no
+ echo "$s"no
;;
esac
])