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.
 
 
 
 
 
 

117 lines
3.5 KiB

  1. AC_INIT(configure.in)
  2. AC_SEARCH_LIBS([ioperm], [ioperm])
  3. AC_CANONICAL_HOST
  4. AC_C_BIGENDIAN
  5. AC_CHECK_FUNCS(strndup)
  6. build_bitbang=no
  7. is_cygwin=no
  8. AC_ARG_ENABLE(parport,
  9. AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
  10. [build_parport=$enableval], [build_parport=no])
  11. AC_ARG_ENABLE(parport_ppdev,
  12. AS_HELP_STRING([--enable-parport_ppdev], [Enable use of ppdev (/dev/parportN) for parport]),
  13. [parport_use_ppdev=$enableval], [parport_use_ppdev=no])
  14. AC_ARG_ENABLE(ftdi2232,
  15. AS_HELP_STRING([--enable-ftdi2232], [Enable building the libftdi ft2232c driver]),
  16. [build_ftdi2232=$enableval], [build_ftdi2232=no])
  17. AC_ARG_ENABLE(ftd2xx,
  18. AS_HELP_STRING([--enable-ftd2xx], [Enable building the ftd2xx ft2232c driver]),
  19. [build_ftd2xx=$enableval], [build_ftd2xx=no])
  20. AC_ARG_ENABLE(amtjtagaccel,
  21. AS_HELP_STRING([--enable-amtjtagaccel], [Enable building the Amontec JTAG-Accelerator driver]),
  22. [build_amtjtagaccel=$enableval], [build_amtjtagaccel=no])
  23. AC_ARG_ENABLE(ep93xx,
  24. AS_HELP_STRING([--enable-ep93xx], [Enable building support for EP93xx based SBCs]),
  25. [build_ep93xx=$enableval], [build_ep93xx=no])
  26. AC_ARG_WITH(ftd2xx,
  27. [AS_HELP_STRING(--with-ftd2xx,
  28. [Where libftd2xx can be found <default=search>])],
  29. [],
  30. with_ftd2xx=search)
  31. if test $build_parport = yes; then
  32. build_bitbang=yes
  33. AC_DEFINE(BUILD_PARPORT, 1, [1 if you want parport.])
  34. else
  35. AC_DEFINE(BUILD_PARPORT, 0, [0 if you don't want parport.])
  36. fi
  37. if test $build_ep93xx = yes; then
  38. build_bitbang=yes
  39. AC_DEFINE(BUILD_EP93XX, 1, [1 if you want ep93xx.])
  40. else
  41. AC_DEFINE(BUILD_EP93XX, 0, [0 if you don't want ep93xx.])
  42. fi
  43. if test $parport_use_ppdev = yes; then
  44. AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
  45. else
  46. AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
  47. fi
  48. if test $build_bitbang = yes; then
  49. AC_DEFINE(BUILD_BITBANG, 1, [1 if you want a bitbang interface.])
  50. else
  51. AC_DEFINE(BUILD_BITBANG, 0, [0 if you don't want a bitbang interface.])
  52. fi
  53. if test $build_ftdi2232 = yes; then
  54. AC_DEFINE(BUILD_FTDI2232, 1, [1 if you want libftdi ft2232.])
  55. else
  56. AC_DEFINE(BUILD_FTDI2232, 0, [0 if you don't want libftdi ft2232.])
  57. fi
  58. if test $build_ftd2xx = yes; then
  59. AC_DEFINE(BUILD_FTD2XX, 1, [1 if you want ftd2xx ft2232.])
  60. else
  61. AC_DEFINE(BUILD_FTD2XX, 0, [0 if you don't want ftd2xx ft2232.])
  62. fi
  63. if test $build_amtjtagaccel = yes; then
  64. AC_DEFINE(BUILD_AMTJTAGACCEL, 1, [1 if you want the Amontec JTAG-Accelerator driver.])
  65. else
  66. AC_DEFINE(BUILD_AMTJTAGACCEL, 0, [0 if you don't want the Amontec JTAG-Accelerator driver.])
  67. fi
  68. case $host in
  69. *-*-cygwin*)
  70. is_cygwin=yes
  71. AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
  72. ;;
  73. *)
  74. AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
  75. ;;
  76. esac
  77. AM_CONFIG_HEADER(config.h)
  78. AM_INIT_AUTOMAKE(openocd, 0.1)
  79. AM_CONDITIONAL(PARPORT, test $build_parport = yes)
  80. AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
  81. AM_CONDITIONAL(BITBANG, test $build_bitbang = yes)
  82. AM_CONDITIONAL(FTDI2232, test $build_ftdi2232 = yes)
  83. AM_CONDITIONAL(FTD2XX, test $build_ftd2xx = yes)
  84. AM_CONDITIONAL(AMTJTAGACCEL, test $build_amtjtagaccel = yes)
  85. AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
  86. AM_CONDITIONAL(FTD2XXDIR, test $with_ftd2xx != search)
  87. AC_LANG_C
  88. AC_PROG_CC
  89. AC_PROG_RANLIB
  90. AC_SUBST(WITH_FTD2XX, $with_ftd2xx)
  91. AC_OUTPUT(Makefile src/Makefile src/helper/Makefile src/jtag/Makefile src/xsvf/Makefile src/target/Makefile src/server/Makefile src/flash/Makefile)