From b0b1c2c0ebc1f12ddf52682d75c3dc7bcbbe55ca Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 14 Feb 2003 20:07:00 +0000 Subject: * configure.in: Add check for _etext. * maint.c (maintenance_set_profile_cmd): Use etext if _etext isn't available. * config.in, configure: regenerated. --- gdb/configure.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/configure.in') diff --git a/gdb/configure.in b/gdb/configure.in index 65b62f0..eb946f3 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -204,6 +204,16 @@ AC_ARG_ENABLE(profiling, [enable_profiling=no]) AC_CHECK_FUNCS(monstartup _mcleanup) +AC_CACHE_CHECK([for _etext], ac_cv_var__etext, +[AC_TRY_LINK( +[#include +extern char _etext; +], +[free (&_etext);], ac_cv_var__etext=yes, ac_cv_var__etext=no)]) +if test $ac_cv_var__etext = yes; then + AC_DEFINE(HAVE__ETEXT, 1, + [Define to 1 if your system has the _etext variable. ]) +fi if test "$enable_profiling" = yes ; then if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then AC_MSG_ERROR(--enable-profiling requires monstartup and _mcleanup) -- cgit v1.1