- Added support for native MinGW builds (thanks to Spencer Oliver and Michael Fischer...
[openocd.git] / configure.in
1 AC_INIT(configure.in)
2
3 AC_SEARCH_LIBS([ioperm], [ioperm])
4
5 AC_CANONICAL_HOST
6
7 AC_C_BIGENDIAN
8
9 AC_CHECK_FUNCS(strndup)
10 AC_CHECK_FUNCS(strnlen)
11 AC_CHECK_FUNCS(gettimeofday)
12 AC_CHECK_FUNCS(usleep)
13
14 build_bitbang=no
15 is_cygwin=no
16 is_mingw=no
17 is_win32=no
18
19 AC_ARG_ENABLE(parport,
20 AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
21 [build_parport=$enableval], [build_parport=no])
22
23 AC_ARG_ENABLE(parport_ppdev,
24 AS_HELP_STRING([--enable-parport_ppdev], [Enable use of ppdev (/dev/parportN) for parport]),
25 [parport_use_ppdev=$enableval], [parport_use_ppdev=no])
26
27 AC_ARG_ENABLE(ftdi2232,
28 AS_HELP_STRING([--enable-ftdi2232], [Enable building the libftdi ft2232c driver]),
29 [build_ftdi2232=$enableval], [build_ftdi2232=no])
30
31 AC_ARG_ENABLE(ftd2xx,
32 AS_HELP_STRING([--enable-ftd2xx], [Enable building the ftd2xx ft2232c driver]),
33 [build_ftd2xx=$enableval], [build_ftd2xx=no])
34
35 AC_ARG_ENABLE(amtjtagaccel,
36 AS_HELP_STRING([--enable-amtjtagaccel], [Enable building the Amontec JTAG-Accelerator driver]),
37 [build_amtjtagaccel=$enableval], [build_amtjtagaccel=no])
38
39 AC_ARG_ENABLE(ep93xx,
40 AS_HELP_STRING([--enable-ep93xx], [Enable building support for EP93xx based SBCs]),
41 [build_ep93xx=$enableval], [build_ep93xx=no])
42
43 AC_ARG_WITH(ftd2xx,
44 [AS_HELP_STRING(--with-ftd2xx,
45 [Where libftd2xx can be found <default=search>])],
46 [],
47 with_ftd2xx=search)
48
49 case $host in
50 *-*-cygwin*)
51 is_cygwin=yes
52 is_win32=yes
53
54 AC_ARG_ENABLE(parport_giveio,
55 AS_HELP_STRING([--enable-parport_giveio], [Enable use of giveio for parport instead of ioperm]),
56 [parport_use_giveio=$enableval], [parport_use_giveio=no])
57
58 AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
59 AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
60 ;;
61 *-*-mingw*)
62 is_mingw=yes
63 is_win32=yes
64
65 parport_use_giveio=yes
66
67 AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
68 AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
69 ;;
70 *)
71 parport_use_giveio=no
72 AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
73 AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
74 ;;
75 esac
76
77 if test $build_parport = yes; then
78 build_bitbang=yes
79 AC_DEFINE(BUILD_PARPORT, 1, [1 if you want parport.])
80 else
81 AC_DEFINE(BUILD_PARPORT, 0, [0 if you don't want parport.])
82 fi
83
84 if test $build_ep93xx = yes; then
85 build_bitbang=yes
86 AC_DEFINE(BUILD_EP93XX, 1, [1 if you want ep93xx.])
87 else
88 AC_DEFINE(BUILD_EP93XX, 0, [0 if you don't want ep93xx.])
89 fi
90
91 if test $parport_use_ppdev = yes; then
92 AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
93 else
94 AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
95 fi
96
97 if test $parport_use_giveio = yes; then
98 AC_DEFINE(PARPORT_USE_GIVEIO, 1, [1 if you want parport to use giveio.])
99 else
100 AC_DEFINE(PARPORT_USE_GIVEIO, 0, [0 if you don't want parport to use giveio.])
101 fi
102
103 if test $build_bitbang = yes; then
104 AC_DEFINE(BUILD_BITBANG, 1, [1 if you want a bitbang interface.])
105 else
106 AC_DEFINE(BUILD_BITBANG, 0, [0 if you don't want a bitbang interface.])
107 fi
108
109 if test $build_ftdi2232 = yes; then
110 AC_DEFINE(BUILD_FTDI2232, 1, [1 if you want libftdi ft2232.])
111 else
112 AC_DEFINE(BUILD_FTDI2232, 0, [0 if you don't want libftdi ft2232.])
113 fi
114
115 if test $build_ftd2xx = yes; then
116 AC_DEFINE(BUILD_FTD2XX, 1, [1 if you want ftd2xx ft2232.])
117 else
118 AC_DEFINE(BUILD_FTD2XX, 0, [0 if you don't want ftd2xx ft2232.])
119 fi
120
121 if test $build_amtjtagaccel = yes; then
122 AC_DEFINE(BUILD_AMTJTAGACCEL, 1, [1 if you want the Amontec JTAG-Accelerator driver.])
123 else
124 AC_DEFINE(BUILD_AMTJTAGACCEL, 0, [0 if you don't want the Amontec JTAG-Accelerator driver.])
125 fi
126
127 AM_CONFIG_HEADER(config.h)
128 AM_INIT_AUTOMAKE(openocd, 0.1)
129
130 AM_CONDITIONAL(PARPORT, test $build_parport = yes)
131 AM_CONDITIONAL(GIVEIO, test $parport_use_giveio = yes)
132 AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
133 AM_CONDITIONAL(BITBANG, test $build_bitbang = yes)
134 AM_CONDITIONAL(FTDI2232, test $build_ftdi2232 = yes)
135 AM_CONDITIONAL(FTD2XX, test $build_ftd2xx = yes)
136 AM_CONDITIONAL(AMTJTAGACCEL, test $build_amtjtagaccel = yes)
137 AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
138 AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes)
139 AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)
140 AM_CONDITIONAL(FTD2XXDIR, test $with_ftd2xx != search)
141
142 AC_LANG_C
143 AC_PROG_CC
144 AC_PROG_RANLIB
145
146 AC_SUBST(WITH_FTD2XX, $with_ftd2xx)
147
148 AC_OUTPUT(Makefile src/Makefile src/helper/Makefile src/jtag/Makefile src/xsvf/Makefile src/target/Makefile src/server/Makefile src/flash/Makefile)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)