X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=configure.in;h=fa2a4985bf318c0f3e8bfd2d9b29c588f94022a2;hp=0b2bcf671847b378a5f8b5301fe17bf8c718f7fa;hb=5b6df55a1e5e4c0f531bc336691bc7c9a6a0df87;hpb=a634b5d52e9a818f7dea91958df7d8a0cd1c1d04 diff --git a/configure.in b/configure.in index 0b2bcf6718..fa2a4985bf 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT([openocd], [0.3.0-in-development], +AC_INIT([openocd], [0.4.0-dev], [OpenOCD Mailing List ]) AC_CONFIG_SRCDIR([src/openocd.c]) @@ -35,27 +35,78 @@ AC_TYPE_LONG_LONG_INT AC_SEARCH_LIBS([ioperm], [ioperm]) AC_SEARCH_LIBS([dlopen], [dl]) -AC_CHECK_HEADERS(arpa/inet.h) +AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS(arpa/inet.h, [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(elf.h) AC_CHECK_HEADERS(dirent.h) AC_CHECK_HEADERS(fcntl.h) -AC_CHECK_HEADERS(ifaddrs.h) +AC_CHECK_HEADERS(ifaddrs.h, [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(malloc.h) AC_CHECK_HEADERS(netdb.h) -AC_CHECK_HEADERS(netinet/in.h) -AC_CHECK_HEADERS(netinet/tcp.h) +AC_CHECK_HEADERS([netinet/in.h], [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) +AC_CHECK_HEADERS(netinet/tcp.h, [], [], [dnl +#include +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(pthread.h) AC_CHECK_HEADERS(strings.h) AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/param.h) AC_CHECK_HEADERS(sys/poll.h) AC_CHECK_HEADERS(sys/select.h) -AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(unistd.h) - AC_CHECK_HEADERS([net/if.h], [], [], [dnl #include #ifdef STDC_HEADERS @@ -323,10 +374,6 @@ AC_ARG_ENABLE(ft2232_ftd2xx, AS_HELP_STRING([--enable-ft2232_ftd2xx], [Enable building support for FT2232 based devices using the FTD2XX driver from ftdichip.com]), [build_ft2232_ftd2xx=$enableval], [build_ft2232_ftd2xx=no]) -AC_ARG_ENABLE(ft2232_highspeed, - AS_HELP_STRING([--enable-ft2232-highspeed], [Enable building support for FT2232H and FT4232H-based devices (requires >=libftd2xx-0.4.16 or >=libftdi-0.16)]), - [want_ft2232_highspeed=$enableval], [want_ft2232_highspeed=no]) - AC_ARG_ENABLE(amtjtagaccel, AS_HELP_STRING([--enable-amtjtagaccel], [Enable building the Amontec JTAG-Accelerator driver]), [build_amtjtagaccel=$enableval], [build_amtjtagaccel=no]) @@ -381,7 +428,8 @@ AC_ARG_ENABLE(usbprog, [build_usbprog=$enableval], [build_usbprog=no]) AC_ARG_ENABLE(oocd_trace, - AS_HELP_STRING([--enable-oocd_trace], [Enable building support for the OpenOCD+trace ETM capture device]), + AS_HELP_STRING([--enable-oocd_trace], + [Enable building support for some prototype OpenOCD+trace ETM capture hardware]), [build_oocd_trace=$enableval], [build_oocd_trace=no]) AC_ARG_ENABLE(jlink, @@ -485,6 +533,8 @@ case $host in AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts]) fi parport_use_giveio=yes + + CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO" AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.]) AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.]) @@ -686,12 +736,12 @@ if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then # And calculate the LDFLAGS for the machine case "$host_cpu" in - i?86|x86_*) + i?86|x86_32) LDFLAGS="$LDFLAGS -L$with_ftd2xx_win32_zipdir/i386" LIBS="$LIBS -lftd2xx" f=$with_ftd2xx_win32_zipdir/i386/ftd2xx.lib ;; - amd64) + amd64|x86_64) LDFLAGS="$LDFLAGS -L$with_ftd2xx_win32_zipdir/amd64" LIBS="$LIBS -lftd2xx" f=$with_ftd2xx_win32_zipdir/amd64/ftd2xx.lib @@ -834,11 +884,8 @@ main( int argc, char **argv ) AC_MSG_RESULT([Skipping as we are cross-compiling]) ]) -AC_MSG_CHECKING([whether to build ftd2xx highspeed device support]) -AC_MSG_RESULT([$want_ft2232_highspeed]) -if test $want_ft2232_highspeed != no; then - AC_MSG_CHECKING([for ftd2xx highspeed device support]) - AC_COMPILE_IFELSE([ +AC_MSG_CHECKING([for ftd2xx highspeed device support]) +AC_COMPILE_IFELSE([ #include "confdefs.h" #if IS_WIN32 #include "windows.h" @@ -855,10 +902,9 @@ DWORD x = FT_DEVICE_4232H; ]) AC_MSG_RESULT([$build_ft2232_highspeed]) - if test $want_ft2232_highspeed = yes -a $build_ft2232_highspeed = no; then - AC_MSG_ERROR([You need a newer FTD2XX driver (version 0.4.16 or later).]) + if test $build_ft2232_highspeed = no; then + AC_MSG_WARN([You need a newer FTD2XX driver (version 2.04.16 or later).]) fi -fi LDFLAGS=$LDFLAGS_SAVE CFLAGS=$CFLAGS_SAVE @@ -903,11 +949,8 @@ main( int argc, char **argv ) AC_MSG_RESULT([Skipping as we are cross-compiling]) ]) - AC_MSG_CHECKING([whether to build libftdi highspeed device support]) - AC_MSG_RESULT([$want_ft2232_highspeed]) - if test $want_ft2232_highspeed != no; then - AC_MSG_CHECKING([for libftdi highspeed device support]) - AC_COMPILE_IFELSE([ +AC_MSG_CHECKING([for libftdi highspeed device support]) +AC_COMPILE_IFELSE([ #include #include enum ftdi_chip_type x = TYPE_2232H; @@ -920,10 +963,9 @@ enum ftdi_chip_type x = TYPE_2232H; ]) AC_MSG_RESULT([$build_ft2232_highspeed]) - if test $want_ft2232_highspeed = yes -a $build_ft2232_highspeed = no; then - AC_MSG_ERROR([You need a newer libftdi version (0.16 or later).]) + if test $build_ft2232_highspeed = no; then + AC_MSG_WARN([You need a newer libftdi version (0.16 or later).]) fi - fi # Restore the 'unexpanded ldflags' LDFLAGS=$LDFLAGS_SAVE