You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1065 lines
32 KiB

  1. AC_PREREQ(2.60)
  2. AC_INIT([openocd], [0.3.0-dev],
  3. [OpenOCD Mailing List <openocd-development@lists.berlios.de>])
  4. AC_CONFIG_SRCDIR([src/openocd.c])
  5. AM_INIT_AUTOMAKE([-Wall -Wno-portability dist-bzip2 dist-zip])
  6. AM_MAINTAINER_MODE
  7. AM_CONFIG_HEADER(config.h)
  8. AH_BOTTOM([
  9. #include "system.h"
  10. #include "replacements.h"
  11. ])
  12. AC_LANG_C
  13. AC_PROG_CC
  14. AC_PROG_CC_C99
  15. AM_PROG_CC_C_O
  16. AC_PROG_RANLIB
  17. dnl disable checks for C++, Fortran and GNU Java Compiler
  18. m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
  19. m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
  20. m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])
  21. AC_DISABLE_SHARED
  22. AC_PROG_LIBTOOL
  23. AC_SUBST(LIBTOOL_DEPS)
  24. dnl configure checks required for Jim files (these are obsolete w/ C99)
  25. AC_C_CONST
  26. AC_TYPE_LONG_LONG_INT
  27. AC_SEARCH_LIBS([ioperm], [ioperm])
  28. AC_SEARCH_LIBS([dlopen], [dl])
  29. AC_CHECK_HEADERS(arpa/inet.h)
  30. AC_CHECK_HEADERS(elf.h)
  31. AC_CHECK_HEADERS(dirent.h)
  32. AC_CHECK_HEADERS(fcntl.h)
  33. AC_CHECK_HEADERS(ifaddrs.h)
  34. AC_CHECK_HEADERS(malloc.h)
  35. AC_CHECK_HEADERS(netdb.h)
  36. AC_CHECK_HEADERS(netinet/in.h)
  37. AC_CHECK_HEADERS(netinet/tcp.h)
  38. AC_CHECK_HEADERS(pthread.h)
  39. AC_CHECK_HEADERS(strings.h)
  40. AC_CHECK_HEADERS(sys/ioctl.h)
  41. AC_CHECK_HEADERS(sys/param.h)
  42. AC_CHECK_HEADERS(sys/poll.h)
  43. AC_CHECK_HEADERS(sys/select.h)
  44. AC_CHECK_HEADERS(sys/socket.h)
  45. AC_CHECK_HEADERS(sys/stat.h)
  46. AC_CHECK_HEADERS(sys/time.h)
  47. AC_CHECK_HEADERS(sys/types.h)
  48. AC_CHECK_HEADERS(unistd.h)
  49. AC_CHECK_HEADERS([net/if.h], [], [], [dnl
  50. #include <stdio.h>
  51. #ifdef STDC_HEADERS
  52. # include <stdlib.h>
  53. # include <stddef.h>
  54. #else
  55. # ifdef HAVE_STDLIB_H
  56. # include <stdlib.h>
  57. # endif
  58. #endif
  59. #ifdef HAVE_SYS_SOCKET_H
  60. # include <sys/socket.h>
  61. #endif
  62. ])
  63. AC_HEADER_ASSERT
  64. AC_HEADER_STDBOOL
  65. AC_HEADER_TIME
  66. AC_C_BIGENDIAN
  67. AC_CHECK_FUNCS(strndup)
  68. AC_CHECK_FUNCS(strnlen)
  69. AC_CHECK_FUNCS(gettimeofday)
  70. AC_CHECK_FUNCS(usleep)
  71. AC_CHECK_FUNCS(vasprintf)
  72. build_bitbang=no
  73. build_bitq=no
  74. is_cygwin=no
  75. is_mingw=no
  76. is_win32=no
  77. is_darwin=no
  78. if test $cross_compiling = no; then
  79. # guess-rev.sh only exists in the repository, not in the released archives
  80. AC_CHECK_FILE("$srcdir/guess-rev.sh", has_guess_rev=yes, has_guess_rev=no)
  81. AC_MSG_CHECKING([whether to build a release])
  82. if test $has_guess_rev = no; then
  83. build_release=yes
  84. else
  85. build_release=no
  86. fi
  87. AC_MSG_RESULT($build_release)
  88. else
  89. build_release=yes
  90. fi
  91. # We are not *ALWAYS* being installed in the standard place.
  92. # We may be installed in a "tool-build" specific location.
  93. # Normally with other packages - as part of a tool distro.
  94. # Thus - we should search that 'libdir' also.
  95. #
  96. # And - if we are being installed there - the odds are
  97. # The libraries unique to what we are are there too.
  98. #
  99. # Expand nd deal with NONE - just like configure will do later
  100. OCDprefix=$prefix
  101. OCDxprefix=$exec_prefix
  102. test x"$OCDprefix" = xNONE && OCDprefix=$ac_default_prefix
  103. # Let make expand exec_prefix.
  104. test x"$OCDxprefix" = xNONE && OCDxprefix="$OCDprefix"
  105. # what matters is the "exec-prefix"
  106. if test "$OCDxprefix" != "$ac_default_prefix"
  107. then
  108. # We are installing in a non-standard place
  109. # Nonstandard --prefix and/or --exec-prefix
  110. # We have an override of some sort.
  111. # use build specific install library dir
  112. LDFLAGS="$LDFLAGS -L$OCDxprefix/lib"
  113. # RPATH becomes an issue on Linux only
  114. if test $host_os = linux-gnu || test $host_os = linux ; then
  115. LDFLAGS="$LDFLAGS -Wl,-rpath,$OCDxprefix/lib"
  116. fi
  117. # The "INCDIR" is also usable
  118. CFLAGS="$CFLAGS -I$includedir"
  119. fi
  120. AC_ARG_WITH(ftd2xx,
  121. AS_HELP_STRING([--with-ftd2xx=<PATH>],[This option has been removed.]),
  122. [
  123. # Option Given.
  124. cat << __EOF__
  125. The option: --with-ftd2xx=<PATH> has been removed.
  126. On Linux, the new option is:
  127. --with-ftd2xx-linux-tardir=/path/to/files
  128. Where <path> is the path the the directory where the "tar.gz" file
  129. from FTDICHIP.COM was unpacked, for example:
  130. --with-ftd2xx-linux-tardir=${HOME}/libftd2xx0.4.16
  131. On Cygwin/MingW32, the new option is:
  132. --with-ftd2xx-win32-zipdir=/path/to/files
  133. Where <path> is the path to the directory where the "zip" file from
  134. FTDICHIP.COM was unpacked, for example:
  135. --with-ftd2xx-win32-zipdir=${HOME}/ftd2xx.cdm.files
  136. __EOF__
  137. AC_MSG_ERROR([Sorry Cannot continue])
  138. ], [true])
  139. #========================================
  140. # FTD2XXX support comes in 4 forms.
  141. # (1) win32 - via a zip file
  142. # (2) linux - via a tar file
  143. # (3) linux/cygwin/mingw - via libftdi
  144. # (4) darwin - installed under /usr/local
  145. #
  146. # In case (1) and (2) we need to know where the package was unpacked.
  147. AC_ARG_WITH(ftd2xx-win32-zipdir,
  148. AS_HELP_STRING([--with-ftd2xx-win32-zipdir],[Where (CYGWIN/MINGW) the zip file from ftdichip.com was unpacked <default=search>]),
  149. [
  150. # option present
  151. if test -d $with_ftd2xx_win32_zipdir
  152. then
  153. with_ftd2xx_win32_zipdir=`cd $with_ftd2xx_win32_zipdir && pwd`
  154. AC_MSG_NOTICE([Using: ftdichip.com library: $with_ftd2xx_win32_zipdir])
  155. else
  156. AC_MSG_ERROR([Parameter to --with-ftd2xx-win32-zipdir is not a dir: $with_ftd2xx_win32_zipdir])
  157. fi
  158. ], [true])
  159. AC_ARG_WITH(ftd2xx-linux-tardir,
  160. AS_HELP_STRING([--with-ftd2xx-linux-tardir], [Where (Linux/Unix) the tar file from ftdichip.com was unpacked <default=search>]),
  161. [
  162. # Option present
  163. if test $is_win32 = yes ; then
  164. AC_MSG_ERROR([The option: --with-ftd2xx-linux-tardir is only usable on linux])
  165. fi
  166. if test -d $with_ftd2xx_linux_tardir
  167. then
  168. with_ftd2xx_linux_tardir=`cd $with_ftd2xx_linux_tardir && pwd`
  169. AC_MSG_NOTICE([Using: ftdichip.com library: $with_ftd2xx_linux_tardir])
  170. else
  171. AC_MSG_ERROR([Parameter to --with-ftd2xx-linux-tardir is not a dir: $with_ftd2xx_linux_tardir])
  172. fi
  173. ], [true])
  174. AC_ARG_WITH(ftd2xx-lib,
  175. AS_HELP_STRING([--with-ftd2xx-lib],
  176. [Use static or shared ftd2xx libs on default static]),
  177. [
  178. case "$withval" in
  179. static)
  180. with_ftd2xx_lib=$withval
  181. ;;
  182. shared)
  183. with_ftd2xx_lib=$withval
  184. ;;
  185. *)
  186. AC_MSG_ERROR([Option: --with-ftd2xx-lib=static or --with-ftd2xx-lib=shared not, $withval])
  187. ;;
  188. esac
  189. ], [
  190. # Default is static - it is simpler :-(
  191. with_ftd2xx_lib=static
  192. ])
  193. AC_ARG_ENABLE(gccwarnings,
  194. AS_HELP_STRING([--disable-gccwarnings], [Disable compiler warnings]),
  195. [gcc_warnings=$enableval], [gcc_warnings=yes])
  196. AC_ARG_ENABLE(wextra,
  197. AS_HELP_STRING([--disable-wextra], [Disable extra compiler warnings]),
  198. [gcc_wextra=$enableval], [gcc_wextra=$gcc_warnings])
  199. AC_ARG_ENABLE(werror,
  200. AS_HELP_STRING([--disable-werror], [Do not treat warnings as errors]),
  201. [gcc_werror=$enableval], [gcc_werror=$gcc_warnings])
  202. # set default verbose options, overridden by following options
  203. debug_jtag_io=no
  204. debug_usb_io=no
  205. debug_usb_comms=no
  206. AC_ARG_ENABLE(verbose,
  207. AS_HELP_STRING([--enable-verbose],
  208. [Enable verbose JTAG I/O messages (for debugging).]),
  209. [
  210. debug_jtag_io=$enableval
  211. debug_usb_io=$enableval
  212. debug_usb_comms=$enableval
  213. ], [])
  214. AC_ARG_ENABLE(verbose_jtag_io,
  215. AS_HELP_STRING([--enable-verbose-jtag-io],
  216. [Enable verbose JTAG I/O messages (for debugging).]),
  217. [debug_jtag_io=$enableval], [])
  218. AC_ARG_ENABLE(verbose_usb_io,
  219. AS_HELP_STRING([--enable-verbose-usb-io],
  220. [Enable verbose USB I/O messages (for debugging)]),
  221. [debug_usb_io=$enableval], [])
  222. AC_ARG_ENABLE(verbose_usb_comms,
  223. AS_HELP_STRING([--enable-verbose-usb-comms],
  224. [Enable verbose USB communication messages (for debugging)]),
  225. [debug_usb_comms=$enableval], [])
  226. AC_MSG_CHECKING([whether to enable verbose JTAG I/O messages]);
  227. AC_MSG_RESULT($debug_jtag_io)
  228. if test $debug_jtag_io = yes; then
  229. AC_DEFINE([_DEBUG_JTAG_IO_],[1], [Print verbose JTAG I/O messages])
  230. fi
  231. AC_MSG_CHECKING([whether to enable verbose USB I/O messages]);
  232. AC_MSG_RESULT($debug_usb_io)
  233. if test $debug_usb_io = yes; then
  234. AC_DEFINE([_DEBUG_USB_IO_],[1], [Print verbose USB I/O messages])
  235. fi
  236. AC_MSG_CHECKING([whether to enable verbose USB communication messages]);
  237. AC_MSG_RESULT($debug_usb_comms)
  238. if test $debug_usb_comms = yes; then
  239. AC_DEFINE([_DEBUG_USB_COMMS_],[1], [Print verbose USB communication messages])
  240. fi
  241. debug_malloc=no
  242. AC_ARG_ENABLE(malloc_logging,
  243. AS_HELP_STRING([--enable-malloc-logging],
  244. [Include free space in logging messages (requires malloc.h).]),
  245. [debug_malloc=$enableval], [])
  246. AC_MSG_CHECKING([whether to enable malloc free space logging]);
  247. AC_MSG_RESULT($debug_malloc)
  248. if test $debug_malloc = yes; then
  249. AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging])
  250. fi
  251. AC_ARG_ENABLE(dummy,
  252. AS_HELP_STRING([--enable-dummy], [Enable building the dummy port driver]),
  253. [build_dummy=$enableval], [build_dummy=no])
  254. AC_ARG_ENABLE(parport,
  255. AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
  256. [build_parport=$enableval], [build_parport=no])
  257. AC_ARG_ENABLE(parport_ppdev,
  258. AS_HELP_STRING([--disable-parport-ppdev],
  259. [Disable use of ppdev (/dev/parportN) for parport (for x86 only)]),
  260. [parport_use_ppdev=$enableval], [parport_use_ppdev=yes])
  261. AC_ARG_ENABLE(parport_giveio,
  262. AS_HELP_STRING([--enable-parport-giveio],
  263. [Enable use of giveio for parport (for CygWin only)]),
  264. [parport_use_giveio=$enableval], [parport_use_giveio=])
  265. AC_ARG_ENABLE(ft2232_libftdi,
  266. AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver, opensource alternate of FTD2XX]),
  267. [build_ft2232_libftdi=$enableval], [build_ft2232_libftdi=no])
  268. AC_ARG_ENABLE(ft2232_ftd2xx,
  269. AS_HELP_STRING([--enable-ft2232_ftd2xx], [Enable building support for FT2232 based devices using the FTD2XX driver from ftdichip.com]),
  270. [build_ft2232_ftd2xx=$enableval], [build_ft2232_ftd2xx=no])
  271. AC_ARG_ENABLE(amtjtagaccel,
  272. AS_HELP_STRING([--enable-amtjtagaccel], [Enable building the Amontec JTAG-Accelerator driver]),
  273. [build_amtjtagaccel=$enableval], [build_amtjtagaccel=no])
  274. AC_ARG_ENABLE(ecosboard,
  275. AS_HELP_STRING([--enable-ecosboard], [Enable building support for eCos based JTAG debugger]),
  276. [build_ecosboard=$enableval], [build_ecosboard=no])
  277. AC_ARG_ENABLE(zy1000,
  278. AS_HELP_STRING([--enable-zy1000], [Enable ZY1000 interface]),
  279. [build_zy1000=$enableval], [build_zy1000=no])
  280. AC_ARG_ENABLE(ioutil,
  281. AS_HELP_STRING([--enable-ioutil], [Enable ioutil functions - useful for standalone OpenOCD implementations]),
  282. [build_ioutil=$enableval], [build_ioutil=no])
  283. AC_ARG_ENABLE(httpd,
  284. AS_HELP_STRING([--enable-httpd], [Enable builtin httpd server - useful for standalone OpenOCD implementations]),
  285. [build_httpd=$enableval], [build_httpd=no])
  286. case "${host_cpu}" in
  287. arm*)
  288. AC_ARG_ENABLE(ep93xx,
  289. AS_HELP_STRING([--enable-ep93xx], [Enable building support for EP93xx based SBCs]),
  290. [build_ep93xx=$enableval], [build_ep93xx=no])
  291. AC_ARG_ENABLE(at91rm9200,
  292. AS_HELP_STRING([--enable-at91rm9200], [Enable building support for AT91RM9200 based SBCs]),
  293. [build_at91rm9200=$enableval], [build_at91rm9200=no])
  294. ;;
  295. *)
  296. build_ep93xx=no
  297. build_at91rm9200=no
  298. ;;
  299. esac
  300. AC_ARG_ENABLE(gw16012,
  301. AS_HELP_STRING([--enable-gw16012], [Enable building support for the Gateworks GW16012 JTAG Programmer]),
  302. [build_gw16012=$enableval], [build_gw16012=no])
  303. AC_ARG_ENABLE(presto_libftdi,
  304. AS_HELP_STRING([--enable-presto_libftdi], [Enable building support for ASIX Presto Programmer using the libftdi driver]),
  305. [build_presto_libftdi=$enableval], [build_presto_libftdi=no])
  306. AC_ARG_ENABLE(presto_ftd2xx,
  307. AS_HELP_STRING([--enable-presto_ftd2xx], [Enable building support for ASIX Presto Programmer using the FTD2XX driver]),
  308. [build_presto_ftd2xx=$enableval], [build_presto_ftd2xx=no])
  309. AC_ARG_ENABLE(usbprog,
  310. AS_HELP_STRING([--enable-usbprog], [Enable building support for the usbprog JTAG Programmer]),
  311. [build_usbprog=$enableval], [build_usbprog=no])
  312. AC_ARG_ENABLE(oocd_trace,
  313. AS_HELP_STRING([--enable-oocd_trace], [Enable building support for the OpenOCD+trace ETM capture device]),
  314. [build_oocd_trace=$enableval], [build_oocd_trace=no])
  315. AC_ARG_ENABLE(jlink,
  316. AS_HELP_STRING([--enable-jlink], [Enable building support for the Segger J-Link JTAG Programmer]),
  317. [build_jlink=$enableval], [build_jlink=no])
  318. AC_ARG_ENABLE(vsllink,
  319. AS_HELP_STRING([--enable-vsllink], [Enable building support for the Versaloon-Link JTAG Programmer]),
  320. [build_vsllink=$enableval], [build_vsllink=no])
  321. AC_ARG_ENABLE(rlink,
  322. AS_HELP_STRING([--enable-rlink], [Enable building support for the Raisonance RLink JTAG Programmer]),
  323. [build_rlink=$enableval], [build_rlink=no])
  324. AC_ARG_ENABLE(arm-jtag-ew,
  325. AS_HELP_STRING([--enable-arm-jtag-ew], [Enable building support for the Olimex ARM-JTAG-EW Programmer]),
  326. [build_armjtagew=$enableval], [build_armjtagew=no])
  327. AC_ARG_ENABLE(minidriver_dummy,
  328. AS_HELP_STRING([--enable-minidriver-dummy], [Enable the dummy minidriver.]),
  329. [build_minidriver_dummy=$enableval], [build_minidriver_dummy=no])
  330. build_minidriver=no
  331. AC_MSG_CHECKING([whether to enable ZY1000 minidriver])
  332. if test $build_zy1000 = yes; then
  333. if test $build_minidriver = yes; then
  334. AC_MSG_ERROR([Multiple minidriver options have been enabled.])
  335. fi
  336. AC_DEFINE(HAVE_JTAG_MINIDRIVER_H, 1,
  337. [Define to 1 if you have the <jtag_minidriver.h> header file.])
  338. build_minidriver=yes
  339. fi
  340. AC_MSG_RESULT($build_zy1000)
  341. AC_MSG_CHECKING([whether to enable dummy minidriver])
  342. if test $build_minidriver_dummy = yes; then
  343. if test $build_minidriver = yes; then
  344. AC_MSG_ERROR([Multiple minidriver options have been enabled.])
  345. fi
  346. build_minidriver=yes
  347. AC_DEFINE(BUILD_MINIDRIVER_DUMMY, 1, [Use the dummy minidriver.])
  348. AC_DEFINE(HAVE_JTAG_MINIDRIVER_H, 1,
  349. [Define to 1 if you have the <jtag_minidriver.h> header file.])
  350. fi
  351. AC_MSG_RESULT($build_minidriver_dummy)
  352. AC_MSG_CHECKING([whether standard drivers can be built])
  353. if test "$build_minidriver" = yes; then
  354. AC_MSG_RESULT([no])
  355. AC_MSG_WARN([Using the minidriver disables all other drivers.])
  356. sleep 2
  357. else
  358. AC_MSG_RESULT([yes])
  359. fi
  360. case "${host_cpu}" in
  361. i?86|x86*)
  362. ;;
  363. *)
  364. if test x$parport_use_ppdev = xno; then
  365. AC_MSG_WARN([--disable-parport-ppdev is not supported by the host CPU])
  366. fi
  367. parport_use_ppdev=yes
  368. ;;
  369. esac
  370. case $host in
  371. *-cygwin*)
  372. is_win32=yes
  373. parport_use_ppdev=no
  374. AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),
  375. [is_mingw=yes],[is_mingw=no])
  376. if test $is_mingw = yes; then
  377. AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
  378. if test x$parport_use_giveio = xno; then
  379. AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
  380. fi
  381. parport_use_giveio=yes
  382. is_cygwin=no
  383. else
  384. is_cygwin=yes
  385. AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
  386. # sys/io.h needed under cygwin for parport access
  387. if test $build_parport = yes; then
  388. AC_CHECK_HEADERS(sys/io.h,[],AC_MSG_ERROR([Please install the cygwin ioperm package]))
  389. fi
  390. fi
  391. AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
  392. AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
  393. ;;
  394. *-mingw*)
  395. is_mingw=yes
  396. is_win32=yes
  397. parport_use_ppdev=no
  398. if test x$parport_use_giveio = xno; then
  399. AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
  400. fi
  401. parport_use_giveio=yes
  402. AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
  403. AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
  404. AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
  405. ;;
  406. *darwin*)
  407. is_darwin=yes
  408. if test x$parport_use_giveio = xyes; then
  409. AC_MSG_WARN([--enable-parport-giveio cannot be used by Darwin hosts])
  410. fi
  411. parport_use_giveio=no
  412. AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
  413. AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
  414. AC_DEFINE(IS_DARWIN, 1, [1 if building for Darwin.])
  415. ;;
  416. *)
  417. if test x$parport_use_giveio = xyes; then
  418. AC_MSG_WARN([--enable-parport-giveio cannot be used by ]$host[ hosts])
  419. fi
  420. parport_use_giveio=no
  421. AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
  422. AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
  423. AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
  424. ;;
  425. esac
  426. if test $build_parport = yes; then
  427. build_bitbang=yes
  428. AC_DEFINE(BUILD_PARPORT, 1, [1 if you want parport.])
  429. else
  430. AC_DEFINE(BUILD_PARPORT, 0, [0 if you don't want parport.])
  431. fi
  432. if test $build_dummy = yes; then
  433. build_bitbang=yes
  434. AC_DEFINE(BUILD_DUMMY, 1, [1 if you want dummy driver.])
  435. else
  436. AC_DEFINE(BUILD_DUMMY, 0, [0 if you don't want dummy driver.])
  437. fi
  438. if test $build_ep93xx = yes; then
  439. build_bitbang=yes
  440. AC_DEFINE(BUILD_EP93XX, 1, [1 if you want ep93xx.])
  441. else
  442. AC_DEFINE(BUILD_EP93XX, 0, [0 if you don't want ep93xx.])
  443. fi
  444. if test $build_ecosboard = yes; then
  445. AC_DEFINE(BUILD_ECOSBOARD, 1, [1 if you want eCosBoard.])
  446. else
  447. AC_DEFINE(BUILD_ECOSBOARD, 0, [0 if you don't want eCosBoard.])
  448. fi
  449. if test $build_zy1000 = yes; then
  450. AC_DEFINE(BUILD_ZY1000, 1, [1 if you want ZY1000.])
  451. else
  452. AC_DEFINE(BUILD_ZY1000, 0, [0 if you don't want ZY1000.])
  453. fi
  454. if test $build_ioutil = yes; then
  455. AC_DEFINE(BUILD_IOUTIL, 1, [1 if you want ioutils.])
  456. else
  457. AC_DEFINE(BUILD_IOUTIL, 0, [0 if you don't want ioutils.])
  458. fi
  459. if test $build_httpd = yes; then
  460. AC_DEFINE(BUILD_HTTPD, 1, [1 if you want httpd.])
  461. else
  462. AC_DEFINE(BUILD_HTTPD, 0, [0 if you don't want httpd.])
  463. fi
  464. if test $build_at91rm9200 = yes; then
  465. build_bitbang=yes
  466. AC_DEFINE(BUILD_AT91RM9200, 1, [1 if you want at91rm9200.])
  467. else
  468. AC_DEFINE(BUILD_AT91RM9200, 0, [0 if you don't want at91rm9200.])
  469. fi
  470. if test x$parport_use_ppdev = xyes; then
  471. AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
  472. else
  473. AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
  474. fi
  475. if test x$parport_use_giveio = xyes; then
  476. AC_DEFINE(PARPORT_USE_GIVEIO, 1, [1 if you want parport to use giveio.])
  477. else
  478. AC_DEFINE(PARPORT_USE_GIVEIO, 0, [0 if you don't want parport to use giveio.])
  479. fi
  480. if test $build_bitbang = yes; then
  481. AC_DEFINE(BUILD_BITBANG, 1, [1 if you want a bitbang interface.])
  482. else
  483. AC_DEFINE(BUILD_BITBANG, 0, [0 if you don't want a bitbang interface.])
  484. fi
  485. if test $build_ft2232_libftdi = yes; then
  486. AC_DEFINE(BUILD_FT2232_LIBFTDI, 1, [1 if you want libftdi ft2232.])
  487. else
  488. AC_DEFINE(BUILD_FT2232_LIBFTDI, 0, [0 if you don't want libftdi ft2232.])
  489. fi
  490. if test $build_ft2232_ftd2xx = yes; then
  491. AC_DEFINE(BUILD_FT2232_FTD2XX, 1, [1 if you want ftd2xx ft2232.])
  492. else
  493. AC_DEFINE(BUILD_FT2232_FTD2XX, 0, [0 if you don't want ftd2xx ft2232.])
  494. fi
  495. if test $build_amtjtagaccel = yes; then
  496. AC_DEFINE(BUILD_AMTJTAGACCEL, 1, [1 if you want the Amontec JTAG-Accelerator driver.])
  497. else
  498. AC_DEFINE(BUILD_AMTJTAGACCEL, 0, [0 if you don't want the Amontec JTAG-Accelerator driver.])
  499. fi
  500. if test $build_gw16012 = yes; then
  501. AC_DEFINE(BUILD_GW16012, 1, [1 if you want the Gateworks GW16012 driver.])
  502. else
  503. AC_DEFINE(BUILD_GW16012, 0, [0 if you don't want the Gateworks GW16012 driver.])
  504. fi
  505. if test $build_presto_libftdi = yes; then
  506. build_bitq=yes
  507. AC_DEFINE(BUILD_PRESTO_LIBFTDI, 1, [1 if you want the ASIX PRESTO driver using libftdi.])
  508. else
  509. AC_DEFINE(BUILD_PRESTO_LIBFTDI, 0, [0 if you don't want the ASIX PRESTO driver using libftdi.])
  510. fi
  511. if test $build_presto_ftd2xx = yes; then
  512. build_bitq=yes
  513. AC_DEFINE(BUILD_PRESTO_FTD2XX, 1, [1 if you want the ASIX PRESTO driver using FTD2XX.])
  514. else
  515. AC_DEFINE(BUILD_PRESTO_FTD2XX, 0, [0 if you don't want the ASIX PRESTO driver using FTD2XX.])
  516. fi
  517. if test $build_bitq = yes; then
  518. AC_DEFINE(BUILD_BITQ, 1, [1 if you want a bitq interface.])
  519. else
  520. AC_DEFINE(BUILD_BITQ, 0, [0 if you don't want a bitq interface.])
  521. fi
  522. if test $build_usbprog = yes; then
  523. AC_DEFINE(BUILD_USBPROG, 1, [1 if you want the usbprog JTAG driver.])
  524. else
  525. AC_DEFINE(BUILD_USBPROG, 0, [0 if you don't want the usbprog JTAG driver.])
  526. fi
  527. if test $build_oocd_trace = yes; then
  528. AC_DEFINE(BUILD_OOCD_TRACE, 1, [1 if you want the OpenOCD+trace ETM capture driver.])
  529. else
  530. AC_DEFINE(BUILD_OOCD_TRACE, 0, [0 if you don't want the OpenOCD+trace ETM capture driver.])
  531. fi
  532. if test $build_jlink = yes; then
  533. AC_DEFINE(BUILD_JLINK, 1, [1 if you want the J-Link JTAG driver.])
  534. else
  535. AC_DEFINE(BUILD_JLINK, 0, [0 if you don't want the J-Link JTAG driver.])
  536. fi
  537. if test $build_vsllink = yes; then
  538. AC_DEFINE(BUILD_VSLLINK, 1, [1 if you want the Versaloon-Link JTAG driver.])
  539. else
  540. AC_DEFINE(BUILD_VSLLINK, 0, [0 if you don't want the Versaloon-Link JTAG driver.])
  541. fi
  542. if test $build_rlink = yes; then
  543. AC_DEFINE(BUILD_RLINK, 1, [1 if you want the RLink JTAG driver.])
  544. else
  545. AC_DEFINE(BUILD_RLINK, 0, [0 if you don't want the RLink JTAG driver.])
  546. fi
  547. if test $build_armjtagew = yes; then
  548. AC_DEFINE(BUILD_ARMJTAGEW, 1, [1 if you want the ARM-JTAG-EW JTAG driver.])
  549. else
  550. AC_DEFINE(BUILD_ARMJTAGEW, 0, [0 if you don't want the ARM-JTAG-EW JTAG driver.])
  551. fi
  552. #-- Deal with MingW/Cygwin FTD2XX issues
  553. if test $is_win32 = yes; then
  554. if test "${with_ftd2xx_linux_tardir+set}" = set
  555. then
  556. AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
  557. fi
  558. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
  559. AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])
  560. # if we are given a zipdir...
  561. if test "${with_ftd2xx_win32_zipdir+set}" = set
  562. then
  563. # Set the CFLAGS for "ftd2xx.h"
  564. f=$with_ftd2xx_win32_zipdir/ftd2xx.h
  565. if test ! -f $f ; then
  566. AC_MSG_ERROR([File: $f cannot be found])
  567. fi
  568. CFLAGS="$CFLAGS -I$with_ftd2xx_win32_zipdir"
  569. # And calculate the LDFLAGS for the machine
  570. case "$host_cpu" in
  571. i?86|x86_*)
  572. LDFLAGS="$LDFLAGS -L$with_ftd2xx_win32_zipdir/i386"
  573. LIBS="$LIBS -lftd2xx"
  574. f=$with_ftd2xx_win32_zipdir/i386/ftd2xx.lib
  575. ;;
  576. amd64)
  577. LDFLAGS="$LDFLAGS -L$with_ftd2xx_win32_zipdir/amd64"
  578. LIBS="$LIBS -lftd2xx"
  579. f=$with_ftd2xx_win32_zipdir/amd64/ftd2xx.lib
  580. ;;
  581. *)
  582. AC_MSG_ERROR([Unknown Win32 host cpu: $host_cpu])
  583. ;;
  584. esac
  585. if test ! -f $f ; then
  586. AC_MSG_ERROR([Library: $f not found])
  587. fi
  588. else
  589. LIBS="$LIBS -lftd2xx"
  590. AC_MSG_WARN([ASSUMPTION: The (win32) FTDICHIP.COM files: ftd2xx.h and ftd2xx.lib are in a proper place])
  591. fi
  592. fi
  593. fi # win32
  594. if test $is_darwin = yes ; then
  595. if test "${with_ftd2xx_win32_zipdir+set}" = set
  596. then
  597. AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only])
  598. fi
  599. if test "${with_ftd2xx_linux_tardir+set}" = set
  600. then
  601. AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
  602. fi
  603. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
  604. AC_MSG_CHECKING([for libftd2xx.a (darwin)])
  605. if test ! -f /usr/local/include/ftd2xx.h ; then
  606. AC_MSG_ERROR([ftd2xx library from FTDICHIP.com seems to be missing, cannot find: /usr/local/include/ftd2xx.h])
  607. fi
  608. CFLAGS="$CFLAGS -I/usr/local/include"
  609. LDFLAGS="$LDFLAGS -L/usr/local/lib"
  610. LIBS="$LIBS -lftd2xx"
  611. AC_MSG_RESULT([-L/usr/local/lib -lftd2xx])
  612. fi
  613. fi # darwin
  614. if test $is_win32 = no && test $is_darwin = no ; then
  615. if test "${with_ftd2xx_win32_zipdir+set}" = set
  616. then
  617. AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only])
  618. fi
  619. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
  620. # Must be linux
  621. if test $host_os != linux-gnu && test $host_os != linux ; then
  622. AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi instead])
  623. fi
  624. # Are we given a TAR directory?
  625. if test "${with_ftd2xx_linux_tardir+set}" = set
  626. then
  627. AC_MSG_CHECKING([uninstalled ftd2xx distribution])
  628. # The .H file is simple..
  629. FTD2XX_H=$with_ftd2xx_linux_tardir/ftd2xx.h
  630. if test ! -f "${FTD2XX_H}"; then
  631. AC_MSG_ERROR([Option: --with-ftd2xx-linux-tardir appears wrong, cannot find: ${FTD2XX_H}])
  632. fi
  633. CFLAGS="$CFLAGS -I$with_ftd2xx_linux_tardir"
  634. FTD2XX_LDFLAGS="-L$with_ftd2xx_linux_tardir"
  635. FTD2XX_LIB="-lftd2xx"
  636. if test $with_ftd2xx_lib != shared; then
  637. # Test #1 - Future proof - if/when ftdichip fixes their distro.
  638. # Try it with the simple ".a" suffix.
  639. FTD2XX_LIB="$with_ftd2xx_linux_tardir/static_lib/libftd2xx.a"
  640. if test -f "${FTD2XX_LIB}"; then
  641. FTD2XX_LDFLAGS="${FTD2XX_LDFLAGS}/static_lib"
  642. else
  643. # Test Number2.
  644. # Grr.. perhaps it exists as a version number?
  645. FTD2XX_LIB="$with_ftd2xx_linux_tardir/static_lib/libftd2xx.a.*.*.*"
  646. count=`ls ${FTD2XX_LIB} | wc -l`
  647. if test $count -gt 1 ; then
  648. AC_MSG_ERROR([Multiple libftd2xx.a files found in: $with_ftd2xx_linux_tardir/static_lib sorry cannot handle this yet])
  649. fi
  650. if test $count -ne 1 ; then
  651. AC_MSG_ERROR([Not found: $f, option: --with-ftd2xx-linux-tardir appears to be wrong])
  652. fi
  653. # Because the "-l" rules do not understand version numbers...
  654. # we will just stuff the absolute path onto the LIBS variable
  655. FTD2XX_LIB="`ls ${FTD2XX_LIB}` -lpthread"
  656. FTD2XX_LDFLAGS=""
  657. fi
  658. fi
  659. LDFLAGS="${LDFLAGS} ${FTD2XX_LDFLAGS}"
  660. LIBS="${LIBS} ${FTD2XX_LIB}"
  661. AC_MSG_RESULT([${FTD2XX_LDFLAGS} ${FTD2XX_LIB}])
  662. else
  663. AC_CHECK_HEADER([ftd2xx.h],[],[
  664. AC_MSG_ERROR([You seem to be missing the FTD2xx driver header file.])
  665. ])
  666. AC_SEARCH_LIBS([FT_GetLibraryVersion],[ftd2xx],,[
  667. AC_MSG_ERROR([You appear to be missing the FTD2xx driver library.])
  668. ],[])
  669. fi
  670. fi
  671. fi # linux
  672. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes; then
  673. # Before we go any further - make sure we can *BUILD* and *RUN*
  674. # a simple app with the "ftd2xx.lib" file - in what ever form we where given
  675. # We should be able to compile, link and run this test program now
  676. AC_MSG_CHECKING([whether ftd2xx library works])
  677. #
  678. # Save the LDFLAGS for later..
  679. LDFLAGS_SAVE=$LDFLAGS
  680. CFLAGS_SAVE=$CFLAGS
  681. _LDFLAGS=`eval echo $LDFLAGS`
  682. _CFLAGS=`eval echo $CFLAGS`
  683. LDFLAGS=$_LDFLAGS
  684. CFLAGS=$_CFLAGS
  685. AC_RUN_IFELSE([
  686. #include "confdefs.h"
  687. #if IS_WIN32
  688. #include "windows.h"
  689. #endif
  690. #include <stdio.h>
  691. #include <ftd2xx.h>
  692. int
  693. main( int argc, char **argv )
  694. {
  695. DWORD x;
  696. FT_GetLibraryVersion( &x );
  697. return 0;
  698. }
  699. ], [
  700. AC_MSG_RESULT([Success!])
  701. ], [
  702. AC_MSG_ERROR([Cannot build & run test program using ftd2xx.lib])
  703. ], [
  704. AC_MSG_RESULT([Skipping as we are cross-compiling])
  705. ])
  706. AC_MSG_CHECKING([for ftd2xx highspeed device support])
  707. AC_COMPILE_IFELSE([
  708. #include "confdefs.h"
  709. #if IS_WIN32
  710. #include "windows.h"
  711. #endif
  712. #include <stdio.h>
  713. #include <ftd2xx.h>
  714. DWORD x = FT_DEVICE_4232H;
  715. ], [
  716. AC_DEFINE(BUILD_FT2232_HIGHSPEED, [1],
  717. [Support FT2232H/FT4232HS with FTD2XX or libftdi.])
  718. build_ft2232_highspeed=yes
  719. ], [
  720. build_ft2232_highspeed=no
  721. ])
  722. AC_MSG_RESULT([$build_ft2232_highspeed])
  723. if test $build_ft2232_highspeed = no; then
  724. AC_MSG_WARN([You need a newer FTD2XX driver (version 2.04.16 or later).])
  725. fi
  726. LDFLAGS=$LDFLAGS_SAVE
  727. CFLAGS=$CFLAGS_SAVE
  728. fi
  729. if test $build_ft2232_libftdi = yes ; then
  730. # We assume: the package is preinstalled in the proper place
  731. # these present as 2 libraries..
  732. LIBS="$LIBS -lftdi -lusb"
  733. #
  734. # Try to build a small program.
  735. AC_MSG_CHECKING([Build & Link with libftdi...])
  736. LDFLAGS_SAVE=$LDFLAGS
  737. CFLAGS_SAVE=$CFLAGS
  738. _LDFLAGS=`eval echo $LDFLAGS`
  739. _CFLAGS=`eval echo $CFLAGS`
  740. LDFLAGS=$_LDFLAGS
  741. CFLAGS=$_CFLAGS
  742. AC_RUN_IFELSE([
  743. #include <stdio.h>
  744. #include <ftdi.h>
  745. int
  746. main( int argc, char **argv )
  747. {
  748. struct ftdi_context *p;
  749. p = ftdi_new();
  750. if( p != NULL ){
  751. return 0;
  752. } else {
  753. fprintf( stderr, "calling ftdi_new() failed\n");
  754. return 1;
  755. }
  756. }
  757. ], [
  758. AC_MSG_RESULT([Success])
  759. ], [
  760. AC_MSG_ERROR([Cannot build & run test program using libftdi])
  761. ], [
  762. AC_MSG_RESULT([Skipping as we are cross-compiling])
  763. ])
  764. AC_MSG_CHECKING([for libftdi highspeed device support])
  765. AC_COMPILE_IFELSE([
  766. #include <stdio.h>
  767. #include <ftdi.h>
  768. enum ftdi_chip_type x = TYPE_2232H;
  769. ], [
  770. AC_DEFINE(BUILD_FT2232_HIGHSPEED, [1],
  771. [Support FT2232H/FT4232HS with FTD2XX or libftdi.])
  772. build_ft2232_highspeed=yes
  773. ], [
  774. build_ft2232_highspeed=no
  775. ])
  776. AC_MSG_RESULT([$build_ft2232_highspeed])
  777. if test $build_ft2232_highspeed = no; then
  778. AC_MSG_WARN([You need a newer libftdi version (0.16 or later).])
  779. fi
  780. # Restore the 'unexpanded ldflags'
  781. LDFLAGS=$LDFLAGS_SAVE
  782. CFLAGS=$CFLAGS_SAVE
  783. fi
  784. # check for usb.h when a driver will require it
  785. if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \
  786. $build_rlink = yes -o $build_armjtagew = yes
  787. then
  788. AC_CHECK_HEADERS([usb.h],[],
  789. [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
  790. fi
  791. AM_CONDITIONAL(RELEASE, test $build_release = yes)
  792. AM_CONDITIONAL(PARPORT, test $build_parport = yes)
  793. AM_CONDITIONAL(DUMMY, test $build_dummy = yes)
  794. AM_CONDITIONAL(GIVEIO, test x$parport_use_giveio = xyes)
  795. AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
  796. AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes)
  797. AM_CONDITIONAL(ZY1000, test $build_zy1000 = yes)
  798. AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes)
  799. AM_CONDITIONAL(HTTPD, test $build_httpd = yes)
  800. AM_CONDITIONAL(AT91RM9200, test $build_at91rm9200 = yes)
  801. AM_CONDITIONAL(BITBANG, test $build_bitbang = yes)
  802. AM_CONDITIONAL(FT2232_LIBFTDI, test $build_ft2232_libftdi = yes)
  803. AM_CONDITIONAL(FT2232_DRIVER, test $build_ft2232_ftd2xx = yes -o $build_ft2232_libftdi = yes)
  804. AM_CONDITIONAL(AMTJTAGACCEL, test $build_amtjtagaccel = yes)
  805. AM_CONDITIONAL(GW16012, test $build_gw16012 = yes)
  806. AM_CONDITIONAL(PRESTO_LIBFTDI, test $build_presto_libftdi = yes)
  807. AM_CONDITIONAL(PRESTO_DRIVER, test $build_presto_ftd2xx = yes -o $build_presto_libftdi = yes)
  808. AM_CONDITIONAL(USBPROG, test $build_usbprog = yes)
  809. AM_CONDITIONAL(OOCD_TRACE, test $build_oocd_trace = yes)
  810. AM_CONDITIONAL(JLINK, test $build_jlink = yes)
  811. AM_CONDITIONAL(VSLLINK, test $build_vsllink = yes)
  812. AM_CONDITIONAL(RLINK, test $build_rlink = yes)
  813. AM_CONDITIONAL(ARMJTAGEW, test $build_armjtagew = yes)
  814. AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
  815. AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes)
  816. AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)
  817. AM_CONDITIONAL(IS_DARWIN, test $is_darwin = yes)
  818. AM_CONDITIONAL(BITQ, test $build_bitq = yes)
  819. AM_CONDITIONAL(MINIDRIVER, test $build_minidriver = yes)
  820. AM_CONDITIONAL(MINIDRIVER_DUMMY, test $build_minidriver_dummy = yes)
  821. # Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
  822. AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
  823. AC_COMPILE_IFELSE([
  824. #define _GNU_SOURCE
  825. #include <unistd.h>
  826. #include <stdlib.h>
  827. int main(int argc, char **argv) { char **ep = environ; }
  828. ], [
  829. AC_MSG_RESULT([yes])
  830. has_environ=yes
  831. ], [
  832. AC_MSG_RESULT([no])
  833. # Possibility #2: can environ be found in an available library?
  834. AC_MSG_CHECKING([for extern environ])
  835. AC_LINK_IFELSE([
  836. extern char **environ;
  837. int main(int argc, char **argv) { char **ep = environ; }
  838. ], [
  839. AC_DEFINE(NEED_ENVIRON_EXTERN, [1], [Must declare 'environ' to use it.])
  840. has_environ=yes
  841. ], [
  842. has_environ=no
  843. ])
  844. AC_MSG_RESULT([${has_environ}])
  845. ])
  846. if test "${has_environ}" != "yes" ; then
  847. AC_MSG_FAILURE([Could not find 'environ' in unistd.h or available libraries.])
  848. fi
  849. AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).])
  850. # set default gcc warnings
  851. GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security"
  852. if test "${gcc_wextra}" = yes; then
  853. GCC_WARNINGS="${GCC_WARNINGS} -Wextra -Wno-unused-parameter"
  854. GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
  855. GCC_WARNINGS="${GCC_WARNINGS} -Wcast-align"
  856. GCC_WARNINGS="${GCC_WARNINGS} -Wredundant-decls"
  857. fi
  858. if test "${gcc_werror}" = yes; then
  859. GCC_WARNINGS="${GCC_WARNINGS} -Werror"
  860. fi
  861. # overide default gcc cflags
  862. if test $gcc_warnings = yes; then
  863. CFLAGS="$CFLAGS $GCC_WARNINGS"
  864. fi
  865. # Setup for compiling build tools
  866. AC_MSG_CHECKING([for a C compiler for build tools])
  867. if test $cross_compiling = yes; then
  868. AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
  869. CFLAGS_FOR_BUILD="-g -O2 $GCC_WARNINGS"
  870. else
  871. CC_FOR_BUILD=$CC
  872. CFLAGS_FOR_BUILD=$CFLAGS
  873. fi
  874. AC_MSG_RESULT([$CC_FOR_BUILD])
  875. AC_SUBST(CC_FOR_BUILD)
  876. AC_SUBST(CFLAGS_FOR_BUILD)
  877. AC_MSG_CHECKING([for suffix of executable build tools])
  878. if test $cross_compiling = yes; then
  879. cat >conftest.c <<\_______EOF
  880. int main ()
  881. {
  882. exit (0);
  883. }
  884. _______EOF
  885. for i in .exe ""; do
  886. compile="$CC_FOR_BUILD conftest.c -o conftest$i"
  887. if AC_TRY_EVAL(compile); then
  888. if (./conftest) 2>&AC_FD_CC; then
  889. EXEEXT_FOR_BUILD=$i
  890. break
  891. fi
  892. fi
  893. done
  894. rm -f conftest*
  895. if test "${EXEEXT_FOR_BUILD+set}" != set; then
  896. AC_MSG_ERROR([Cannot determine suffix of executable build tools])
  897. fi
  898. else
  899. EXEEXT_FOR_BUILD=$EXEEXT
  900. fi
  901. AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
  902. AC_SUBST(EXEEXT_FOR_BUILD)
  903. AC_OUTPUT(dnl
  904. Makefile dnl
  905. src/Makefile dnl
  906. src/helper/Makefile dnl
  907. src/jtag/Makefile dnl
  908. src/xsvf/Makefile dnl
  909. src/svf/Makefile dnl
  910. src/target/Makefile dnl
  911. src/server/Makefile dnl
  912. src/flash/Makefile dnl
  913. src/pld/Makefile dnl
  914. doc/Makefile dnl
  915. )