* 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.
This commit is contained in:
Daniel Jacobowitz 2003-01-27 14:36:56 +00:00
parent 5cfbfc2b20
commit d9feb4e7bf
5 changed files with 489 additions and 470 deletions

View File

@ -1,3 +1,11 @@
2003-01-27 Daniel Jacobowitz <drow@mvista.com>
* 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.
2003-01-23 Jim Blandy <jimb@redhat.com>
* symfile.c (syms_from_objfile): Don't print the "(no debugging

View File

@ -188,6 +188,9 @@
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the _mcleanup function. */
#undef HAVE__MCLEANUP
/* Define if you have the canonicalize_file_name function. */
#undef HAVE_CANONICALIZE_FILE_NAME
@ -200,6 +203,9 @@
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the monstartup function. */
#undef HAVE_MONSTARTUP
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP

921
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -642,6 +642,9 @@ maintenance_show_cmd (char *args, int from_tty)
/* Profiling support. */
static int maintenance_profile_p;
#if defined (HAVE_MONSTARTUP) && defined (HAVE__MCLEANUP)
static int profiling_state;
static void
@ -685,6 +688,13 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
_mcleanup ();
}
}
#else
static void
maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
{
warning ("Profiling support is not available on this system.");
}
#endif
void
_initialize_maint_cmds (void)