]>
Commit | Line | Data |
---|---|---|
6a161fa9 | 1 | # Process this file with autoconf to produce a configure script. |
2 | ||
8c411768 | 3 | # Copyright (C) 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 | |
8c411768 BC |
26 | dnl The current strategy is to build utilities using host |
27 | dnl cross-compiler and grub core and modules using target | |
28 | dnl cross-compiler. For this we use nested packages approach, where | |
29 | dnl top-level package grub utilities is built with HOSTCC and nested | |
30 | dnl package (in grub-core directory) builds with TARGETCC. | |
b977bf01 | 31 | |
8c411768 | 32 | # NOTE: grub-core/configure.ac must also be updated. |
5519963b | 33 | AC_INIT([GRUB],[1.98],[bug-grub@gnu.org]) |
8c411768 | 34 | AC_CONFIG_AUX_DIR([.]) |
6a161fa9 | 35 | |
6304d292 BC |
36 | : ${CFLAGS=""} # We don't want -g -O2 |
37 | ||
b977bf01 | 38 | # Checks for host and target systems. |
6a161fa9 | 39 | AC_CANONICAL_HOST |
b977bf01 | 40 | AC_CANONICAL_TARGET |
6a161fa9 | 41 | |
8c411768 BC |
42 | AM_INIT_AUTOMAKE() |
43 | AC_PREREQ(2.60) | |
6304d292 | 44 | AC_CONFIG_SRCDIR([include/grub/dl.h]) |
8c411768 | 45 | AC_CONFIG_HEADER([config.h]) |
e52db1f7 | 46 | |
a60f6ee1 BC |
47 | grub_coredir='grub-core' |
48 | AC_SUBST(grub_coredir) | |
8c411768 | 49 | |
2d465fb0 BC |
50 | grub_utildir='.' |
51 | AC_SUBST(grub_utildir) | |
52 | ||
d3ff5a05 BC |
53 | m4_include([configure.common]) |
54 | ||
a60f6ee1 | 55 | # Output files. |
6304d292 BC |
56 | grub_CHECK_LINK_DIR |
57 | if test x"$link_dir" = xyes ; then | |
58 | AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu]) | |
59 | mkdir -p grub-core/lib | |
60 | cp -rp $srcdir/grub-core/lib/$target_cpu grub-core/lib/target_cpu | |
61 | if test "$platform" != emu ; then | |
62 | AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform]) | |
63 | fi | |
64 | else | |
65 | mkdir -p include/grub 2>/dev/null | |
66 | rm -rf include/grub/cpu | |
67 | cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null | |
68 | cp -rp $srcdir/grub-core/lib/$target_cpu grub-core/lib/target_cpu 2>/dev/null | |
69 | if test "$platform" != emu ; then | |
70 | rm -rf include/grub/machine | |
71 | cp -rp $srcdir/grub-core/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null | |
72 | fi | |
73 | fi | |
74 | ||
8c411768 | 75 | AC_CONFIG_FILES([Makefile]) |
6304d292 | 76 | AC_CONFIG_FILES([grub-core/Makefile]) |
8c411768 BC |
77 | AC_CONFIG_FILES([po/Makefile]) |
78 | AC_CONFIG_FILES([docs/Makefile]) | |
6a161fa9 | 79 | AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) |
8c411768 | 80 | |
6a161fa9 | 81 | AC_OUTPUT |
5ce5507f | 82 | [ |
83 | echo "*******************************************************" | |
84 | echo GRUB2 will be compiled with following components: | |
85 | echo Platform: "$target_cpu"-"$platform" | |
f84b481b | 86 | if [ x"$platform" = xemu ]; then |
5ce5507f | 87 | if [ x"$grub_emu_usb_excuse" = x ]; then |
88 | echo USB support for grub-emu: Yes | |
89 | else | |
90 | echo USB support for grub-emu: No "($grub_emu_usb_excuse)" | |
91 | fi | |
927d0134 VS |
92 | if [ x"$grub_emu_sdl_excuse" = x ]; then |
93 | echo SDL support for grub-emu: Yes | |
94 | else | |
95 | echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)" | |
96 | fi | |
325c8258 | 97 | if [ x"$grub_emu_pci_excuse" = x ]; then |
98 | echo PCI support for grub-emu: Yes | |
99 | else | |
100 | echo PCI support for grub-emu: No "($grub_emu_pci_excuse)" | |
101 | fi | |
f84b481b | 102 | fi |
5ce5507f | 103 | if [ x"$enable_mm_debug" = xyes ]; then |
104 | echo With memory debugging: Yes | |
105 | else | |
106 | echo With memory debugging: No | |
107 | fi | |
5ce5507f | 108 | if [ x"$efiemu_excuse" = x ]; then |
109 | echo efiemu runtime: Yes | |
110 | else | |
111 | echo efiemu runtime: No "($efiemu_excuse)" | |
112 | fi | |
113 | if [ x"$grub_fstest_excuse" = x ]; then | |
114 | echo grub-fstest: Yes | |
115 | else | |
116 | echo grub-fstest: No "($grub_fstest_excuse)" | |
117 | fi | |
118 | if [ x"$grub_mkfont_excuse" = x ]; then | |
119 | echo grub-mkfont: Yes | |
120 | else | |
121 | echo grub-mkfont: No "($grub_mkfont_excuse)" | |
122 | fi | |
123 | echo "*******************************************************" | |
124 | ] |