AC_PREREQ(2.59)
-AC_INIT(configure.in)
+AC_INIT([openocd], [0.2.0-in-development],
+ [OpenOCD Mailing List <openocd-development@lists.berlios.de>])
+AC_CONFIG_SRCDIR([src/openocd.c])
AC_CANONICAL_HOST
AC_CHECK_HEADERS(jtag_minidriver.h)
AC_CHECK_HEADERS(sys/param.h)
AC_CHECK_HEADERS(sys/time.h)
+AC_CHECK_HEADERS(sys/select.h)
AC_CHECK_HEADERS(elf.h)
AC_CHECK_HEADERS(strings.h)
AC_CHECK_HEADERS(stdbool.h)
AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
fi
-if test $build_ft2232_ftd2xx = yes ; then
+if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])
# if we are given a zipdir...
AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
fi
-if test $build_ft2232_ftd2xx = yes ; then
+if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
AC_MSG_CHECKING([for libftd2xx.a (darwin)])
if test ! -f /usr/local/include/ftd2xx.h ; then
AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only])
fi
-if test $build_ft2232_ftd2xx = yes ; then
+if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
# Must be linux
if test $host_os != linux-gnu && test $host_os != linux ; then
AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi instead])
fi
fi
-if test $build_ft2232_ftd2xx = yes; then
+if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes; then
# Before we go any further - make sure we can *BUILD* and *RUN*
# a simple app with the "ftd2xx.lib" file - in what ever form we where given
CFLAGS=$CFLAGS_SAVE
fi
+# check for usb.h when a driver will require it
+if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \
+ $build_rlink = yes -o $build_armjtagew = yes
+then
+ AC_CHECK_HEADERS([usb.h],[],
+ [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
+fi
+
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(openocd, 1.0)
+AM_INIT_AUTOMAKE([-Wall -Wno-portability])
AM_MAINTAINER_MODE
AM_CONDITIONAL(RELEASE, test $build_release = yes)
AC_LANG_C
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_RANLIB
# set default gcc warnings
GCC_WARNINGS="${GCC_WARNINGS} -Wextra -Wno-unused-parameter"
GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
GCC_WARNINGS="${GCC_WARNINGS} -Wcast-align"
+ GCC_WARNINGS="${GCC_WARNINGS} -Wredundant-decls"
fi
if test "${gcc_werror}" = yes; then
GCC_WARNINGS="${GCC_WARNINGS} -Werror"