~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-12-26 00:52:47 UTC
  • mto: (17.6.37 experimental)
  • mto: This revision was merged to the branch mainline in revision 184.
  • Revision ID: package-import@ubuntu.com-20131226005247-dalaa9te0g0d49kd
Tags: upstream-2.02~beta2
ImportĀ upstreamĀ versionĀ 2.02~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
33
33
dnl type.
34
34
 
35
 
AC_INIT([GRUB],[2.00],[bug-grub@gnu.org])
 
35
AC_INIT([GRUB],[2.02~beta2],[bug-grub@gnu.org])
36
36
 
37
37
AC_CONFIG_AUX_DIR([build-aux])
38
38
 
69
69
grub_TRANSFORM([grub-set-default])
70
70
grub_TRANSFORM([grub-sparc64-setup])
71
71
grub_TRANSFORM([grub-render-label])
 
72
grub_TRANSFORM([grub-file])
72
73
 
73
74
# Optimization flag.  Allow user to override.
74
75
if test "x$TARGET_CFLAGS" = x; then
176
177
   esac
177
178
fi
178
179
 
 
180
if test x"$target_cpu-$platform" = xsparc64-emu ; then
 
181
   target_m64=1 ;
 
182
fi
 
183
 
179
184
case "$target_os" in
180
185
  windows* | mingw32*) target_os=cygwin ;;
181
186
esac
209
214
  qemu)         machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
210
215
  pc)           machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
211
216
  emu)          machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
212
 
  loongson)     machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
213
 
  qemu_mips)    machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
 
217
  loongson)     machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1" ;;
 
218
  qemu_mips)    machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1" ;;
214
219
  arc)  machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARC=1" ;;
215
220
esac
216
 
case "$target_cpu" in
217
 
  arm)          machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARM=1" ;;
218
 
  arm64)        machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARM64=1" ;;
219
 
  mips |mipsel)         machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS=1" ;;
220
 
  sparc64)      machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
221
 
esac
222
221
if test x${target_cpu} = xmipsel ; then
223
222
   machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
