fix a configure bug.

This commit is contained in:
okuji 1999-09-23 05:38:53 +00:00
parent 88efa06787
commit 50016e0e32
5 changed files with 64 additions and 31 deletions

View file

@ -1,3 +1,11 @@
1999-09-23 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* acinclude.m4 (grub_ASM_ADDR32): First, create a template
source file "conftest.s.in", and then, replace @ADDR32@ with
"addr32" if GRUB_CV_ASM_PREFIX_REQUIREMENT is yes, otherwise,
replace it with "addr32;". Reported by John Tobey
<spam@john-edwin-tobey.org>.
1999-09-23 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/builtins.c (debug_fs_print_func): Renamed to ...

1
THANKS
View file

@ -17,6 +17,7 @@ Eric Hanchrow <erich@microsoft.com>
Heiko Schroeder <heiko@pool.informatik.rwth-aachen.de>
Hisazumi Kenji <nel@soraneko.com>
Jochen Hoenicke <jochen@gnu.org>
John Tobey <spam@john-edwin-tobey.org>
Klaus Reichl <klaus.reichl@alcatel.at>
Kunihiro Ishiguro <kunihiro@zebra.org>
Mark Lundeberg <aa026@pgfn.bc.ca>

View file

@ -93,17 +93,25 @@ AC_DEFUN(grub_ASM_ADDR32,
AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
AC_MSG_CHECKING([for .code16 addr32 assembler support])
AC_CACHE_VAL(grub_cv_asm_addr32,
[cat > conftest.s <<\EOF
[cat > conftest.s.in <<\EOF
.code16
l1: ADDR32 movb %al, l1
l1: @ADDR32@ movb %al, l1
EOF
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi
if AC_TRY_COMMAND([${CC-cc} -c conftest.s]) && test -s conftest.o; then
grub_cv_asm_addr32=yes
else
grub_cv_asm_addr32=no
fi
rm -f conftest*])
AC_MSG_RESULT([$grub_cv_asm_addr32])])
dnl

12
aclocal.m4 vendored
View file

@ -105,17 +105,25 @@ AC_DEFUN(grub_ASM_ADDR32,
AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
AC_MSG_CHECKING([for .code16 addr32 assembler support])
AC_CACHE_VAL(grub_cv_asm_addr32,
[cat > conftest.s <<\EOF
[cat > conftest.s.in <<\EOF
.code16
l1: ADDR32 movb %al, l1
l1: @ADDR32@ movb %al, l1
EOF
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi
if AC_TRY_COMMAND([${CC-cc} -c conftest.s]) && test -s conftest.o; then
grub_cv_asm_addr32=yes
else
grub_cv_asm_addr32=no
fi
rm -f conftest*])
AC_MSG_RESULT([$grub_cv_asm_addr32])])
dnl

62
configure vendored
View file

@ -1611,19 +1611,27 @@ echo "configure:1611: checking for .code16 addr32 assembler support" >&5
if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<\EOF
cat > conftest.s.in <<\EOF
.code16
l1: ADDR32 movb %al, l1
l1: @ADDR32@ movb %al, l1
EOF
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_addr32=yes
else
grub_cv_asm_addr32=no
fi
rm -f conftest*
fi
echo "$ac_t""$grub_cv_asm_addr32" 1>&6
if test "x$grub_cv_asm_addr32" != xyes; then
{ echo "configure: error: GRUB requires GAS .code16 addr32 support; upgrade your binutils" 1>&2; exit 1; }
@ -1631,7 +1639,7 @@ fi
echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1635: checking if start is defined by the compiler" >&5
echo "configure:1643: checking if start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_start_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1644,7 +1652,7 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_start_symbol=yes
else
grub_cv_check_start_symbol=no
@ -1665,7 +1673,7 @@ echo "$ac_t""$grub_cv_check_start_symbol" 1>&6
echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1669: checking if _start is defined by the compiler" >&5
echo "configure:1677: checking if _start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_start_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1678,7 +1686,7 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_uscore_start_symbol=yes
else
grub_cv_check_uscore_start_symbol=no
@ -1704,7 +1712,7 @@ fi
echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6
echo "configure:1708: checking if end is defined by the compiler" >&5
echo "configure:1716: checking if end is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_end_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1717,7 +1725,7 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_end_symbol=yes
else
grub_cv_check_end_symbol=no
@ -1738,7 +1746,7 @@ echo "$ac_t""$grub_cv_check_end_symbol" 1>&6
echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6
echo "configure:1742: checking if _end is defined by the compiler" >&5
echo "configure:1750: checking if _end is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_end_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1751,7 +1759,7 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_uscore_end_symbol=yes
else
grub_cv_check_uscore_end_symbol=no
@ -1777,7 +1785,7 @@ fi
# Check for curses libraries.
echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6
echo "configure:1781: checking for wgetch in -lncurses" >&5
echo "configure:1789: checking for wgetch in -lncurses" >&5
ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1785,7 +1793,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1789 "configure"
#line 1797 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1796,7 +1804,7 @@ int main() {
wgetch()
; return 0; }
EOF
if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1819,7 +1827,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6
echo "configure:1823: checking for wgetch in -lcurses" >&5
echo "configure:1831: checking for wgetch in -lcurses" >&5
ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1827,7 +1835,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1831 "configure"
#line 1839 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1838,7 +1846,7 @@ int main() {
wgetch()
; return 0; }
EOF
if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1868,7 +1876,7 @@ fi
# Check for headers.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1872: checking how to run the C preprocessor" >&5
echo "configure:1880: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1883,13 +1891,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1887 "configure"
#line 1895 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1900,13 +1908,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1904 "configure"
#line 1912 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1917,13 +1925,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1921 "configure"
#line 1929 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1951,17 +1959,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1955: checking for $ac_hdr" >&5
echo "configure:1963: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1960 "configure"
#line 1968 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*