- allow building for MinGW using either -mno-cygwin or the MinGW gcc
[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_win32=yes
52
53 AC_ARG_ENABLE(parport_giveio,
54 AS_HELP_STRING([--enable-parport_giveio], [Enable use of giveio for parport instead of ioperm]),
55 [parport_use_giveio=$enableval], [parport_use_giveio=no])
56
57 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[return __MINGW32__;]),[is_mingw=yes],[is_mingw=no])
58 if test $is_mingw = yes; then
59 AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
60 parport_use_giveio=yes
61 is_cygwin=no
62 else
63 is_cygwin=yes
64 AC_DEFINE(IS_CYGWIN, 1, [1 if building for Cygwin.])
65 fi
66
67 AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
68 ;;
69 *-*-mingw*)
70 is_mingw=yes
71 is_win32=yes
72
73 parport_use_giveio=yes
74
75 AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
76 AC_DEFINE(IS_WIN32, 1, [1 if building for Win32.])
77 ;;
78 *)
79 parport_use_giveio=no
80 AC_DEFINE(IS_CYGWIN, 0, [0 if not building for Cygwin.])
81 AC_DEFINE(IS_WIN32, 0, [0 if not building for Win32.])
82 ;;
83 esac
84
85 if test $build_parport = yes; then
86 build_bitbang=yes
87 AC_DEFINE(BUILD_PARPORT, 1, [1 if you want parport.])
88 else
89 AC_DEFINE(BUILD_PARPORT, 0, [0 if you don't want parport.])
90 fi
91
92 if test $build_ep93xx = yes; then
93 build_bitbang=yes
94 AC_DEFINE(BUILD_EP93XX, 1, [1 if you want ep93xx.])
95 else
96 AC_DEFINE(BUILD_EP93XX, 0, [0 if you don't want ep93xx.])
97 fi
98
99 if test $parport_use_ppdev = yes; then
100 AC_DEFINE(PARPORT_USE_PPDEV, 1, [1 if you want parport to use ppdev.])
101 else
102 AC_DEFINE(PARPORT_USE_PPDEV, 0, [0 if you don't want parport to use ppdev.])
103 fi
104
105 if test $parport_use_giveio = yes; then
106 AC_DEFINE(PARPORT_USE_GIVEIO, 1, [1 if you want parport to use giveio.])
107 else
108 AC_DEFINE(PARPORT_USE_GIVEIO, 0, [0 if you don't want parport to use giveio.])
109 fi
110
111 if test $build_bitbang = yes; then
112 AC_DEFINE(BUILD_BITBANG, 1, [1 if you want a bitbang interface.])
113 else
114 AC_DEFINE(BUILD_BITBANG, 0, [0 if you don't want a bitbang interface.])
115 fi
116
117 if test $build_ftdi2232 = yes; then
118 AC_DEFINE(BUILD_FTDI2232, 1, [1 if you want libftdi ft2232.])
119 else
120 AC_DEFINE(BUILD_FTDI2232, 0, [0 if you don't want libftdi ft2232.])
121 fi
122
123 if test $build_ftd2xx = yes; then
124 AC_DEFINE(BUILD_FTD2XX, 1, [1 if you want ftd2xx ft2232.])
125 else
126 AC_DEFINE(BUILD_FTD2XX, 0, [0 if you don't want ftd2xx ft2232.])
127 fi
128
129 if test $build_amtjtagaccel = yes; then
130 AC_DEFINE(BUILD_AMTJTAGACCEL, 1, [1 if you want the Amontec JTAG-Accelerator driver.])
131 else
132 AC_DEFINE(BUILD_AMTJTAGACCEL, 0, [0 if you don't want the Amontec JTAG-Accelerator driver.])
133 fi
134
135 AM_CONFIG_HEADER(config.h)
136 AM_INIT_AUTOMAKE(openocd, 0.1)
137
138 AM_CONDITIONAL(PARPORT, test $build_parport = yes)
139 AM_CONDITIONAL(GIVEIO, test $parport_use_giveio = yes)
140 AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
141 AM_CONDITIONAL(BITBANG, test $build_bitbang = yes)
142 AM_CONDITIONAL(FTDI2232, test $build_ftdi2232 = yes)
143 AM_CONDITIONAL(FTD2XX, test $build_ftd2xx = yes)
144 AM_CONDITIONAL(AMTJTAGACCEL, test $build_amtjtagaccel = yes)
145 AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes)
146 AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes)
147 AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)
148 AM_CONDITIONAL(FTD2XXDIR, test $with_ftd2xx != search)
149
150 AC_LANG_C
151 AC_PROG_CC
152 AC_PROG_RANLIB
153
154 AC_SUBST(WITH_FTD2XX, $with_ftd2xx)
155
156 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)