blob: be9b1a30c21c618459364d9707a91fb264f15912 [file] [log] [blame]
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +01001AC_PREREQ([2.69])
Liam Girdwood6bb37832018-01-10 20:43:25 +00002AC_INIT([sof],[m4_esyscmd(./version.sh)],[sound-open-firmware@alsa-project.org])
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +01003AC_CONFIG_SRCDIR([src/init/init.c])
4AC_CONFIG_HEADERS([src/include/config.h])
5AC_CONFIG_MACRO_DIRS([m4])
6AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability subdir-objects silent-rules color-tests dist-xz tar-ustar])
7
8# Initialize maintainer mode
9AM_MAINTAINER_MODE([enable])
10
11# get version info from git
Pierre-Louis Bossart81708a52018-04-04 18:46:50 -050012m4_define(sof_major, `cat .version | cut -dv -f2 | cut -d. -f1`)
13m4_define(sof_minor, `cat .version | cut -d. -f2 | cut -d- -f1`)
14m4_define(sof_micro, `cat .version | cut -d. -f3 | cut -d- -f1`)
15AC_DEFINE_UNQUOTED([SOF_MAJOR], sof_major, [Sof major version])
16AC_DEFINE_UNQUOTED([SOF_MINOR], sof_minor, [Sof minor version])
17AC_DEFINE_UNQUOTED([SOF_MICRO], sof_micro, [Sof micro version])
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010018
19AC_CANONICAL_HOST
20
21# General compiler flags
Liam Girdwood05ef4342018-02-13 20:29:40 +000022CFLAGS="${CFLAGS:+$CFLAGS } -O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes"
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010023
Liam Girdwoodcc9fba32018-01-22 23:31:24 +000024# General assembler flags
25ASFLAGS="-DASSEMBLY"
26AC_SUBST(ASFLAGS)
27
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010028# Cross compiler tool libgcc and headers
Liam Girdwood8855ce52016-10-18 17:18:16 +010029AC_ARG_WITH([root-dir],
Tomasz Laudaac7b0c22018-06-04 12:03:42 +010030 AS_HELP_STRING([--with-root-dir], [Specify location of cross gcc libraries and headers]),
31 [], [with_root_dir=no])
32
33# MEU location
34AC_ARG_WITH([meu],
35 AS_HELP_STRING([--with-meu], [Specify location of MEU tool]),
36 [], [with_meu=no])
37if test "x$with_meu" != "xno"; then
38 MEU_PATH="$with_meu"
39 AC_SUBST(MEU_PATH)
40
41 MEU_VERSION=$($with_meu/meu -ver | grep "Version:" | cut -d" " -f6)
42 AX_COMPARE_VERSION([$MEU_VERSION], [ge], [12.0.0.1035], [MEU_OFFSET=1088], [MEU_OFFSET=1152])
43 AC_SUBST(MEU_OFFSET)
44fi
45AM_CONDITIONAL(USE_MEU, test "x$with_meu" != "xno")
46
47# Private key location
48AC_ARG_WITH([key],
49 AS_HELP_STRING([--with-key], [Specify location of private key]),
50 [], [with_key=no])
51if test "x$with_meu" != "xno"; then
52 if test "x$with_key" != "xno"; then
53 PRIVATE_KEY="$with_key"
54 AC_SUBST(PRIVATE_KEY)
55 else
56 AC_MSG_ERROR([Private key location not specified])
57 fi
58fi
Ranjani Sridharan05058232018-01-24 22:42:38 -080059
60# check if we are building FW image or library
61AC_ARG_ENABLE(library, [AS_HELP_STRING([--enable-library],[build library])], have_library=$enableval, have_library=no)
62if test "$have_library" = "yes"; then
63 AC_DEFINE([CONFIG_LIB], [1], [Configure for Shared Library])
64fi
65AM_CONDITIONAL(BUILD_LIB, test "$have_library" = "yes")
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010066
Liam Girdwood05ef4342018-02-13 20:29:40 +000067# check if we are building tools
68AC_ARG_ENABLE(rimage, [AS_HELP_STRING([--enable-rimage],[build rimage tool])], have_rimage=$enableval, have_rimage=no)
69if test "$have_rimage" = "yes"; then
70 AC_DEFINE([CONFIG_RIMAGE], [1], [Configure to build rimage])
71fi
72AM_CONDITIONAL(BUILD_RIMAGE, test "$have_rimage" = "yes")
73
Marcin Makafa325252018-07-05 12:47:22 +020074# check if we are building docs
75AC_ARG_ENABLE(doc, [AS_HELP_STRING([--enable-doc],[build doc])], have_doc=$enableval, have_doc=no)
76if test "$have_doc" = "yes"; then
77 AC_DEFINE([CONFIG_DOC], [1], [Configure to build doc])
78fi
79AM_CONDITIONAL(BUILD_DOC, test "$have_doc" = "yes")
80
Seppo Ingalsuo447ac9b2018-05-11 17:03:03 +030081# Disable DMIC driver if requested, by default build for supported platforms
82AC_ARG_ENABLE([dmic], AS_HELP_STRING([--disable-dmic], [Disable DMIC driver]))
83AS_IF([test "x$enable_dmic" != "xno"], [
84 AC_DEFINE([CONFIG_DMIC], [1], [Configure to build DMIC driver])
85])
86
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010087# Architecture support
88AC_ARG_WITH([arch],
89 AS_HELP_STRING([--with-arch], [Specify DSP architecture]),
90 [], [with_arch=no])
91
92case "$with_arch" in
93 xtensa*)
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +010094
95 ARCH_CFLAGS="-mtext-section-literals"
96 AC_SUBST(ARCH_CFLAGS)
97
98 ARCH_LDFLAGS="-nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static"
99 AC_SUBST(XTENSA_LDFLAGS)
100
101 # extra CFLAGS defined here otherwise configure working gcc tests fails.
Liam Girdwood05ef4342018-02-13 20:29:40 +0000102 CFLAGS="${CFLAGS:+$CFLAGS }-fno-inline-functions -nostdlib -mlongcalls"
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100103 LDFLAGS="${LDFLAGS:+$LDFLAGS }-nostdlib"
104
105 #ARCH_ASFLAGS=""
106 AC_SUBST(ARCH_ASFLAGS)
107
108 ARCH="xtensa"
109 AC_SUBST(ARCH)
Ranjani Sridharan05058232018-01-24 22:42:38 -0800110
111 AS_IF([test "x$with_root_dir" = xno],
112 AC_MSG_ERROR([Please specify cross compiler root header directory]),
113 [ROOT_DIR=$with_root_dir])
114 AC_SUBST(ROOT_DIR)
115 ;;
116 host*)
117
118 ARCH_CFLAGS="-g"
119 AC_SUBST(ARCH_CFLAGS)
120
121 # extra CFLAGS defined here otherwise configure working gcc tests fails.
122 CFLAGS="${CFLAGS:+$CFLAGS } -O3"
123 LDFLAGS="${LDFLAGS:+$LDFLAGS }-lpthread"
124
125 ARCH="host"
126 AC_SUBST(ARCH)
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100127 ;;
128 *)
Marcin Makafa325252018-07-05 12:47:22 +0200129 if test "$have_rimage" = "no" && test "$have_doc" = "no" ; then
Liam Girdwood05ef4342018-02-13 20:29:40 +0000130 AC_MSG_ERROR([DSP architecture not specified])
131 fi
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100132 ;;
133esac
134
Liam Girdwood2eab4672017-11-27 05:24:51 +0800135AM_CONDITIONAL(BUILD_XTENSA, test "$ARCH" = "xtensa")
Ranjani Sridharan05058232018-01-24 22:42:38 -0800136AM_CONDITIONAL(BUILD_HOST, test "$ARCH" = "host")
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100137
Tomasz Lauda01ebad72018-06-27 12:00:58 +0200138# check for xtensa extension
139AM_CONDITIONAL(BUILD_XTENSA_SMP, test "$with_arch" = "xtensa-smp")
140
Janusz Jankowskid6d9efb2018-06-11 10:31:30 +0200141# Cmocka tests
142AC_ARG_WITH([cmocka-prefix],
143 AS_HELP_STRING([--with-cmocka-prefix], [Path to cmocka]),
144 [], [with_cmocka_prefix="no"])
145
Janusz Jankowski98933132018-06-15 10:46:42 +0200146# in case of native build, cmocka may be installed
147HAVE_CMOCKA_PKG=no
148AC_CHECK_LIB(cmocka, _cmocka_run_group_tests, [HAVE_CMOCKA_PKG=yes])
149
Janusz Jankowskid6d9efb2018-06-11 10:31:30 +0200150if test "x$with_arch" != "xno"; then
151 if test "x$with_cmocka_prefix" = "xno"; then
152 if test "$ARCH" = "xtensa"; then
153 AC_MSG_WARN([Need cmocka to run unit tests. Path to cmocka not specified. Please use --with-cmocka-prefix option.])
Janusz Jankowski98933132018-06-15 10:46:42 +0200154 elif test "x$HAVE_CMOCKA_PKG" = "xno"; then
155 AC_MSG_WARN([Need cmocka to run unit tests. No cmocka library found. Please install cmocka or use --with-cmocka-prefix option.])
Janusz Jankowskid6d9efb2018-06-11 10:31:30 +0200156 fi
157 else
158 CMOCKA_PREFIX="$with_cmocka_prefix"
159 AC_SUBST(CMOCKA_PREFIX)
160 fi
161fi
162
163AM_CONDITIONAL(HAVE_CMOCKA_PREFIX, test "x$with_cmocka_prefix" != "xno")
164
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100165# Platform support
166AC_ARG_WITH([platform],
167 AS_HELP_STRING([--with-platform], [Specify Host Platform]),
168 [], [with_platform=no])
169
170case "$with_platform" in
171 baytrail*)
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100172
173 PLATFORM_LDSCRIPT="baytrail.x"
174 AC_SUBST(PLATFORM_LDSCRIPT)
175
176 PLATFORM="baytrail"
177 AC_SUBST(PLATFORM)
178
179 FW_NAME="byt"
180 AC_SUBST(FW_NAME)
181
Liam Girdwoodf63c7892017-12-04 20:08:39 +0000182 XTENSA_CORE="hifiep_bd5"
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100183 AC_SUBST(XTENSA_CORE)
184
185 AC_DEFINE([CONFIG_BAYTRAIL], [1], [Configure for Baytrail])
Keyon Jiefb784212017-12-06 21:16:32 +0800186 AC_DEFINE([CONFIG_HOST_PTABLE], [1], [Configure handling host page table])
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100187 ;;
188 cherrytrail*)
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100189
190 PLATFORM_LDSCRIPT="baytrail.x"
191 AC_SUBST(PLATFORM_LDSCRIPT)
192
193 PLATFORM="baytrail"
194 AC_SUBST(PLATFORM)
195
196 FW_NAME="cht"
197 AC_SUBST(FW_NAME)
198
Liam Girdwoodf63c7892017-12-04 20:08:39 +0000199 XTENSA_CORE="hifiep_bd5"
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100200 AC_SUBST(XTENSA_CORE)
201
202 AC_DEFINE([CONFIG_CHERRYTRAIL], [1], [Configure for Cherrytrail])
Keyon Jiefb784212017-12-06 21:16:32 +0800203 AC_DEFINE([CONFIG_HOST_PTABLE], [1], [Configure handling host page table])
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100204 ;;
Liam Girdwood095c9072018-01-23 14:53:00 +0000205 apollolake*)
206
207 PLATFORM_LDSCRIPT="apollolake.x"
208 AC_SUBST(PLATFORM_LDSCRIPT)
209
210 PLATFORM="apollolake"
211 AC_SUBST(PLATFORM)
212
213 FW_NAME="apl"
214 AC_SUBST(FW_NAME)
215
216 XTENSA_CORE="hifi3_std"
217 AC_SUBST(XTENSA_CORE)
218
219 AC_DEFINE([CONFIG_APOLLOLAKE], [1], [Configure for Apololake])
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200220 AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
Liam Girdwood095c9072018-01-23 14:53:00 +0000221 AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
Keyon Jiec610c642018-02-08 20:48:11 +0800222 AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
Liam Girdwood095c9072018-01-23 14:53:00 +0000223 ;;
Liam Girdwoodf198ad92018-01-21 23:48:35 +0000224 haswell*)
225
226 PLATFORM_LDSCRIPT="haswell.x"
227 AC_SUBST(PLATFORM_LDSCRIPT)
228
229 PLATFORM="haswell"
230 AC_SUBST(PLATFORM)
231
232 FW_NAME="hsw"
233 AC_SUBST(FW_NAME)
234
235 XTENSA_CORE="hifiep_bd5"
236 AC_SUBST(XTENSA_CORE)
237
238 AC_DEFINE([CONFIG_HASWELL], [1], [Configure for Haswell])
239 AC_DEFINE([CONFIG_HOST_PTABLE], [1], [Configure handling host page table])
240 ;;
241 broadwell*)
242
243 PLATFORM_LDSCRIPT="broadwell.x"
244 AC_SUBST(PLATFORM_LDSCRIPT)
245
246 PLATFORM="haswell"
247 AC_SUBST(PLATFORM)
248
249 FW_NAME="bdw"
250 AC_SUBST(FW_NAME)
251
252 XTENSA_CORE="hifiep_bd5"
253 AC_SUBST(XTENSA_CORE)
254
255 AC_DEFINE([CONFIG_BROADWELL], [1], [Configure for Broadwell])
256 AC_DEFINE([CONFIG_HOST_PTABLE], [1], [Configure handling host page table])
257 ;;
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000258 cannonlake*)
259
260 PLATFORM_LDSCRIPT="cannonlake.x"
261 AC_SUBST(PLATFORM_LDSCRIPT)
262
263 PLATFORM="cannonlake"
264 AC_SUBST(PLATFORM)
265
266 FW_NAME="cnl"
267 AC_SUBST(FW_NAME)
268
269 XTENSA_CORE="hifi4_std"
270 AC_SUBST(XTENSA_CORE)
271
272 AC_DEFINE([CONFIG_CANNONLAKE], [1], [Configure for Cannonlake])
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200273 AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000274 AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
Keyon Jiec610c642018-02-08 20:48:11 +0800275 AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000276 ;;
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100277 *)
Marcin Makafa325252018-07-05 12:47:22 +0200278 if test "$have_rimage" = "no" && test "$have_doc" = "no"; then
Liam Girdwood05ef4342018-02-13 20:29:40 +0000279 if test "$ARCH" = "host"; then
280 PLATFORM="host"
281 AC_SUBST(PLATFORM)
282 else
283 AC_MSG_ERROR([Host platform not specified])
284 fi
Ranjani Sridharan05058232018-01-24 22:42:38 -0800285 fi
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100286 ;;
287esac
288
Liam Girdwood2eab4672017-11-27 05:24:51 +0800289AM_CONDITIONAL(BUILD_BAYTRAIL, test "$FW_NAME" = "byt")
290AM_CONDITIONAL(BUILD_CHERRYTRAIL, test "$FW_NAME" = "cht")
291AM_CONDITIONAL(BUILD_HASWELL, test "$FW_NAME" = "hsw")
292AM_CONDITIONAL(BUILD_BROADWELL, test "$FW_NAME" = "bdw")
293AM_CONDITIONAL(BUILD_APOLLOLAKE, test "$FW_NAME" = "apl")
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000294AM_CONDITIONAL(BUILD_CANNONLAKE, test "$FW_NAME" = "cnl")
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200295AM_CONDITIONAL(BUILD_BOOTLOADER, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl")
Tomasz Lauda14ca1fa2018-06-19 16:55:34 +0200296AM_CONDITIONAL(BUILD_CAVS, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl")
Liam Girdwood095c9072018-01-23 14:53:00 +0000297AM_CONDITIONAL(BUILD_MODULE, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl")
Rander Wang45027652018-02-08 16:06:33 +0800298AM_CONDITIONAL(BUILD_APL_SSP, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl")
Liam Girdwoodf198ad92018-01-21 23:48:35 +0000299
Sebastien Guiriecca23f512016-11-02 08:44:19 +0100300# DSP core support (Optional)
301AC_ARG_WITH([dsp-core],
302 AS_HELP_STRING([--with-dsp-core], [Specify DSP Core]),
303 [], [with_dsp_core=no])
304
305case "$with_dsp_core" in
Tomasz Lauda7f352662018-04-05 17:20:09 +0200306 *)
307 XTENSA_CORE="$with_dsp_core"
Sebastien Guiriecca23f512016-11-02 08:44:19 +0100308 AC_SUBST(XTENSA_CORE)
309 ;;
310
311esac
312
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000313PLATFORM_BOOT_LDR_LDSCRIPT="boot_ldr.x"
314AC_SUBST(PLATFORM_BOOT_LDR_LDSCRIPT)
315
Ranjani Sridharan05058232018-01-24 22:42:38 -0800316# Optimisation settings and checks
317
318# SSE4_2 support
319AC_ARG_ENABLE(sse42, [AS_HELP_STRING([--enable-sse42],[enable SSE42 optimizations])], have_sse42=$enableval, have_sse42=yes)
320AX_CHECK_COMPILE_FLAG(-msse4.2, [SSE42_CFLAGS="-DOPS_SSE42 -msse4.2 -ffast-math -ftree-vectorizer-verbose=0"],
321 [have_sse42=no])
322if test "$have_sse42" = "yes"; then
323 AC_DEFINE(HAVE_SSE42,1,[Define to enable SSE42 optimizations.])
324fi
325AM_CONDITIONAL(HAVE_SSE42, test "$have_sse42" = "yes")
326AC_SUBST(SSE42_CFLAGS)
327
328# AVX support
329AC_ARG_ENABLE(avx, [AS_HELP_STRING([--enable-avx],[enable AVX optimizations])], have_avx=$enableval, have_avx=yes)
330AX_CHECK_COMPILE_FLAG(-mavx, [AVX_CFLAGS="-DOPS_AVX -mavx -ffast-math -ftree-vectorizer-verbose=0"],
331 [have_avx=no])
332if test "$have_avx" = "yes"; then
333 AC_DEFINE(HAVE_AVX,1,[Define to enable AVX optimizations.])
334fi
335AM_CONDITIONAL(HAVE_AVX, test "$have_avx" = "yes")
336AC_SUBST(AVX_CFLAGS)
337
338
339# AVX2 support
340AC_ARG_ENABLE(avx2, [AS_HELP_STRING([--enable-avx2],[enable AVX2 optimizations])], have_avx2=$enableval, have_avx2=yes)
341AX_CHECK_COMPILE_FLAG(-mavx2, [AVX2_CFLAGS="-DOPS_AVX2 -mavx2 -ffast-math -ftree-vectorizer-verbose=0"],
342 [have_avx2=no])
343if test "$have_avx2" = "yes"; then
344 AC_DEFINE(HAVE_AVX2,1,[Define to enable AVX2 optimizations.])
345fi
346AM_CONDITIONAL(HAVE_AVX2, test "$have_avx2" = "yes")
347AC_SUBST(AVX2_CFLAGS)
348
349
350# FMA support
351AC_ARG_ENABLE(fma, [AS_HELP_STRING([--enable-fma],[enable FMA optimizations])], have_fma=$enableval, have_fma=yes)
352AX_CHECK_COMPILE_FLAG(-mfma, [FMA_CFLAGS="-DOPS_FMA -mfma -ffast-math -ftree-vectorizer-verbose=0"],
353 [have_fma=no])
354if test "$have_fma" = "yes"; then
355 AC_DEFINE(HAVE_FMA,1,[Define to enable FMA optimizations.])
356fi
357AM_CONDITIONAL(HAVE_FMA, test "$have_fma" = "yes")
358AC_SUBST(FMA_CFLAGS)
359
360# Hifi2EP
361AC_ARG_ENABLE(hifi2ep, [AS_HELP_STRING([--enable-hifi2ep],[enable HiFi2EP optimizations])], have_hifi2ep=$enableval, have_hifi2ep=yes)
362AX_CHECK_COMPILE_FLAG(-mhifi2ep, [FMA_CFLAGS="-DOPS_HIFI2EP -mhifi2ep -ffast-math -ftree-vectorizer-verbose=0"],
363 [have_hifi2ep=no])
364if test "$have_hifi2ep" = "yes"; then
365 AC_DEFINE(HAVE_HIFI2EP,1,[Define to enable Hifi2 EP optimizations.])
366fi
367AM_CONDITIONAL(HAVE_HIFI2EP, test "$have_hifi2ep" = "yes")
368AC_SUBST(HIFI2EP_CFLAGS)
369
370# Hifi3
371AC_ARG_ENABLE(hifi3, [AS_HELP_STRING([--enable-hifi3],[enable HiFi3 optimizations])], have_hifi3=$enableval, have_hifi3=yes)
372AX_CHECK_COMPILE_FLAG(-mhihi3, [FMA_CFLAGS="-DOPS_HIFI3 -mhifi3 -ffast-math -ftree-vectorizer-verbose=0"],
373 [have_hifi3=no])
374if test "$have_hifi3" = "yes"; then
375 AC_DEFINE(HAVE_HIFI3,1,[Define to enable Hifi3 optimizations.])
376fi
377AM_CONDITIONAL(HAVE_HIFI3, test "$have_hifi3" = "yes")
378AC_SUBST(HIFI3_CFLAGS)
379
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100380# Test after CFLAGS set othewise test of cross compiler fails.
381AM_PROG_AS
382AM_PROG_AR
383AC_PROG_CC
384LT_INIT
385AC_CHECK_TOOL([OBJCOPY], [objcopy], [])
386AC_CHECK_TOOL([OBJDUMP], [objdump], [])
387
Liam Girdwood05ef4342018-02-13 20:29:40 +0000388# Check for openssl - used by rimage
389AC_CHECK_LIB([crypto], [OPENSSL_config], , [have_openssl="no"])
390if test "$have_rimage" = "yes"; then
391 if test "$have_openssl" = "no"; then
392 AC_MSG_ERROR([Need OpenSSL libcrypto for rimage code signing])
393 fi
394fi
395
Pan Xiuli408d9352018-06-10 15:32:24 +0800396if test "x$prefix" == "xNONE"; then
Liam Girdwood05ef4342018-02-13 20:29:40 +0000397PEM_KEY_PREFIX="/usr/local/share/rimage"
Pan Xiuli408d9352018-06-10 15:32:24 +0800398else
399PEM_KEY_PREFIX=$prefix"/share/rimage"
400fi
Liam Girdwood05ef4342018-02-13 20:29:40 +0000401AC_DEFINE_UNQUOTED([PEM_KEY_PREFIX], ["$PEM_KEY_PREFIX"], ["Path for PEM keys"])
402AC_SUBST(PEM_KEY_PREFIX)
403
Liam Girdwooda1977152018-04-13 15:33:57 +0100404# Check for doxygen and graphviz - used by make doc
405AC_CHECK_PROG(have_doxygen, doxygen, true, false)
406if test "$have_doxygen" = "false"; then
407 AC_MSG_WARN([Need doxygen to build documentation])
408fi
409AC_CHECK_PROG(have_graphviz, dot, true, false)
410if test "$have_graphviz" = "false"; then
411 AC_MSG_WARN([Need graphviz to build documentation])
412fi
413
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200414# Check for compiler type
415AM_CONDITIONAL(XCC, test "$CC" = "xt-xcc")
416
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100417AM_EXTRA_RECURSIVE_TARGETS([bin])
418
419AM_EXTRA_RECURSIVE_TARGETS([vminstall])
420
421AC_CONFIG_FILES([
422 Makefile
Liam Girdwood05ef4342018-02-13 20:29:40 +0000423 rimage/Makefile
424 rimage/keys/Makefile
Marcin Maka6aee21b2018-04-13 13:03:42 +0200425 doc/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100426 src/Makefile
427 src/tasks/Makefile
428 src/init/Makefile
429 src/arch/Makefile
430 src/arch/xtensa/Makefile
431 src/arch/xtensa/include/Makefile
Liam Girdwoodb14e8522018-01-10 17:36:41 +0000432 src/arch/xtensa/include/arch/Makefile
433 src/arch/xtensa/include/xtensa/Makefile
434 src/arch/xtensa/include/xtensa/config/Makefile
Tomasz Lauda01ebad72018-06-27 12:00:58 +0200435 src/arch/xtensa/smp/Makefile
436 src/arch/xtensa/smp/hal/Makefile
Tomasz Laudab31c7432018-07-03 11:52:29 +0200437 src/arch/xtensa/smp/include/Makefile
438 src/arch/xtensa/smp/include/arch/Makefile
Tomasz Lauda01ebad72018-06-27 12:00:58 +0200439 src/arch/xtensa/smp/xtos/Makefile
440 src/arch/xtensa/up/Makefile
441 src/arch/xtensa/up/hal/Makefile
Tomasz Laudab31c7432018-07-03 11:52:29 +0200442 src/arch/xtensa/up/include/Makefile
443 src/arch/xtensa/up/include/arch/Makefile
Tomasz Lauda01ebad72018-06-27 12:00:58 +0200444 src/arch/xtensa/up/xtos/Makefile
Ranjani Sridharan05058232018-01-24 22:42:38 -0800445 src/arch/host/Makefile
446 src/arch/host/include/Makefile
447 src/arch/host/include/arch/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100448 src/audio/Makefile
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200449 src/math/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100450 src/drivers/Makefile
451 src/include/Makefile
Pierre-Louis Bossart81708a52018-04-04 18:46:50 -0500452 src/include/sof/Makefile
453 src/include/sof/audio/Makefile
454 src/include/sof/audio/coefficients/Makefile
455 src/include/sof/audio/coefficients/src/Makefile
456 src/include/sof/math/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100457 src/include/uapi/Makefile
458 src/ipc/Makefile
Ranjani Sridharan05058232018-01-24 22:42:38 -0800459 src/library/Makefile
460 src/library/include/Makefile
461 src/library/include/platform/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100462 src/lib/Makefile
Ranjani Sridharana169fa32018-05-31 19:29:08 -0700463 src/host/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100464 src/platform/Makefile
465 src/platform/baytrail/Makefile
466 src/platform/baytrail/include/Makefile
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200467 src/platform/baytrail/include/arch/Makefile
468 src/platform/baytrail/include/arch/xtensa/Makefile
469 src/platform/baytrail/include/arch/xtensa/config/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100470 src/platform/baytrail/include/platform/Makefile
Liam Girdwood095c9072018-01-23 14:53:00 +0000471 src/platform/apollolake/Makefile
472 src/platform/apollolake/include/Makefile
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200473 src/platform/apollolake/include/arch/Makefile
474 src/platform/apollolake/include/arch/xtensa/Makefile
475 src/platform/apollolake/include/arch/xtensa/config/Makefile
Liam Girdwood095c9072018-01-23 14:53:00 +0000476 src/platform/apollolake/include/platform/Makefile
Liam Girdwoodf198ad92018-01-21 23:48:35 +0000477 src/platform/haswell/Makefile
478 src/platform/haswell/include/Makefile
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200479 src/platform/haswell/include/arch/Makefile
480 src/platform/haswell/include/arch/xtensa/Makefile
481 src/platform/haswell/include/arch/xtensa/config/Makefile
Liam Girdwoodf198ad92018-01-21 23:48:35 +0000482 src/platform/haswell/include/platform/Makefile
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000483 src/platform/cannonlake/Makefile
484 src/platform/cannonlake/include/Makefile
Tomasz Lauda80f3d472018-06-05 18:25:37 +0200485 src/platform/cannonlake/include/arch/Makefile
486 src/platform/cannonlake/include/arch/xtensa/Makefile
487 src/platform/cannonlake/include/arch/xtensa/config/Makefile
Liam Girdwood17c6bcf2018-01-23 15:44:08 +0000488 src/platform/cannonlake/include/platform/Makefile
Tomasz Lauda14ca1fa2018-06-19 16:55:34 +0200489 src/platform/intel/Makefile
490 src/platform/intel/include/Makefile
491 src/platform/intel/include/platform/Makefile
492 src/platform/intel/include/platform/cavs/Makefile
Janusz Jankowskid6d9efb2018-06-11 10:31:30 +0200493 test/Makefile
494 test/cmocka/Makefile
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100495])
Janusz Jankowskid6d9efb2018-06-11 10:31:30 +0200496AC_REQUIRE_AUX_FILE([tap-driver.sh])
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100497AC_OUTPUT
498
499echo "
500---{ $PACKAGE_NAME $VERSION }---
501
502Target Architecture: ${ARCH}
503Target Platform: ${PLATFORM}
Sebastien Guiriecca23f512016-11-02 08:44:19 +0100504Target Core: ${XTENSA_CORE}
Pan Xiuli408d9352018-06-10 15:32:24 +0800505Install Prefix: ${prefix}
Liam Girdwood05ef4342018-02-13 20:29:40 +0000506PEM: ${PEM_KEY_PREFIX}
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100507
508Compiler: ${CC}
Pan Xiuli6fd219c2018-06-19 18:02:45 +0800509OBJCOPY: ${OBJCOPY}
510OBJDUMP: ${OBJDUMP}
Liam Girdwoodc0dfb4e2016-09-21 15:57:22 +0100511CFLAGS: ${CFLAGS}
512LDFLAGS: ${LDFLAGS}
513ARCH_CFLAGS: ${ARCH_CFLAGS}
514ARCH_LDFLAGS: ${ARCH_LDFLAGS}
515"
516