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.
 
 
 
 
 
 

1068 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],
  314. [Enable building support for some prototype OpenOCD+trace ETM capture hardware]),
  315. [build_oocd_trace=$enableval], [build_oocd_trace=no])
  316. AC_ARG_ENABLE(jlink,
  317. AS_HELP_STRING([--enable-jlink], [Enable building support for the Segger J-Link JTAG Programmer]),
  318. [build_jlink=$enableval], [build_jlink=no])
  319. AC_ARG_ENABLE(vsllink,
  320. AS_HELP_STRING([--enable-vsllink], [Enable building support for the Versaloon-Link JTAG Programmer]),
  321. [build_vsllink=$enableval], [build_vsllink=no])
  322. AC_ARG_ENABLE(rlink,
  323. AS_HELP_STRING([--enable-rlink], [Enable building support for the Raisonance RLink JTAG Programmer]),
  324. [build_rlink=$enableval], [build_rlink=no])
  325. AC_ARG_ENABLE(arm-jtag-ew,
  326. AS_HELP_STRING([--enable-arm-jtag-ew], [Enable building support for the Olimex ARM-JTAG-EW Programmer]),
  327. [build_armjtagew=$enableval], [build_armjtagew=no])
  328. AC_ARG_ENABLE(minidriver_dummy,
  329. AS_HELP_STRING([--enable-minidriver-dummy], [Enable the dummy minidriver.]),
  330. [build_minidriver_dummy=$enableval], [build_minidriver_dummy=no])
  331. build_minidriver=no
  332. AC_MSG_CHECKING([whether to enable ZY1000 minidriver])
  333. if test $build_zy1000 = yes; then
  334. if test $build_minidriver = yes; then
  335. AC_MSG_ERROR([Multiple minidriver options have been enabled.])
  336. fi
  337. AC_DEFINE(HAVE_JTAG_MINIDRIVER_H, 1,
  338. [Define to 1 if you have the <jtag_minidriver.h> header file.])
  339. build_minidriver=yes
  340. fi
  341. AC_MSG_RESULT($build_zy1000)
  342. AC_MSG_CHECKING([whether to enable dummy minidriver])
  343. if test $build_minidriver_dummy = yes; then
  344. if test $build_minidriver = yes; then
  345. AC_MSG_ERROR([Multiple minidriver options have been enabled.])
  346. fi
  347. build_minidriver=yes
  348. AC_DEFINE(BUILD_MINIDRIVER_DUMMY, 1, [Use the dummy minidriver.])
  349. AC_DEFINE(HAVE_JTAG_MINIDRIVER_H, 1,
  350. [Define to 1 if you have the <jtag_minidriver.h> header file.])
  351. fi
  352. AC_MSG_RESULT($build_minidriver_dummy)
  353. AC_MSG_CHECKING([whether standard drivers can be built])
  354. if test "$build_minidriver" = yes; then
  355. AC_MSG_RESULT([no])
  356. AC_MSG_WARN([Using the minidriver disables all other drivers.])
  357. sleep 2
  358. else
  359. AC_MSG_RESULT([yes])
  360. fi
  361. case "${host_cpu}" in
  362. i?86|x86*)
  363. ;;
  364. *)
  365. if test x$parport_use_ppdev = xno; then
  366. AC_MSG_WARN([--disable-parport-ppdev is not supported by the host CPU])
  367. fi
  368. parport_use_ppdev=yes
  369. ;;
  370. esac
  371. case $host in
  372. *-cygwin*)
  373. is_win32=yes
  374. parport_use_ppdev=no
  375. AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),
  376. [is_mingw=yes],[is_mingw=no])
  377. if test $is_mingw = yes; then
  378. AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
  379. if test x$parport_use_giveio = xno; then
  380. AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
  381. fi
  382. parport_use_giveio=yes
  383. is_cygwin=no
  384. else
  385. is_cygwin=yes
  386. AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
  387. # sys/io.h needed under cygwin for parport access
  388. if test $build_parport = yes; then
  389. AC_CHECK_HEADERS(sys/io.h,[],AC_MSG_ERROR([Please install the cygwin ioperm package]))
  390. fi
  391. fi
  392. AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
  393. AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
  394. ;;
  395. *-mingw*)
  396. is_mingw=yes
  397. is_win32=yes
  398. parport_use_ppdev=no
  399. if test x$parport_use_giveio = xno; then
  400. AC_MSG_WARN([--disable-parport-giveio is not supported by MinGW32 hosts])
  401. fi
  402. parport_use_giveio=yes
  403. CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO"
  404. AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
  405. AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
  406. AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
  407. ;;
  408. *darwin*)
  409. is_darwin=yes
  410. if test x$parport_use_giveio = xyes; then
  411. AC_MSG_WARN([--enable-parport-giveio cannot be used by Darwin hosts])
  412. fi
  413. parport_use_giveio=no
  414. AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
  415. AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
  416. AC_DEFINE(IS_DARWIN, 1, [1 if building for Darwin.])
  417. ;;
  418. *)
  419. if test x$parport_use_giveio = xyes; then
  420. AC_MSG_WARN([--enable-parport-giveio cannot be used by ]$host[ hosts])
  421. fi
  422. parport_use_giveio=no
  423. AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
  424. AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
  425. AC_DEFINE(IS_DARWIN, 0, [0 if not building for Darwin.])
  426. ;;
  427. esac
  428. if test $build_parport = yes; then
  429. build_bitbang=yes
  430. AC_DEFINE(BUILD_PARPORT, 1, [1 if you want parport.])
  431. else
  432. AC_DEFINE(BUILD_PARPORT, 0, [0 if you don't want parport.])
  433. fi
  434. if test $build_dummy = yes; then
  435. build_bitbang=yes
  436. AC_DEFINE(BUILD_DUMMY, 1, [1 if you want dummy driver.])
  437. else
  438. AC_DEFINE(BUILD_DUMMY, 0, [0 if you don't want dummy driver.])
  439. fi
  440. if test $build_ep93xx = yes; then
  441. build_bitbang=yes
  442. AC_DEFINE(BUILD_EP93XX, 1, [1 if you want ep93xx.])
  443. else
  444. AC_DEFINE(BUILD_EP93XX, 0, [0 if you don't want ep93xx.])
  445. fi
  446. if test $build_ecosboard = yes; then
  447. AC_DEFINE(BUILD_ECOSBOARD, 1, [1 if you want eCosBoard.])
  448. else
  449. AC_DEFINE(BUILD_ECOSBOARD, 0, [0 if you don't want eCosBoard.])
  450. fi
  451. if test $build_zy1000 = yes; then
  452. AC_DEFINE(BUILD_ZY1000, 1, [1 if you want ZY1000.])
  453. else
  454. AC_DEFINE(BUILD_ZY1000, 0, [0 if you don't want ZY1000.])
  455. fi
  456. if test $build_ioutil = yes; then
  457. AC_DEFINE(BUILD_IOUTIL, 1, [1 if you want ioutils.])
  458. else
  459. AC_DEFINE(BUILD_IOUTIL, 0, [0 if you don't want ioutils.])
  460. fi
  461. if test $build_httpd = yes; then
  462. AC_DEFINE(BUILD_HTTPD, 1, [1 if you want httpd.])
  463. else
  464. AC_DEFINE(BUILD_HTTPD, 0, [0 if you don't want httpd.])
  465. fi
  466. if test $build_at91rm9200 = yes; then
  467. build_bitbang=yes
  468. AC_DEFINE(BUILD_AT91RM9200, 1, [1 if you want at91rm9200.])
  469. else
  470. AC_DEFINE(BUILD_AT91RM9200, 0, [0 if you don't want at91rm9200.])
  471. fi
  472. if test x$parport_use_ppdev = xyes; then
  473. AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
  474. else
  475. AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
  476. fi
  477. if test x$parport_use_giveio = xyes; then
  478. AC_DEFINE(PARPORT_USE_GIVEIO, 1, [1 if you want parport to use giveio.])
  479. else
  480. AC_DEFINE(PARPORT_USE_GIVEIO, 0, [0 if you don't want parport to use giveio.])
  481. fi
  482. if test $build_bitbang = yes; then
  483. AC_DEFINE(BUILD_BITBANG, 1, [1 if you want a bitbang interface.])
  484. else
  485. AC_DEFINE(BUILD_BITBANG, 0, [0 if you don't want a bitbang interface.])
  486. fi
  487. if test $build_ft2232_libftdi = yes; then
  488. AC_DEFINE(BUILD_FT2232_LIBFTDI, 1, [1 if you want libftdi ft2232.])
  489. else
  490. AC_DEFINE(BUILD_FT2232_LIBFTDI, 0, [0 if you don't want libftdi ft2232.])
  491. fi
  492. if test $build_ft2232_ftd2xx = yes; then
  493. AC_DEFINE(BUILD_FT2232_FTD2XX, 1, [1 if you want ftd2xx ft2232.])
  494. else
  495. AC_DEFINE(BUILD_FT2232_FTD2XX, 0, [0 if you don't want ftd2xx ft2232.])
  496. fi
  497. if test $build_amtjtagaccel = yes; then
  498. AC_DEFINE(BUILD_AMTJTAGACCEL, 1, [1 if you want the Amontec JTAG-Accelerator driver.])
  499. else
  500. AC_DEFINE(BUILD_AMTJTAGACCEL, 0, [0 if you don't want the Amontec JTAG-Accelerator driver.])
  501. fi
  502. if test $build_gw16012 = yes; then
  503. AC_DEFINE(BUILD_GW16012, 1, [1 if you want the Gateworks GW16012 driver.])
  504. else
  505. AC_DEFINE(BUILD_GW16012, 0, [0 if you don't want the Gateworks GW16012 driver.])
  506. fi
  507. if test $build_presto_libftdi = yes; then
  508. build_bitq=yes
  509. AC_DEFINE(BUILD_PRESTO_LIBFTDI, 1, [1 if you want the ASIX PRESTO driver using libftdi.])
  510. else
  511. AC_DEFINE(BUILD_PRESTO_LIBFTDI, 0, [0 if you don't want the ASIX PRESTO driver using libftdi.])
  512. fi
  513. if test $build_presto_ftd2xx = yes; then
  514. build_bitq=yes
  515. AC_DEFINE(BUILD_PRESTO_FTD2XX, 1, [1 if you want the ASIX PRESTO driver using FTD2XX.])
  516. else
  517. AC_DEFINE(BUILD_PRESTO_FTD2XX, 0, [0 if you don't want the ASIX PRESTO driver using FTD2XX.])
  518. fi
  519. if test $build_bitq = yes; then
  520. AC_DEFINE(BUILD_BITQ, 1, [1 if you want a bitq interface.])
  521. else
  522. AC_DEFINE(BUILD_BITQ, 0, [0 if you don't want a bitq interface.])
  523. fi
  524. if test $build_usbprog = yes; then
  525. AC_DEFINE(BUILD_USBPROG, 1, [1 if you want the usbprog JTAG driver.])
  526. else
  527. AC_DEFINE(BUILD_USBPROG, 0, [0 if you don't want the usbprog JTAG driver.])
  528. fi
  529. if test $build_oocd_trace = yes; then
  530. AC_DEFINE(BUILD_OOCD_TRACE, 1, [1 if you want the OpenOCD+trace ETM capture driver.])
  531. else
  532. AC_DEFINE(BUILD_OOCD_TRACE, 0, [0 if you don't want the OpenOCD+trace ETM capture driver.])
  533. fi
  534. if test $build_jlink = yes; then
  535. AC_DEFINE(BUILD_JLINK, 1, [1 if you want the J-Link JTAG driver.])
  536. else
  537. AC_DEFINE(BUILD_JLINK, 0, [0 if you don't want the J-Link JTAG driver.])
  538. fi
  539. if test $build_vsllink = yes; then
  540. AC_DEFINE(BUILD_VSLLINK, 1, [1 if you want the Versaloon-Link JTAG driver.])
  541. else
  542. AC_DEFINE(BUILD_VSLLINK, 0, [0 if you don't want the Versaloon-Link JTAG driver.])
  543. fi
  544. if test $build_rlink = yes; then
  545. AC_DEFINE(BUILD_RLINK, 1, [1 if you want the RLink JTAG driver.])
  546. else
  547. AC_DEFINE(BUILD_RLINK, 0, [0 if you don't want the RLink JTAG driver.])
  548. fi
  549. if test $build_armjtagew = yes; then
  550. AC_DEFINE(BUILD_ARMJTAGEW, 1, [1 if you want the ARM-JTAG-EW JTAG driver.])
  551. else
  552. AC_DEFINE(BUILD_ARMJTAGEW, 0, [0 if you don't want the ARM-JTAG-EW JTAG driver.])
  553. fi
  554. #-- Deal with MingW/Cygwin FTD2XX issues
  555. if test $is_win32 = yes; then
  556. if test "${with_ftd2xx_linux_tardir+set}" = set
  557. then
  558. AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
  559. fi
  560. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
  561. AC_MSG_CHECKING([for ftd2xx.lib exists (win32)])
  562. # if we are given a zipdir...
  563. if test "${with_ftd2xx_win32_zipdir+set}" = set
  564. then
  565. # Set the CFLAGS for "ftd2xx.h"
  566. f=$with_ftd2xx_win32_zipdir/ftd2xx.h
  567. if test ! -f $f ; then
  568. AC_MSG_ERROR([File: $f cannot be found])
  569. fi
  570. CFLAGS="$CFLAGS -I$with_ftd2xx_win32_zipdir"
  571. # And calculate the LDFLAGS for the machine
  572. case "$host_cpu" in
  573. i?86|x86_*)
  574. LDFLAGS="$LDFLAGS -L$with_ftd2xx_win32_zipdir/i386"
  575. LIBS="$LIBS -lftd2xx"
  576. f=$with_ftd2xx_win32_zipdir/i386/ftd2xx.lib
  577. ;;
  578. amd64)
  579. LDFLAGS="$LDFLAGS -L$with_ftd2xx_win32_zipdir/amd64"
  580. LIBS="$LIBS -lftd2xx"
  581. f=$with_ftd2xx_win32_zipdir/amd64/ftd2xx.lib
  582. ;;
  583. *)
  584. AC_MSG_ERROR([Unknown Win32 host cpu: $host_cpu])
  585. ;;
  586. esac
  587. if test ! -f $f ; then
  588. AC_MSG_ERROR([Library: $f not found])
  589. fi
  590. else
  591. LIBS="$LIBS -lftd2xx"
  592. AC_MSG_WARN([ASSUMPTION: The (win32) FTDICHIP.COM files: ftd2xx.h and ftd2xx.lib are in a proper place])
  593. fi
  594. fi
  595. fi # win32
  596. if test $is_darwin = yes ; then
  597. if test "${with_ftd2xx_win32_zipdir+set}" = set
  598. then
  599. AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only])
  600. fi
  601. if test "${with_ftd2xx_linux_tardir+set}" = set
  602. then
  603. AC_MSG_ERROR([The option: with_ftd2xx_linux_tardir is for LINUX only.])
  604. fi
  605. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
  606. AC_MSG_CHECKING([for libftd2xx.a (darwin)])
  607. if test ! -f /usr/local/include/ftd2xx.h ; then
  608. AC_MSG_ERROR([ftd2xx library from FTDICHIP.com seems to be missing, cannot find: /usr/local/include/ftd2xx.h])
  609. fi
  610. CFLAGS="$CFLAGS -I/usr/local/include"
  611. LDFLAGS="$LDFLAGS -L/usr/local/lib"
  612. LIBS="$LIBS -lftd2xx"
  613. AC_MSG_RESULT([-L/usr/local/lib -lftd2xx])
  614. fi
  615. fi # darwin
  616. if test $is_win32 = no && test $is_darwin = no ; then
  617. if test "${with_ftd2xx_win32_zipdir+set}" = set
  618. then
  619. AC_MSG_ERROR([The option: --with-ftd2xx-win32-zipdir is for win32 only])
  620. fi
  621. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes ; then
  622. # Must be linux
  623. if test $host_os != linux-gnu && test $host_os != linux ; then
  624. AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi instead])
  625. fi
  626. # Are we given a TAR directory?
  627. if test "${with_ftd2xx_linux_tardir+set}" = set
  628. then
  629. AC_MSG_CHECKING([uninstalled ftd2xx distribution])
  630. # The .H file is simple..
  631. FTD2XX_H=$with_ftd2xx_linux_tardir/ftd2xx.h
  632. if test ! -f "${FTD2XX_H}"; then
  633. AC_MSG_ERROR([Option: --with-ftd2xx-linux-tardir appears wrong, cannot find: ${FTD2XX_H}])
  634. fi
  635. CFLAGS="$CFLAGS -I$with_ftd2xx_linux_tardir"
  636. FTD2XX_LDFLAGS="-L$with_ftd2xx_linux_tardir"
  637. FTD2XX_LIB="-lftd2xx"
  638. if test $with_ftd2xx_lib != shared; then
  639. # Test #1 - Future proof - if/when ftdichip fixes their distro.
  640. # Try it with the simple ".a" suffix.
  641. FTD2XX_LIB="$with_ftd2xx_linux_tardir/static_lib/libftd2xx.a"
  642. if test -f "${FTD2XX_LIB}"; then
  643. FTD2XX_LDFLAGS="${FTD2XX_LDFLAGS}/static_lib"
  644. else
  645. # Test Number2.
  646. # Grr.. perhaps it exists as a version number?
  647. FTD2XX_LIB="$with_ftd2xx_linux_tardir/static_lib/libftd2xx.a.*.*.*"
  648. count=`ls ${FTD2XX_LIB} | wc -l`
  649. if test $count -gt 1 ; then
  650. AC_MSG_ERROR([Multiple libftd2xx.a files found in: $with_ftd2xx_linux_tardir/static_lib sorry cannot handle this yet])
  651. fi
  652. if test $count -ne 1 ; then
  653. AC_MSG_ERROR([Not found: $f, option: --with-ftd2xx-linux-tardir appears to be wrong])
  654. fi
  655. # Because the "-l" rules do not understand version numbers...
  656. # we will just stuff the absolute path onto the LIBS variable
  657. FTD2XX_LIB="`ls ${FTD2XX_LIB}` -lpthread"
  658. FTD2XX_LDFLAGS=""
  659. fi
  660. fi
  661. LDFLAGS="${LDFLAGS} ${FTD2XX_LDFLAGS}"
  662. LIBS="${LIBS} ${FTD2XX_LIB}"
  663. AC_MSG_RESULT([${FTD2XX_LDFLAGS} ${FTD2XX_LIB}])
  664. else
  665. AC_CHECK_HEADER([ftd2xx.h],[],[
  666. AC_MSG_ERROR([You seem to be missing the FTD2xx driver header file.])
  667. ])
  668. AC_SEARCH_LIBS([FT_GetLibraryVersion],[ftd2xx],,[
  669. AC_MSG_ERROR([You appear to be missing the FTD2xx driver library.])
  670. ],[])
  671. fi
  672. fi
  673. fi # linux
  674. if test $build_ft2232_ftd2xx = yes -o $build_presto_ftd2xx = yes; then
  675. # Before we go any further - make sure we can *BUILD* and *RUN*
  676. # a simple app with the "ftd2xx.lib" file - in what ever form we where given
  677. # We should be able to compile, link and run this test program now
  678. AC_MSG_CHECKING([whether ftd2xx library works])
  679. #
  680. # Save the LDFLAGS for later..
  681. LDFLAGS_SAVE=$LDFLAGS
  682. CFLAGS_SAVE=$CFLAGS
  683. _LDFLAGS=`eval echo $LDFLAGS`
  684. _CFLAGS=`eval echo $CFLAGS`
  685. LDFLAGS=$_LDFLAGS
  686. CFLAGS=$_CFLAGS
  687. AC_RUN_IFELSE([
  688. #include "confdefs.h"
  689. #if IS_WIN32
  690. #include "windows.h"
  691. #endif
  692. #include <stdio.h>
  693. #include <ftd2xx.h>
  694. int
  695. main( int argc, char **argv )
  696. {
  697. DWORD x;
  698. FT_GetLibraryVersion( &x );
  699. return 0;
  700. }
  701. ], [
  702. AC_MSG_RESULT([Success!])
  703. ], [
  704. AC_MSG_ERROR([Cannot build & run test program using ftd2xx.lib])
  705. ], [
  706. AC_MSG_RESULT([Skipping as we are cross-compiling])
  707. ])
  708. AC_MSG_CHECKING([for ftd2xx highspeed device support])
  709. AC_COMPILE_IFELSE([
  710. #include "confdefs.h"
  711. #if IS_WIN32
  712. #include "windows.h"
  713. #endif
  714. #include <stdio.h>
  715. #include <ftd2xx.h>
  716. DWORD x = FT_DEVICE_4232H;
  717. ], [
  718. AC_DEFINE(BUILD_FT2232_HIGHSPEED, [1],
  719. [Support FT2232H/FT4232HS with FTD2XX or libftdi.])
  720. build_ft2232_highspeed=yes
  721. ], [
  722. build_ft2232_highspeed=no
  723. ])
  724. AC_MSG_RESULT([$build_ft2232_highspeed])
  725. if test $build_ft2232_highspeed = no; then
  726. AC_MSG_WARN([You need a newer FTD2XX driver (version 2.04.16 or later).])
  727. fi
  728. LDFLAGS=$LDFLAGS_SAVE
  729. CFLAGS=$CFLAGS_SAVE
  730. fi
  731. if test $build_ft2232_libftdi = yes ; then
  732. # We assume: the package is preinstalled in the proper place
  733. # these present as 2 libraries..
  734. LIBS="$LIBS -lftdi -lusb"
  735. #
  736. # Try to build a small program.
  737. AC_MSG_CHECKING([Build & Link with libftdi...])
  738. LDFLAGS_SAVE=$LDFLAGS
  739. CFLAGS_SAVE=$CFLAGS
  740. _LDFLAGS=`eval echo $LDFLAGS`
  741. _CFLAGS=`eval echo $CFLAGS`
  742. LDFLAGS=$_LDFLAGS
  743. CFLAGS=$_CFLAGS
  744. AC_RUN_IFELSE([
  745. #include <stdio.h>
  746. #include <ftdi.h>
  747. int
  748. main( int argc, char **argv )
  749. {
  750. struct ftdi_context *p;
  751. p = ftdi_new();
  752. if( p != NULL ){
  753. return 0;
  754. } else {
  755. fprintf( stderr, "calling ftdi_new() failed\n");
  756. return 1;
  757. }
  758. }
  759. ], [
  760. AC_MSG_RESULT([Success])
  761. ], [
  762. AC_MSG_ERROR([Cannot build & run test program using libftdi])
  763. ], [
  764. AC_MSG_RESULT([Skipping as we are cross-compiling])
  765. ])
  766. AC_MSG_CHECKING([for libftdi highspeed device support])
  767. AC_COMPILE_IFELSE([
  768. #include <stdio.h>
  769. #include <ftdi.h>
  770. enum ftdi_chip_type x = TYPE_2232H;
  771. ], [
  772. AC_DEFINE(BUILD_FT2232_HIGHSPEED, [1],
  773. [Support FT2232H/FT4232HS with FTD2XX or libftdi.])
  774. build_ft2232_highspeed=yes
  775. ], [
  776. build_ft2232_highspeed=no
  777. ])
  778. AC_MSG_RESULT([$build_ft2232_highspeed])
  779. if test $build_ft2232_highspeed = no; then
  780. AC_MSG_WARN([You need a newer libftdi version (0.16 or later).])
  781. fi
  782. # Restore the 'unexpanded ldflags'
  783. LDFLAGS=$LDFLAGS_SAVE
  784. CFLAGS=$CFLAGS_SAVE
  785. fi
  786. # check for usb.h when a driver will require it
  787. if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \
  788. $build_rlink = yes -o $build_armjtagew = yes
  789. then
  790. AC_CHECK_HEADERS([usb.h],[],
  791. [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
  792. fi
  793. AM_CONDITIONAL(RELEASE, test $build_release = yes)
  794. AM_CONDITIONAL(PARPORT, test $build_parport = yes)
  795. AM_CONDITIONAL(DUMMY, test $build_dummy = yes)
  796. AM_CONDITIONAL(GIVEIO, test x$parport_use_giveio = xyes)
  797. AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
  798. AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes)
  799. AM_CONDITIONAL(ZY1000, test $build_zy1000 = yes)
  800. AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes)
  801. AM_CONDITIONAL(HTTPD, test $build_httpd = yes)
  802. AM_CONDITIONAL(AT91RM9200, test $build_at91rm9200 = yes)
  803. AM_CONDITIONAL(BITBANG, test $build_bitbang = yes)
  804. AM_CONDITIONAL(FT2232_LIBFTDI, test $build_ft2232_libftdi = yes)
  805. AM_CONDITIONAL(FT2232_DRIVER, test $build_ft2232_ftd2xx = yes -o $build_ft2232_libftdi = yes)
  806. AM_CONDITIONAL(AMTJTAGACCEL, test $build_amtjtagaccel = yes)
  807. AM_CONDITIONAL(GW16012, test $build_gw16012 = yes)
  808. AM_CONDITIONAL(PRESTO_LIBFTDI, test $build_presto_libftdi = yes)
  809. AM_CONDITIONAL(PRESTO_DRIVER, test $build_presto_ftd2xx = yes -o $build_presto_libftdi = yes)
  810. AM_CONDITIONAL(USBPROG, test $build_usbprog = yes)
  811. AM_CONDITIONAL(OOCD_TRACE, test $build_oocd_trace = yes)
  812. AM_CONDITIONAL(JLINK, test $build_jlink = yes)
  813. AM_CONDITIONAL(VSLLINK, test $build_vsllink = yes)
  814. AM_CONDITIONAL(RLINK, test $build_rlink = yes)
  815. AM_CONDITIONAL(ARMJTAGEW, test $build_armjtagew = yes)
  816. AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
  817. AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes)
  818. AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)
  819. AM_CONDITIONAL(IS_DARWIN, test $is_darwin = yes)
  820. AM_CONDITIONAL(BITQ, test $build_bitq = yes)
  821. AM_CONDITIONAL(MINIDRIVER, test $build_minidriver = yes)
  822. AM_CONDITIONAL(MINIDRIVER_DUMMY, test $build_minidriver_dummy = yes)
  823. # Look for environ alternatives. Possibility #1: is environ in unistd.h or stdlib.h?
  824. AC_MSG_CHECKING([for environ in unistd.h and stdlib.h])
  825. AC_COMPILE_IFELSE([
  826. #define _GNU_SOURCE
  827. #include <unistd.h>
  828. #include <stdlib.h>
  829. int main(int argc, char **argv) { char **ep = environ; }
  830. ], [
  831. AC_MSG_RESULT([yes])
  832. has_environ=yes
  833. ], [
  834. AC_MSG_RESULT([no])
  835. # Possibility #2: can environ be found in an available library?
  836. AC_MSG_CHECKING([for extern environ])
  837. AC_LINK_IFELSE([
  838. extern char **environ;
  839. int main(int argc, char **argv) { char **ep = environ; }
  840. ], [
  841. AC_DEFINE(NEED_ENVIRON_EXTERN, [1], [Must declare 'environ' to use it.])
  842. has_environ=yes
  843. ], [
  844. has_environ=no
  845. ])
  846. AC_MSG_RESULT([${has_environ}])
  847. ])
  848. if test "${has_environ}" != "yes" ; then
  849. AC_MSG_FAILURE([Could not find 'environ' in unistd.h or available libraries.])
  850. fi
  851. AC_DEFINE([_GNU_SOURCE],[1],[Use GNU C library extensions (e.g. stdndup).])
  852. # set default gcc warnings
  853. GCC_WARNINGS="-Wall -Wstrict-prototypes -Wformat-security"
  854. if test "${gcc_wextra}" = yes; then
  855. GCC_WARNINGS="${GCC_WARNINGS} -Wextra -Wno-unused-parameter"
  856. GCC_WARNINGS="${GCC_WARNINGS} -Wbad-function-cast"
  857. GCC_WARNINGS="${GCC_WARNINGS} -Wcast-align"
  858. GCC_WARNINGS="${GCC_WARNINGS} -Wredundant-decls"
  859. fi
  860. if test "${gcc_werror}" = yes; then
  861. GCC_WARNINGS="${GCC_WARNINGS} -Werror"
  862. fi
  863. # overide default gcc cflags
  864. if test $gcc_warnings = yes; then
  865. CFLAGS="$CFLAGS $GCC_WARNINGS"
  866. fi
  867. # Setup for compiling build tools
  868. AC_MSG_CHECKING([for a C compiler for build tools])
  869. if test $cross_compiling = yes; then
  870. AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
  871. CFLAGS_FOR_BUILD="-g -O2 $GCC_WARNINGS"
  872. else
  873. CC_FOR_BUILD=$CC
  874. CFLAGS_FOR_BUILD=$CFLAGS
  875. fi
  876. AC_MSG_RESULT([$CC_FOR_BUILD])
  877. AC_SUBST(CC_FOR_BUILD)
  878. AC_SUBST(CFLAGS_FOR_BUILD)
  879. AC_MSG_CHECKING([for suffix of executable build tools])
  880. if test $cross_compiling = yes; then
  881. cat >conftest.c <<\_______EOF
  882. int main ()
  883. {
  884. exit (0);
  885. }
  886. _______EOF
  887. for i in .exe ""; do
  888. compile="$CC_FOR_BUILD conftest.c -o conftest$i"
  889. if AC_TRY_EVAL(compile); then
  890. if (./conftest) 2>&AC_FD_CC; then
  891. EXEEXT_FOR_BUILD=$i
  892. break
  893. fi
  894. fi
  895. done
  896. rm -f conftest*
  897. if test "${EXEEXT_FOR_BUILD+set}" != set; then
  898. AC_MSG_ERROR([Cannot determine suffix of executable build tools])
  899. fi
  900. else
  901. EXEEXT_FOR_BUILD=$EXEEXT
  902. fi
  903. AC_MSG_RESULT([$EXEEXT_FOR_BUILD])
  904. AC_SUBST(EXEEXT_FOR_BUILD)
  905. AC_OUTPUT(dnl
  906. Makefile dnl
  907. src/Makefile dnl
  908. src/helper/Makefile dnl
  909. src/jtag/Makefile dnl
  910. src/xsvf/Makefile dnl
  911. src/svf/Makefile dnl
  912. src/target/Makefile dnl
  913. src/server/Makefile dnl
  914. src/flash/Makefile dnl
  915. src/pld/Makefile dnl
  916. doc/Makefile dnl
  917. )