Commit | Line | Data |
---|---|---|
252b5132 | 1 | dnl Process this file with autoconf to produce a configure script. |
5bf135a7 | 2 | dnl |
6f2750fe | 3 | dnl Copyright (C) 2012-2016 Free Software Foundation, Inc. |
5bf135a7 NC |
4 | dnl |
5 | dnl This file is free software; you can redistribute it and/or modify | |
6 | dnl it under the terms of the GNU General Public License as published by | |
7 | dnl the Free Software Foundation; either version 3 of the License, or | |
8 | dnl (at your option) any later version. | |
f3445b37 | 9 | dnl |
5bf135a7 NC |
10 | dnl This program is distributed in the hope that it will be useful, |
11 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | dnl GNU General Public License for more details. | |
f3445b37 | 14 | dnl |
5bf135a7 NC |
15 | dnl You should have received a copy of the GNU General Public License |
16 | dnl along with this program; see the file COPYING3. If not see | |
17 | dnl <http://www.gnu.org/licenses/>. | |
18 | dnl | |
6bf9431b | 19 | AC_PREREQ(2.59) |
2e98a7bd AM |
20 | m4_include([../bfd/version.m4]) |
21 | AC_INIT([gprof], BFD_VERSION) | |
6bf9431b | 22 | AC_CONFIG_SRCDIR([gprof.c]) |
252b5132 | 23 | |
6bf9431b | 24 | AC_CANONICAL_TARGET([]) |
5d64ca4e | 25 | AC_ISC_POSIX |
252b5132 | 26 | |
2e98a7bd | 27 | AM_INIT_AUTOMAKE |
252b5132 | 28 | |
252b5132 RH |
29 | dnl For simplicity, we use the BFD configuration file for most |
30 | dnl things. However, we also need our own configuration file for | |
31 | dnl the automake PACKAGE and VERSION macros. We don't name it | |
32 | dnl config.h, to avoid any possible confusion with the bfd config.h. | |
6bf9431b | 33 | AC_CONFIG_HEADERS([gconfig.h:gconfig.in]) |
252b5132 RH |
34 | |
35 | AC_PROG_CC | |
0ab6f085 | 36 | AC_GNU_SOURCE |
7357c5b6 | 37 | AC_USE_SYSTEM_EXTENSIONS |
252b5132 RH |
38 | AC_PROG_INSTALL |
39 | ||
da594c4a | 40 | LT_INIT |
b879806f | 41 | ACX_LARGEFILE |
ce2cded5 | 42 | |
5af11cab | 43 | AC_CHECK_FUNCS(setmode) |
252b5132 | 44 | |
ba241f2d | 45 | ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga ms fi nl bg eo ja sr hu" |
20e95c23 DJ |
46 | ZW_GNU_GETTEXT_SISTER_DIR |
47 | AM_PO_SUBDIRS | |
252b5132 RH |
48 | |
49 | AM_MAINTAINER_MODE | |
d5fbea21 | 50 | AM_CONDITIONAL(GENINSRC_NEVER, false) |
252b5132 RH |
51 | AC_EXEEXT |
52 | ||
0eee5820 AM |
53 | AC_CHECK_HEADERS(sys/gmon_out.h) |
54 | ||
34875e64 NC |
55 | AC_MSG_CHECKING(for a known getopt prototype in unistd.h) |
56 | AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h, | |
da594c4a | 57 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])], |
34875e64 NC |
58 | gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)]) |
59 | AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h) | |
60 | if test $gprof_cv_decl_getopt_unistd_h = yes; then | |
61 | AC_DEFINE([HAVE_DECL_GETOPT], 1, | |
62 | [Is the prototype for getopt in <unistd.h> in the expected format?]) | |
63 | fi | |
64 | ||
1b9750d6 NC |
65 | # Some systems have fabs only in -lm, not in -lc. |
66 | AC_SEARCH_LIBS(fabs, m) | |
67 | ||
9e9b66a9 | 68 | AM_BINUTILS_WARNINGS |
a2d91340 | 69 | |
31dd3154 | 70 | dnl Required by html, pdf, install-pdf and install-html |
108a6f8e CD |
71 | AC_SUBST(datarootdir) |
72 | AC_SUBST(docdir) | |
73 | AC_SUBST(htmldir) | |
31dd3154 | 74 | AC_SUBST(pdfdir) |
108a6f8e | 75 | |
6bf9431b | 76 | AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) |
6bf9431b | 77 | AC_OUTPUT |