aboutsummaryrefslogtreecommitdiff
path: root/gprof/configure.in
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-03-14 03:14:56 +0000
committerAlan Modra <amodra@gmail.com>2001-03-14 03:14:56 +0000
commit0eee5820aa0f68b2283b40f5a3fb09aefcfb1575 (patch)
tree849fb8ae327bfed38a9afe6c45bed35e4a96703a /gprof/configure.in
parent04847a4d3e1cf5c5c811f8fbbdeeca498de51dc4 (diff)
downloadgdb-0eee5820aa0f68b2283b40f5a3fb09aefcfb1575.zip
gdb-0eee5820aa0f68b2283b40f5a3fb09aefcfb1575.tar.gz
gdb-0eee5820aa0f68b2283b40f5a3fb09aefcfb1575.tar.bz2
David Mosberger's fixes for cross compiling gprof.
Diffstat (limited to 'gprof/configure.in')
-rw-r--r--gprof/configure.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/gprof/configure.in b/gprof/configure.in
index a8bde47..7d6ca2c 100644
--- a/gprof/configure.in
+++ b/gprof/configure.in
@@ -29,6 +29,33 @@ CY_GNU_GETTEXT
AM_MAINTAINER_MODE
AC_EXEEXT
+AC_CHECK_HEADERS(sys/gmon_out.h)
+
+AC_MSG_CHECKING(the size of gmon pointers)
+AC_TRY_RUN([#include <stdio.h>
+#include <stdlib.h>
+#if HAVE_SYS_GMON_OUT_H
+#include <sys/gmon_out.h>
+#endif
+main()
+{
+#if HAVE_SYS_GMON_OUT_H
+ struct gmon_cg_arc_record arc;
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(arc.from_pc));
+ exit(0);
+#else
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", (int) sizeof(char *));
+ exit(1);
+#endif
+}], gmon_ptr_size=`cat conftestval`, gmon_ptr_size=4, gmon_ptr_size=4)
+AC_MSG_RESULT($gmon_ptr_size)
+
+AC_DEFINE_UNQUOTED(GMON_PTR_SIZE, $gmon_ptr_size)
+
build_warnings="-W -Wall"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],