diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-01-27 14:36:56 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-01-27 14:36:56 +0000 |
commit | d9feb4e7bfd6d419ccc49092d750c480319b5614 (patch) | |
tree | cb5b40ffbc4cfba811fe758bc4c4a9d52964d596 /gdb/configure.in | |
parent | 5cfbfc2b20bb18a0a9ff530935ae044f6caeecff (diff) | |
download | gdb-d9feb4e7bfd6d419ccc49092d750c480319b5614.zip gdb-d9feb4e7bfd6d419ccc49092d750c480319b5614.tar.gz gdb-d9feb4e7bfd6d419ccc49092d750c480319b5614.tar.bz2 |
* 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.in | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index d1e1836..47fa235 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 |