summaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2007-09-19 22:00:34 +0000
committerJoel Brobecker <brobecker@gnat.com>2007-09-19 22:00:34 +0000
commit876bc05c1f54d5c8c3e50f43efccca80dd164ecc (patch)
tree9a8e99d482d2bad27533888dce080c6c562b4ed0 /gdb/configure
parent9d503d0810dd775ca6dac11367174a24a578c68d (diff)
downloadgdb-876bc05c1f54d5c8c3e50f43efccca80dd164ecc.tar.gz
* configure.ac: Add check for "etext".
* configure, config.in: Regenerate. * maint.c (TEXTEND): Only define if either _etext or etext are available. Disable the profiling functionality if TEXTEND is not defined.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure63
1 files changed, 63 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure
index 7b90943a15f..1dd4fb466b3 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -4278,6 +4278,69 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
+echo "$as_me:$LINENO: checking for etext" >&5
+echo $ECHO_N "checking for etext... $ECHO_C" >&6
+if test "${ac_cv_var_etext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+extern char etext;
+
+int
+main ()
+{
+free (&etext);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_var_etext=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_etext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5
+echo "${ECHO_T}$ac_cv_var_etext" >&6
+if test $ac_cv_var_etext = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ETEXT 1
+_ACEOF
+
+fi
if test "$enable_profiling" = yes ; then
if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
{ { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5