1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2012-2021 Free Software Foundation, Inc.
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.
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.
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/>.
19 m4_include([../bfd/version.m4])
20 AC_INIT([gprof], BFD_VERSION)
21 AC_CONFIG_SRCDIR([gprof.c])
23 AC_CANONICAL_TARGET([])
28 dnl For simplicity, we use the BFD configuration file for most
29 dnl things. However, we also need our own configuration file for
30 dnl the automake PACKAGE and VERSION macros. We don't name it
31 dnl config.h, to avoid any possible confusion with the bfd config.h.
32 AC_CONFIG_HEADERS([gconfig.h:gconfig.in])
36 AC_USE_SYSTEM_EXTENSIONS
42 AC_CHECK_FUNCS(setmode)
44 ALL_LINGUAS="bg da de eo es fi fr ga hu id it ja ms nl pt_BR ro ru rw sr sv tr uk vi"
45 ZW_GNU_GETTEXT_SISTER_DIR
49 AM_CONDITIONAL(GENINSRC_NEVER, false)
52 AC_CHECK_HEADERS(sys/gmon_out.h)
54 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
55 AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h,
56 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
57 gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)])
58 AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h)
59 if test $gprof_cv_decl_getopt_unistd_h = yes; then
60 AC_DEFINE([HAVE_DECL_GETOPT], 1,
61 [Is the prototype for getopt in <unistd.h> in the expected format?])
64 # Some systems have fabs only in -lm, not in -lc.
65 AC_SEARCH_LIBS(fabs, m)
69 dnl Required by html, pdf, install-pdf and install-html
75 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])