Minor cleanups

This commit is contained in:
gord 1999-11-19 17:41:32 +00:00
parent 1f9a7e6efc
commit 9f3e0b8ec5
11 changed files with 318 additions and 324 deletions

View file

@ -1,5 +1,34 @@
1999-11-19 Gordon Matzigkeit <gord@fig.org>
* grub/asmstub.c (getkey): Stop immediately if we get an EOF.
* stage2/stage2.c (cmain): Tell enter_cmdline to run forever.
(run_menu): Tell print_cmdline_message and enter_cmdline that we
won't run forever.
* stage2/cmdline.c (enter_cmdline): New argument, FOREVER, for
when ESC shouldn't allow an exit. Pass it to
print_cmdline_message.
(print_cmdline_message): Use new argument, FOREVER, to decide
whether to tell the user that ESC exits.
1999-11-18 Gordon Matzigkeit <gord@fig.org>
* debian/rules (binary-arch): Don't strip or generate shared
library dependencies for /usr/sbin/grub-install, since it's a
script.
* util/grub-install.in: Create safe temporary log files using
/bin/tempfile if it is executable.
1999-11-17 Gordon Matzigkeit <gord@fig.org>
* stage1/Makefile.am (LDFLAGS): Consolidate multiple -Wl flags.
* stage2/Makefile.am (PRE_STAGE2_LINK): Likewise.
(START_LINK): Likewise.
(STAGE1_5_LINK): Likewise.
1999-11-19 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* util/grub-install.in (debug): New variable.
(convert): If the device file does not exist, then emit an
error. Get the GRUB drive instead of the OS device.
@ -10,7 +39,7 @@
Make sure that $install_drive is not empty.
Likewise, make sure that $root_drive is not empty.
Any error message is redirected to the standard error.
1999-11-19 Pavel Roskin <pavel_roskin@geocities.com>
* stage2/Makefile.am (noinst_DATA): Renamed to ...
@ -29,14 +58,14 @@
[MAINTAINER_MODE] ($(srcdir)/grub-install.8): New target.
* docs/grub-install.8: New file. Generated by help2man.
* docs/user-ref.texi (Invoking grub-install): New chapter.
1999-11-16 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
From Pavel Roskin:
* stage1/stage1.S: Check for the API subset support bitmap
returned by INT 13 AH=48h, and jump to chs_mode if AH=42h is not
supported.
1999-11-13 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/builtins.c (install_func): When using a Stage 1.5, set
@ -46,17 +75,17 @@
embed any drive number whenever possible.
* stage2/disk_io.c (set_device) [STAGE1_5]: Always set
CURRENT_PARTITION to PARTITION.
1999-11-13 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
From Pavel Roskin:
* stage1/stage1.S (lba_mode): Jump to chs_mode if INT 13 AH=42h
fails.
1999-11-12 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
Do not use the device map file unless --device-map is specified.
* grub/main.c (device_map_file): Set to 0.
(default_device_map_file): Removed.
(usage): Do not print DEFAULT_DEVICE_MAP_FILE.
@ -64,7 +93,7 @@
do not try to open the device map file.
Set FP to NULL by default.
* docs/grub.8: Regenerated.
1999-11-11 Michael Hohmuth <hohmuth@innocent.com>
* stage2/boot.c (load_image): grub_close was called after
@ -74,7 +103,7 @@
non-zero, call chain_stage2.
* stage1/Makefile.am (BUILT_SOURCES): Removed.
(CLEANFILES): Set to $(nodist_pkgdata_DATA).
1999-11-11 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
Suggested by Klaus Reichl:
@ -87,10 +116,10 @@
If ERRNUM is non-zero, then return -1.
* stage2/char_io.c [!STAGE1_5] (get_cmdline): Clear ERRNUM after
calling print_completions to print the list as well.
* stage2/asm.S [!STAGE1_5] (currticks): Set %eax to %cx:%dx
correctly. Reported by Michael Hohmuth.
1999-11-06 Klaus Reichl <Klaus.Reichl@alcatel.at>
* grub/asmstub.c (get_diskinfo) [__linux__]: After opening the

5
TODO
View file

