comparison config/acx.m4 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 77e2b8dfacca
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
233 rm -f conf$$.sh 233 rm -f conf$$.sh
234 fi 234 fi
235 ]) 235 ])
236 236
237 237
238 dnl ####
239 dnl # GCC_BASE_VER
240 dnl # Determine GCC version number to use in compiler directories.
241
242 AC_DEFUN([GCC_BASE_VER],
243 [
244 get_gcc_base_ver="cat"
245 AC_ARG_WITH(gcc-major-version-only,
246 [AS_HELP_STRING([--with-gcc-major-version-only], [use only GCC major number in filesystem paths])],
247 [if test x$with_gcc_major_version_only = xyes ; then
248 changequote(,)dnl
249 get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
250 changequote([,])dnl
251 fi
252 ])
253 AC_SUBST(get_gcc_base_ver)
254 ])
255
256
238 AC_DEFUN([ACX_TOOL_DIRS], [ 257 AC_DEFUN([ACX_TOOL_DIRS], [
239 AC_REQUIRE([ACX_PATH_SEP]) 258 AC_REQUIRE([ACX_PATH_SEP])
259 AC_REQUIRE([GCC_BASE_VER])
240 if test "x$exec_prefix" = xNONE; then 260 if test "x$exec_prefix" = xNONE; then
241 if test "x$prefix" = xNONE; then 261 if test "x$prefix" = xNONE; then
242 gcc_cv_tool_prefix=$ac_default_prefix 262 gcc_cv_tool_prefix=$ac_default_prefix
243 else 263 else
244 gcc_cv_tool_prefix=$prefix 264 gcc_cv_tool_prefix=$prefix
249 269
250 # If there is no compiler in the tree, use the PATH only. In any 270 # If there is no compiler in the tree, use the PATH only. In any
251 # case, if there is no compiler in the tree nobody should use 271 # case, if there is no compiler in the tree nobody should use
252 # AS_FOR_TARGET and LD_FOR_TARGET. 272 # AS_FOR_TARGET and LD_FOR_TARGET.
253 if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then 273 if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
254 gcc_version=`cat $srcdir/gcc/BASE-VER` 274 if test x$with_gcc_major_version_only = xyes ; then
275 changequote(,)dnl
276 gcc_version=`sed -e 's/^\([0-9]*\).*$/\1/' $srcdir/gcc/BASE-VER`
277 changequote([,])dnl
278 else
279 gcc_version=`cat $srcdir/gcc/BASE-VER`
280 fi
255 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" 281 gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
256 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR" 282 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
257 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" 283 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
258 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR" 284 gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
259 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR" 285 gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
354 [AC_REQUIRE([AC_PROG_CPP])dnl 380 [AC_REQUIRE([AC_PROG_CPP])dnl
355 m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD])) 381 m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD]))
356 ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR 382 ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
357 383
358 # Test for GNAT. 384 # Test for GNAT.
359 # We require the gnatbind program, and a compiler driver that 385 # We require the gnatbind & gnatmake programs, as well as a compiler driver
360 # understands Ada. We use the user's CC setting, already found, 386 # that understands Ada. We use the user's CC setting, already found, and
361 # and possibly add $1 to the command-line parameters. 387 # possibly add $1 to the command-line parameters.
362 # 388 #
363 # Sets the shell variable have_gnat to yes or no as appropriate, and 389 # Sets the shell variable have_gnat to yes or no as appropriate, and
364 # substitutes GNATBIND and GNATMAKE. 390 # substitutes GNATBIND and GNATMAKE.
365 AC_DEFUN([ACX_PROG_GNAT], 391 AC_DEFUN([ACX_PROG_GNAT],
366 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) 392 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
385 if test x"$errors" = x && test -f conftest.$ac_objext; then 411 if test x"$errors" = x && test -f conftest.$ac_objext; then
386 acx_cv_cc_gcc_supports_ada=yes 412 acx_cv_cc_gcc_supports_ada=yes
387 fi 413 fi
388 rm -f conftest.*]) 414 rm -f conftest.*])
389 415
390 if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then 416 if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
391 have_gnat=yes 417 have_gnat=yes
392 else 418 else
393 have_gnat=no 419 have_gnat=no
394 fi 420 fi
395 ]) 421 ])
402 dnl accepted by cmp on some systems. 428 dnl accepted by cmp on some systems.
403 AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL], 429 AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
404 [AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip, 430 [AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip,
405 [ echo abfoo >t1 431 [ echo abfoo >t1
406 echo cdfoo >t2 432 echo cdfoo >t2
407 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2' 433 gcc_cv_prog_cmp_skip='tail -c +17 $$f1 > tmp-foo1; tail -c +17 $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
408 if cmp t1 t2 2 2 > /dev/null 2>&1; then 434 if cmp t1 t2 2 2 > /dev/null 2>&1; then
409 if cmp t1 t2 1 1 > /dev/null 2>&1; then 435 if cmp t1 t2 1 1 > /dev/null 2>&1; then
410 : 436 :
411 else 437 else
412 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16' 438 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'