From: Alan Modra Date: Mon, 18 Jun 2012 04:23:15 +0000 (+0000) Subject: * configure.in: Check DECLS for free, getenv, malloc, realloc, X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a574142b3eeecca344737b380438e7a3cb6427ae;p=deliverable%2Fbinutils-gdb.git * configure.in: Check DECLS for free, getenv, malloc, realloc, * configure: Regenerate. * config.in: Likewise. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 7860d0f503..aca611ea6f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2012-06-18 Iain Sandoe + + * configure.in: Check DECLS for free, getenv, malloc, realloc, + * configure: Regenerate. + * config.in: Likewise. + 2012-06-13 H.J. Lu * config/tc-i386.c (x86_address_bytes): New. diff --git a/gas/config.in b/gas/config.in index eb6cf03bac..7c6e23764f 100644 --- a/gas/config.in +++ b/gas/config.in @@ -70,6 +70,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H +/* Define to 1 if you have the `free' function. */ +#undef HAVE_FREE + +/* Define to 1 if you have the `getenv' function. */ +#undef HAVE_GETENV + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -82,9 +88,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H +/* Define to 1 if you have the `malloc' function. */ +#undef HAVE_MALLOC + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `realloc' function. */ +#undef HAVE_REALLOC + /* Define to 1 if you have the `remove' function. */ #undef HAVE_REMOVE @@ -100,12 +112,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H +/* Define to 1 if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + /* Define if has struct stat.st_mtim.tv_nsec */ #undef HAVE_ST_MTIM_TV_NSEC diff --git a/gas/configure b/gas/configure index c3586f0097..c1fd3aae4f 100755 --- a/gas/configure +++ b/gas/configure @@ -13478,31 +13478,20 @@ _ACEOF fi done - -# Some systems don't have sbrk(). -for ac_func in sbrk +for ac_func in free getenv malloc realloc sbrk setlocale stpcpy strstr do : - ac_fn_c_check_func "$LINENO" "sbrk" "ac_cv_func_sbrk" -if test "x$ac_cv_func_sbrk" = x""yes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SBRK 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -for ac_func in setlocale -do : - ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETLOCALE 1 -_ACEOF - -fi -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } diff --git a/gas/configure.in b/gas/configure.in index 1f16e70a56..f29dc12ba1 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -663,11 +663,8 @@ AC_C_INLINE # VMS doesn't have unlink. AC_CHECK_FUNCS(unlink remove, break) +AC_CHECK_FUNCS(free getenv malloc realloc sbrk setlocale stpcpy strstr) -# Some systems don't have sbrk(). -AC_CHECK_FUNCS(sbrk) - -AC_CHECK_FUNCS(setlocale) AM_LC_MESSAGES # do we need the math library?