summaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-02-14 20:07:00 +0000
committerMark Kettenis <kettenis@gnu.org>2003-02-14 20:07:00 +0000
commitd44872e52f9015a8878eb7b40eefb33bd051133c (patch)
treeba95be194e6da51f591241727e4abbfa082dc148 /gdb/configure.in
parent276df42d090ce626048587bbcad4e23495920cb6 (diff)
downloadgdb-d44872e52f9015a8878eb7b40eefb33bd051133c.tar.gz
* configure.in: Add check for _etext.
* maint.c (maintenance_set_profile_cmd): Use etext if _etext isn't available. * config.in, configure: regenerated.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 65b62f0432c..eb946f33f51 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 <stdlib.h>
+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)