]>
Commit | Line | Data |
---|---|---|
6a161fa9 | 1 | # Process this file with autoconf to produce a configure script. |
2 | ||
2f1a3acf | 3 | # Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. |
6a161fa9 | 4 | # |
5 | # This configure.ac is free software; the author | |
6 | # gives unlimited permission to copy and/or distribute it, | |
7 | # with or without modifications, as long as this notice is preserved. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
12 | # PARTICULAR PURPOSE. | |
13 | ||
b977bf01 | 14 | dnl This configure script is complicated, because GRUB needs to deal |
15 | dnl with three potentially different types: | |
16 | dnl | |
17 | dnl build -- the environment for building GRUB | |
18 | dnl host -- the environment for running utilities | |
19 | dnl target -- the environment for running GRUB | |
20 | dnl | |
21 | dnl In addition, GRUB needs to deal with a platform specification | |
22 | dnl which specifies the system running GRUB, such as firmware. | |
23 | dnl This is necessary because the target type in autoconf does not | |
24 | dnl describe such a system very well. | |
25 | dnl | |
26 | dnl The current strategy is to use variables with no prefix (such as | |
27 | dnl CC, CFLAGS, etc.) for the host type as well as the build type, | |
28 | dnl because GRUB does not need to use those variables for the build | |
29 | dnl type, so there is no conflict. Variables with the prefix "TARGET_" | |
30 | dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target | |
31 | dnl type. | |
32 | ||
33 | ||
5519963b | 34 | AC_INIT([GRUB],[1.98],[bug-grub@gnu.org]) |
fc22844e | 35 | AM_INIT_AUTOMAKE() |
f022876b | 36 | AC_PREREQ(2.60) |
4b13b216 | 37 | AC_CONFIG_SRCDIR([include/grub/dl.h]) |
6a161fa9 | 38 | AC_CONFIG_HEADER([config.h]) |
39 | ||
b977bf01 | 40 | # Checks for host and target systems. |
6a161fa9 | 41 | AC_CANONICAL_HOST |
b977bf01 | 42 | AC_CANONICAL_TARGET |
6a161fa9 | 43 | |
1d543c3e | 44 | # Program name transformations |
45 | AC_ARG_PROGRAM | |
46 | ||
90d1e879 RM |
47 | # Optimization flag. Allow user to override. |
48 | if test "x$TARGET_CFLAGS" = x; then | |
49 | TARGET_CFLAGS="$TARGET_CFLAGS -Os" | |
50 | fi | |
51 | ||
b977bf01 | 52 | case "$target_cpu" in |
02164e1b | 53 | i[[3456]]86) target_cpu=i386 ;; |
c7ef54aa | 54 | amd64) target_cpu=x86_64 ;; |
02164e1b | 55 | sparc) target_cpu=sparc64 ;; |
ade85305 | 56 | mipsel|mips64el) |
4a1eefb6 | 57 | target_cpu=mips; |
58 | TARGET_CFLAGS="$TARGET_CFLAGS -DGRUB_CPU_MIPSEL=1"; | |
59 | CFLAGS="$CFLAGS -DGRUB_CPU_MIPSEL=1"; | |
60 | ;; | |
ade85305 | 61 | mips|mips64) |
4a1eefb6 | 62 | target_cpu=mips; |
63 | TARGET_CFLAGS="$TARGET_CFLAGS -DGRUB_CPU_MIPS=1"; | |
64 | CFLAGS="$CFLAGS -DGRUB_CPU_MIPS=1"; | |
65 | ;; | |
6a161fa9 | 66 | esac |
67 | ||
05568c2e | 68 | # Specify the platform (such as firmware). |
69 | AC_ARG_WITH([platform], | |
70 | AS_HELP_STRING([--with-platform=PLATFORM], | |
83b984de | 71 | [select the host platform [[guessed]]])) |
05568c2e | 72 | |
73 | # Guess the platform if not specified. | |
74 | if test "x$with_platform" = x; then | |
b977bf01 | 75 | case "$target_cpu"-"$target_vendor" in |
05568c2e | 76 | i386-apple) platform=efi ;; |
77 | i386-*) platform=pc ;; | |
58393a2d | 78 | x86_64-apple) platform=efi ;; |
737feb35 | 79 | x86_64-*) platform=pc ;; |
05568c2e | 80 | powerpc-*) platform=ieee1275 ;; |
58393a2d | 81 | powerpc64-*) platform=ieee1275 ;; |
05568c2e | 82 | sparc64-*) platform=ieee1275 ;; |
ad17a401 | 83 | mips-*) platform=yeeloong ;; |
58393a2d | 84 | *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;; |
05568c2e | 85 | esac |
86 | else | |
87 | platform="$with_platform" | |
88 | fi | |
89 | ||
58393a2d | 90 | # Adjust CPU unless target was explicitly specified. |
91 | if test -z "$target_alias"; then | |
92 | case "$target_cpu"-"$platform" in | |
93 | x86_64-efi) ;; | |
909301af | 94 | x86_64-emu) ;; |
3f4ce737 | 95 | x86_64-*) target_cpu=i386 ;; |
96 | powerpc64-ieee1275) target_cpu=powerpc ;; | |
20011694 | 97 | esac |
98 | fi | |
99 | ||
58393a2d | 100 | # Check if the platform is supported, make final adjustments. |
b977bf01 | 101 | case "$target_cpu"-"$platform" in |
05568c2e | 102 | i386-efi) ;; |
3f4ce737 | 103 | x86_64-efi) ;; |
05568c2e | 104 | i386-pc) ;; |
546f966a | 105 | i386-coreboot) ;; |
58393a2d | 106 | i386-linuxbios) platform=coreboot ;; |
3d04eab8 | 107 | i386-ieee1275) ;; |
8231fb77 | 108 | i386-qemu) ;; |
05568c2e | 109 | powerpc-ieee1275) ;; |
110 | sparc64-ieee1275) ;; | |
7b5f334b | 111 | mips-qemu-mips) ;; |
ad17a401 | 112 | mips-yeeloong) ;; |
f84b481b | 113 | *-emu) ;; |
58393a2d | 114 | *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;; |
6a161fa9 | 115 | esac |
116 | ||
3f4ce737 | 117 | case "$target_cpu" in |
118 | i386 | powerpc) target_m32=1 ;; | |
119 | x86_64 | sparc64) target_m64=1 ;; | |
120 | esac | |
121 | ||
6e5a42fe | 122 | case "$host_os" in |
4825d790 | 123 | mingw32*) host_os=cygwin ;; |
6e5a42fe | 124 | esac |
125 | ||
9304eef1 | 126 | # This normalizes the names, and creates a new variable ("host_kernel") |
127 | # while at it, since the mapping is not always 1:1 (e.g. different OSes | |
128 | # using the same kernel type). | |
129 | case "$host_os" in | |
130 | gnu*) host_kernel=hurd ;; | |
131 | linux*) host_kernel=linux ;; | |
67937d4d | 132 | freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;; |
2c7031b1 | 133 | netbsd*) host_kernel=netbsd ;; |
9304eef1 | 134 | cygwin) host_kernel=windows ;; |
135 | esac | |
136 | ||
f84b481b RM |
137 | case "$platform" in |
138 | coreboot) machine_CFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;; | |
139 | efi) machine_CFLAGS="-DGRUB_MACHINE_EFI=1" ;; | |
140 | ieee1275) machine_CFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;; | |
141 | qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;; | |
142 | pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;; | |
143 | emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;; | |
6bea3f89 VS |
144 | yeeloong) machine_CFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;; |
145 | qemu-mips) machine_CFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;; | |
f84b481b | 146 | esac |
6bea3f89 VS |
147 | case "$target_cpu" in |
148 | mips) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_MIPS=1" ;; | |
149 | sparc64) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_SPARC64=1" ;; | |
150 | esac | |
151 | ||
f84b481b | 152 | CFLAGS="$CFLAGS $machine_CFLAGS" |
f616f51c | 153 | TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CFLAGS" |
f84b481b RM |
154 | TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS" |
155 | ||
56978920 | 156 | AC_SUBST(host_cpu) |
157 | AC_SUBST(host_os) | |
9304eef1 | 158 | AC_SUBST(host_kernel) |
6e5a42fe | 159 | |
b977bf01 | 160 | AC_SUBST(target_cpu) |
05568c2e | 161 | AC_SUBST(platform) |
6a161fa9 | 162 | |
b977bf01 | 163 | # |
164 | # Checks for build programs. | |
165 | # | |
144f1f98 | 166 | |
6c826348 | 167 | # Although cmp is listed in the GNU Coding Standards as a command which |
168 | # can used directly, OpenBSD lacks cmp in the default installation. | |
169 | AC_CHECK_PROGS([CMP], [cmp]) | |
170 | if test "x$CMP" = x; then | |
171 | AC_MSG_ERROR([cmp is not found]) | |
172 | fi | |
173 | ||
144f1f98 | 174 | AC_CHECK_PROGS([YACC], [bison]) |
1569ec51 | 175 | if test "x$YACC" = x; then |
6c826348 | 176 | AC_MSG_ERROR([bison is not found]) |
1569ec51 | 177 | fi |
178 | ||
02cf98ca | 179 | for file in /usr/src/unifont.bdf /usr/share/fonts/X11/misc/unifont.pcf.gz /usr/share/fonts/unifont/unifont.pcf.gz; do |
4931827f | 180 | if test -e $file ; then |
6c09890c | 181 | AC_SUBST([FONT_SOURCE], [$file]) |
4931827f | 182 | break |
183 | fi | |
184 | done | |
185 | ||
b977bf01 | 186 | AC_PROG_INSTALL |
187 | AC_PROG_AWK | |
09220190 | 188 | AC_PROG_LEX |
b977bf01 | 189 | AC_PROG_MAKE_SET |
ff420223 | 190 | AC_PROG_MKDIR_P |
b977bf01 | 191 | |
09220190 BC |
192 | if test "x$LEX" = x; then |
193 | AC_MSG_ERROR([flex is not found]) | |
194 | else | |
2663fb5f | 195 | version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'` |
b777c18e | 196 | if test -n "$version" -a "$version" -ge 20535; then |
09220190 BC |
197 | : |
198 | else | |
199 | AC_MSG_ERROR([flex is too old. GRUB requires 2.5.35 or above]) | |
200 | fi | |
201 | fi | |
202 | ||
68807e5f | 203 | # These are not a "must". |
b977bf01 | 204 | AC_PATH_PROG(RUBY, ruby) |
c44c90db | 205 | AC_PATH_PROG(MAKEINFO, makeinfo) |
6a161fa9 | 206 | |
b977bf01 | 207 | # |
208 | # Checks for host programs. | |
209 | # | |
210 | ||
211 | AC_PROG_CC | |
6a161fa9 | 212 | # Must be GCC. |
213 | test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required]) | |
214 | ||
4889bdec | 215 | AC_GNU_SOURCE |
2f1a3acf | 216 | AM_GNU_GETTEXT([external]) |
b977bf01 | 217 | AC_SYS_LARGEFILE |
218 | ||
219 | # Identify characteristics of the host architecture. | |
220 | AC_C_BIGENDIAN | |
221 | AC_CHECK_SIZEOF(void *) | |
222 | AC_CHECK_SIZEOF(long) | |
223 | ||
2b167a72 | 224 | grub_apple_cc |
c9da87d0 | 225 | if test x$grub_cv_apple_cc = xyes ; then |
2b167a72 | 226 | CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions" |
227 | ASFLAGS="$ASFLAGS -DAPPLE_CC=1" | |
228 | fi | |
b977bf01 | 229 | |
86695375 | 230 | if test "x$cross_compiling" = xyes; then |
231 | AC_MSG_WARN([cannot generate manual pages while cross compiling]) | |
232 | else | |
233 | AC_PATH_PROG(HELP2MAN, help2man) | |
234 | fi | |
235 | ||
4889bdec | 236 | # Check for functions. |
d6ceebf1 | 237 | AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf) |
4889bdec | 238 | |
7c4e16ff RM |
239 | # For grub-mkisofs |
240 | AC_HEADER_MAJOR | |
241 | AC_HEADER_DIRENT | |
4825d790 | 242 | AC_CHECK_FUNCS(memmove sbrk strdup lstat getuid getgid) |
7c4e16ff | 243 | AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h) |
ea4a7e35 | 244 | AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h limits.h) |
7c4e16ff | 245 | |
2c7031b1 GS |
246 | # For opendisk() and getrawpartition() on NetBSD. |
247 | # Used in util/deviceiter.c and in util/hostdisk.c. | |
248 | AC_CHECK_HEADER([util.h], [ | |
249 | AC_CHECK_LIB([util], [opendisk], [ | |
250 | LIBUTIL="-lutil" | |
251 | AC_DEFINE(HAVE_OPENDISK, 1, [Define if opendisk() in -lutil can be used]) | |
252 | ]) | |
253 | AC_CHECK_LIB([util], [getrawpartition], [ | |
254 | LIBUTIL="-lutil" | |
255 | AC_DEFINE(HAVE_GETRAWPARTITION, 1, [Define if getrawpartition() in -lutil can be used]) | |
256 | ]) | |
257 | ]) | |
258 | AC_SUBST([LIBUTIL]) | |
259 | ||
b977bf01 | 260 | # |
261 | # Check for target programs. | |
262 | # | |
263 | ||
5b5d4aa5 | 264 | # Find tools for the target. |
265 | if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then | |
b977bf01 | 266 | tmp_ac_tool_prefix="$ac_tool_prefix" |
267 | ac_tool_prefix=$target_alias- | |
268 | ||
269 | AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc], | |
270 | [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])]) | |
271 | AC_CHECK_TOOL(OBJCOPY, objcopy) | |
272 | AC_CHECK_TOOL(STRIP, strip) | |
273 | AC_CHECK_TOOL(NM, nm) | |
274 | ||
275 | ac_tool_prefix="$tmp_ac_tool_prefix" | |
276 | else | |
277 | if test "x$TARGET_CC" = x; then | |
278 | TARGET_CC=$CC | |
279 | fi | |
280 | AC_CHECK_TOOL(OBJCOPY, objcopy) | |
281 | AC_CHECK_TOOL(STRIP, strip) | |
282 | AC_CHECK_TOOL(NM, nm) | |
283 | fi | |
284 | AC_SUBST(TARGET_CC) | |
285 | ||
286 | ||
287 | # Test the C compiler for the target environment. | |
288 | tmp_CC="$CC" | |
289 | tmp_CFLAGS="$CFLAGS" | |
290 | tmp_LDFLAGS="$LDFLAGS" | |
291 | tmp_CPPFLAGS="$CPPFLAGS" | |
aa6d7826 | 292 | tmp_LIBS="$LIBS" |
b977bf01 | 293 | CC="$TARGET_CC" |
294 | CFLAGS="$TARGET_CFLAGS" | |
295 | CPPFLAGS="$TARGET_CPPFLAGS" | |
296 | LDFLAGS="$TARGET_LDFLAGS" | |
aa6d7826 | 297 | LIBS="" |
b977bf01 | 298 | |
90d1e879 RM |
299 | # debug flags. |
300 | TARGET_CFLAGS="$TARGET_CFLAGS -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \ | |
301 | -Wundef -Wstrict-prototypes -g" | |
6a161fa9 | 302 | |
90d1e879 RM |
303 | # Force no alignment to save space on i386. |
304 | if test "x$target_cpu" = xi386; then | |
305 | AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [ | |
306 | CFLAGS="$CFLAGS -falign-loops=1" | |
eb73121d | 307 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
90d1e879 RM |
308 | [grub_cv_cc_falign_loop=yes], |
309 | [grub_cv_cc_falign_loop=no]) | |
6a161fa9 | 310 | ]) |
6a161fa9 | 311 | |
90d1e879 RM |
312 | if test "x$grub_cv_cc_falign_loop" = xyes; then |
313 | TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" | |
6a161fa9 | 314 | else |
90d1e879 | 315 | TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" |
6a161fa9 | 316 | fi |
317 | ||
90d1e879 RM |
318 | # Some toolchains enable these features by default, but they need |
319 | # registers that aren't set up properly in GRUB. | |
320 | TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow" | |
321 | fi | |
77c55a87 | 322 | |
90d1e879 RM |
323 | # By default, GCC 4.4 generates .eh_frame sections containing unwind |
324 | # information in some cases where it previously did not. GRUB doesn't need | |
325 | # these and they just use up vital space. Restore the old compiler | |
326 | # behaviour. | |
327 | AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [ | |
328 | SAVE_CFLAGS="$CFLAGS" | |
329 | CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm" | |
330 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], | |
331 | [grub_cv_cc_fno_dwarf2_cfi_asm=yes], | |
332 | [grub_cv_cc_fno_dwarf2_cfi_asm=no]) | |
333 | CFLAGS="$SAVE_CFLAGS" | |
334 | ]) | |
77c55a87 | 335 | |
90d1e879 RM |
336 | if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then |
337 | TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm" | |
b977bf01 | 338 | fi |
6a161fa9 | 339 | |
2b167a72 | 340 | grub_apple_target_cc |
c9da87d0 | 341 | if test x$grub_cv_apple_target_cc = xyes ; then |
2b167a72 | 342 | TARGET_CFLAGS="$TARGET_CFLAGS -DAPPLE_CC=1 -fnested-functions" |
343 | CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions" | |
344 | TARGET_ASFLAGS="$TARGET_ASFLAGS -DAPPLE_CC=1" | |
345 | TARGET_APPLE_CC=1 | |
cf00df31 | 346 | AC_CHECK_PROG([OBJCONV], [objconv], [objconv], []) |
347 | if test "x$OBJCONV" = x ; then | |
348 | AC_CHECK_PROG([OBJCONV], [objconv], [./objconv], [], [.]) | |
349 | fi | |
350 | if test "x$OBJCONV" = x ; then | |
351 | AC_MSG_ERROR([objconv not found which is required when building with apple compiler]) | |
352 | fi | |
2b167a72 | 353 | TARGET_IMG_LDSCRIPT= |
354 | TARGET_IMG_CFLAGS="-static" | |
355 | TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,' | |
356 | TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,' | |
357 | else | |
358 | TARGET_APPLE_CC=0 | |
359 | # Use linker script if present, otherwise use builtin -N script. | |
2b167a72 | 360 | if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then |
361 | TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" | |
362 | TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext," | |
38e55e90 | 363 | TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc -Wl,-Ttext," |
2b167a72 | 364 | else |
365 | TARGET_IMG_LDSCRIPT= | |
366 | TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,' | |
367 | TARGET_IMG_LDFLAGS_AC='-Wl,-N -Wl,-Ttext,' | |
368 | fi | |
369 | TARGET_IMG_CFLAGS= | |
370 | fi | |
371 | ||
372 | AC_SUBST(TARGET_IMG_LDSCRIPT) | |
373 | AC_SUBST(TARGET_IMG_LDFLAGS) | |
374 | AC_SUBST(TARGET_IMG_CFLAGS) | |
2b167a72 | 375 | |
376 | # For platforms where ELF is not the default link format. | |
377 | AC_MSG_CHECKING([for command to convert module to ELF format]) | |
378 | case "${host_os}" in | |
4b0cd8f8 VS |
379 | cygwin) TARGET_OBJ2ELF='grub-pe2elf'; |
380 | # FIXME: put proper test here | |
381 | AC_DEFINE([NEED_REGISTER_FRAME_INFO], 1, | |
382 | [Define to 1 if GCC generates calls to __register_frame_info()]) | |
383 | ;; | |
2b167a72 | 384 | *) ;; |
385 | esac | |
386 | AC_SUBST(TARGET_OBJ2ELF) | |
387 | AC_MSG_RESULT([$TARGET_OBJ2ELF]) | |
388 | ||
389 | ||
b977bf01 | 390 | if test "x$target_m32" = x1; then |
391 | # Force 32-bit mode. | |
392 | TARGET_CFLAGS="$TARGET_CFLAGS -m32" | |
5c2ee771 | 393 | TARGET_ASFLAGS="$TARGET_CFLAGS -m32" |
b977bf01 | 394 | TARGET_LDFLAGS="$TARGET_LDFLAGS -m32" |
2b167a72 | 395 | TARGET_MODULE_FORMAT="elf32" |
6a161fa9 | 396 | fi |
b977bf01 | 397 | |
20011694 | 398 | if test "x$target_m64" = x1; then |
399 | # Force 64-bit mode. | |
7e9ca17a | 400 | TARGET_CFLAGS="$TARGET_CFLAGS -m64" |
5c2ee771 | 401 | TARGET_ASFLAGS="$TARGET_ASFLAGS -m64" |
7e9ca17a | 402 | TARGET_LDFLAGS="$TARGET_LDFLAGS -m64" |
2b167a72 | 403 | TARGET_MODULE_FORMAT="elf64" |
7e9ca17a | 404 | fi |
405 | ||
406 | if test "$target_cpu"-"$platform" = x86_64-efi; then | |
407 | # Use large model to support 4G memory | |
6e09b8b7 | 408 | AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [ |
c8600122 | 409 | SAVED_CFLAGS=$CFLAGS |
410 | CFLAGS="$CFLAGS -m64 -mcmodel=large" | |
6e09b8b7 | 411 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
412 | [grub_cv_cc_mcmodel=yes], | |
413 | [grub_cv_cc_mcmodel=no]) | |
414 | ]) | |
c8600122 | 415 | if test "x$grub_cv_cc_mcmodel" = xno; then |
4ba8d354 | 416 | AC_MSG_ERROR([-mcmodel=large not supported. Upgrade your gcc.]) |
c8600122 | 417 | else |
418 | TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large" | |
6e09b8b7 | 419 | fi |
7e9ca17a | 420 | |
421 | # EFI writes to stack below %rsp, we must not use the red zone | |
422 | AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [ | |
c8600122 | 423 | CFLAGS="$CFLAGS -m64 -mno-red-zone" |
7e9ca17a | 424 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
425 | [grub_cv_cc_no_red_zone=yes], | |
426 | [grub_cv_cc_no_red_zone=no]) | |
427 | ]) | |
428 | if test "x$grub_cv_cc_no_red_zone" = xno; then | |
429 | AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc]) | |
430 | fi | |
431 | ||
c8600122 | 432 | TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone" |
20011694 | 433 | fi |
434 | ||
baa2a121 | 435 | # |
436 | # Compiler features. | |
437 | # | |
438 | ||
9035dce4 | 439 | # Need __enable_execute_stack() for nested function trampolines? |
440 | grub_CHECK_ENABLE_EXECUTE_STACK | |
441 | ||
93a81088 | 442 | # Position independent executable. |
443 | grub_CHECK_PIE | |
444 | [# Need that, because some distributions ship compilers that include | |
445 | # `-fPIE' in the default specs. | |
446 | if [ x"$pie_possible" = xyes ]; then | |
447 | TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE" | |
448 | fi] | |
449 | ||
baa2a121 | 450 | # Smashing stack protector. |
451 | grub_CHECK_STACK_PROTECTOR | |
c3db8364 | 452 | # Need that, because some distributions ship compilers that include |
baa2a121 | 453 | # `-fstack-protector' in the default specs. |
c3db8364 | 454 | if test "x$ssp_possible" = xyes; then |
455 | TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector" | |
456 | fi | |
2a8a80e4 | 457 | grub_CHECK_STACK_ARG_PROBE |
458 | # Cygwin's GCC uses alloca() to probe the stackframe on static | |
459 | # stack allocations above some threshold. | |
460 | if test x"$sap_possible" = xyes; then | |
461 | TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe" | |
462 | fi | |
baa2a121 | 463 | |
63f745e8 | 464 | AC_ARG_ENABLE([werror], |
465 | [AS_HELP_STRING([--disable-werror], | |
466 | [do not use -Werror when building GRUB])]) | |
467 | if test x"$enable_werror" != xno ; then | |
468 | TARGET_CFLAGS="$TARGET_CFLAGS -Werror" | |
469 | fi | |
470 | ||
b977bf01 | 471 | AC_SUBST(TARGET_CFLAGS) |
2b167a72 | 472 | AC_SUBST(TARGET_MODULE_FORMAT) |
cf00df31 | 473 | AC_SUBST(OBJCONV) |
2b167a72 | 474 | AC_SUBST(TARGET_APPLE_CC) |
475 | AC_SUBST(TARGET_ASFLAGS) | |
b977bf01 | 476 | AC_SUBST(TARGET_CPPFLAGS) |
477 | AC_SUBST(TARGET_LDFLAGS) | |
6a161fa9 | 478 | |
aa6d7826 | 479 | # Set them to their new values for the tests below. |
480 | CC="$TARGET_CC" | |
26de2bcd | 481 | if test "x$TARGET_APPLE_CC" = x1 ; then |
69be5b74 | 482 | CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error" |
26de2bcd | 483 | else |
01fcf061 | 484 | CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wno-error" |
26de2bcd | 485 | fi |
aa6d7826 | 486 | CPPFLAGS="$TARGET_CPPFLAGS" |
487 | LDFLAGS="$TARGET_LDFLAGS" | |
69be5b74 VS |
488 | LIBS=-lgcc |
489 | ||
01fcf061 VS |
490 | grub_ASM_USCORE |
491 | if test x$grub_cv_asm_uscore = xyes; then | |
492 | CFLAGS="$CFLAGS -Wl,--defsym,_abort=_main" | |
493 | else | |
494 | CFLAGS="$CFLAGS -Wl,--defsym,abort=main" | |
495 | fi | |
496 | ||
69be5b74 VS |
497 | # Check for libgcc symbols |
498 | AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x) | |
499 | ||
500 | if test "x$TARGET_APPLE_CC" = x1 ; then | |
501 | CFLAGS="$TARGET_CFLAGS -nostdlib" | |
502 | else | |
503 | CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100" | |
504 | fi | |
42e0cba3 | 505 | LIBS="" |
aa6d7826 | 506 | |
6a161fa9 | 507 | # Defined in aclocal.m4. |
f6130a12 | 508 | grub_PROG_TARGET_CC |
2b167a72 | 509 | if test "x$TARGET_APPLE_CC" != x1 ; then |
b977bf01 | 510 | grub_PROG_OBJCOPY_ABSOLUTE |
2b167a72 | 511 | fi |
cb71ba20 | 512 | grub_PROG_LD_BUILD_ID_NONE |
b977bf01 | 513 | if test "x$target_cpu" = xi386; then |
2aec1692 CF |
514 | if test "$platform" != emu && test "x$TARGET_APPLE_CC" != x1 ; then |
515 | if test ! -z "$TARGET_IMG_LDSCRIPT"; then | |
516 | # Check symbols provided by linker script. | |
517 | CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC}8000 -Wl,--defsym,___main=0x8100" | |
518 | fi | |
2a8a80e4 | 519 | grub_CHECK_BSS_START_SYMBOL |
520 | grub_CHECK_END_SYMBOL | |
521 | fi | |
522 | CFLAGS="$TARGET_CFLAGS" | |
4b13b216 | 523 | grub_I386_ASM_PREFIX_REQUIREMENT |
524 | grub_I386_ASM_ADDR32 | |
525 | grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK | |
5aded270 | 526 | else |
f4917dfd | 527 | AC_DEFINE([NESTED_FUNC_ATTR], [], [Catch gcc bug]) |
6a161fa9 | 528 | fi |
529 | ||
bf6a5fb2 | 530 | AH_BOTTOM([#if defined(__i386__) && !defined(GRUB_UTIL) |
531 | #define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (1))) | |
532 | #else | |
533 | #define NESTED_FUNC_ATTR | |
534 | #endif]) | |
535 | ||
5ce5507f | 536 | AC_ARG_ENABLE([efiemu], |
537 | [AS_HELP_STRING([--enable-efiemu], | |
538 | [build and install the efiemu runtimes (default=guessed)])]) | |
539 | if test x"$enable_efiemu" = xno ; then | |
ce7a733d | 540 | efiemu_excuse="explicitly disabled" |
5ce5507f | 541 | fi |
542 | if test x"$efiemu_excuse" = x ; then | |
43e6200c | 543 | AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [ |
d2838156 | 544 | CFLAGS="$CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib" |
5ce5507f | 545 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], |
546 | [grub_cv_cc_efiemu=yes], | |
547 | [grub_cv_cc_efiemu=no]) | |
548 | ]) | |
55c70904 | 549 | if test x$grub_cv_cc_efiemu = xno; then |
e98cd0c2 | 550 | efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib" |
5ce5507f | 551 | fi |
552 | fi | |
553 | if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then | |
ce7a733d | 554 | AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled]) |
5ce5507f | 555 | fi |
556 | if test x"$efiemu_excuse" = x ; then | |
557 | enable_efiemu=yes | |
558 | else | |
559 | enable_efiemu=no | |
560 | fi | |
561 | AC_SUBST([enable_efiemu]) | |
562 | ||
016a671b | 563 | if test "$platform" != emu; then |
8f9a632b VS |
564 | AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [ |
565 | SAVED_CPPFLAGS="$CPPFLAGS" | |
566 | CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`" | |
567 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h> | |
568 | int va_arg_func (int fixed, va_list args);]], [[]])], | |
569 | [grub_cv_cc_isystem=yes], | |
570 | [grub_cv_cc_isystem=no]) | |
571 | CPPFLAGS="$SAVED_CPPFLAGS" | |
572 | ]) | |
573 | ||
574 | if test x"$grub_cv_cc_isystem" = xyes ; then | |
575 | TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`" | |
576 | fi | |
dae79b6b | 577 | fi |
5ce5507f | 578 | |
c9a86192 | 579 | # Restore the flags. |
9962ed99 | 580 | CC="$tmp_CC" |
581 | CFLAGS="$tmp_CFLAGS" | |
582 | CPPFLAGS="$tmp_CPPFLAGS" | |
c9a86192 | 583 | LDFLAGS="$tmp_LDFLAGS" |
aa6d7826 | 584 | LIBS="$tmp_LIBS" |
6a161fa9 | 585 | |
4fe9862e | 586 | # |
2965c7cc | 587 | # Check for options. |
4fe9862e | 588 | # |
589 | ||
590 | # Memory manager debugging. | |
b39f9d20 | 591 | AC_ARG_ENABLE([mm-debug], |
2965c7cc | 592 | AS_HELP_STRING([--enable-mm-debug], |
90ce5d56 | 593 | [include memory manager debugging]), |
2965c7cc | 594 | [AC_DEFINE([MM_DEBUG], [1], |
595 | [Define to 1 if you enable memory manager debugging.])]) | |
596 | ||
d64399b5 | 597 | AC_ARG_ENABLE([grub-emu-usb], |
598 | [AS_HELP_STRING([--enable-grub-emu-usb], | |
5ce5507f | 599 | [build and install the `grub-emu' debugging utility with USB support (default=guessed)])]) |
5ce5507f | 600 | |
927d0134 VS |
601 | AC_ARG_ENABLE([grub-emu-sdl], |
602 | [AS_HELP_STRING([--enable-grub-emu-sdl], | |
603 | [build and install the `grub-emu' debugging utility with SDL support (default=guessed)])]) | |
604 | ||
3affd0ec | 605 | AC_ARG_ENABLE([grub-emu-pci], |
606 | [AS_HELP_STRING([--enable-grub-emu-pci], | |
607 | [build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])]) | |
608 | ||
f38873b8 VS |
609 | AC_ARG_ENABLE([grub-emu-modules], |
610 | [AS_HELP_STRING([--enable-grub-emu-modules], | |
611 | [Support module loading in `grub-emu' debugging utility (default=no)])]) | |
612 | ||
f84b481b RM |
613 | if test "$platform" = emu; then |
614 | missing_ncurses= | |
615 | [# Check for curses libraries.] | |
4fe9862e | 616 | AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"], |
617 | [AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"], | |
f84b481b | 618 | [missing_ncurses=[true]])]) |
4fe9862e | 619 | AC_SUBST([LIBCURSES]) |
f84b481b | 620 | [if [ x"$missing_ncurses" = x ]; then ] |
4fe9862e | 621 | [# Check for headers.] |
622 | AC_CHECK_HEADERS([ncurses/curses.h], [], | |
623 | [AC_CHECK_HEADERS([ncurses.h], [], | |
624 | [AC_CHECK_HEADERS([curses.h], [], | |
f84b481b | 625 | [missing_ncurses=[true]])])]) |
5ce5507f | 626 | [fi] |
f84b481b RM |
627 | if test x"$missing_ncurses" = xtrue ; then |
628 | AC_MSG_ERROR([grub-emu can't be compiled without ncurses]) | |
5ce5507f | 629 | fi |
f84b481b | 630 | |
f38873b8 VS |
631 | if test x"$enable_grub_emu_modules" = xyes ; then |
632 | TARGET_NO_MODULES=no | |
633 | else | |
634 | TARGET_NO_MODULES=yes | |
635 | fi | |
636 | AC_SUBST(TARGET_NO_MODULES) | |
637 | ||
2aec1692 CF |
638 | if test "$TARGET_NO_MODULES" = yes ; then |
639 | # Do not convert modules, otherwise linkage may fail (Cygwin only). | |
640 | # FIXME: Should be checked above before TARGET_OBJ2ELF is set first. | |
641 | TARGET_OBJ2ELF= | |
642 | fi | |
643 | ||
5ce5507f | 644 | if test x"$enable_grub_emu_usb" = xno ; then |
ce7a733d | 645 | grub_emu_usb_excuse="explicitly disabled" |
5ce5507f | 646 | fi |
325c8258 | 647 | |
0e848909 VS |
648 | if test x"$enable_grub_emu_pci" = xyes ; then |
649 | grub_emu_usb_excuse="conflicts with PCI support" | |
650 | fi | |
651 | ||
5ce5507f | 652 | [if [ x"$grub_emu_usb_excuse" = x ]; then |
d64399b5 | 653 | # Check for libusb libraries.] |
5ce5507f | 654 | AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"], |
e98cd0c2 | 655 | [grub_emu_usb_excuse=["need libusb library"]]) |
d64399b5 | 656 | AC_SUBST([LIBUSB]) |
5ce5507f | 657 | [fi] |
658 | [if [ x"$grub_emu_usb_excuse" = x ]; then | |
659 | # Check for headers.] | |
d64399b5 | 660 | AC_CHECK_HEADERS([usb.h], [], |
e98cd0c2 | 661 | [grub_emu_usb_excuse=["need libusb headers"]]) |
4fe9862e | 662 | [fi] |
c6f3b249 | 663 | if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then |
ce7a733d | 664 | AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled]) |
5ce5507f | 665 | fi |
666 | if test x"$grub_emu_usb_excuse" = x ; then | |
667 | enable_grub_emu_usb=yes | |
668 | else | |
669 | enable_grub_emu_usb=no | |
670 | fi | |
671 | ||
927d0134 VS |
672 | if test x"$enable_grub_emu_sdl" = xno ; then |
673 | grub_emu_sdl_excuse="explicitely disabled" | |
674 | fi | |
675 | [if [ x"$grub_emu_sdl_excuse" = x ]; then | |
676 | # Check for libSDL libraries.] | |
677 | AC_CHECK_LIB([SDL], [SDL_Init], [LIBSDL="-lSDL"], | |
678 | [grub_emu_sdl_excuse=["libSDL libraries are required to build \`grub-emu' with SDL support"]]) | |
679 | AC_SUBST([LIBSDL]) | |
680 | [fi] | |
9f293ab0 | 681 | |
927d0134 VS |
682 | [if [ x"$grub_emu_sdl_excuse" = x ]; then |
683 | # Check for headers.] | |
684 | AC_CHECK_HEADERS([SDL/SDL.h], [], | |
685 | [grub_emu_sdl_excuse=["libSDL header file is required to build \`grub-emu' with SDL support"]]) | |
686 | [fi] | |
9f293ab0 | 687 | |
927d0134 VS |
688 | if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then |
689 | AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled]) | |
690 | fi | |
691 | if test x"$grub_emu_sdl_excuse" = x ; then | |
692 | enable_grub_emu_sdl=yes | |
693 | else | |
694 | enable_grub_emu_sdl=no | |
695 | fi | |
696 | ||
3affd0ec | 697 | if test x"$enable_grub_emu_pci" != xyes ; then |
325c8258 | 698 | grub_emu_pci_excuse="not enabled" |
699 | fi | |
700 | ||
701 | if test x"$enable_grub_emu_usb" = xyes ; then | |
702 | grub_emu_pci_excuse="conflicts with USB support" | |
703 | fi | |
704 | ||
705 | [if [ x"$grub_emu_pci_excuse" = x ]; then | |
706 | # Check for libpci libraries.] | |
459fed4b | 707 | AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"], |
708 | [grub_emu_pci_excuse=["need libpciaccess library"]]) | |
709 | AC_SUBST([LIBPCIACCESS]) | |
325c8258 | 710 | [fi] |
711 | [if [ x"$grub_emu_pci_excuse" = x ]; then | |
712 | # Check for headers.] | |
713 | AC_CHECK_HEADERS([pci/pci.h], [], | |
459fed4b | 714 | [grub_emu_pci_excuse=["need libpciaccess headers"]]) |
325c8258 | 715 | [fi] |
716 | ||
717 | if test x"$grub_emu_pci_excuse" = x ; then | |
718 | enable_grub_emu_pci=yes | |
719 | else | |
9f293ab0 | 720 | |
325c8258 | 721 | enable_grub_emu_pci=no |
3affd0ec | 722 | fi |
723 | ||
927d0134 | 724 | AC_SUBST([enable_grub_emu_sdl]) |
d64399b5 | 725 | AC_SUBST([enable_grub_emu_usb]) |
3affd0ec | 726 | AC_SUBST([enable_grub_emu_pci]) |
f84b481b | 727 | fi |
4fe9862e | 728 | |
99fadbaa | 729 | AC_ARG_ENABLE([grub-fstest], |
730 | [AS_HELP_STRING([--enable-grub-fstest], | |
5ce5507f | 731 | [build and install the `grub-fstest' debugging utility (default=guessed)])]) |
732 | if test x"$enable_grub_fstest" = xno ; then | |
ce7a733d | 733 | grub_fstest_excuse="explicitly disabled" |
5ce5507f | 734 | fi |
735 | if test x"$grub_fstest_excuse" = x ; then | |
736 | enable_grub_fstest=yes | |
737 | else | |
738 | enable_grub_fstest=no | |
739 | fi | |
99fadbaa | 740 | AC_SUBST([enable_grub_fstest]) |
741 | ||
e52db1f7 | 742 | AC_ARG_ENABLE([grub-mkfont], |
743 | [AS_HELP_STRING([--enable-grub-mkfont], | |
5ce5507f | 744 | [build and install the `grub-mkfont' utility (default=guessed)])]) |
745 | if test x"$enable_grub_mkfont" = xno ; then | |
ce7a733d | 746 | grub_mkfont_excuse="explicitly disabled" |
5ce5507f | 747 | fi |
748 | ||
749 | if test x"$grub_mkfont_excuse" = x ; then | |
e52db1f7 | 750 | # Check for freetype libraries. |
751 | AC_CHECK_PROGS([FREETYPE], [freetype-config]) | |
752 | if test "x$FREETYPE" = x ; then | |
e98cd0c2 | 753 | grub_mkfont_excuse=["need freetype2 library"] |
e52db1f7 | 754 | fi |
755 | freetype_cflags=`freetype-config --cflags` | |
756 | freetype_libs=`freetype-config --libs` | |
757 | fi | |
660960d6 VS |
758 | |
759 | if test x"$grub_mkfont_excuse" = x ; then | |
760 | # Check for freetype libraries. | |
d1e8a02f VS |
761 | SAVED_CPPFLAGS="$CPPFLAGS" |
762 | CPPFLAGS="$CPPFLAGS $freetype_cflags" | |
660960d6 VS |
763 | AC_CHECK_HEADERS([ft2build.h], [], |
764 | [grub_mkfont_excuse=["need freetype2 headers"]]) | |
d1e8a02f | 765 | CPPFLAGS="$SAVED_CPPFLAGS" |
660960d6 VS |
766 | fi |
767 | ||
5ce5507f | 768 | if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then |
ce7a733d | 769 | AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled]) |
5ce5507f | 770 | fi |
771 | if test x"$grub_mkfont_excuse" = x ; then | |
772 | enable_grub_mkfont=yes | |
773 | else | |
774 | enable_grub_mkfont=no | |
775 | fi | |
e52db1f7 | 776 | AC_SUBST([enable_grub_mkfont]) |
777 | AC_SUBST([freetype_cflags]) | |
778 | AC_SUBST([freetype_libs]) | |
779 | ||
2b167a72 | 780 | AC_SUBST(ASFLAGS) |
fc45fb58 | 781 | |
6a161fa9 | 782 | # Output files. |
1f4147aa | 783 | grub_CHECK_LINK_DIR |
784 | if test x"$link_dir" = xyes ; then | |
f84b481b RM |
785 | AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu]) |
786 | if test "$platform" != emu ; then | |
787 | AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform]) | |
788 | fi | |
1f4147aa | 789 | else |
790 | mkdir -p include/grub 2>/dev/null | |
791 | rm -rf include/grub/cpu | |
792 | cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null | |
f84b481b RM |
793 | if test "$platform" != emu ; then |
794 | rm -rf include/grub/machine | |
795 | cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null | |
796 | fi | |
1f4147aa | 797 | fi |
7b455f4d | 798 | AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh]) |
6a161fa9 | 799 | AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) |
800 | AC_OUTPUT | |
5ce5507f | 801 | [ |
802 | echo "*******************************************************" | |
803 | echo GRUB2 will be compiled with following components: | |
804 | echo Platform: "$target_cpu"-"$platform" | |
f84b481b | 805 | if [ x"$platform" = xemu ]; then |
5ce5507f | 806 | if [ x"$grub_emu_usb_excuse" = x ]; then |
807 | echo USB support for grub-emu: Yes | |
808 | else | |
809 | echo USB support for grub-emu: No "($grub_emu_usb_excuse)" | |
810 | fi | |
927d0134 VS |
811 | if [ x"$grub_emu_sdl_excuse" = x ]; then |
812 | echo SDL support for grub-emu: Yes | |
813 | else | |
814 | echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)" | |
815 | fi | |
325c8258 | 816 | if [ x"$grub_emu_pci_excuse" = x ]; then |
817 | echo PCI support for grub-emu: Yes | |
818 | else | |
819 | echo PCI support for grub-emu: No "($grub_emu_pci_excuse)" | |
820 | fi | |
f38873b8 VS |
821 | if [ x"$TARGET_NO_MODULES" = xno ]; then |
822 | echo Module support for grub-emu: Yes | |
823 | else | |
824 | echo Module support for grub-emu: No | |
825 | fi | |
f84b481b | 826 | fi |
5ce5507f | 827 | if [ x"$enable_mm_debug" = xyes ]; then |
828 | echo With memory debugging: Yes | |
829 | else | |
830 | echo With memory debugging: No | |
831 | fi | |
5ce5507f | 832 | if [ x"$efiemu_excuse" = x ]; then |
833 | echo efiemu runtime: Yes | |
834 | else | |
835 | echo efiemu runtime: No "($efiemu_excuse)" | |
836 | fi | |
837 | if [ x"$grub_fstest_excuse" = x ]; then | |
838 | echo grub-fstest: Yes | |
839 | else | |
840 | echo grub-fstest: No "($grub_fstest_excuse)" | |
841 | fi | |
842 | if [ x"$grub_mkfont_excuse" = x ]; then | |
843 | echo grub-mkfont: Yes | |
844 | else | |
845 | echo grub-mkfont: No "($grub_mkfont_excuse)" | |
846 | fi | |
847 | echo "*******************************************************" | |
848 | ] |