set CFLAGS to "-Os -g" if the optimization flag for size is available
This commit is contained in:
parent
225bd167d7
commit
bdd07e3f83
3 changed files with 100 additions and 30 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
1999-06-27 Pavel Roskin <pavel_roskin@geocities.com>
|
||||||
|
|
||||||
|
* configure.in: set CFLAGS to "-Os -g" for compilers which
|
||||||
|
understand "-Os" if CFLAGS is not already set. Use
|
||||||
|
"-O2 -fno-strength-reduce -fno-unroll-loops -g" for older gcc
|
||||||
|
versions.
|
||||||
|
|
||||||
1999-06-25 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
1999-06-25 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
* stage2/disk_io.c (attempt_mount) [STAGE1_5]: Set FSYS_TYPE to
|
* stage2/disk_io.c (attempt_mount) [STAGE1_5]: Set FSYS_TYPE to
|
||||||
|
|
104
configure
vendored
104
configure
vendored
|
@ -904,13 +904,18 @@ else
|
||||||
GRUB_MAINT_FALSE=
|
GRUB_MAINT_FALSE=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This should be checked before AC_PROG_CC
|
||||||
|
if test "x$CFLAGS" = x; then
|
||||||
|
default_CFLAGS=yes
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Programs
|
# Programs
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||||
echo "configure:914: checking build system type" >&5
|
echo "configure:919: 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
|
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.
|
# Make sure we can run config.sub.
|
||||||
|
@ -957,7 +962,7 @@ fi
|
||||||
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
|
# 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
|
set dummy ${ac_tool_prefix}gcc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:961: checking for $ac_word" >&5
|
echo "configure:966: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -989,7 +994,7 @@ fi
|
||||||
# Extract the first word of "gcc", so it can be a program name with args.
|
# Extract the first word of "gcc", so it can be a program name with args.
|
||||||
set dummy gcc; ac_word=$2
|
set dummy gcc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:993: checking for $ac_word" >&5
|
echo "configure:998: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1019,7 +1024,7 @@ if test -z "$CC"; then
|
||||||
# Extract the first word of "cc", so it can be a program name with args.
|
# Extract the first word of "cc", so it can be a program name with args.
|
||||||
set dummy cc; ac_word=$2
|
set dummy cc; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1023: checking for $ac_word" >&5
|
echo "configure:1028: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1070,7 +1075,7 @@ fi
|
||||||
# Extract the first word of "cl", so it can be a program name with args.
|
# Extract the first word of "cl", so it can be a program name with args.
|
||||||
set dummy cl; ac_word=$2
|
set dummy cl; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1074: checking for $ac_word" >&5
|
echo "configure:1079: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1102,7 +1107,7 @@ fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||||
echo "configure:1106: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
|
echo "configure:1111: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
|
@ -1113,12 +1118,12 @@ cross_compiling=$ac_cv_prog_cc_cross
|
||||||
|
|
||||||
cat > conftest.$ac_ext << EOF
|
cat > conftest.$ac_ext << EOF
|
||||||
|
|
||||||
#line 1117 "configure"
|
#line 1122 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
main(){return(0);}
|
main(){return(0);}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
ac_cv_prog_cc_works=yes
|
ac_cv_prog_cc_works=yes
|
||||||
# If we can't run a trivial program, we are probably using a cross compiler.
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
||||||
if (./conftest; exit) 2>/dev/null; then
|
if (./conftest; exit) 2>/dev/null; then
|
||||||
|
@ -1144,12 +1149,12 @@ 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; }
|
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
||||||
echo "configure:1148: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
|
echo "configure:1153: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||||
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
||||||
cross_compiling=$ac_cv_prog_cc_cross
|
cross_compiling=$ac_cv_prog_cc_cross
|
||||||
|
|
||||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||||
echo "configure:1153: checking whether we are using GNU C" >&5
|
echo "configure:1158: checking whether we are using GNU C" >&5
|
||||||
if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1158,7 +1163,7 @@ else
|
||||||
yes;
|
yes;
|
||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1162: \"$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:1167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||||
ac_cv_prog_gcc=yes
|
ac_cv_prog_gcc=yes
|
||||||
else
|
else
|
||||||
ac_cv_prog_gcc=no
|
ac_cv_prog_gcc=no
|
||||||
|
@ -1177,7 +1182,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
|
||||||
ac_save_CFLAGS="$CFLAGS"
|
ac_save_CFLAGS="$CFLAGS"
|
||||||
CFLAGS=
|
CFLAGS=
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
||||||
echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5
|
echo "configure:1186: checking whether ${CC-cc} accepts -g" >&5
|
||||||
if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1211,7 +1216,7 @@ fi
|
||||||
# Extract the first word of "ranlib", so it can be a program name with args.
|
# Extract the first word of "ranlib", so it can be a program name with args.
|
||||||
set dummy ranlib; ac_word=$2
|
set dummy ranlib; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1215: checking for $ac_word" >&5
|
echo "configure:1220: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1239,13 +1244,52 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test "x$ac_cv_prog_gcc" = xyes; then
|
||||||
|
if test "x$default_CFLAGS" = xyes; then
|
||||||
|
echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6
|
||||||
|
echo "configure:1251: checking whether optimization for size works" >&5
|
||||||
|
if eval "test \"\${size_flag+set}\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
|
||||||
|
CFLAGS="-Os -g"
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 1258 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
|
rm -rf conftest*
|
||||||
|
size_flag=yes
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
size_flag=no
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$ac_t""$size_flag" 1>&6
|
||||||
|
if test "x$size_flag" = xyes; then
|
||||||
|
CFLAGS="-Os -g"
|
||||||
|
else
|
||||||
|
CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops -g"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Enforce coding standards.
|
# Enforce coding standards.
|
||||||
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
|
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
|
||||||
|
|
||||||
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
|
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
|
||||||
set dummy ${ac_tool_prefix}ld; ac_word=$2
|
set dummy ${ac_tool_prefix}ld; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1249: checking for $ac_word" >&5
|
echo "configure:1293: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_LD+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_LD+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1277,7 +1321,7 @@ fi
|
||||||
# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
|
# 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
|
set dummy ${ac_tool_prefix}objcopy; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:1281: checking for $ac_word" >&5
|
echo "configure:1325: checking for $ac_word" >&5
|
||||||
if eval "test \"\${ac_cv_prog_OBJCOPY+set}\" = set"; then
|
if eval "test \"\${ac_cv_prog_OBJCOPY+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1310,7 +1354,7 @@ fi
|
||||||
# Defined in acinclude.m4.
|
# Defined in acinclude.m4.
|
||||||
|
|
||||||
echo $ac_n "checking symbol names produced by ${CC-cc}""... $ac_c" 1>&6
|
echo $ac_n "checking symbol names produced by ${CC-cc}""... $ac_c" 1>&6
|
||||||
echo "configure:1314: checking symbol names produced by ${CC-cc}" >&5
|
echo "configure:1358: checking symbol names produced by ${CC-cc}" >&5
|
||||||
if eval "test \"\${grub_cv_asm_ext_c+set}\" = set"; then
|
if eval "test \"\${grub_cv_asm_ext_c+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1323,7 +1367,7 @@ func (int *list)
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
|
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
|
||||||
else
|
else
|
||||||
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
|
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
@ -1352,7 +1396,7 @@ EOF
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
|
||||||
echo "configure:1356: checking whether ${OBJCOPY} works for absolute addresses" >&5
|
echo "configure:1400: checking whether ${OBJCOPY} works for absolute addresses" >&5
|
||||||
if eval "test \"\${grub_cv_prog_objcopy_absolute+set}\" = set"; then
|
if eval "test \"\${grub_cv_prog_objcopy_absolute+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1364,21 +1408,21 @@ blah (void)
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if { (eval echo configure:1368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
|
if { (eval echo configure:1412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
|
||||||
else
|
else
|
||||||
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
|
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
grub_cv_prog_objcopy_absolute=yes
|
grub_cv_prog_objcopy_absolute=yes
|
||||||
for link_addr in 2000 8000 7C00; do
|
for link_addr in 2000 8000 7C00; do
|
||||||
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
||||||
else
|
else
|
||||||
{ echo "configure: error: ${LD-ld} cannot link at address $link_addr" 1>&2; exit 1; }
|
{ echo "configure: error: ${LD-ld} cannot link at address $link_addr" 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
||||||
else
|
else
|
||||||
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
|
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
|
||||||
fi
|
fi
|
||||||
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1382: \"$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:1426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||||
mv -f conftest conftest.old
|
mv -f conftest conftest.old
|
||||||
else
|
else
|
||||||
grub_cv_prog_objcopy_absolute=no
|
grub_cv_prog_objcopy_absolute=no
|
||||||
|
@ -1395,7 +1439,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
|
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
|
||||||
echo "configure:1399: checking for .code16 addr32 assembler support" >&5
|
echo "configure:1443: checking for .code16 addr32 assembler support" >&5
|
||||||
if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then
|
if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -1405,7 +1449,7 @@ l1: addr32
|
||||||
movb %al, l1
|
movb %al, l1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
|
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
|
||||||
grub_cv_asm_addr32=yes
|
grub_cv_asm_addr32=yes
|
||||||
else
|
else
|
||||||
grub_cv_asm_addr32=no
|
grub_cv_asm_addr32=no
|
||||||
|
@ -1420,7 +1464,7 @@ fi
|
||||||
|
|
||||||
# Check for curses libraries.
|
# Check for curses libraries.
|
||||||
echo $ac_n "checking for getch in -lncurses""... $ac_c" 1>&6
|
echo $ac_n "checking for getch in -lncurses""... $ac_c" 1>&6
|
||||||
echo "configure:1424: checking for getch in -lncurses" >&5
|
echo "configure:1468: checking for getch in -lncurses" >&5
|
||||||
ac_lib_var=`echo ncurses'_'getch | sed 'y%./+-:%__p__%'`
|
ac_lib_var=`echo ncurses'_'getch | sed 'y%./+-:%__p__%'`
|
||||||
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
|
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -1428,7 +1472,7 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lncurses $LIBS"
|
LIBS="-lncurses $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1432 "configure"
|
#line 1476 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
@ -1439,7 +1483,7 @@ int main() {
|
||||||
getch()
|
getch()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1462,7 +1506,7 @@ EOF
|
||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for getch in -lcurses""... $ac_c" 1>&6
|
echo $ac_n "checking for getch in -lcurses""... $ac_c" 1>&6
|
||||||
echo "configure:1466: checking for getch in -lcurses" >&5
|
echo "configure:1510: checking for getch in -lcurses" >&5
|
||||||
ac_lib_var=`echo curses'_'getch | sed 'y%./+-:%__p__%'`
|
ac_lib_var=`echo curses'_'getch | sed 'y%./+-:%__p__%'`
|
||||||
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
|
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -1470,7 +1514,7 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lcurses $LIBS"
|
LIBS="-lcurses $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1474 "configure"
|
#line 1518 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
@ -1481,7 +1525,7 @@ int main() {
|
||||||
getch()
|
getch()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
|
19
configure.in
19
configure.in
|
@ -43,6 +43,11 @@ AC_ARG_ENABLE(maintainer-mode,
|
||||||
esac],[maintainermode=no])
|
esac],[maintainermode=no])
|
||||||
AM_CONDITIONAL(GRUB_MAINT, test "x${maintainermode}" = xyes)
|
AM_CONDITIONAL(GRUB_MAINT, test "x${maintainermode}" = xyes)
|
||||||
|
|
||||||
|
# This should be checked before AC_PROG_CC
|
||||||
|
if test "x$CFLAGS" = x; then
|
||||||
|
default_CFLAGS=yes
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Programs
|
# Programs
|
||||||
#
|
#
|
||||||
|
@ -51,6 +56,20 @@ AC_CHECK_TOOL(CC, gcc)
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
|
if test "x$ac_cv_prog_gcc" = xyes; then
|
||||||
|
if test "x$default_CFLAGS" = xyes; then
|
||||||
|
AC_CACHE_CHECK([whether optimization for size works], size_flag, [
|
||||||
|
CFLAGS="-Os -g"
|
||||||
|
AC_TRY_COMPILE(, , size_flag=yes, size_flag=no)
|
||||||
|
])
|
||||||
|
if test "x$size_flag" = xyes; then
|
||||||
|
CFLAGS="-Os -g"
|
||||||
|
else
|
||||||
|
CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops -g"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Enforce coding standards.
|
# Enforce coding standards.
|
||||||
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
|
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue