1# jpeg-turbo has simd support for some architectures
2config BR2_PACKAGE_JPEG_SIMD_SUPPORT
3	bool
4	default y if BR2_X86_CPU_HAS_MMX
5	default y if BR2_ARM_CPU_HAS_NEON
6	default y if BR2_POWERPC_CPU_HAS_ALTIVEC && !BR2_powerpc64le
7	default y if BR2_POWERPC_CPU_HAS_VSX && BR2_powerpc64le
8	default y if BR2_aarch64 || BR2_aarch64_be
9
10config BR2_PACKAGE_JPEG
11	bool "jpeg support"
12	help
13	  Select the desired JPEG library provider.
14
15if BR2_PACKAGE_JPEG
16
17choice
18	prompt "jpeg variant"
19	default BR2_PACKAGE_JPEG_TURBO if BR2_PACKAGE_JPEG_SIMD_SUPPORT
20	help
21	  Select the normal libjpeg or libjpeg-turbo.
22
23config BR2_PACKAGE_LIBJPEG
24	bool "jpeg"
25	select BR2_PACKAGE_HAS_JPEG
26	help
27	  The ubiquitous C library for manipulating JPEG images.
28
29	  http://www.ijg.org/
30
31config BR2_PACKAGE_JPEG_TURBO
32	bool "jpeg-turbo"
33	select BR2_PACKAGE_HAS_JPEG
34	help
35	  Libjpeg-turbo is a derivative of libjpeg that uses SIMD
36	  instructions (MMX, SSE2, NEON) to accelerate baseline JPEG
37	  compression and decompression on x86, x86-64, and ARM
38	  systems.
39
40	  http://www.libjpeg-turbo.org
41
42# libjpeg from br2-external trees, if any
43source "$BR2_BASE_DIR/.br2-external.in.jpeg"
44
45endchoice
46
47source "package/jpeg-turbo/Config.in.options"
48
49config BR2_PACKAGE_HAS_JPEG
50	bool
51
52config BR2_PACKAGE_PROVIDES_JPEG
53	string
54	default "libjpeg"    if BR2_PACKAGE_LIBJPEG
55	default "jpeg-turbo" if BR2_PACKAGE_JPEG_TURBO
56
57endif
58