224
223
else
225
 
   machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,` -DGRUB_TARGET_CPU_`echo ${target_cpu} | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`=1"
 
224
   machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
226
225
fi
227
226
 
228
227
case "${target_cpu}-$platform" in
345
344
# Identify characteristics of the host architecture.
346
345
unset ac_cv_c_bigendian
347
346
 
 
347
if test x"$target_cpu-$platform" = xsparc64-emu ; then
 
348
  CFLAGS="$CFLAGS -m64"
 
349
  HOST_CFLAGS="$HOST_CFLAGS -m64"
 
350
fi
 
351
 
348
352
AC_C_BIGENDIAN
349
353
AC_CHECK_SIZEOF(void *)
350
354
AC_CHECK_SIZEOF(long)
422
426
# For gnulib.
423
427
gl_INIT
424
428
 
425
 
WARN_FLAGS="-Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes"
426
 
EXTRA_WARN_FLAGS="-Wold-style-definition -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign"
 
429
WARN_FLAGS="-Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes"
 
430
EXTRA_WARN_FLAGS="-Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2"
427
431
 
428
432
HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS -Wcast-align"
429
433
 
499
503
TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
500
504
fi
501
505
 
 
506
TARGET_CC_VERSION="$(LC_ALL=C $TARGET_CC --version | head -n1)"
 
507
 
502
508
AC_CACHE_CHECK([which extra warnings work], [grub_cv_target_cc_w_extra_flags], [
503
509
  LDFLAGS="$TARGET_LDFLAGS -nostdlib -static"
504
510
 
505
511
  grub_cv_target_cc_w_extra_flags=
506
512
  for x in $EXTRA_WARN_FLAGS; do
507
513
      CFLAGS="$TARGET_CFLAGS $x -Werror"
508
 
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
 
514
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 
515
asm (".globl start; start:");
 
516
void __main (void);
 
517
void __main (void) {}
 
518
int main (void);
 
519
]], [[]])], [flag=1], [flag=0])
509
520
      if test x$flag = x1 ; then
510
521
         grub_cv_target_cc_w_extra_flags="$grub_cv_target_cc_w_extra_flags $x"
511
522
      fi
679
690
  TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
680
691
fi
681
692
 
682
 
# For platforms where ELF is not the default link format.
683
 
case "${target_os}" in
684
 
  cygwin)
685
 
# FIXME: put proper test here
686
 
  NEED_REGISTER_FRAME_INFO=1
687
 
  ;;
688
 
  *) NEED_REGISTER_FRAME_INFO=0 ;;
689
 
esac
690
 
 
691
 
 
692
693
AC_ARG_ENABLE([efiemu],
693
694
              [AS_HELP_STRING([--enable-efiemu],
694
695
                             [build and install the efiemu runtimes (default=guessed)])])
695
696
if test x"$enable_efiemu" = xno ; then
696
697
  efiemu_excuse="explicitly disabled"
697
698
fi
698
 
if test x"$target_os" = xcygwin ; then
 
699
if test x"$grub_cv_target_cc_link_format" = x-mi386pe || test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
699
700
  efiemu_excuse="not available on cygwin"
700
701
fi
701
702
if test x"$target_cpu" != xi386 ; then
740
741
  fi
741
742
fi
742
743
if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then
743
 
  AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled])
 
744
  AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled ($efiemu_excuse)])
744
745
fi
745
746
if test x"$efiemu_excuse" = x ; then
746
747
enable_efiemu=yes
752
753
 
753
754
CFLAGS="$TARGET_CFLAGS"
754
755
 
755
 
if test x"$target_cpu" = xi386 || test x"$target_cpu" = xx86_64; then
 
756
 
 
757
if test x"$platform" = xemu ; then
 
758
  TARGET_OBJ2ELF=
 
759
  grub_cv_target_cc_link_format=
 
760
  case "$host_os" in
 
761
    *darwin* | *mac*)
 
762
       grub_cv_target_cc_link_format="-arch,${target_cpu}"
 
763
       TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
 
764
        ;;
 
765
    *windows* | *cygwin* | *mingw*)
 
766
      if test x${target_cpu} = xi386 ; then
 
767
        grub_cv_target_cc_link_format=-mi386pe;
 
768
        TARGET_OBJ2ELF='./build-grub-pe2elf';
 
769
      fi
 
770
      if test x${target_cpu} = xx86_64 ; then
 
771
        grub_cv_target_cc_link_format=-mi386pep;
 
772
        TARGET_OBJ2ELF='./build-grub-pep2elf';
 
773
      fi
 
774
      TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
 
775
      ;;
 
776
  esac
 
777
elif test x"$target_cpu" = xi386 || test x"$target_cpu" = xx86_64; then
756
778
  AC_CACHE_CHECK([for target linking format], [grub_cv_target_cc_link_format], [
757
779
    grub_cv_target_cc_link_format=unknown
758
 
    for format in -melf_${target_cpu} -melf_${target_cpu}_fbsd -melf_${target_cpu}_obsd -melf_${target_cpu}_haiku -m${target_cpu}pe -arch,${target_cpu}; do
759
 
      if test x${target_cpu} != xi386 && test x$format = x${target_cpu}pe; then
 
780
    for format in -melf_${target_cpu} -melf_${target_cpu}_fbsd -melf_${target_cpu}_obsd -melf_${target_cpu}_haiku -mi386pe -mi386pep -arch,${target_cpu}; do
 
781
      if test x${target_cpu} != xi386 && test x$format = x-mi386pe; then
 
782
        continue
 
783
      fi
 
784
      if test x${target_cpu} != xx86_64 && test x$format = x-mi386pep; then
760
785
        continue
761
786
      fi
762
787
      CFLAGS="$TARGET_CFLAGS"
777
802
    AC_MSG_ERROR([no suitable link format found])
778
803
  fi
779
804
  TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
780
 
  if test x"$grub_cv_target_cc_link_format" = x-mi386pe; then
 
805
  if test x"$grub_cv_target_cc_link_format" = x-mi386pe ; then
781
806
    TARGET_OBJ2ELF='./build-grub-pe2elf';
782
807
  fi
 
808
  if test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
 
809
    TARGET_OBJ2ELF='./build-grub-pep2elf';
 
810
  fi
783
811
fi
784
812
 
785
813
if test x$grub_cv_target_cc_link_format = x-arch,i386 || test x$grub_cv_target_cc_link_format = x-arch,x86_64; then
797
825
   TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
798
826
   TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
799
827
   TARGET_LDFLAGS_OLDMAGIC=""
800
 
elif test x$grub_cv_target_cc_link_format = x-mi386pe && test x$platform = xpc; then
 
828
elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_cc_link_format = x-mi386pep ; then
801
829
  TARGET_APPLE_LINKER=0
802
830
  TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
803
 
  TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/${grub_coredir}/conf/i386-pc-cygwin-img-ld.sc"
 
831
  TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/${grub_coredir}/conf/i386-cygwin-img-ld.sc"
804
832
  TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
805
 
  TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/${grub_coredir}/conf/i386-pc-cygwin-img-ld.sc"
 
833
  TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/${grub_coredir}/conf/i386-cygwin-img-ld.sc"
806
834
  TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
807
835
  TARGET_IMG_CFLAGS=
808
836
else
820
848
 
821
849
LDFLAGS="$TARGET_LDFLAGS"
822
850
 
823
 
if test "$target_cpu" = x86_64; then
 
851
if test "$target_cpu" = x86_64 || test "$target_cpu-$platform" = sparc64-emu ; then
824
852
  # Use large model to support 4G memory
825
853
  AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
826
854
    CFLAGS="$TARGET_CFLAGS -m64 -mcmodel=large"
830
858
  ])
831
859
  if test "x$grub_cv_cc_mcmodel" = xyes; then
832
860
    TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
 
861
  elif test "$target_cpu-$platform" = sparc64-emu; then
 
862
    TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
833
863
  fi
834
864
fi
835
865
 
858
888
  if test "x$grub_cv_cc_mlong_calls" = xyes; then
859
889
    TARGET_CFLAGS="$TARGET_CFLAGS -mlong-calls"
860
890
  fi
 
891
  AC_CACHE_CHECK([whether option -mthumb-interwork works], grub_cv_cc_mthumb_interwork, [
 
892
    CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
 
893
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
 
894
                      [grub_cv_cc_mthumb_interwork=yes],
 
895
                      [grub_cv_cc_mthumb_interwork=no])
 
896
  ])
 
897
  if test "x$grub_cv_cc_mthumb_interwork" = xyes; then
 
898
    TARGET_CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
 
899
  elif test "x$grub_cv_cc_target_clang" = xno ; then
 
900
    AC_MSG_ERROR([your compiler doesn't support -mthumb-interwork])
 
901
  else
 
902
    CFLAGS="$TARGET_CFLAGS"
 
903
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
 
904
#if defined (__thumb__) && !defined (__thumb2__)
 
905
#error thumb without interworking
 
906
#endif
 
907
]])],
 
908
                      [no_interwork_ok=yes],
 
909
                      [no_interwork_ok=no])
 
910
    if test x$no_interwork_ok = xno ; then
 
911
       AC_MSG_ERROR([attempt to compile to thumb with no thumb interwork])
 
912
    fi
 
913
  fi
 
914
fi
 
915
 
 
916
AC_CACHE_CHECK([whether option -Qn works], grub_cv_target_cc_qn, [
 
917
  CFLAGS="$TARGET_CFLAGS -Qn -Werror"
 
918
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
 
919
                    [grub_cv_target_cc_qn=yes],
 
920
                    [grub_cv_target_cc_qn=no])])
 
921
if test "x$grub_cv_target_cc_qn" = xyes; then
 
922
  TARGET_CFLAGS="$TARGET_CFLAGS -Qn"
861
923
fi
862
924
 
863
925
#
948
1010
if test "x$TARGET_APPLE_LINKER" = x1 ; then
949
1011
CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
950
1012
else
951
 
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wno-error"
 
1013
CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
952
1014
fi
953
1015
CPPFLAGS="$TARGET_CPPFLAGS"
954
1016
if test x$target_cpu = xi386 || test x$target_cpu = xx86_64 || test "x$grub_cv_cc_target_clang" = xyes ; then
962
1024
grub_ASM_USCORE
963
1025
if test "x$TARGET_APPLE_LINKER" = x0 ; then
964
1026
if test x$grub_cv_asm_uscore = xyes; then
965
 
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,_abort=_main"
 
1027
DEFSYM="-Wl,--defsym,_abort=_main -Wl,--defsym,__main=_main"
966
1028
else
967
 
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,abort=main"
 
1029
DEFSYM="-Wl,--defsym,abort=main -Wl,--defsym,_main=main -Wl,--defsym,__main=main"
968
1030
fi
 
1031
CFLAGS="$TARGET_CFLAGS -nostdlib $DEFSYM"
969
1032
fi
970
1033
 
971
1034
# Check for libgcc symbols
974
1037
if test "x$TARGET_APPLE_LINKER" = x1 ; then
975
1038
CFLAGS="$TARGET_CFLAGS -nostdlib -static"
976
1039
else
977
 
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
 
1040
CFLAGS="$TARGET_CFLAGS -nostdlib"
978
1041
fi
979
1042
LIBS=""
980
1043
 
988
1051
  if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
989
1052
    if test ! -z "$TARGET_IMG_LDSCRIPT"; then
990
1053
      # Check symbols provided by linker script.
991
 
      CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},0x8000 -Wl,--defsym,___main=0x8100"
 
1054
      CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},0x8000"
992
1055
    fi
993
1056
    grub_CHECK_BSS_START_SYMBOL
994
1057
    grub_CHECK_END_SYMBOL
1107
1170
      [grub_emu_usb_excuse=["need libusb headers"]])
1108
1171
[fi]
1109
1172
if test x"$enable_grub_emu_usb" = xyes && test x"$grub_emu_usb_excuse" != x ; then
1110
 
  AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled])
 
1173
  AC_MSG_ERROR([USB support for grub-emu was explicitly requested but can't be compiled ($grub_emu_usb_excuse)])
1111
1174
fi
1112
1175
if test x"$grub_emu_usb_excuse" = x ; then
1113
1176
enable_grub_emu_usb=yes
1116
1179
fi
1117
1180
 
1118
1181
if test x"$enable_grub_emu_sdl" = xno ; then
1119
 
  grub_emu_sdl_excuse="explicitely disabled"
 
1182
  grub_emu_sdl_excuse="explicitly disabled"
1120
1183
fi
1121
1184
[if [ x"$grub_emu_sdl_excuse" = x ]; then
1122
1185
    # Check for libSDL libraries.]
1132
1195
[fi]
1133
1196
 
1134
1197
if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
1135
 
  AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled])
 
1198
  AC_MSG_ERROR([SDL support for grub-emu was explicitly requested but can't be compiled ($grub_emu_sdl_excuse)])
1136
1199
fi
1137
1200
if test x"$grub_emu_sdl_excuse" = x ; then
1138
1201
enable_grub_emu_sdl=yes
1212
1275
fi
1213
1276
 
1214
1277
if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
1215
 
  AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled])
 
1278
  AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled ($grub_mkfont_excuse)])
1216
1279
fi
1217
1280
if test x"$grub_mkfont_excuse" = x ; then
1218
1281
enable_grub_mkfont=yes
1271
1334
fi
1272
1335
 
1273
1336
if test x"$enable_build_grub_mkfont" = xyes && test x"$grub_build_mkfont_excuse" != x ; then
1274
 
  AC_MSG_ERROR([build-grub-mkfont was explicitly requested but can't be compiled])
 
1337
  AC_MSG_ERROR([build-grub-mkfont was explicitly requested but can't be compiled ($grub_build_mkfont_excuse)])
1275
1338
fi
1276
1339
if test x"$grub_build_mkfont_excuse" = x ; then
1277
1340
  enable_build_grub_mkfont=yes
1279
1342
  enable_build_grub_mkfont=no
1280
1343
fi
1281
1344
if test x"$enable_build_grub_mkfont" = xno && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$target_cpu"-"$platform" = xpowerpc-ieee1275 || test "x$platform" = xcoreboot ); then
1282
 
  AC_MSG_ERROR([qemu, powerpc-ieee1275, coreboot and loongson ports needs build-time grub-mkfont])
 
1345
  if test x"$grub_build_mkfont_excuse" = x ; then
 
1346
    AC_MSG_ERROR([qemu, powerpc-ieee1275, coreboot and loongson ports needs build-time grub-mkfont])
 
1347
  else
 
1348
    AC_MSG_ERROR([qemu, powerpc-ieee1275, coreboot and loongson ports needs build-time grub-mkfont ($grub_build_mkfont_excuse)])
 
1349
  fi
1283
1350
fi
1284
1351
 
1285
1352
AC_SUBST([build_freetype_cflags])
1322
1389
fi
1323
1390
 
1324
1391
if test x"$enable_grub_themes" = xyes &&  test x"$starfield_excuse" != x; then
1325
 
   AC_MSG_ERROR([themes were explicitly requested but requirements are not satisfied])
 
1392
   AC_MSG_ERROR([themes were explicitly requested but requirements are not satisfied ($starfield_excuse)])
1326
1393
fi
1327
1394
 
1328
1395
AC_SUBST([DJVU_FONT_SOURCE])
1348
1415
fi
1349
1416
 
1350
1417
if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$target_cpu"-"$platform" = xpowerpc-ieee1275 || test "x$platform" = xcoreboot ); then
1351
 
   AC_MSG_ERROR([qemu, powerpc-ieee1275, coreboot and loongson ports need unifont])
 
1418
  if test x"$grub_build_mkfont_excuse" = x ; then
 
1419
    AC_MSG_ERROR([qemu, powerpc-ieee1275, coreboot and loongson ports need unifont])
 
1420
  else
 
1421
    AC_MSG_ERROR([qemu, powerpc-ieee1275, coreboot and loongson ports need unifont ($grub_build_mkfont_excuse)])
 
1422
  fi
1352
1423
fi
1353
1424
 
1354
1425
AC_SUBST([FONT_SOURCE])
1380
1451
fi
1381
1452
 
1382
1453
if test x"$enable_grub_mount" = xyes && test x"$grub_mount_excuse" != x ; then
1383
 
  AC_MSG_ERROR([grub-mount was explicitly requested but can't be compiled])
 
1454
  AC_MSG_ERROR([grub-mount was explicitly requested but can't be compiled ($grub_mount_excuse)])
1384
1455
fi
1385
1456
if test x"$grub_mount_excuse" = x ; then
1386
1457
enable_grub_mount=yes
1448
1519
fi
1449
1520
 
1450
1521
if test x"$enable_liblzma" = xyes && test x"$liblzma_excuse" != x ; then
1451
 
  AC_MSG_ERROR([liblzma support was explicitly requested but requirements are not satisfied])
 
1522
  AC_MSG_ERROR([liblzma support was explicitly requested but requirements are not satisfied ($liblzma_excuse)])
1452
1523
fi
1453
1524
 
1454
1525
 
1485
1556
fi
1486
1557
 
1487
1558
if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
1488
 
  AC_MSG_ERROR([libzfs support was explicitly requested but requirements are not satisfied])
 
1559
  AC_MSG_ERROR([libzfs support was explicitly requested but requirements are not satisfied ($libzfs_excuse)])
1489
1560
fi
1490
1561
 
1491
1562
if test x"$libzfs_excuse" = x ; then
1514
1585
AC_SUBST(END_SYMBOL)
1515
1586
AC_SUBST(PACKAGE)
1516
1587
AC_SUBST(VERSION)
1517
 
AC_SUBST(NEED_REGISTER_FRAME_INFO)
1518
1588
 
1519
1589
AC_ARG_ENABLE([werror],
1520
1590
              [AS_HELP_STRING([--disable-werror],
1546
1616
AC_SUBST(TARGET_CCAS)
1547
1617
AC_SUBST(TARGET_OBJ2ELF)
1548
1618
AC_SUBST(TARGET_MODULE_FORMAT)
 
1619
AC_SUBST(TARGET_CC_VERSION)
1549
1620
 
1550
1621
AC_SUBST(TARGET_CFLAGS)
1551
1622
AC_SUBST(TARGET_LDFLAGS)
1552
1623
AC_SUBST(TARGET_CPPFLAGS)
1553
1624
AC_SUBST(TARGET_CCASFLAGS)
1554
1625
 
1555
 
AC_SUBST(TARGET_IMG_LDSCRIPT)
1556
1626
AC_SUBST(TARGET_IMG_LDFLAGS)
1557
1627
AC_SUBST(TARGET_IMG_CFLAGS)
1558
1628
AC_SUBST(TARGET_IMG_BASE_LDOPT)
1585
1655
AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")"  -a x$platform = xqemu_mips])
1586
1656
AM_CONDITIONAL([COND_mips_arc], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")"  -a x$platform = xarc])
1587
1657
AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275])
 
1658
AM_CONDITIONAL([COND_sparc64_emu], [test x$target_cpu = xsparc64 -a x$platform = xemu])
1588
1659
AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275])
1589
1660
AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel])
1590
1661
AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel])
1624
1695
AM_CONDITIONAL([COND_HAVE_CXX], [test x$HAVE_CXX = xyes])
1625
1696
 
1626
1697
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
1627
 
AM_CONDITIONAL([COND_CYGWIN], [test x$target_os = xcygwin])
1628
1698
AM_CONDITIONAL([COND_STARFIELD], [test "x$starfield_excuse" = x])
1629
1699
AM_CONDITIONAL([COND_HAVE_EXEC], [test "x$have_exec" = xy])
1630
1700