summaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-01-27 14:36:56 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-01-27 14:36:56 +0000
commitfa7e61083942d771d35c869a7c26e51b830c75af (patch)
tree9676b969ce877d464aefb6069cef3c37574a2dc3 /gdb/configure.in
parent3e9be04d22e03d3afcb30f1786705a1f13c76192 (diff)
downloadgdb-fa7e61083942d771d35c869a7c26e51b830c75af.tar.gz
* configure.in: Check that -pg works if using --enable-profiling.
Check for monstartup and _mcleanup regardless of --enable-profiling. * maint.c: Check for monstartup and _mcleanup before using them. * config.in: Regenerated. * configure: Regenerated.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index d1e183684db..47fa2357486 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -203,16 +203,22 @@ AC_ARG_ENABLE(profiling,
esac],
[enable_profiling=no])
+AC_CHECK_FUNCS(monstartup _mcleanup)
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)
+ fi
PROFILE_CFLAGS=-pg
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PROFILE_CFLAGS"
- AC_CHECK_FUNC(monstartup, [],
- AC_MSG_ERROR(monstartup necessary to use --enable-profiling.))
+ AC_CACHE_CHECK([whether $CC supports -pg], ac_cv_cc_supports_pg,
+ [AC_TRY_COMPILE([], [int x;], ac_cv_cc_supports_pg=yes,
+ ac_cv_cc_supports_pg=no)])
- AC_CHECK_FUNC(_mcleanup, [],
- AC_MSG_ERROR(_mcleanup necessary to use --enable-profiling.))
+ if test $ac_cv_cc_supports_pg = no; then
+ AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg)
+ fi
CFLAGS="$OLD_CFLAGS"
fi