Enable -Werror by default
[deliverable/binutils-gdb.git] / gprof / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT
4 AC_CONFIG_SRCDIR([gprof.c])
5
6 AC_CANONICAL_TARGET([])
7 AC_ISC_POSIX
8
9 changequote(,)dnl
10 BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
11 changequote([,])dnl
12 AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION})
13
14 AM_PROG_LIBTOOL
15
16 dnl For simplicity, we use the BFD configuration file for most
17 dnl things. However, we also need our own configuration file for
18 dnl the automake PACKAGE and VERSION macros. We don't name it
19 dnl config.h, to avoid any possible confusion with the bfd config.h.
20 AC_CONFIG_HEADERS([gconfig.h:gconfig.in])
21
22 AC_PROG_CC
23 AC_PROG_INSTALL
24
25 AC_CHECK_FUNCS(setmode)
26
27 ALL_LINGUAS="fr tr sv es id da pt_BR de vi"
28 CY_GNU_GETTEXT
29
30 AM_MAINTAINER_MODE
31 AC_EXEEXT
32
33 AC_CHECK_HEADERS(sys/gmon_out.h)
34
35 build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
36
37 AC_ARG_ENABLE(error-on-warning,
38 [ --enable-error-on-warning treat compile warnings as errors],
39 [case "${enableval}" in
40 yes | y) ERROR_ON_WARNING="yes" ;;
41 no | n) ERROR_ON_WARNING="no" ;;
42 *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
43 esac])
44
45 # Enable -Werror by default, suppressing it only for --disable-error-on-warning
46 # or --disable-build-warnings.
47 if test "${ERROR_ON_WARNING}" != no
48 then
49 build_warnings="$build_warnings -Werror"
50 fi
51
52 AC_ARG_ENABLE(build-warnings,
53 [ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
54 [case "${enableval}" in
55 yes) ;;
56 no) build_warnings="-w";;
57 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
58 build_warnings="${build_warnings} ${t}";;
59 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
60 build_warnings="${t} ${build_warnings}";;
61 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
62 esac
63 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
64 echo "Setting warning flags = $build_warnings" 6>&1
65 fi])dnl
66 WARN_CFLAGS=""
67 if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
68 WARN_CFLAGS="${build_warnings}"
69 fi
70 AC_SUBST(WARN_CFLAGS)
71
72 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
73 AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]])
74 AC_OUTPUT
This page took 0.035057 seconds and 5 git commands to generate.