*** empty log message ***
[deliverable/binutils-gdb.git] / gprof / configure.in
CommitLineData
252b5132
RH
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.13)
3AC_INIT(gprof.c)
4
5AC_CANONICAL_SYSTEM
5d64ca4e 6AC_ISC_POSIX
252b5132 7
27b7e12d
AM
8changequote(,)dnl
9BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
10changequote([,])dnl
11AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION})
252b5132
RH
12
13AM_PROG_LIBTOOL
14
15dnl For simplicity, we use the BFD configuration file for most
16dnl things. However, we also need our own configuration file for
17dnl the automake PACKAGE and VERSION macros. We don't name it
18dnl config.h, to avoid any possible confusion with the bfd config.h.
19AM_CONFIG_HEADER(gconfig.h:gconfig.in)
20
21AC_PROG_CC
22AC_PROG_INSTALL
23
5af11cab 24AC_CHECK_FUNCS(setmode)
252b5132
RH
25
26ALL_LINGUAS=
27CY_GNU_GETTEXT
28
29AM_MAINTAINER_MODE
30AC_EXEEXT
31
0eee5820
AM
32AC_CHECK_HEADERS(sys/gmon_out.h)
33
34AC_MSG_CHECKING(the size of gmon pointers)
35AC_TRY_RUN([#include <stdio.h>
36#include <stdlib.h>
37#if HAVE_SYS_GMON_OUT_H
38#include <sys/gmon_out.h>
39#endif
40main()
41{
42#if HAVE_SYS_GMON_OUT_H
43 struct gmon_cg_arc_record arc;
44 FILE *f=fopen("conftestval", "w");
45 if (!f) exit(1);
46 fprintf(f, "%d\n", sizeof(arc.from_pc));
47 exit(0);
48#else
49 FILE *f=fopen("conftestval", "w");
50 if (!f) exit(1);
51 fprintf(f, "%d\n", (int) sizeof(char *));
52 exit(1);
53#endif
54}], gmon_ptr_size=`cat conftestval`, gmon_ptr_size=4, gmon_ptr_size=4)
55AC_MSG_RESULT($gmon_ptr_size)
56
57AC_DEFINE_UNQUOTED(GMON_PTR_SIZE, $gmon_ptr_size)
58
a2d91340
AC
59build_warnings="-W -Wall"
60AC_ARG_ENABLE(build-warnings,
61[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
62[case "${enableval}" in
63 yes) ;;
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"`;;
70esac
71if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
72 echo "Setting warning flags = $build_warnings" 6>&1
73fi])dnl
74WARN_CFLAGS=""
75if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
76 WARN_CFLAGS="${build_warnings}"
77fi
78AC_SUBST(WARN_CFLAGS)
79
252b5132
RH
80AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
81[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
This page took 0.086795 seconds and 4 git commands to generate.