1 # Process this file with autoconf to produce a configure script.
3 # Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
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.
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
14 dnl This configure script is complicated, because GRUB needs to deal
15 dnl with three potentially different types:
17 dnl build -- the environment for building GRUB
18 dnl host -- the environment for running utilities
19 dnl target -- the environment for running GRUB
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.
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
34 AC_INIT([GRUB],[1.96],[bug-grub@gnu.org])
36 AC_CONFIG_SRCDIR([include/grub/dl.h])
37 AC_CONFIG_HEADER([config.h])
39 # Checks for host and target systems.
43 # Program name transformations
47 i[[3456]]86) target_cpu=i386 ;;
48 sparc) target_cpu=sparc64 ;;
51 # Specify the platform (such as firmware).
52 AC_ARG_WITH([platform],
53 AS_HELP_STRING([--with-platform=PLATFORM],
54 [select the host platform [[guessed]]]))
56 # Guess the platform if not specified.
57 if test "x$with_platform" = x; then
58 case "$target_cpu"-"$target_vendor" in
59 i386-apple) platform=efi ;;
60 i386-*) platform=pc ;;
61 x86_64-apple) platform=efi ;;
62 x86_64-*) platform=pc ;;
63 powerpc-*) platform=ieee1275 ;;
64 powerpc64-*) platform=ieee1275 ;;
65 sparc64-*) platform=ieee1275 ;;
66 *) AC_MSG_ERROR([unsupported CPU: "$target_cpu"]) ;;
69 platform="$with_platform"
72 # Adjust CPU unless target was explicitly specified.
73 if test -z "$target_alias"; then
74 case "$target_cpu"-"$platform" in
76 x86_64-*) target_cpu=i386 ;;
77 powerpc64-ieee1275) target_cpu=powerpc ;;
81 # Check if the platform is supported, make final adjustments.
82 case "$target_cpu"-"$platform" in
87 i386-linuxbios) platform=coreboot ;;
92 *) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
96 i386 | powerpc) target_m32=1 ;;
97 x86_64 | sparc64) target_m64=1 ;;
101 mingw32) host_os=cygwin ;;
104 # This normalizes the names, and creates a new variable ("host_kernel")
105 # while at it, since the mapping is not always 1:1 (e.g. different OSes
106 # using the same kernel type).
108 gnu*) host_kernel=hurd ;;
109 linux*) host_kernel=linux ;;
110 freebsd* | kfreebsd*-gnu) host_kernel=freebsd ;;
111 cygwin) host_kernel=windows ;;
116 AC_SUBST(host_kernel)
122 # Checks for build programs.
125 # Although cmp is listed in the GNU Coding Standards as a command which
126 # can used directly, OpenBSD lacks cmp in the default installation.
127 AC_CHECK_PROGS([CMP], [cmp])
128 if test "x$CMP" = x; then
129 AC_MSG_ERROR([cmp is not found])
132 AC_CHECK_PROGS([YACC], [bison])
133 if test "x$YACC" = x; then
134 AC_MSG_ERROR([bison is not found])
137 for file in /usr/src/unifont.bdf ; do
138 if test -e $file ; then
139 AC_SUBST([UNIFONT_BDF], [$file])
148 # These are not a "must".
149 AC_PATH_PROG(RUBY, ruby)
150 AC_PATH_PROG(HELP2MAN, help2man)
153 # Checks for host programs.
158 test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
163 # Identify characteristics of the host architecture.
165 AC_CHECK_SIZEOF(void *)
166 AC_CHECK_SIZEOF(long)
169 if test x$grub_cv_apple_cc = xyes ; then
170 CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions"
171 ASFLAGS="$ASFLAGS -DAPPLE_CC=1"
174 # Check LZO when compiling for the i386-pc.
175 if test "$target_cpu"-"$platform" = i386-pc; then
177 [AS_HELP_STRING([--enable-lzo],
178 [use lzo to compress kernel (default is lzma)])])
179 [if [ x"$enable_lzo" = xyes ]; then
180 # There are three possibilities. LZO version 2 installed with the name
181 # liblzo2, with the name liblzo, and LZO version 1.]
182 AC_DEFINE([ENABLE_LZO], [1], [Use lzo compression])
183 AC_CHECK_LIB([lzo2], [__lzo_init_v2], [LIBLZO="-llzo2"],
184 [AC_CHECK_LIB([lzo], [__lzo_init_v2], [LIBLZO="-llzo"],
185 [AC_CHECK_LIB([lzo], [__lzo_init2], [LIBLZO="-llzo"],
186 [AC_MSG_ERROR([LZO library version 1.02 or later is required])])])])
188 [LIBS="$LIBS $LIBLZO"]
189 AC_CHECK_FUNC([lzo1x_999_compress], ,
190 [AC_MSG_ERROR([LZO1X-999 must be enabled])])
192 [# LZO version 2 uses lzo/lzo1x.h, while LZO version 1 uses lzo1x.h.]
193 AC_CHECK_HEADERS([lzo/lzo1x.h lzo1x.h])
195 AC_DEFINE([ENABLE_LZMA], [1], [Use lzma compression])
197 AC_SUBST([enable_lzo])
200 # Check for functions.
201 AC_CHECK_FUNCS(posix_memalign memalign asprintf)
204 # Check for target programs.
207 # Find tools for the target.
208 if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
209 tmp_ac_tool_prefix="$ac_tool_prefix"
210 ac_tool_prefix=$target_alias-
212 AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc],
213 [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])])
214 AC_CHECK_TOOL(OBJCOPY, objcopy)
215 AC_CHECK_TOOL(STRIP, strip)
216 AC_CHECK_TOOL(NM, nm)
218 ac_tool_prefix="$tmp_ac_tool_prefix"
220 if test "x$TARGET_CC" = x; then
223 AC_CHECK_TOOL(OBJCOPY, objcopy)
224 AC_CHECK_TOOL(STRIP, strip)
225 AC_CHECK_TOOL(NM, nm)
230 # Test the C compiler for the target environment.
233 tmp_LDFLAGS="$LDFLAGS"
234 tmp_CPPFLAGS="$CPPFLAGS"
237 CFLAGS="$TARGET_CFLAGS"
238 CPPFLAGS="$TARGET_CPPFLAGS"
239 LDFLAGS="$TARGET_LDFLAGS"
242 if test "x$TARGET_CFLAGS" = x; then
244 TARGET_CFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \
245 -Wundef -Wstrict-prototypes -g"
247 # optimization flags.
248 AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
250 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
254 if test "x$grub_cv_cc_Os" = xyes; then
255 TARGET_CFLAGS="$TARGET_CFLAGS -Os"
257 TARGET_CFLAGS="$TARGET_CFLAGS -O2 -fno-strength-reduce -fno-unroll-loops"
260 # Force no alignment to save space on i386.
261 if test "x$target_cpu" = xi386; then
262 AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
263 SAVED_CFLAGS="$CFLAGS"
264 CFLAGS="$CFLAGS -falign-loops=1"
265 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
266 [grub_cv_cc_falign_loop=yes],
267 [grub_cv_cc_falign_loop=no])
268 CFLAGS="$SAVED_CFLAGS"
271 if test "x$grub_cv_cc_falign_loop" = xyes; then
272 TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
274 AC_CACHE_CHECK([whether -malign-loops works], [grub_cv_cc_malign_loop], [
275 CFLAGS="$CFLAGS -malign-loops=1"
276 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
277 [grub_cv_cc_malign_loop=yes],
278 [grub_cv_cc_malign_loop=no])
280 if test "x$grub_cv_cc_malign_loop" = xyes; then
281 TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
288 if test x$grub_cv_apple_target_cc = xyes ; then
289 TARGET_CFLAGS="$TARGET_CFLAGS -DAPPLE_CC=1 -fnested-functions"
290 CFLAGS="$CFLAGS -DAPPLE_CC=1 -fnested-functions"
291 TARGET_ASFLAGS="$TARGET_ASFLAGS -DAPPLE_CC=1"
293 AC_CHECK_PROG([OBJCONV], [objconv], [objconv], [])
294 if test "x$OBJCONV" = x ; then
295 AC_CHECK_PROG([OBJCONV], [objconv], [./objconv], [], [.])
297 if test "x$OBJCONV" = x ; then
298 AC_MSG_ERROR([objconv not found which is required when building with apple compiler])
301 TARGET_IMG_CFLAGS="-static"
302 TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,'
303 TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20 -Wl,-image_base,'
306 # Use linker script if present, otherwise use builtin -N script.
307 if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then
308 TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
309 TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT} -Wl,-Ttext,"
310 TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"
313 TARGET_IMG_LDFLAGS='-Wl,-N -Wl,-Ttext,'
314 TARGET_IMG_LDFLAGS_AC='-Wl,-N -Wl,-Ttext,'
319 AC_SUBST(TARGET_IMG_LDSCRIPT)
320 AC_SUBST(TARGET_IMG_LDFLAGS)
321 AC_SUBST(TARGET_IMG_CFLAGS)
323 # For platforms where ELF is not the default link format.
324 AC_MSG_CHECKING([for command to convert module to ELF format])
326 cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;;
329 AC_SUBST(TARGET_OBJ2ELF)
330 AC_MSG_RESULT([$TARGET_OBJ2ELF])
333 if test "x$target_m32" = x1; then
334 AC_CACHE_CHECK([whether option -m32 is supported], grub_cv_cc_m32, [
336 CFLAGS="$CFLAGS -m32"
337 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
338 [grub_cv_cc_m32=yes],
342 if test "x$grub_cv_cc_m32" = xyes; then
343 TARGET_CFLAGS="$TARGET_CFLAGS -m32"
344 TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
345 CFLAGS="$SAVED_CFLAGS -m32"
347 TARGET_MODULE_FORMAT="elf32"
350 if test "x$target_m64" = x1; then
351 AC_CACHE_CHECK([whether option -m64 is supported], grub_cv_cc_m64, [
353 CFLAGS="$CFLAGS -m64"
354 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
355 [grub_cv_cc_m64=yes],
359 if test "x$grub_cv_cc_m64" = xyes; then
360 TARGET_CFLAGS="$TARGET_CFLAGS -m64"
361 TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
362 CFLAGS="$SAVED_CFLAGS -m64"
364 TARGET_MODULE_FORMAT="elf64"
367 if test "$target_cpu"-"$platform" = x86_64-efi; then
368 # Use large model to support 4G memory
369 AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
371 CFLAGS="$CFLAGS -mcmodel=large"
372 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
373 [grub_cv_cc_mcmodel=yes],
374 [grub_cv_cc_mcmodel=no])
376 if test "x$grub_cv_cc_mcmodel" = xno; then
377 CFLAGS="$SAVED_CFLAGS -DMCMODEL_SMALL=1"
378 TARGET_CFLAGS="$TARGET_CFLAGS -DMCMODEL_SMALL=1"
379 AC_MSG_WARN([-mcmodel=large not supported. You won't be able to use the memory over 4GiB. Upgrade your gcc])
381 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
384 # EFI writes to stack below %rsp, we must not use the red zone
385 AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [
386 CFLAGS="$CFLAGS -mno-red-zone"
387 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
388 [grub_cv_cc_no_red_zone=yes],
389 [grub_cv_cc_no_red_zone=no])
391 if test "x$grub_cv_cc_no_red_zone" = xno; then
392 AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc])
395 TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone"
402 # Need __enable_execute_stack() for nested function trampolines?
403 grub_CHECK_ENABLE_EXECUTE_STACK
405 # Smashing stack protector.
406 grub_CHECK_STACK_PROTECTOR
407 # Need that, because some distributions ship compilers that include
408 # `-fstack-protector' in the default specs.
409 if test "x$ssp_possible" = xyes; then
410 TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector"
412 grub_CHECK_STACK_ARG_PROBE
413 # Cygwin's GCC uses alloca() to probe the stackframe on static
414 # stack allocations above some threshold.
415 if test x"$sap_possible" = xyes; then
416 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
419 AC_SUBST(TARGET_CFLAGS)
420 AC_SUBST(TARGET_MODULE_FORMAT)
422 AC_SUBST(TARGET_APPLE_CC)
423 AC_SUBST(TARGET_ASFLAGS)
424 AC_SUBST(TARGET_CPPFLAGS)
425 AC_SUBST(TARGET_LDFLAGS)
427 # Set them to their new values for the tests below.
429 if test "x$TARGET_APPLE_CC" = x1 ; then
430 CFLAGS="$TARGET_CFLAGS -nostdlib"
432 CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
434 CPPFLAGS="$TARGET_CPPFLAGS"
435 LDFLAGS="$TARGET_LDFLAGS"
437 # Defined in aclocal.m4.
439 if test "x$TARGET_APPLE_CC" != x1 ; then
440 grub_PROG_OBJCOPY_ABSOLUTE
442 grub_PROG_LD_BUILD_ID_NONE
444 if test "x$target_cpu" = xi386; then
445 if test ! -z "$TARGET_IMG_LDSCRIPT"; then
446 # Check symbols provided by linker script.
447 CFLAGS="$TARGET_CFLAGS -nostdlib $TARGET_IMG_LDFLAGS_AC -Wl,-Ttext,8000,--defsym,___main=0x8100"
449 if test "x$TARGET_APPLE_CC" != x1 ; then
450 grub_CHECK_BSS_START_SYMBOL
451 grub_CHECK_END_SYMBOL
453 CFLAGS="$TARGET_CFLAGS"
454 grub_I386_ASM_PREFIX_REQUIREMENT
456 grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK
458 AC_DEFINE([NESTED_FUNC_ATTR], [], [Catch gcc bug])
461 AH_BOTTOM([#if defined(__i386__) && !defined(GRUB_UTIL)
462 #define NESTED_FUNC_ATTR __attribute__ ((__regparm__ (1)))
464 #define NESTED_FUNC_ATTR
467 if test "$target_cpu"-"$platform" = i386-pc; then
468 AC_ARG_ENABLE([efiemu64],
469 [AS_HELP_STRING([--enable-efiemu64],
470 [build and install the 64-bit efiemu runtime (default=guessed)])])
471 if test x"$enable_efiemu64" = xno ; then
472 efiemu64_excuse="explicitly disabled"
474 if test x"$efiemu64_excuse" = x ; then
475 AC_CACHE_CHECK([whether options required for 64-bit efiemu work], grub_cv_cc_efiemu64, [
476 CFLAGS="$CFLAGS -m64 -mcmodel=large -mno-red-zone -nostdlib"
477 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
478 [grub_cv_cc_efiemu64=yes],
479 [grub_cv_cc_efiemu64=no])
481 if test x$grub_cv_cc_efiemu64 = xno; then
482 efiemu64_excuse="compiler doesn't support compiling with -m64 -mcmodel=large -mno-red-zone -nostdlib"
485 if test x"$enable_efiemu64" = xyes && test x"$efiemu64_excuse" != x ; then
486 AC_MSG_ERROR([64-bit efiemu runtime was explicitly requested but can't be compiled])
488 if test x"$efiemu64_excuse" = x ; then
493 AC_SUBST([enable_efiemu64])
499 CPPFLAGS="$tmp_CPPFLAGS"
500 LDFLAGS="$tmp_LDFLAGS"
507 # Memory manager debugging.
508 AC_ARG_ENABLE([mm-debug],
509 AS_HELP_STRING([--enable-mm-debug],
510 [include memory manager debugging]),
511 [AC_DEFINE([MM_DEBUG], [1],
512 [Define to 1 if you enable memory manager debugging.])])
514 AC_ARG_ENABLE([grub-emu],
515 [AS_HELP_STRING([--enable-grub-emu],
516 [build and install the `grub-emu' debugging utility (default=guessed)])])
517 AC_ARG_ENABLE([grub-emu-usb],
518 [AS_HELP_STRING([--enable-grub-emu-usb],
519 [build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
520 AC_ARG_ENABLE([grub-emu-sdl],
521 [AS_HELP_STRING([--enable-grub-emu-sdl],
522 [build and install the `grub-emu' debugging utility with SDL support (default=guessed)])])
524 if test x"$enable_grub_emu" = xno ; then
525 grub_emu_excuse="explicitly disabled"
528 [# Check for curses libraries.]
529 [if [ x"$grub_emu_excuse" = x ]; then ]
530 AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
531 [AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
532 [grub_emu_excuse=["(n)curses libraries are required to build \`grub-emu'"]])])
533 AC_SUBST([LIBCURSES])
535 [if [ x"$grub_emu_excuse" = x ]; then ]
536 [# Check for headers.]
537 AC_CHECK_HEADERS([ncurses/curses.h], [],
538 [AC_CHECK_HEADERS([ncurses.h], [],
539 [AC_CHECK_HEADERS([curses.h], [],
540 [grub_emu_excuse=["(n)curses header files are required to build \`grub-emu'"]])])])
543 if test x"$enable_grub_emu" = xyes && test x"$grub_emu_excuse" != x ; then
544 AC_MSG_ERROR([grub-emu was explicitly requested but can't be compiled])
546 if test x"$grub_emu_excuse" = x ; then
550 grub_emu_usb_excuse="grub-emu isn't built"
551 grub_emu_sdl_excuse="grub-emu isn't built"
553 if test x"$enable_grub_emu_usb" = xno ; then
554 grub_emu_usb_excuse="explicitly disabled"
556 [if [ x"$grub_emu_usb_excuse" = x ]; then
557 # Check for libusb libraries.]
558 AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"],
559 [grub_emu_usb_excuse=["libusb libraries are required to build \`grub-emu' with USB support"]])
562 [if [ x"$grub_emu_usb_excuse" = x ]; then
563 # Check for headers.]
564 AC_CHECK_HEADERS([usb.h], [],
565 [grub_emu_usb_excuse=["libusb header file is required to build \`grub-emu' with USB support"]])
567 if test x"enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then
568 AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled])
570 if test x"$grub_emu_usb_excuse" = x ; then
571 enable_grub_emu_usb=yes
573 enable_grub_emu_usb=no
576 if test x"$enable_grub_emu_sdl" = xno ; then
577 grub_emu_sdl_excuse="explicitely disabled"
579 [if [ x"$grub_emu_sdl_excuse" = x ]; then
580 # Check for libSDL libraries.]
581 AC_CHECK_LIB([SDL], [SDL_Init], [LIBSDL="-lSDL"],
582 [grub_emu_sdl_excuse=["libSDL libraries are required to build \`grub-emu' with SDL support"]])
585 [if [ x"$grub_emu_sdl_excuse" = x ]; then
586 # Check for headers.]
587 AC_CHECK_HEADERS([SDL/SDL.h], [],
588 [grub_emu_sdl_excuse=["libSDL header file is required to build \`grub-emu' with SDL support"]])
590 if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
591 AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled])
593 if test x"$grub_emu_sdl_excuse" = x ; then
594 enable_grub_emu_sdl=yes
596 enable_grub_emu_sdl=no
599 AC_SUBST([enable_grub_emu])
600 AC_SUBST([enable_grub_emu_usb])
601 AC_SUBST([enable_grub_emu_sdl])
603 AC_ARG_ENABLE([grub-fstest],
604 [AS_HELP_STRING([--enable-grub-fstest],
605 [build and install the `grub-fstest' debugging utility (default=guessed)])])
606 if test x"$enable_grub_fstest" = xno ; then
607 grub_fstest_excuse="explicitly disabled"
609 if test x"$grub_fstest_excuse" = x ; then
610 enable_grub_fstest=yes
612 enable_grub_fstest=no
614 AC_SUBST([enable_grub_fstest])
616 AC_ARG_ENABLE([grub-pe2elf],
617 [AS_HELP_STRING([--enable-grub-pe2elf],
618 [build and install the `grub-pe2elf' conversion utility])])
619 AC_SUBST([enable_grub_pe2elf])
621 AC_ARG_ENABLE([grub-mkfont],
622 [AS_HELP_STRING([--enable-grub-mkfont],
623 [build and install the `grub-mkfont' utility (default=guessed)])])
624 if test x"$enable_grub_mkfont" = xno ; then
625 grub_mkfont_excuse="explicitly disabled"
628 if test x"$grub_mkfont_excuse" = x ; then
629 # Check for freetype libraries.
630 AC_CHECK_PROGS([FREETYPE], [freetype-config])
631 if test "x$FREETYPE" = x ; then
632 grub_mkfont_excuse=["freetype2 libraries are required to build \`grub-mkfont'"]
634 freetype_cflags=`freetype-config --cflags`
635 freetype_libs=`freetype-config --libs`
637 if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
638 AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled])
640 if test x"$grub_mkfont_excuse" = x ; then
641 enable_grub_mkfont=yes
643 enable_grub_mkfont=no
645 AC_SUBST([enable_grub_mkfont])
646 AC_SUBST([freetype_cflags])
647 AC_SUBST([freetype_libs])
653 if test x"$link_dir" = xyes ; then
654 AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
655 include/grub/machine:include/grub/$target_cpu/$platform])
657 mkdir -p include/grub 2>/dev/null
658 rm -rf include/grub/cpu
659 cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
660 rm -rf include/grub/machine
661 cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
663 AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
664 AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
667 echo "*******************************************************"
668 echo GRUB2 will be compiled with following components:
669 echo Platform: "$target_cpu"-"$platform"
670 if test "$target_cpu"-"$platform" = i386-pc; then
671 if [ x"$enable_lzo" = xyes ]; then
672 echo Compression: LZO
674 echo Compression: LZMA
677 if [ x"$grub_emu_excuse" = x ]; then
680 echo grub-emu: No "($grub_emu_excuse)"
682 if [ x"$grub_emu_usb_excuse" = x ]; then
683 echo USB support for grub-emu: Yes
685 echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
687 if [ x"$grub_emu_sdl_excuse" = x ]; then
688 echo SDL support for grub-emu: Yes
690 echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
692 if [ x"$enable_mm_debug" = xyes ]; then
693 echo With memory debugging: Yes
695 echo With memory debugging: No
697 if [ x"$enable_grub_pe2elf" = xyes ]; then
698 echo grub-pe2elf will be built and installed
699 elif [ x$TARGET_OBJ2ELF = xgrub-pe2elf ]; then
700 echo grub-pe2elf will be built but not installed
702 echo grub-pe2elf will not be built
704 if test "$target_cpu"-"$platform" = i386-pc; then
705 if [ x"$efiemu64_excuse" = x ]; then
706 echo efiemu64 runtime: Yes
708 echo efiemu64 runtime: No "($efiemu64_excuse)"
711 if [ x"$grub_fstest_excuse" = x ]; then
712 echo grub-fstest: Yes
714 echo grub-fstest: No "($grub_fstest_excuse)"
716 if [ x"$grub_mkfont_excuse" = x ]; then
717 echo grub-mkfont: Yes
719 echo grub-mkfont: No "($grub_mkfont_excuse)"
721 echo "*******************************************************"