@ -27,7 +27,8 @@ Priorities:
partition. !!!
* Support embedding a Stage 1.5 in the EXT2_BOOT_LOADER_INO of an ext2fs
partition. Maybe we can just make a hard link to an existing file? !
partition, so that it won't be accidentally erased or modified by
the kernel.
* Complete the netboot support. !
@ -42,7 +43,7 @@ Priorities:
* Fix the completion so that it works for BSD partitions as well. !!
* Add BSD syntax support, using results of ioprobe to map drives.
(0x1f0-0x1f77 = primary IDE, 0x170-0x176 = secondary,
(0x1f0-0x1f7 = primary IDE, 0x170-0x176 = secondary,
0x1e8-0x1ef = tertiary, 0x168-0x16f = quaternary).
* Add more filesystems support (XFS, NTFS, etc.)

380
configure vendored
View file

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13.1
# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -376,7 +376,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13.1"
echo "configure generated by autoconf version 2.13"
exit 0 ;;
-with-* | --with-*)
@ -536,7 +536,7 @@ done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
test -f "$cache_file" && . $cache_file
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
@ -574,18 +574,14 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f $ac_dir/shtool; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@ -599,9 +595,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:603: checking for a BSD compatible install" >&5
echo "configure:599: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"\${ac_cv_path_install+set}\" = set"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
@ -619,10 +615,6 @@ else
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
@ -651,12 +643,12 @@ echo "$ac_t""$INSTALL" 1>&6
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:660: checking whether build environment is sane" >&5
echo "configure:652: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@ -704,10 +696,10 @@ EOF_SED
rm -f conftestsed
fi
test "$program_prefix" != NONE &&
program_transform_name="s,^,${program_prefix},;$program_transform_name"
program_transform_name="s,^,${program_prefix},; $program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
# sed with no file args requires a program.
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
@ -717,8 +709,8 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:721: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
echo "configure:713: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AWK"; then
@ -747,9 +739,9 @@ test -n "$AWK" && break
done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:751: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:743: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftestmake <<\EOF
@ -796,7 +788,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:800: checking for working aclocal" >&5
echo "configure:792: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -809,7 +801,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:813: checking for working autoconf" >&5
echo "configure:805: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -822,7 +814,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:826: checking for working automake" >&5
echo "configure:818: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -835,7 +827,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:839: checking for working autoheader" >&5
echo "configure:831: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -848,7 +840,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:852: checking for working makeinfo" >&5
echo "configure:844: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -868,8 +860,8 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:872: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
echo "configure:864: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AMTAR"; then
@ -911,45 +903,31 @@ fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:916: checking host system type" >&5
if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
# Make sure we can run config.sub.
if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
ac_cv_host_alias=$host
case "$ac_cv_host_alias" in
NONE)
case $nonopt in
NONE)
if ac_cv_host_alias=`$ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) ac_cv_host_alias=$nonopt ;;
esac ;;
esac
ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
echo $ac_n "(cached) $ac_c" 1>&6
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo "$ac_t""$ac_cv_host" 1>&6
host=$ac_cv_host
host_alias=$ac_cv_host_alias
host_cpu=$ac_cv_host_cpu
host_vendor=$ac_cv_host_vendor
host_os=$ac_cv_host_os
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:913: checking host system type" >&5
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
case "$host_cpu" in
@ -965,7 +943,7 @@ esac
#
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:969: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:947: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@ -991,15 +969,15 @@ if test "x$enable_maintainer_mode" = xyes; then
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:995: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_PERL+set}\" = set"; then
echo "configure:973: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PERL" in
/*)
ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
;;
?:/*)
?:/*)
ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
;;
*)
@ -1037,45 +1015,23 @@ fi
# Programs
#
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1043: checking build system type" >&5
if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
# Make sure we can run config.sub.
if $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
ac_cv_build_alias=$build
case "$ac_cv_build_alias" in
NONE)
case $nonopt in
NONE)
ac_cv_build_alias=$host_alias ;;
*) ac_cv_build_alias=$nonopt ;;
esac ;;
esac
ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
else
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo "$ac_t""$ac_cv_build" 1>&6
build=$ac_cv_build
build_alias=$ac_cv_build_alias
build_cpu=$ac_cv_build_cpu
build_vendor=$ac_cv_build_vendor
build_os=$ac_cv_build_os
echo "configure:1020: checking build system type" >&5
build_alias=$build
case "$build_alias" in
NONE)
case $nonopt in
NONE) build_alias=$host_alias ;;
*) build_alias=$nonopt ;;
esac ;;
esac
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
if test $host != $build; then
ac_tool_prefix=${host_alias}-
@ -1086,8 +1042,8 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1090: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo "configure:1046: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
@ -1118,8 +1074,8 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1122: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo "configure:1078: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
@ -1148,8 +1104,8 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1152: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo "configure:1108: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
@ -1195,12 +1151,12 @@ fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32* | *CYGWIN*)
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1203: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
echo "configure:1159: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
@ -1230,8 +1186,8 @@ fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1235: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1191: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1242,12 +1198,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1246 "configure"
#line 1202 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1272,14 +1228,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1277: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1233: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1282: checking whether we are using GNU C" >&5
if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
echo "configure:1238: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
@ -1287,7 +1243,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1306,8 +1262,8 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1310: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
echo "configure:1266: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
@ -1349,15 +1305,15 @@ if test "x$with_binutils" != x; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1353: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_RANLIB+set}\" = set"; then
echo "configure:1309: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$RANLIB" in
/*)
ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path.
;;
?:/*)
?:/*)
ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a dos path.
;;
*)
@ -1386,8 +1342,8 @@ else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1390: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
echo "configure:1346: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
@ -1426,22 +1382,22 @@ if test "x$ac_cv_prog_gcc" = xyes; then
STAGE1_CFLAGS="-O2"
GRUB_CFLAGS="-O2"
echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6
echo "configure:1430: checking whether optimization for size works" >&5
if eval "test \"\${size_flag+set}\" = set"; then
echo "configure:1386: checking whether optimization for size works" >&5
if eval "test \"`echo '$''{'size_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
saved_CFLAGS=$CFLAGS
CFLAGS="-Os -g"
cat > conftest.$ac_ext <<EOF
#line 1438 "configure"
#line 1394 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
size_flag=yes
else
@ -1475,15 +1431,15 @@ if test "x$with_binutils" != x; then
# Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1479: checking for $ac_word" >&5
if eval "test \"\${ac_cv_path_OBJCOPY+set}\" = set"; then
echo "configure:1435: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$OBJCOPY" in
/*)
ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
;;
?:/*)
?:/*)
ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a dos path.
;;
*)
@ -1511,8 +1467,8 @@ else
# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ac_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1515: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_OBJCOPY+set}\" = set"; then
echo "configure:1471: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$OBJCOPY"; then
@ -1545,8 +1501,8 @@ fi
# Defined in acinclude.m4.
echo $ac_n "checking if C symbols get an underscore after compilation""... $ac_c" 1>&6
echo "configure:1549: checking if C symbols get an underscore after compilation" >&5
if eval "test \"\${grub_cv_asm_uscore+set}\" = set"; then
echo "configure:1505: checking if C symbols get an underscore after compilation" >&5
if eval "test \"`echo '$''{'grub_cv_asm_uscore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
@ -1558,7 +1514,7 @@ func (int *list)
}
EOF
if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
true
else
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
@ -1584,8 +1540,8 @@ fi
echo "$ac_t""$grub_cv_asm_uscore" 1>&6
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
echo "configure:1588: checking whether ${OBJCOPY} works for absolute addresses" >&5
if eval "test \"\${grub_cv_prog_objcopy_absolute+set}\" = set"; then
echo "configure:1544: checking whether ${OBJCOPY} works for absolute addresses" >&5
if eval "test \"`echo '$''{'grub_cv_prog_objcopy_absolute'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
@ -1596,21 +1552,21 @@ cmain (void)
}
EOF
if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
else
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'; { (eval echo configure:1606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec'; { (eval echo configure:1562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else
{ echo "configure: error: ${CC-cc} cannot link at address $link_addr" 1>&2; exit 1; }
fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
fi
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
mv -f conftest conftest.old
else
grub_cv_prog_objcopy_absolute=no
@ -1627,8 +1583,8 @@ fi
echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6
echo "configure:1631: checking whether addr32 must be in the same line as the instruction" >&5
if eval "test \"\${grub_cv_asm_prefix_requirement+set}\" = set"; then
echo "configure:1587: checking whether addr32 must be in the same line as the instruction" >&5
if eval "test \"`echo '$''{'grub_cv_asm_prefix_requirement'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<\EOF
@ -1636,7 +1592,7 @@ else
l1: addr32 movb %al, l1
EOF
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_prefix_requirement=yes
else
grub_cv_asm_prefix_requirement=no
@ -1668,8 +1624,8 @@ echo "$ac_t""$grub_cv_asm_prefix_requirement" 1>&6
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
echo "configure:1672: checking for .code16 addr32 assembler support" >&5
if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then
echo "configure:1628: checking for .code16 addr32 assembler support" >&5
if eval "test \"`echo '$''{'grub_cv_asm_addr32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s.in <<\EOF
@ -1683,7 +1639,7 @@ else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1643: \"$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
@ -1700,19 +1656,19 @@ fi
echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1704: checking if start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_start_symbol+set}\" = set"; then
echo "configure:1660: checking if start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1709 "configure"
#line 1665 "configure"
#include "confdefs.h"
int main() {
asm ("incl start")
; return 0; }
EOF
if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_start_symbol=yes
else
@ -1736,19 +1692,19 @@ 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:1740: checking if _start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_start_symbol+set}\" = set"; then
echo "configure:1696: checking if _start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1745 "configure"
#line 1701 "configure"
#include "confdefs.h"
int main() {
asm ("incl _start")
; return 0; }
EOF
if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_uscore_start_symbol=yes
else
@ -1777,19 +1733,19 @@ fi
echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1781: checking if __bss_start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_uscore_bss_start_symbol+set}\" = set"; then
echo "configure:1737: checking if __bss_start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_uscore_bss_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1786 "configure"
#line 1742 "configure"
#include "confdefs.h"
int main() {
asm ("incl __bss_start")
; return 0; }
EOF
if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_uscore_uscore_bss_start_symbol=yes
else
@ -1813,19 +1769,19 @@ echo "$ac_t""$grub_cv_check_uscore_uscore_bss_start_symbol" 1>&6
echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6
echo "configure:1817: checking if _edata is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_edata_symbol+set}\" = set"; then
echo "configure:1773: checking if _edata is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1822 "configure"
#line 1778 "configure"
#include "confdefs.h"
int main() {
asm ("incl _edata")
; return 0; }
EOF
if { (eval echo configure:1829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_uscore_edata_symbol=yes
else
@ -1849,19 +1805,19 @@ echo "$ac_t""$grub_cv_check_uscore_edata_symbol" 1>&6
echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6
echo "configure:1853: checking if edata is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_edata_symbol+set}\" = set"; then
echo "configure:1809: checking if edata is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1858 "configure"
#line 1814 "configure"
#include "confdefs.h"
int main() {
asm ("incl edata")
; return 0; }
EOF
if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_edata_symbol=yes
else
@ -1891,19 +1847,19 @@ fi
echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6
echo "configure:1895: checking if end is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_end_symbol+set}\" = set"; then
echo "configure:1851: checking if end is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1900 "configure"
#line 1856 "configure"
#include "confdefs.h"
int main() {
asm ("incl end")
; return 0; }
EOF
if { (eval echo configure:1907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_end_symbol=yes
else
@ -1927,19 +1883,19 @@ 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:1931: checking if _end is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_end_symbol+set}\" = set"; then
echo "configure:1887: checking if _end is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1936 "configure"
#line 1892 "configure"
#include "confdefs.h"
int main() {
asm ("incl _end")
; return 0; }
EOF
if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
grub_cv_check_uscore_end_symbol=yes
else
@ -1977,15 +1933,15 @@ fi
# Get the filename or the whole disk and open it.
# Known to work on NetBSD.
echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6
echo "configure:1981: checking for opendisk in -lutil" >&5
ac_lib_var=`echo util'_'opendisk | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo "configure:1937: checking for opendisk in -lutil" >&5
ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1989 "configure"
#line 1945 "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
@ -1996,7 +1952,7 @@ int main() {
opendisk()
; return 0; }
EOF
if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1956: \"$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
@ -2024,15 +1980,15 @@ fi
# Unless the user specify --without-curses, check for curses.
if test "x$with_curses" != "xno"; then
echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6
echo "configure:2028: 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 "configure:1984: checking for wgetch in -lncurses" >&5
ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2036 "configure"
#line 1992 "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
@ -2043,7 +1999,7 @@ int main() {
wgetch()
; return 0; }
EOF
if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2003: \"$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
@ -2066,15 +2022,15 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6
echo "configure:2070: 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 "configure:2026: checking for wgetch in -lcurses" >&5
ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2078 "configure"
#line 2034 "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
@ -2085,7 +2041,7 @@ int main() {
wgetch()
; return 0; }
EOF
if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2045: \"$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
@ -2117,13 +2073,13 @@ fi
# Check for headers.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2121: checking how to run the C preprocessor" >&5
echo "configure:2077: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
@ -2132,13 +2088,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 2136 "configure"
#line 2092 "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:2142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2098: \"$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
:
@ -2149,13 +2105,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 2153 "configure"
#line 2109 "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:2159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2115: \"$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
:
@ -2166,13 +2122,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 2170 "configure"
#line 2126 "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:2176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2132: \"$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
:
@ -2200,17 +2156,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:2204: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo "configure:2160: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2209 "configure"
#line 2165 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2170: \"$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*
@ -2538,7 +2494,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
echo "$CONFIG_STATUS generated by autoconf version 2.13"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -2712,7 +2668,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*[Mm]akefile*) ac_comsub="1i\\
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
@ -2846,5 +2802,5 @@ exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

4
debian/rules vendored
View file

@ -49,7 +49,7 @@ binary-arch: checkroot build
dir=`cd debian/tmp && pwd` && make install DESTDIR=$$dir
gzip -f9 debian/tmp/usr/share/info/* debian/tmp/usr/share/man/*/*
strip -s debian/tmp/usr/sbin/*
strip -s debian/tmp/usr/sbin/grub
$(INSTALL_DATA) TODO BUGS NEWS docs/menu.lst \
debian/tmp/usr/share/doc/grub/
@ -63,7 +63,7 @@ binary-arch: checkroot build
# Install control files.
$(INSTALL_PROGRAM) debian/postinst debian/prerm debian/tmp/DEBIAN
dpkg-shlibdeps debian/tmp/usr/*bin/*
dpkg-shlibdeps debian/tmp/usr/sbin/grub
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp

View file

@ -177,14 +177,14 @@ grub_stage2 (void)
/* Make sure that actual writing is done. */
sync ();
/* Set our stack, and go for it. */
simstack = (char *) PROTSTACKINIT;
doit ();
/* I don't know if this is necessary really. */
sync ();
#ifdef HAVE_LIBCURSES
if (use_curses)
endwin ();
@ -229,7 +229,7 @@ init_device_map (void)
{
fprintf (stderr, "%s:%d: error: %s\n", device_map_file, no, msg);
}
assert (device_map == 0);
device_map = malloc (NUM_DISKS * sizeof (char *));
assert (device_map);
@ -250,41 +250,41 @@ init_device_map (void)
probing devices. */
char buf[1024]; /* XXX */
int line_number = 0;
while (fgets (buf, sizeof (buf), fp))
{
char *ptr, *eptr;
int drive;
int is_floppy = 0;
/* Increase the number of lines. */
line_number++;
/* If the first character is '#', skip it. */
if (buf[0] == '#')
continue;
ptr = buf;
/* Skip leading spaces. */
while (*ptr && isspace (*ptr))
ptr++;
if (*ptr != '(')
{
print_error (line_number, "No open parenthesis found");
stop ();
}
ptr++;
if ((*ptr != 'f' && *ptr != 'h') || *(ptr + 1) != 'd')
{
print_error (line_number, "Bad drive name");
stop ();
}
if (*ptr == 'f')
is_floppy = 1;
ptr += 2;
drive = strtoul (ptr, &ptr, 10);
if (drive < 0 || drive > 8)
@ -292,41 +292,41 @@ init_device_map (void)
print_error (line_number, "Bad device number");
stop ();
}
if (! is_floppy)
drive += 0x80;
if (*ptr != ')')
{
print_error (line_number, "No close parenthesis found");
stop ();
}
ptr++;
/* Skip spaces. */
while (*ptr && isspace (*ptr))
ptr++;
if (! *ptr)
{
print_error (line_number, "No filename found");
stop ();
}
/* Terminate the filename. */
eptr = ptr;
while (*eptr && ! isspace (*eptr))
eptr++;
*eptr = 0;
assign_device_name (drive, ptr);
}
fclose (fp);
return;
}
}
/* Print something as the user does not think GRUB has been crashed. */
fprintf (stderr,
"Probe devices to guess BIOS drives. This may take a long time.\n");
@ -334,7 +334,7 @@ init_device_map (void)
if (device_map_file)
/* Try to open the device map file to write the probed data. */
fp = fopen (device_map_file, "w");
/* Floppies. */
if (! no_floppy)
for (i = 0; i < 2; i++)
@ -343,17 +343,17 @@ init_device_map (void)
if (i == 1 && ! probe_second_floppy)
break;
get_floppy_disk_name (name, i);
/* In floppies, write the map, whether check_device succeeds
or not, because the user just does not insert floppies. */
if (fp)
fprintf (fp, "(fd%d)\t%s\n", i, name);
if (check_device (name))
assign_device_name (i, name);
}
/* IDE disks. */
for (i = 0; i < 4; i++)
{
@ -363,15 +363,15 @@ init_device_map (void)
if (check_device (name))
{
assign_device_name (num_hd + 0x80, name);
/* If the device map file is opened, write the map. */
if (fp)
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
num_hd++;
}
}
/* The rest is SCSI disks. */
for (i = 0; i < 8; i++)
{
@ -385,7 +385,7 @@ init_device_map (void)
/* If the device map file is opened, write the map. */
if (fp)
fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
num_hd++;
}
}
@ -484,7 +484,7 @@ get_scsi_disk_name (char *name, int unit)
*name = 0;
#endif
}
/* Check if DEVICE can be read. If an error occurs, return zero,
otherwise return non-zero. */
int
@ -524,7 +524,7 @@ check_device (const char *device)
fclose (fp);
return 0;
}
fclose (fp);
return 1;
}
@ -536,14 +536,14 @@ assign_device_name (int drive, const char *device)
/* If DRIVE is already assigned, free it. */
if (device_map[drive])
free (device_map[drive]);
/* If the old one is already opened, close it. */
if (disks[drive].flags != -1)
{
close (disks[drive].flags);
disks[drive].flags = -1;
}
/* Assign DRIVE to DEVICE. */
if (! device)
device_map[drive] = 0;
@ -763,11 +763,11 @@ static int save_char = ERR;
int
getkey (void)
{
int c;
#ifdef HAVE_LIBCURSES
if (use_curses)
{
int c;
/* If checkkey has already got a character, then return it. */
if (save_char != ERR)
{
@ -775,15 +775,19 @@ getkey (void)
save_char = ERR;
return c;
}
wtimeout (stdscr, -1);
c = getch ();
wtimeout (stdscr, 100);
return c;
}
else
#endif
c = getchar ();
return getchar ();
/* Quit if we get EOF. */
if (c == -1)
stop ();
return c;
}
@ -800,7 +804,7 @@ checkkey (void)
means checkkey is called twice continuously. */
if (save_char != ERR)
return save_char;
c = getch ();
/* If C is not ERR, then put it back in the input queue. */
if (c != ERR)
@ -809,7 +813,8 @@ checkkey (void)
}
#endif
/* Just pretend they hit the space bar. */
/* Just pretend they hit the space bar, then read the real key when
they call getkey. */
return ' ';
}
@ -845,7 +850,7 @@ get_drive_geometry (int drive)
struct hd_geometry hdg;
if (ioctl (geom->flags, HDIO_GETGEO, &hdg))
return 0;
/* Got the geometry, so save it. */
geom->cylinders = hdg.cylinders;
geom->heads = hdg.heads;
@ -853,19 +858,19 @@ get_drive_geometry (int drive)
/* FIXME: Should get the real number of sectors. */
geom->total_sectors = hdg.cylinders * hdg.heads * hdg.sectors;
return 1;
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
/* FreeBSD */
struct disklabel hdg;
if (ioctl (disks[drive].flags, DIOCGDINFO, &hdg))
return 0;
disks[drive].cylinders = hdg.d_ncylinders;
disks[drive].heads = hdg.d_ntracks;
disks[drive].sectors = hdg.d_nsectors;
disks[drive].total_sectors = hdg.d_secperunit;
return 1;
#else
# warning "In your operating system, automatic detection of geometries \
will not be performed."
@ -873,7 +878,7 @@ will not be performed."
#endif
}
/* Low-level disk I/O. Our stubbed version just returns a file
descriptor, not the actual geometry. */
int
@ -897,11 +902,11 @@ get_diskinfo (int drive, struct geometry *geometry)
if (verbose)
grub_printf ("Attempt to open drive 0x%x (%s)\n",
drive, devname);
/* Open read/write, or read-only if that failed. */
if (! read_only)
disks[drive].flags = open (devname, O_RDWR);
if (disks[drive].flags == -1)
{
if (read_only || errno == EACCES || errno == EROFS)
@ -962,11 +967,11 @@ get_diskinfo (int drive, struct geometry *geometry)
return -1;
#ifdef __linux__
/* In Linux, invalidate the buffer cache, so that left overs
/* In Linux, invalidate the buffer cache, so that left overs
from other program in the cache are flushed and seen by us */
ioctl (disks[drive].flags, BLKFLSBUF, 0);
#endif
*geometry = disks[drive];
return 0;
}
@ -977,7 +982,7 @@ static int
nread (int fd, char *buf, size_t len)
{
int size = len;
while (len)
{
int ret = read (fd, buf, len);
@ -993,7 +998,7 @@ nread (int fd, char *buf, size_t len)
len -= ret;
buf += ret;
}
return size;
}
@ -1003,7 +1008,7 @@ static int
nwrite (int fd, char *buf, size_t len)
{
int size = len;
while (len)
{
int ret = write (fd, buf, len);
@ -1019,7 +1024,7 @@ nwrite (int fd, char *buf, size_t len)
len -= ret;
buf += ret;
}
return size;
}
@ -1036,7 +1041,7 @@ hex_dump (void *buf, size_t size)
int column = 0;
/* how many bytes written */
int count = 0;
while (size > 0)
{
/* high 4 bits */
@ -1099,7 +1104,7 @@ biosdisk (int subfunc, int drive, struct geometry *geometry,
#else
{
off_t offset = (off_t) sector * (off_t) SECTOR_SIZE;
if (lseek (fd, offset, SEEK_SET) != offset)
return -1;
}
@ -1113,7 +1118,7 @@ biosdisk (int subfunc, int drive, struct geometry *geometry,
if (nread (fd, buf, nsec * SECTOR_SIZE) != nsec * SECTOR_SIZE)
return -1;
break;
case BIOSDISK_WRITE:
if (verbose)
{
@ -1126,12 +1131,12 @@ biosdisk (int subfunc, int drive, struct geometry *geometry,
if (nwrite (fd, buf, nsec * SECTOR_SIZE) != nsec * SECTOR_SIZE)
return -1;
break;
default:
grub_printf ("unknown subfunc %d\n", subfunc);
break;
}
return 0;
}

View file

@ -5,7 +5,7 @@ CLEANFILES = $(nodist_pkgdata_DATA)
# We can't use builtins or standard includes.
AM_CFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
noinst_PROGRAMS = stage1.exec
stage1_exec_SOURCES = stage1.S stage1.h

View file

@ -87,7 +87,7 @@ CLEANFILES = $(nodist_pkgdata_DATA)
# We can't use builtins or standard includes.
AM_CFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
noinst_PROGRAMS = stage1.exec
stage1_exec_SOURCES = stage1.S stage1.h

View file

@ -42,11 +42,13 @@ skip_to (int after_equal, char *cmdline)
/* Print a helpful message for the command-line interface. */
void
print_cmdline_message (void)
print_cmdline_message (int forever)
{
printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB
printf ("\
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ESC at any time exits. ]\n");
completions of a device/filename.%s ]\n",
(forever ? "" : " ESC at any time exits."));
}
/* Find the builtin whose command name is COMMAND and return the
@ -106,14 +108,15 @@ init_cmdline (void)
}
/* Enter the command-line interface. HEAP is used for the command-line
buffer. Return only if get_cmdline returns non-zero (ESC is pushed). */
buffer. Return only if FOREVER is nonzero and get_cmdline returns
nonzero (ESC is pushed). */
void
enter_cmdline (char *heap)
enter_cmdline (char *heap, int forever)
{
/* Initialize the data and print a message. */
init_cmdline ();
init_page ();
print_cmdline_message ();
print_cmdline_message (forever);
while (1)
{
@ -123,7 +126,7 @@ enter_cmdline (char *heap)
*heap = 0;
print_error ();
errnum = ERR_NONE;
/* Get the command-line with the minimal BASH-like interface. */
if (get_cmdline (PACKAGE "> ", heap, 2048, 0, 1))
return;

View file

@ -668,8 +668,8 @@ void init_builtins (void);
void init_config (void);
char *skip_to (int after_equal, char *cmdline);
struct builtin *find_command (char *command);
void print_cmdline_message (void);
void enter_cmdline (char *heap);
void print_cmdline_message (int forever);
void enter_cmdline (char *heap, int forever);
int run_script (char *script, char *heap);
#endif

View file

@ -94,14 +94,14 @@ print_border (int y, int size)
for (i = 0; i < 14; i++)
{
int j;
for (j = 0; j < 75; j++)
for (j = 0; j < 75; j++)
{
gotoxy (j + 1, i + y);
set_attrib (normal_color);
gotoxy (j + 1, i + y);
set_attrib (normal_color);
}
}
#endif
gotoxy (1, y);
putchar (DISP_UL);
@ -185,7 +185,7 @@ restart:
init_page ();
#ifndef GRUB_UTIL
nocursor ();
nocursor ();
#endif
print_border (3, 12);
@ -193,7 +193,7 @@ restart:
#ifdef GRUB_UTIL
grub_printf ("\n
Use the up and down arrows for selecting which entry is highlighted.\n");
#else
#else
grub_printf ("\n
Use the %c and %c keys for selecting which entry is highlighted.\n",
DISP_UP, DISP_DOWN);
@ -303,7 +303,7 @@ restart:
if ((c == 'd') || (c == 'o') || (c == 'O'))
{
set_line_normal (4 + entryno);
/* insert after is almost exactly like insert before */
if (c == 'o')
{
@ -332,7 +332,7 @@ restart:
char *ptr = get_entry(menu_entries,
first_entry + entryno + 1,
0);
memmove (cur_entry, ptr, ((int) heap) - ((int) ptr));
heap -= (((int) ptr) - ((int) cur_entry));
@ -364,7 +364,7 @@ restart:
char *pptr = password;
gotoxy (1, 21);
/* Wipe out the previously entered password */
memset (entered, 0, sizeof (entered));
get_cmdline (" Password: ", entered, 31, '*', 0);
@ -374,7 +374,7 @@ restart:
/* Make sure that PASSWORD is NUL-terminated. */
*pptr++ = 0;
if (! strcmp (password, entered))
{
char *new_file = config_file;
@ -431,7 +431,7 @@ restart:
else
{
cls ();
print_cmdline_message ();
print_cmdline_message (0);
new_heap = heap + NEW_HEAPSIZE + 1;
@ -470,7 +470,7 @@ restart:
}
if (c == 'c')
{
enter_cmdline (heap);
enter_cmdline (heap, 0);
goto restart;
}
#ifdef GRUB_UTIL
@ -518,7 +518,7 @@ restart:
else
break;
}
goto restart;
}
@ -582,7 +582,7 @@ cmain (void)
/* Initialize the kill buffer. */
*kill = 0;
/* Never return. */
for (;;)
{
@ -622,7 +622,7 @@ cmain (void)
if (builtin->flags & BUILTIN_TITLE)
{
char *ptr;
/* the command "title" is specially treated. */
if (state > 1)
{
@ -641,7 +641,7 @@ cmain (void)
/* Reset the state. */
state = 1;
/* Copy title into menu area. */
ptr = skip_to (1, cmdline);
while ((menu_entries[menu_len++] = *(ptr++)) != 0)
@ -663,14 +663,14 @@ cmain (void)
else
{
char *ptr = cmdline;
state++;
/* Copy config file data to config area. */
while ((config_entries[config_len++] = *ptr++) != 0)
;
}
}
if (state > 1)
{
/* Finish the last entry. */
@ -682,7 +682,7 @@ cmain (void)
menu_len = prev_menu_len;
config_len = prev_config_len;
}
menu_entries[menu_len++] = 0;
config_entries[config_len++] = 0;
grub_memmove (config_entries + config_len, menu_entries, menu_len);
@ -690,14 +690,13 @@ cmain (void)
grub_close ();
}
if (! num_entries)
{
/* If no acceptable config file, goto command-line, starting
heap from where the config entries would have been stored
if there were any. */
while (1)
enter_cmdline (config_entries);
enter_cmdline (config_entries, 1);
}
else
{

View file

@ -64,7 +64,7 @@ convert () {
# Break the device name into the disk part and the partition part.
case $host_os in
linux*)
linux*)
tmp_disk=`echo $1 | sed 's%[0-9]*$%%'`
tmp_part=`echo $1 | sed "s%$tmp_disk%%"` ;;
gnu*)
@ -154,16 +154,14 @@ fi
# Stage 1.5 does not exist.
# Create the GRUB directory if it is not present.
if test ! -d $bootdir; then
mkdir $bootdir
fi
if test ! -d $grubdir; then
mkdir $grubdir
fi
test -d $bootdir || mkdir $bootdir
test -d $grubdir || mkdir $grubdir
# Create the device map file if it is not present.
if test ! -f $device_map; then
# Create a safe temporary file.
test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
$grub_shell --batch --device-map=$device_map <<EOF >$log_file
quit
EOF
@ -209,6 +207,9 @@ fi
rm -f ${grubdir}/stage1 ${grubdir}/stage2 ${grubdir}/*stage1_5
cp ${pkgdatadir}/stage1 ${pkgdatadir}/stage2 ${pkgdatadir}/*stage1_5 ${grubdir}
# Create a safe temporary file.
test -x /bin/tempfile && log_file=`tempfile --prefix=grub`
# Now perform the installation.
$grub_shell --batch --device-map=$device_map <<EOF >$log_file
root $root_drive