From 6cd4433d3e6ada0e04d1a36ddd1c574a4cba09fe Mon Sep 17 00:00:00 2001 From: proski Date: Thu, 10 Apr 2008 22:26:50 +0000 Subject: [PATCH] 2008-04-10 Pavel Roskin * configure.ac: Always use "_cv_" in cache variables for compatibility with Autoconf 2.62. --- ChangeLog | 5 +++++ configure.ac | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 816315a20..b2464143f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-10 Pavel Roskin + + * configure.ac: Always use "_cv_" in cache variables for + compatibility with Autoconf 2.62. + 2008-03-28 Robert Millan Surpass 1 TiB disk addressing limit. Note: there are no plans to handle diff --git a/configure.ac b/configure.ac index 540691f3c..2c6e5c95e 100644 --- a/configure.ac +++ b/configure.ac @@ -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