1 dnl Process this file with autoconf to produce a configure script.
9 BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
11 AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION})
15 dnl For simplicity, we use the BFD configuration file for most
16 dnl things. However, we also need our own configuration file for
17 dnl the automake PACKAGE and VERSION macros. We don't name it
18 dnl config.h, to avoid any possible confusion with the bfd config.h.
19 AM_CONFIG_HEADER(gconfig.h:gconfig.in)
24 AC_CHECK_FUNCS(setmode)
32 AC_CHECK_HEADERS(sys/gmon_out.h)
34 AC_MSG_CHECKING(the size of gmon pointers)
35 AC_TRY_RUN([#include <stdio.h>
37 #if HAVE_SYS_GMON_OUT_H
38 #include <sys/gmon_out.h>
42 #if HAVE_SYS_GMON_OUT_H
43 struct gmon_cg_arc_record arc;
44 FILE *f=fopen("conftestval", "w");
46 fprintf(f, "%d\n", sizeof(arc.from_pc));
49 FILE *f=fopen("conftestval", "w");
51 fprintf(f, "%d\n", (int) sizeof(char *));
54 }], gmon_ptr_size=`cat conftestval`, gmon_ptr_size=4, gmon_ptr_size=4)
55 AC_MSG_RESULT($gmon_ptr_size)
57 AC_DEFINE_UNQUOTED(GMON_PTR_SIZE, $gmon_ptr_size)
59 build_warnings="-W -Wall"
60 AC_ARG_ENABLE(build-warnings,
61 [ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
62 [case "${enableval}" in
64 no) build_warnings="-w";;
65 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
66 build_warnings="${build_warnings} ${t}";;
67 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
68 build_warnings="${t} ${build_warnings}";;
69 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
71 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
72 echo "Setting warning flags = $build_warnings" 6>&1
75 if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
76 WARN_CFLAGS="${build_warnings}"
80 AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
81 [sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])