X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Facinclude.m4;h=9864abe23ebf59694e1579dc65589457f1ea6fc9;hb=42e58860e260edf7d92734c01b95fccf9ddb2431;hp=31a2c1632f1782cef0b31da6df4cc80cec31e6da;hpb=d0352a18a504a4e7b761f6b3264cf11347d8d056;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/acinclude.m4 b/gas/acinclude.m4 index 31a2c1632f..9864abe23e 100644 --- a/gas/acinclude.m4 +++ b/gas/acinclude.m4 @@ -1,5 +1,5 @@ dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers) -AC_DEFUN(GAS_CHECK_DECL_NEEDED,[ +AC_DEFUN([GAS_CHECK_DECL_NEEDED],[ AC_MSG_CHECKING(whether declaration is required for $1) AC_CACHE_VAL(gas_cv_decl_needed_$1, AC_TRY_LINK([$4], @@ -19,7 +19,7 @@ dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad dnl enough, but on some of those systems, the assert macro relies on requoting dnl working properly! dnl GAS_WORKING_ASSERT -AC_DEFUN(GAS_WORKING_ASSERT, +AC_DEFUN([GAS_WORKING_ASSERT], [AC_MSG_CHECKING([for working assert macro]) AC_CACHE_VAL(gas_cv_assert_ok, AC_TRY_LINK([#include @@ -37,9 +37,9 @@ test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?]) ])dnl dnl dnl Since many Bourne shell implementations lack subroutines, use this -dnl hack to simplify the code in configure.in. +dnl hack to simplify the code in configure.ac. dnl GAS_UNIQ(listvar) -AC_DEFUN(GAS_UNIQ, +AC_DEFUN([GAS_UNIQ], [_gas_uniq_list="[$]$1" _gas_uniq_newlist="" dnl Protect against empty input list. @@ -54,3 +54,41 @@ for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do done $1=[$]_gas_uniq_newlist ])dnl +dnl +dnl Check for existence of member $2 in type $1 in time.h +dnl +AC_DEFUN([GAS_HAVE_TIME_TYPE_MEMBER], +[AC_MSG_CHECKING([for $1.$2 in time.h]) + AC_CACHE_VAL(gas_cv_have_time_type_member_$2, + [AC_TRY_COMPILE([ +#define _BSD_SOURCE 1 +#include ], + [$1 avar; void* aref = (void*) &avar.$2], + gas_cv_have_time_type_member_$2=yes, + gas_cv_have_time_type_member_$2=no + )]) + if test $gas_cv_have_time_type_member_$2 = yes; then + AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z]), 1, + [Define if has $1.$2.]) + fi + AC_MSG_RESULT($gas_cv_have_time_type_member_$2) +])dnl +dnl +dnl Check for existence of member $2.$3 in type $1 in sys/stat.h +dnl +AC_DEFUN([GAS_HAVE_SYS_STAT_TYPE_MEMBER], +[AC_MSG_CHECKING([for $1.$2.$3 in sys/stat.h]) + AC_CACHE_VAL(gas_cv_have_sys_stat_type_member_$2_$3, + [AC_TRY_COMPILE([ +#define _BSD_SOURCE 1 +#include ], + [$1 avar; void* aref = (void*) &avar.$2.$3], + gas_cv_have_sys_stat_type_member_$2_$3=yes, + gas_cv_have_sys_stat_type_member_$2_$3=no + )]) + if test $gas_cv_have_sys_stat_type_member_$2_$3 = yes; then + AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_]translit($3, [a-z], [A-Z]), 1, + [Define if has $1.$2.$3]) + fi + AC_MSG_RESULT($gas_cv_have_sys_stat_type_member_$2_$3) +])dnl