aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-01-22 23:50:35 +0000
committerDaniel Jacobowitz <drow@false.org>2003-01-22 23:50:35 +0000
commitd28f9cdffd64eccc907a788a61c75968eeb0e954 (patch)
tree26505ccef16583054609ba765abc9d5dbfe0b4af /gdb/configure.in
parente7ba9c658425d264adc54dfcf0b654cfc3df8f14 (diff)
downloadgdb-d28f9cdffd64eccc907a788a61c75968eeb0e954.zip
gdb-d28f9cdffd64eccc907a788a61c75968eeb0e954.tar.gz
gdb-d28f9cdffd64eccc907a788a61c75968eeb0e954.tar.bz2
Original patch by Tom Tromey <tromey@cygnus.com> and
Jason Molenda <jmolenda@apple.com>. * Makefile.in (PROFILE_CFLAGS): Substitute from configure. (INTERNAL_LDFLAGS): Don't include PROFILE_CFLAGS. * NEWS: Mention profiling. * configure.in (--enable-gdbtk): Fix typo. (--enable-profiling): New. Set PROFILE_CFLAGS. * maint.c (maintenance_set_profile_cmd): Remove NOTYET. Fill in function. (profiling_state): New variable. (mcleanup_wrapper): New function. (_initialize_maint): Remove NOTYET, fix call to add_setshow_boolean_cmd for "maint set profile". * configure: Regenerated.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in28
1 files changed, 27 insertions, 1 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 96694de..309ca79 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -164,7 +164,7 @@ fi
# Enable gdbtk.
AC_ARG_ENABLE(gdbtk,
-[ --enable-gtk enable gdbtk graphical user interface (GUI)],
+[ --enable-gdbtk enable gdbtk graphical user interface (GUI)],
[case $enableval in
yes | no)
;;
@@ -183,6 +183,31 @@ case $host_os in
enable_gdbtk=no ;;
esac
+# Profiling support.
+AC_ARG_ENABLE(profiling,
+[ --enable-profiling enable profiling of GDB],
+ [case $enableval in
+ yes | no)
+ ;;
+ *)
+ AC_MSG_ERROR([bad value $enableval for --enable-profile]) ;;
+ esac],
+ [enable_profiling=no])
+
+if test "$enable_profiling" = yes ; then
+ PROFILE_CFLAGS=-pg
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+
+ AC_CHECK_FUNC(monstartup, [],
+ AC_MSG_ERROR(monstartup necessary to use --enable-profiling.))
+
+ AC_CHECK_FUNC(_mcleanup, [],
+ AC_MSG_ERROR(_mcleanup necessary to use --enable-profiling.))
+
+ CFLAGS="$OLD_CFLAGS"
+fi
+
# --------------------- #
# Checks for programs. #
# --------------------- #
@@ -1164,6 +1189,7 @@ AC_SUBST(IGNORE_SIM)
AC_SUBST(IGNORE_SIM_OBS)
AC_SUBST(ENABLE_CFLAGS)
+AC_SUBST(PROFILE_CFLAGS)
AC_SUBST(CONFIG_OBS)
AC_SUBST(CONFIG_LIB_OBS)