2008-04-10 Pavel Roskin <proski@gnu.org>

* configure.ac: Always use "_cv_" in cache variables for
	compatibility with Autoconf 2.62.
This commit is contained in:
proski 2008-04-10 22:26:50 +00:00
parent fe11b298f6
commit 6cd4433d3e
2 changed files with 18 additions and 13 deletions

View file

@ -1,3 +1,8 @@
2008-04-10 Pavel Roskin <proski@gnu.org>
* configure.ac: Always use "_cv_" in cache variables for
compatibility with Autoconf 2.62.
2008-03-28 Robert Millan <rmh@aybabtu.com>
Surpass 1 TiB disk addressing limit. Note: there are no plans to handle

View file

@ -86,13 +86,13 @@ if test "x$ac_cv_prog_gcc" = xyes; then
fi
STAGE1_CFLAGS="-O2"
GRUB_CFLAGS="-O2"
AC_CACHE_CHECK([whether optimization for size works], size_flag, [
AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
saved_CFLAGS=$CFLAGS
CFLAGS="-Os -g"
AC_TRY_COMPILE(, , size_flag=yes, size_flag=no)
AC_TRY_COMPILE(, , grub_cv_cc_Os=yes, grub_cv_cc_Os=no)
CFLAGS=$saved_CFLAGS
])
if test "x$size_flag" = xyes; then
if test "x$grub_cv_cc_Os" = xyes; then
STAGE2_CFLAGS="-Os"
else
STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
@ -100,16 +100,16 @@ if test "x$ac_cv_prog_gcc" = xyes; then
# OpenBSD has a GCC extension for protecting applications from
# stack smashing attacks, but GRUB doesn't want this feature.
AC_CACHE_CHECK([whether gcc has -fno-stack-protector],
no_stack_protector_flag, [
grub_cv_cc_no_stack_protector, [
saved_CFLAGS=$CFLAGS
CFLAGS="-fno-stack-protector"
AC_TRY_COMPILE(,
,
no_stack_protector_flag=yes,
no_stack_protector_flag=no)
grub_cv_cc_no_stack_protector=yes,
grub_cv_cc_no_stack_protector=no)
CFLAGS=$saved_CFLAGS
])
if test "x$no_stack_protector_flag" = xyes; then
if test "x$grub_cv_cc_no_stack_protector" = xyes; then
STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector"
fi
fi
@ -123,30 +123,30 @@ AC_SUBST(GRUB_CFLAGS)
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused -Wshadow"
CPPFLAGS="$CPPFLAGS -Wpointer-arith"
AC_CACHE_CHECK([whether -Wundef works], undef_flag, [
AC_CACHE_CHECK([whether -Wundef works], grub_cv_cc_Wundef, [
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-Wundef"
AC_TRY_COMPILE(, , undef_flag=yes, undef_flag=no)
AC_TRY_COMPILE(, , grub_cv_cc_Wundef=yes, grub_cv_cc_Wundef=no)
CPPFLAGS="$saved_CPPFLAGS"
])
# The options `-falign-*' are supported by gcc 3.0 or later.
# Probably it is sufficient to only check for -falign-loops.
AC_CACHE_CHECK([whether -falign-loops works], [falign_loop_flag], [
AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-falign-loops=1"
AC_TRY_COMPILE(, , [falign_loop_flag=yes], [falign_loop_flag=no])
AC_TRY_COMPILE(, , [grub_cv_cc_falign_loop=yes], [grub_cv_cc_falign_loop=no])
CPPFLAGS="$saved_CPPFLAGS"
])
# Force no alignment to save space.
if test "x$falign_loop_flag" = xyes; then
if test "x$grub_cv_cc_falign_loop" = xyes; then
CPPFLAGS="$CPPFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
else
CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
fi
if test "x$undef_flag" = xyes; then
if test "x$grub_cv_cc_Wundef" = xyes; then
CPPFLAGS="$CPPFLAGS -Wundef"
fi