3 # Process this file with autoconf to produce a configure script.
5 # Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
7 # This configure.ac is free software; the author
8 # gives unlimited permission to copy and/or distribute it,
9 # with or without modifications, as long as this notice is preserved.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 dnl This configure script is complicated, because GRUB needs to deal
17 dnl with three potentially different types:
19 dnl build -- the environment for building GRUB
20 dnl host -- the environment for running utilities
21 dnl target -- the environment for running GRUB
23 dnl In addition, GRUB needs to deal with a platform specification
24 dnl which specifies the system running GRUB, such as firmware.
25 dnl This is necessary because the target type in autoconf does not
26 dnl describe such a system very well.
28 dnl The current strategy is to use variables with no prefix (such as
29 dnl CC, CFLAGS, etc.) for the host type as well as the build type,
30 dnl because GRUB does not need to use those variables for the build
31 dnl type, so there is no conflict. Variables with the prefix "TARGET_"
32 dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
35 AC_INIT([GRUB],[2.00~beta0],[bug-grub@gnu.org])
37 AC_CONFIG_AUX_DIR([build-aux])
39 # We don't want -g -O2 by default in CFLAGS
42 # Checks for host and target systems.
48 AC_CONFIG_SRCDIR([include/grub/dl.h])
49 AC_CONFIG_HEADER([config-util.h])
51 # Program name transformations
54 # Optimization flag. Allow user to override.
55 if test "x$TARGET_CFLAGS" = x; then
56 TARGET_CFLAGS="$TARGET_CFLAGS -Os"
59 # Default HOST_CPPFLAGS
60 HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W"
61 HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
62 HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1"
63 HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_LIBDIR=\\\"\$(pkglibdir)\\\""
64 HOST_CPPFLAGS="$HOST_CPPFLAGS -DLOCALEDIR=\\\"\$(localedir)\\\""
66 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -Wall -W"
67 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include"
68 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include"
71 i[[3456]]86) target_cpu=i386 ;;
72 amd64) target_cpu=x86_64 ;;
73 sparc) target_cpu=sparc64 ;;
76 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPSEL=1";
80 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPS=1";
84 # Specify the platform (such as firmware).
85 AC_ARG_WITH([platform],
86 AS_HELP_STRING([--with-platform=PLATFORM],
87 [select the host platform [[guessed]]]))
89 # Guess the platform if not specified.
90 if test "x$with_platform" = x; then
91 case "$target_cpu"-"$target_vendor" in
92 i386-apple) platform=efi ;;
93 i386-*) platform=pc ;;
94 x86_64-apple) platform=efi ;;
95 x86_64-*) platform=pc ;;
96 powerpc-*) platform=ieee1275 ;;
97 powerpc64-*) platform=ieee1275 ;;
98 sparc64-*) platform=ieee1275 ;;
99 mipsel-*) platform=loongson ;;
100 mips-*) platform=arc ;;
101 ia64-*) platform=efi ;;
102 *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;;
105 platform="$with_platform"
108 case "$target_cpu"-"$platform" in
111 x86_64-*) target_cpu=i386 ;;
112 powerpc64-ieee1275) target_cpu=powerpc ;;
115 # Check if the platform is supported, make final adjustments.
116 case "$target_cpu"-"$platform" in
122 i386-linuxbios) platform=coreboot ;;
129 mips-qemu-mips) platform=qemu_mips;;
132 mipsel-qemu-mips) platform=qemu_mips;;
133 mipsel-yeeloong) platform=loongson ;;
134 mipsel-fuloong) platform=loongson ;;
137 *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
140 case "$target_cpu" in
141 i386 | powerpc) target_m32=1 ;;
142 x86_64 | sparc64) target_m64=1 ;;
146 mingw32*) host_os=cygwin ;;
149 # This normalizes the names, and creates a new variable ("host_kernel")
150 # while at it, since the mapping is not always 1:1 (e.g. different OSes
151 # using the same kernel type).
153 gnu*) host_kernel=hurd ;;
154 linux*) host_kernel=linux ;;
155 freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;;
156 netbsd*) host_kernel=netbsd ;;
157 solaris*) host_kernel=illumos ;;
158 cygwin) host_kernel=windows ;;
162 coreboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_COREBOOT=1" ;;
163 multiboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MULTIBOOT=1" ;;
164 efi) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EFI=1" ;;
165 ieee1275) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_IEEE1275=1" ;;
166 qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
167 pc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
168 emu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
169 loongson) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
170 qemu_mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
171 arc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARC=1" ;;
173 case "$target_cpu" in
174 mips |mipsel) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS=1" ;;
175 sparc64) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
177 if test x${target_cpu} = xmipsel ; then
178 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
180 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,` -DGRUB_TARGET_CPU_`echo ${target_cpu} | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`=1"
183 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
187 AC_SUBST(host_kernel)
192 # Define default variables
195 AC_ARG_WITH([bootdir],
196 AS_HELP_STRING([--with-bootdir=DIR],
197 [set the name of /boot directory [[guessed]]]),
198 [have_with_bootdir=y],
199 [have_with_bootdir=n])
200 if test x$have_with_bootdir = xy; then
201 bootdirname="$with_bootdir"
205 # Because /boot is used for the boot block in NetBSD and OpenBSD,
207 *) bootdirname='boot' ;;
211 AC_SUBST(bootdirname)
212 AC_DEFINE_UNQUOTED(GRUB_BOOT_DIR_NAME, "$bootdirname",
213 [Default boot directory name]")
215 AC_ARG_WITH([grubdir],
216 AS_HELP_STRING([--with-grubdir=DIR],
217 [set the name of grub directory [[guessed]]]),
218 [grubdirname="$with_grubdir"],
219 [grubdirname="$PACKAGE"])
221 AC_SUBST(grubdirname)
222 AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
223 [Default grub directory name])
226 # Checks for build programs.
229 # Although cmp is listed in the GNU Coding Standards as a command which
230 # can used directly, OpenBSD lacks cmp in the default installation.
231 AC_CHECK_PROGS([CMP], [cmp])
232 if test "x$CMP" = x; then
233 AC_MSG_ERROR([cmp is not found])
236 AC_CHECK_PROGS([YACC], [bison])
237 if test "x$YACC" = x; then
238 AC_MSG_ERROR([bison is not found])
243 for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
244 for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
245 if test -f "$dir/unifont.$ext"; then
246 FONT_SOURCE="$dir/unifont.$ext"
252 if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips); then
253 AC_MSG_ERROR([qemu and loongson ports need unifont])
256 AC_SUBST([FONT_SOURCE])
267 if test "x$LEX" = "x:"; then
268 AC_MSG_ERROR([flex is not found])
270 version=`$LEX --version | $AWK '{ split($NF,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'`
271 if test -n "$version" -a "$version" -ge 20535; then
274 AC_MSG_ERROR([flex is too old. GRUB requires 2.5.35 or above])
278 # These are not a "must".
279 AC_PATH_PROGS(MAKEINFO, makeinfo true)
282 # Checks for host programs.
291 test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
294 AM_GNU_GETTEXT([external])
297 # Identify characteristics of the host architecture.
299 AC_CHECK_SIZEOF(void *)
300 AC_CHECK_SIZEOF(long)
303 if test x$grub_cv_apple_cc = xyes ; then
304 HOST_CPPFLAGS="$HOST_CPPFLAGS -DAPPLE_CC=1 -fnested-functions"
305 HOST_CFLAGS="$HOST_CFLAGS"
308 if test x$USE_NLS = xno; then
309 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
312 if test "x$cross_compiling" = xyes; then
313 AC_MSG_WARN([cannot generate manual pages while cross compiling])
315 AC_PATH_PROG(HELP2MAN, help2man)
318 # Check for functions and headers.
319 AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent)
320 AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
322 AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
323 #include <sys/param.h>
324 #include <sys/mount.h>])
326 AC_CHECK_MEMBERS([struct statfs.f_mntfromname],,,[$ac_includes_default
327 #include <sys/param.h>
328 #include <sys/mount.h>])
330 # For opendisk() and getrawpartition() on NetBSD.
331 # Used in util/deviceiter.c and in util/hostdisk.c.
332 AC_CHECK_HEADER([util.h], [
333 AC_CHECK_LIB([util], [opendisk], [
335 AC_DEFINE(HAVE_OPENDISK, 1, [Define if opendisk() in -lutil can be used])
337 AC_CHECK_LIB([util], [getrawpartition], [
339 AC_DEFINE(HAVE_GETRAWPARTITION, 1, [Define if getrawpartition() in -lutil can be used])
345 # Check for host and build compilers.
348 AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc],
349 [AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])])
355 # Check for target programs.
358 # Find tools for the target.
359 if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
360 tmp_ac_tool_prefix="$ac_tool_prefix"
361 ac_tool_prefix=$target_alias-
363 AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc],
364 [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])])
365 AC_CHECK_TOOL(OBJCOPY, objcopy)
366 AC_CHECK_TOOL(STRIP, strip)
367 AC_CHECK_TOOL(NM, nm)
369 ac_tool_prefix="$tmp_ac_tool_prefix"
371 if test "x$TARGET_CC" = x; then
374 AC_CHECK_TOOL(OBJCOPY, objcopy)
375 AC_CHECK_TOOL(STRIP, strip)
376 AC_CHECK_TOOL(NM, nm)
382 # Test the C compiler for the target environment.
385 tmp_LDFLAGS="$LDFLAGS"
386 tmp_CPPFLAGS="$CPPFLAGS"
389 CFLAGS="$TARGET_CFLAGS"
390 CPPFLAGS="$TARGET_CPPFLAGS"
391 LDFLAGS="$TARGET_LDFLAGS"
395 WARN_FLAGS="-Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wsync-nand -Wtrigraphs -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-parameter-type -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
396 HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS"
397 TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
398 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
400 # Force no alignment to save space on i386.
401 if test "x$target_cpu" = xi386; then
402 AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
403 CFLAGS="$CFLAGS -falign-loops=1"
404 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
405 [grub_cv_cc_falign_loop=yes],
406 [grub_cv_cc_falign_loop=no])
409 if test "x$grub_cv_cc_falign_loop" = xyes; then
410 TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
412 TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
415 # Some toolchains enable these features by default, but they need
416 # registers that aren't set up properly in GRUB.
417 TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
420 # By default, GCC 4.4 generates .eh_frame sections containing unwind
421 # information in some cases where it previously did not. GRUB doesn't need
422 # these and they just use up vital space. Restore the old compiler
424 AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
425 SAVE_CFLAGS="$CFLAGS"
426 CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
427 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
428 [grub_cv_cc_fno_dwarf2_cfi_asm=yes],
429 [grub_cv_cc_fno_dwarf2_cfi_asm=no])
430 CFLAGS="$SAVE_CFLAGS"
433 if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
434 TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
437 # By default, GCC 4.6 generates .eh_frame sections containing unwind
438 # information in some cases where it previously did not. GRUB doesn't need
439 # these and they just use up vital space. Restore the old compiler
441 AC_CACHE_CHECK([whether -fno-asynchronous-unwind-tables works], [grub_cv_cc_fno_asynchronous_unwind_tables], [
442 SAVE_CFLAGS="$CFLAGS"
443 CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
444 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
445 [grub_cv_cc_fno_asynchronous_unwind_tables=yes],
446 [grub_cv_cc_fno_asynchronous_unwind_tables=no])
447 CFLAGS="$SAVE_CFLAGS"
450 if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
451 TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
455 if test x$grub_cv_apple_target_cc = xyes ; then
456 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DAPPLE_CC=1"
457 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -fnested-functions"
459 CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions"
461 AC_CHECK_PROG([OBJCONV], [objconv], [objconv], [])
462 if test "x$OBJCONV" = x ; then
463 AC_CHECK_PROG([OBJCONV], [objconv], [./objconv], [], [.])
465 if test "x$OBJCONV" = x ; then
466 AC_MSG_ERROR([objconv not found which is required when building with apple compiler])
469 TARGET_IMG_CFLAGS="-static"
470 TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
471 TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
472 TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
475 # Use linker script if present, otherwise use builtin -N script.
476 if test -f "${srcdir}/${grub_coredir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then
477 TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/${grub_coredir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
478 TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
479 TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/${grub_coredir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
480 TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
483 TARGET_IMG_LDFLAGS='-Wl,-N'
484 TARGET_IMG_LDFLAGS_AC='-Wl,-N'
485 TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
490 # For platforms where ELF is not the default link format.
491 AC_MSG_CHECKING([for command to convert module to ELF format])
493 cygwin) TARGET_OBJ2ELF='$(top_builddir)/grub-pe2elf';
494 # FIXME: put proper test here
495 NEED_REGISTER_FRAME_INFO=1
497 *) NEED_REGISTER_FRAME_INFO=0 ;;
499 AC_MSG_RESULT([$TARGET_OBJ2ELF])
502 AC_ARG_ENABLE([efiemu],
503 [AS_HELP_STRING([--enable-efiemu],
504 [build and install the efiemu runtimes (default=guessed)])])
505 if test x"$enable_efiemu" = xno ; then
506 efiemu_excuse="explicitly disabled"
508 if test x"$target_cpu" != xi386 ; then
509 efiemu_excuse="only available on i386"
511 if test x"$platform" = xefi ; then
512 efiemu_excuse="not available on efi"
514 if test x"$efiemu_excuse" = x ; then
515 AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [
516 CFLAGS="$CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib"
517 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
518 [grub_cv_cc_efiemu=yes],
519 [grub_cv_cc_efiemu=no])
521 if test x$grub_cv_cc_efiemu = xno; then
522 efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib"
525 if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then
526 AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled])
528 if test x"$efiemu_excuse" = x ; then
533 AC_SUBST([enable_efiemu])
535 if test "x$target_m32" = x1; then
537 TARGET_CFLAGS="$TARGET_CFLAGS -m32"
538 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32"
539 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m32"
540 TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
541 TARGET_MODULE_FORMAT="elf32"
544 if test "x$target_m64" = x1; then
546 TARGET_CFLAGS="$TARGET_CFLAGS -m64"
547 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64"
548 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m64"
549 TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
550 TARGET_MODULE_FORMAT="elf64"
553 if test "$target_cpu"-"$platform" = x86_64-efi; then
554 # Use large model to support 4G memory
555 AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
557 CFLAGS="$CFLAGS -m64 -mcmodel=large"
558 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
559 [grub_cv_cc_mcmodel=yes],
560 [grub_cv_cc_mcmodel=no])
562 if test "x$grub_cv_cc_mcmodel" = xno; then
563 AC_MSG_ERROR([-mcmodel=large not supported. Upgrade your gcc.])
565 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
568 # EFI writes to stack below %rsp, we must not use the red zone
569 AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [
570 CFLAGS="$CFLAGS -m64 -mno-red-zone"
571 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
572 [grub_cv_cc_no_red_zone=yes],
573 [grub_cv_cc_no_red_zone=no])
575 if test "x$grub_cv_cc_no_red_zone" = xno; then
576 AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc])
579 TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone"
586 # Need __enable_execute_stack() for nested function trampolines?
587 grub_CHECK_ENABLE_EXECUTE_STACK
589 # Position independent executable.
591 [# Need that, because some distributions ship compilers that include
592 # `-fPIE' in the default specs.
593 if [ x"$pie_possible" = xyes ]; then
594 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE"
597 # Smashing stack protector.
598 grub_CHECK_STACK_PROTECTOR
599 # Need that, because some distributions ship compilers that include
600 # `-fstack-protector' in the default specs.
601 if test "x$ssp_possible" = xyes; then
602 TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector"
604 grub_CHECK_STACK_ARG_PROBE
605 # Cygwin's GCC uses alloca() to probe the stackframe on static
606 # stack allocations above some threshold.
607 if test x"$sap_possible" = xyes; then
608 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
611 AC_ARG_ENABLE([werror],
612 [AS_HELP_STRING([--disable-werror],
613 [do not use -Werror when building GRUB])])
614 if test x"$enable_werror" != xno ; then
615 TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
616 HOST_CFLAGS="$HOST_CFLAGS -Werror"
619 TARGET_CPP="$TARGET_CC -E"
620 TARGET_CCAS=$TARGET_CC
622 GRUB_TARGET_CPU="${target_cpu}"
623 GRUB_PLATFORM="${platform}"
625 AC_SUBST(GRUB_TARGET_CPU)
626 AC_SUBST(GRUB_PLATFORM)
630 AC_SUBST(TARGET_CCAS)
631 AC_SUBST(TARGET_OBJ2ELF)
632 AC_SUBST(TARGET_APPLE_CC)
633 AC_SUBST(TARGET_MODULE_FORMAT)
635 AC_SUBST(TARGET_CFLAGS)
636 AC_SUBST(TARGET_LDFLAGS)
637 AC_SUBST(TARGET_CPPFLAGS)
638 AC_SUBST(TARGET_CCASFLAGS)
640 AC_SUBST(TARGET_IMG_LDSCRIPT)
641 AC_SUBST(TARGET_IMG_LDFLAGS)
642 AC_SUBST(TARGET_IMG_CFLAGS)
643 AC_SUBST(TARGET_IMG_BASE_LDOPT)
645 AC_SUBST(HOST_CFLAGS)
646 AC_SUBST(HOST_LDFLAGS)
647 AC_SUBST(HOST_CPPFLAGS)
648 AC_SUBST(HOST_CCASFLAGS)
650 # Set them to their new values for the tests below.
652 if test "x$TARGET_APPLE_CC" = x1 ; then
653 CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
655 CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wno-error"
657 CPPFLAGS="$TARGET_CPPFLAGS"
658 if test x$target_cpu = xi386 || test x$target_cpu = xx86_64 ; then
665 if test x$grub_cv_asm_uscore = xyes; then
666 CFLAGS="$CFLAGS -Wl,--defsym,_abort=_main"
668 CFLAGS="$CFLAGS -Wl,--defsym,abort=main"
671 # Check for libgcc symbols
672 AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x __ia64_trampoline __udivsi3 __umoddi3 __udivdi3 __divsi3 __modsi3 __umodsi3 __moddi3 __divdi3 __ctzdi2 __ctzsi2)
674 if test "x$TARGET_APPLE_CC" = x1 ; then
675 CFLAGS="$TARGET_CFLAGS -nostdlib"
677 CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
681 # Defined in aclocal.m4.
683 if test "x$TARGET_APPLE_CC" != x1 ; then
684 grub_PROG_OBJCOPY_ABSOLUTE
686 grub_PROG_LD_BUILD_ID_NONE
687 if test "x$target_cpu" = xi386; then
688 if test "$platform" != emu && test "x$TARGET_APPLE_CC" != x1 ; then
689 if test ! -z "$TARGET_IMG_LDSCRIPT"; then
690 # Check symbols provided by linker script.
691 CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},8000 -Wl,--defsym,___main=0x8100"
693 grub_CHECK_BSS_START_SYMBOL
694 grub_CHECK_END_SYMBOL
696 CFLAGS="$TARGET_CFLAGS"
697 grub_I386_ASM_PREFIX_REQUIREMENT
701 if test "$platform" != emu; then
702 AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
703 SAVED_CPPFLAGS="$CPPFLAGS"
704 CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
705 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
706 int va_arg_func (int fixed, va_list args);]], [[]])],
707 [grub_cv_cc_isystem=yes],
708 [grub_cv_cc_isystem=no])
709 CPPFLAGS="$SAVED_CPPFLAGS"
712 if test x"$grub_cv_cc_isystem" = xyes ; then
713 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
717 AC_CACHE_CHECK([whether -Wno-trampolines work], [grub_cv_cc_wnotrampolines], [
718 SAVED_CFLAGS="$CFLAGS"
719 # Test for -Wtrampolines rather than -Wno-trampolines to reduce confusion
720 # in the event of later failures (since -Wno-* is always accepted, but
721 # produces a diagnostic if something else is wrong).
722 CFLAGS="$TARGET_CFLAGS -Wtrampolines"
723 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
724 int va_arg_func (int fixed, va_list args);]], [[]])],
725 [grub_cv_cc_wnotrampolines=yes],
726 [grub_cv_cc_wnotrampolines=no])
727 CFLAGS="$SAVED_CFLAGS"
730 if test x"$grub_cv_cc_wnotrampolines" = xyes ; then
731 TARGET_CFLAGS="$TARGET_CFLAGS -Wno-trampolines"
737 CPPFLAGS="$tmp_CPPFLAGS"
738 LDFLAGS="$tmp_LDFLAGS"
745 # Memory manager debugging.
746 AC_ARG_ENABLE([mm-debug],
747 AS_HELP_STRING([--enable-mm-debug],
748 [include memory manager debugging]),
749 [AC_DEFINE([MM_DEBUG], [1],
750 [Define to 1 if you enable memory manager debugging.])])
752 AC_ARG_ENABLE([cache-stats],
753 AS_HELP_STRING([--enable-cache-stats],
754 [enable disk cache statistics collection]))
756 if test x$enable_cache_stats = xyes; then
761 AC_SUBST([DISK_CACHE_STATS])
763 AC_ARG_ENABLE([grub-emu-usb],
764 [AS_HELP_STRING([--enable-grub-emu-usb],
765 [build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
767 AC_ARG_ENABLE([grub-emu-sdl],
768 [AS_HELP_STRING([--enable-grub-emu-sdl],
769 [build and install the `grub-emu' debugging utility with SDL support (default=guessed)])])
771 AC_ARG_ENABLE([grub-emu-pci],
772 [AS_HELP_STRING([--enable-grub-emu-pci],
773 [build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])])
775 if test "$platform" = emu; then
777 [# Check for curses libraries.]
778 AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
779 [AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
780 [missing_ncurses=[true]])])
781 AC_SUBST([LIBCURSES])
782 [if [ x"$missing_ncurses" = x ]; then ]
783 [# Check for headers.]
784 AC_CHECK_HEADERS([ncurses/curses.h], [],
785 [AC_CHECK_HEADERS([ncurses.h], [],
786 [AC_CHECK_HEADERS([curses.h], [],
787 [missing_ncurses=[true]])])])
789 if test x"$missing_ncurses" = xtrue ; then
790 AC_MSG_ERROR([grub-emu can't be compiled without ncurses])
793 if test x"$enable_grub_emu_usb" != xyes ; then
794 grub_emu_usb_excuse="not enabled"
797 if test x"$enable_grub_emu_pci" = xyes ; then
798 grub_emu_usb_excuse="conflicts with PCI support"
801 [if [ x"$grub_emu_usb_excuse" = x ]; then
802 # Check for libusb libraries.]
803 AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"],
804 [grub_emu_usb_excuse=["need libusb library"]])
807 [if [ x"$grub_emu_usb_excuse" = x ]; then
808 # Check for headers.]
809 AC_CHECK_HEADERS([usb.h], [],
810 [grub_emu_usb_excuse=["need libusb headers"]])
812 if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then
813 AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled])
815 if test x"$grub_emu_usb_excuse" = x ; then
816 enable_grub_emu_usb=yes
818 enable_grub_emu_usb=no
821 if test x"$enable_grub_emu_sdl" = xno ; then
822 grub_emu_sdl_excuse="explicitely disabled"
824 [if [ x"$grub_emu_sdl_excuse" = x ]; then
825 # Check for libSDL libraries.]
826 AC_CHECK_LIB([SDL], [SDL_Init], [LIBSDL="-lSDL"],
827 [grub_emu_sdl_excuse=["libSDL libraries are required to build \`grub-emu' with SDL support"]])
831 [if [ x"$grub_emu_sdl_excuse" = x ]; then
832 # Check for headers.]
833 AC_CHECK_HEADERS([SDL/SDL.h], [],
834 [grub_emu_sdl_excuse=["libSDL header file is required to build \`grub-emu' with SDL support"]])
837 if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
838 AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled])
840 if test x"$grub_emu_sdl_excuse" = x ; then
841 enable_grub_emu_sdl=yes
843 enable_grub_emu_sdl=no
846 if test x"$enable_grub_emu_pci" != xyes ; then
847 grub_emu_pci_excuse="not enabled"
850 if test x"$enable_grub_emu_usb" = xyes ; then
851 grub_emu_pci_excuse="conflicts with USB support"
854 [if [ x"$grub_emu_pci_excuse" = x ]; then
855 # Check for libpci libraries.]
856 AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"],
857 [grub_emu_pci_excuse=["need libpciaccess library"]])
858 AC_SUBST([LIBPCIACCESS])
860 [if [ x"$grub_emu_pci_excuse" = x ]; then
861 # Check for headers.]
862 AC_CHECK_HEADERS([pci/pci.h], [],
863 [grub_emu_pci_excuse=["need libpciaccess headers"]])
866 if test x"$grub_emu_pci_excuse" = x ; then
867 enable_grub_emu_pci=yes
870 enable_grub_emu_pci=no
873 AC_SUBST([enable_grub_emu_sdl])
874 AC_SUBST([enable_grub_emu_usb])
875 AC_SUBST([enable_grub_emu_pci])
878 AC_ARG_ENABLE([grub-mkfont],
879 [AS_HELP_STRING([--enable-grub-mkfont],
880 [build and install the `grub-mkfont' utility (default=guessed)])])
881 if test x"$enable_grub_mkfont" = xno ; then
882 grub_mkfont_excuse="explicitly disabled"
885 if test x"$grub_mkfont_excuse" = x ; then
886 # Check for freetype libraries.
887 AC_CHECK_PROGS([FREETYPE], [freetype-config])
888 if test "x$FREETYPE" = x ; then
889 grub_mkfont_excuse=["need freetype2 library"]
893 if test x"$grub_mkfont_excuse" = x ; then
894 # Check for freetype libraries.
895 freetype_cflags=`freetype-config --cflags`
896 freetype_libs=`freetype-config --libs`
897 SAVED_CPPFLAGS="$CPPFLAGS"
898 CPPFLAGS="$CPPFLAGS $freetype_cflags"
899 AC_CHECK_HEADERS([ft2build.h], [],
900 [grub_mkfont_excuse=["need freetype2 headers"]])
901 CPPFLAGS="$SAVED_CPPFLAGS"
904 if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
905 AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled])
907 if test x"$grub_mkfont_excuse" = x ; then
908 enable_grub_mkfont=yes
910 enable_grub_mkfont=no
912 if test x"$enable_grub_mkfont" = xno && test "x$platform" = xloongson; then
913 AC_MSG_ERROR([loongson port needs grub-mkfont])
915 AC_SUBST([enable_grub_mkfont])
916 AC_SUBST([freetype_cflags])
917 AC_SUBST([freetype_libs])
923 if test x$enable_grub_mkfont = xno; then
924 starfield_excuse="No grub-mkfont"
927 if test x"$starfield_excuse" != x; then
928 for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
929 for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu; do
930 if test -f "$dir/DejaVuSans.$ext"; then
931 DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
937 if test "x$DJVU_FONT_SOURCE" = x; then
938 starfield_excuse="No DejaVu found"
942 AC_SUBST([DJVU_FONT_SOURCE])
944 AC_ARG_ENABLE([grub-mount],
945 [AS_HELP_STRING([--enable-grub-mount],
946 [build and install the `grub-mount' utility (default=guessed)])])
947 if test x"$enable_grub_mount" = xno ; then
948 grub_mount_excuse="explicitly disabled"
951 if test x"$grub_mount_excuse" = x ; then
952 AC_CHECK_LIB([fuse], [fuse_main_real], [],
953 [grub_mount_excuse="need FUSE library"])
956 if test x"$grub_mount_excuse" = x ; then
957 # Check for fuse headers.
958 SAVED_CPPFLAGS="$CPPFLAGS"
959 CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26"
960 AC_CHECK_HEADERS([fuse/fuse.h], [],
961 [grub_mount_excuse=["need FUSE headers"]])
962 CPPFLAGS="$SAVED_CPPFLAGS"
965 if test x"$enable_grub_mount" = xyes && test x"$grub_mount_excuse" != x ; then
966 AC_MSG_ERROR([grub-mount was explicitly requested but can't be compiled])
968 if test x"$grub_mount_excuse" = x ; then
969 enable_grub_mount=yes
973 AC_SUBST([enable_grub_mount])
975 AC_ARG_ENABLE([device-mapper],
976 [AS_HELP_STRING([--enable-device-mapper],
977 [enable Linux device-mapper support (default=guessed)])])
978 if test x"$enable_device_mapper" = xno ; then
979 device_mapper_excuse="explicitly disabled"
982 if test x"$device_mapper_excuse" = x ; then
983 # Check for device-mapper header.
984 AC_CHECK_HEADER([libdevmapper.h], [],
985 [device_mapper_excuse="need libdevmapper header"])
988 if test x"$device_mapper_excuse" = x ; then
989 # Check for device-mapper library.
990 AC_CHECK_LIB([devmapper], [dm_task_create], [],
991 [device_mapper_excuse="need devmapper library"])
994 if test x"$device_mapper_excuse" = x ; then
995 # Check for device-mapper library.
996 AC_CHECK_LIB([devmapper], [dm_log_with_errno_init],
998 [device_mapper_excuse="need devmapper library"])
1001 if test x"$device_mapper_excuse" = x ; then
1002 LIBDEVMAPPER="-ldevmapper";
1003 AC_DEFINE([HAVE_DEVICE_MAPPER], [1],
1004 [Define to 1 if you have the devmapper library.])
1007 AC_SUBST([LIBDEVMAPPER])
1010 if test x$host_kernel = xkfreebsd; then
1011 AC_CHECK_LIB([geom], [geom_gettree], [],
1012 [AC_MSG_ERROR([Your platform requires libgeom])])
1018 AC_CHECK_LIB([lzma], [lzma_code],
1020 AC_DEFINE([HAVE_LIBLZMA], [1],
1021 [Define to 1 if you have the LZMA library.])],)
1024 AC_ARG_ENABLE([libzfs],
1025 [AS_HELP_STRING([--enable-libzfs],
1026 [enable libzfs integration (default=guessed)])])
1027 if test x"$enable_libzfs" = xno ; then
1028 libzfs_excuse="explicitly disabled"
1031 if test x"$libzfs_excuse" = x ; then
1032 # Only check for system headers if libzfs support has not been disabled.
1033 AC_CHECK_HEADERS(libzfs.h libnvpair.h)
1036 if test x"$libzfs_excuse" = x ; then
1037 AC_CHECK_LIB([zfs], [libzfs_init],
1039 [libzfs_excuse="need zfs library"])
1042 if test x"$libzfs_excuse" = x ; then
1043 AC_CHECK_LIB([nvpair], [nvlist_print],
1045 [libzfs_excuse="need nvpair library"])
1048 if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
1049 AC_MSG_ERROR([libzfs support was explicitly requested but requirements are not satisfied])
1052 if test x"$libzfs_excuse" = x ; then
1053 # We need both libzfs and libnvpair for a successful build.
1055 AC_DEFINE([HAVE_LIBZFS], [1],
1056 [Define to 1 if you have the ZFS library.])
1057 LIBNVPAIR="-lnvpair"
1058 AC_DEFINE([HAVE_LIBNVPAIR], [1],
1059 [Define to 1 if you have the NVPAIR library.])
1063 AC_SUBST([LIBNVPAIR])
1067 AC_SUBST([FONT_SOURCE])
1068 AS_IF([test x$target_cpu = xi386 -a x$platform = xqemu],
1069 [AC_SUBST([GRUB_BOOT_MACHINE_LINK_ADDR], 0xffe00)])
1070 AS_IF([test x$TARGET_APPLE_CC = x1],
1071 [AC_SUBST([USE_APPLE_CC_FIXES], yes)])
1073 AC_SUBST(HAVE_ASM_USCORE)
1076 AC_SUBST(BSS_START_SYMBOL)
1077 AC_SUBST(END_SYMBOL)
1080 AC_SUBST(NEED_ENABLE_EXECUTE_STACK)
1081 AC_SUBST(NEED_REGISTER_FRAME_INFO)
1084 # Automake conditionals
1087 AM_CONDITIONAL([COND_emu], [test x$platform = xemu])
1088 AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc])
1089 AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = xefi])
1090 AM_CONDITIONAL([COND_ia64_efi], [test x$target_cpu = xia64 -a x$platform = xefi])
1091 AM_CONDITIONAL([COND_i386_qemu], [test x$target_cpu = xi386 -a x$platform = xqemu])
1092 AM_CONDITIONAL([COND_i386_ieee1275], [test x$target_cpu = xi386 -a x$platform = xieee1275])
1093 AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform = xcoreboot])
1094 AM_CONDITIONAL([COND_i386_multiboot], [test x$target_cpu = xi386 -a x$platform = xmultiboot])
1095 AM_CONDITIONAL([COND_x86_64_efi], [test x$target_cpu = xx86_64 -a x$platform = xefi])
1096 AM_CONDITIONAL([COND_mips_loongson], [test x$target_cpu = xmipsel -a x$platform = xloongson])
1097 AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips])
1098 AM_CONDITIONAL([COND_mips_arc], [test x$target_cpu = xmips -a x$platform = xarc])
1099 AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275])
1100 AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275])
1101 AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel])
1103 AM_CONDITIONAL([COND_HOST_HURD], [test x$host_kernel = xhurd])
1104 AM_CONDITIONAL([COND_HOST_LINUX], [test x$host_kernel = xlinux])
1105 AM_CONDITIONAL([COND_HOST_NETBSD], [test x$host_kernel = xnetbsd])
1106 AM_CONDITIONAL([COND_HOST_WINDOWS], [test x$host_kernel = xwindows])
1107 AM_CONDITIONAL([COND_HOST_KFREEBSD], [test x$host_kernel = xkfreebsd])
1108 AM_CONDITIONAL([COND_HOST_ILLUMOS], [test x$host_kernel = xillumos])
1110 AM_CONDITIONAL([COND_MAN_PAGES], [test x$cross_compiling = xno -a x$HELP2MAN != x])
1111 AM_CONDITIONAL([COND_GRUB_EMU_USB], [test x$enable_grub_emu_usb = xyes])
1112 AM_CONDITIONAL([COND_GRUB_EMU_SDL], [test x$enable_grub_emu_sdl = xyes])
1113 AM_CONDITIONAL([COND_GRUB_EMU_PCI], [test x$enable_grub_emu_pci = xyes])
1114 AM_CONDITIONAL([COND_GRUB_MKFONT], [test x$enable_grub_mkfont = xyes])
1115 AM_CONDITIONAL([COND_GRUB_MOUNT], [test x$enable_grub_mount = xyes])
1116 AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
1117 AM_CONDITIONAL([COND_GRUB_PE2ELF], [test x$TARGET_OBJ2ELF != x])
1118 AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
1119 AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
1120 AM_CONDITIONAL([COND_ENABLE_CACHE_STATS], [test x$DISK_CACHE_STATS = x1])
1122 AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
1123 AM_CONDITIONAL([COND_CYGWIN], [test x$host_os = xcygwin])
1124 AM_CONDITIONAL([COND_STARFIELD], [test "x$starfield_excuse" = x])
1127 cpudir="${target_cpu}"
1128 if test x${cpudir} = xmipsel; then
1132 if test x"$link_dir" = xyes ; then
1133 AC_CONFIG_LINKS([include/grub/cpu:include/grub/$cpudir])
1134 if test "$platform" != emu ; then
1135 AC_CONFIG_LINKS([include/grub/machine:include/grub/$cpudir/$platform])
1138 mkdir -p include/grub 2>/dev/null
1139 rm -rf include/grub/cpu
1140 cp -rp $srcdir/include/grub/$cpudir include/grub/cpu 2>/dev/null
1141 if test "$platform" != emu ; then
1142 rm -rf include/grub/machine
1143 cp -rp $srcdir/include/grub/$cpudir/$platform include/grub/machine 2>/dev/null
1147 AC_CONFIG_FILES([Makefile])
1148 AC_CONFIG_FILES([grub-core/Makefile])
1149 AC_CONFIG_FILES([grub-core/gnulib/Makefile])
1150 AC_CONFIG_FILES([po/Makefile.in])
1151 AC_CONFIG_FILES([docs/Makefile])
1152 AC_CONFIG_FILES([util/bash-completion.d/Makefile])
1153 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
1154 AC_CONFIG_FILES([config.h])
1158 echo "*******************************************************"
1159 echo GRUB2 will be compiled with following components:
1160 echo Platform: "$target_cpu"-"$platform"
1161 if [ x"$platform" = xemu ]; then
1162 if [ x"$grub_emu_usb_excuse" = x ]; then
1163 echo USB support for grub-emu: Yes
1165 echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
1167 if [ x"$grub_emu_sdl_excuse" = x ]; then
1168 echo SDL support for grub-emu: Yes
1170 echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
1172 if [ x"$grub_emu_pci_excuse" = x ]; then
1173 echo PCI support for grub-emu: Yes
1175 echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
1178 if test x"$device_mapper_excuse" = x ; then
1179 echo With devmapper support: Yes
1181 echo With devmapper support: No "($device_mapper_excuse)"
1183 if [ x"$enable_mm_debug" = xyes ]; then
1184 echo With memory debugging: Yes
1186 echo With memory debugging: No
1188 if [ x"$enable_cache_stats" = xyes ]; then
1189 echo With disk cache statistics: Yes
1191 echo With disk cache statistics: No
1193 if [ x"$efiemu_excuse" = x ]; then
1194 echo efiemu runtime: Yes
1196 echo efiemu runtime: No "($efiemu_excuse)"
1198 if [ x"$grub_mkfont_excuse" = x ]; then
1199 echo grub-mkfont: Yes
1201 echo grub-mkfont: No "($grub_mkfont_excuse)"
1203 if [ x"$grub_mount_excuse" = x ]; then
1204 echo grub-mount: Yes
1206 echo grub-mount: No "($grub_mount_excuse)"
1208 if [ x"$starfield_excuse" = x ]; then
1209 echo starfield theme: Yes
1211 echo starfield theme: No "($starfield_excuse)"
1213 if [ x"$libzfs_excuse" = x ]; then
1214 echo With libzfs support: Yes
1216 echo With libzfs support: No "($libzfs_excuse)"
1218 echo "*******************************************************"