]> git.proxmox.com Git - grub2.git/blame - configure.ac
add po/Makefile.am
[grub2.git] / configure.ac
CommitLineData
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 14dnl This configure script is complicated, because GRUB needs to deal
15dnl with three potentially different types:
16dnl
17dnl build -- the environment for building GRUB
18dnl host -- the environment for running utilities
19dnl target -- the environment for running GRUB
20dnl
21dnl In addition, GRUB needs to deal with a platform specification
22dnl which specifies the system running GRUB, such as firmware.
23dnl This is necessary because the target type in autoconf does not
24dnl describe such a system very well.
25dnl
8c411768
BC
26dnl The current strategy is to build utilities using host
27dnl cross-compiler and grub core and modules using target
28dnl cross-compiler. For this we use nested packages approach, where
29dnl top-level package grub utilities is built with HOSTCC and nested
30dnl package (in grub-core directory) builds with TARGETCC.
b977bf01 31
8c411768 32# NOTE: grub-core/configure.ac must also be updated.
5519963b 33AC_INIT([GRUB],[1.98],[bug-grub@gnu.org])
8c411768 34AC_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 39AC_CANONICAL_HOST
b977bf01 40AC_CANONICAL_TARGET
6a161fa9 41
8c411768
BC
42AM_INIT_AUTOMAKE()
43AC_PREREQ(2.60)
6304d292 44AC_CONFIG_SRCDIR([include/grub/dl.h])
8c411768 45AC_CONFIG_HEADER([config.h])
e52db1f7 46
a60f6ee1
BC
47grub_coredir='grub-core'
48AC_SUBST(grub_coredir)
8c411768 49
2d465fb0
BC
50grub_utildir='.'
51AC_SUBST(grub_utildir)
52
d3ff5a05
BC
53m4_include([configure.common])
54
a60f6ee1 55# Output files.
6304d292
BC
56grub_CHECK_LINK_DIR
57if 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
64else
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
73fi
74
8c411768 75AC_CONFIG_FILES([Makefile])
6304d292 76AC_CONFIG_FILES([grub-core/Makefile])
8c411768
BC
77AC_CONFIG_FILES([po/Makefile])
78AC_CONFIG_FILES([docs/Makefile])
6a161fa9 79AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
8c411768 80
6a161fa9 81AC_OUTPUT
5ce5507f 82[
83echo "*******************************************************"
84echo GRUB2 will be compiled with following components:
85echo Platform: "$target_cpu"-"$platform"
f84b481b 86if [ x"$platform" = xemu ]; then
5ce5507f 87if [ x"$grub_emu_usb_excuse" = x ]; then
88echo USB support for grub-emu: Yes
89else
90echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
91fi
927d0134
VS
92if [ x"$grub_emu_sdl_excuse" = x ]; then
93echo SDL support for grub-emu: Yes
94else
95echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
96fi
325c8258 97if [ x"$grub_emu_pci_excuse" = x ]; then
98echo PCI support for grub-emu: Yes
99else
100echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
101fi
f84b481b 102fi
5ce5507f 103if [ x"$enable_mm_debug" = xyes ]; then
104echo With memory debugging: Yes
105else
106echo With memory debugging: No
107fi
5ce5507f 108if [ x"$efiemu_excuse" = x ]; then
109echo efiemu runtime: Yes
110else
111echo efiemu runtime: No "($efiemu_excuse)"
112fi
113if [ x"$grub_fstest_excuse" = x ]; then
114echo grub-fstest: Yes
115else
116echo grub-fstest: No "($grub_fstest_excuse)"
117fi
118if [ x"$grub_mkfont_excuse" = x ]; then
119echo grub-mkfont: Yes
120else
121echo grub-mkfont: No "($grub_mkfont_excuse)"
122fi
123echo "*******************************************************"
124]