1ed0d50c3Schristosdnl Process this file with autoconf to produce a configure script.
2ed0d50c3Schristosdnl
3*b88e3e88Schristosdnl   Copyright (C) 2012-2020 Free Software Foundation, Inc.
4ed0d50c3Schristosdnl
5ed0d50c3Schristosdnl This file is free software; you can redistribute it and/or modify
6ed0d50c3Schristosdnl it under the terms of the GNU General Public License as published by
7ed0d50c3Schristosdnl the Free Software Foundation; either version 3 of the License, or
8ed0d50c3Schristosdnl (at your option) any later version.
9ed0d50c3Schristosdnl
10ed0d50c3Schristosdnl This program is distributed in the hope that it will be useful,
11ed0d50c3Schristosdnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12ed0d50c3Schristosdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13ed0d50c3Schristosdnl GNU General Public License for more details.
14ed0d50c3Schristosdnl
15ed0d50c3Schristosdnl You should have received a copy of the GNU General Public License
16ed0d50c3Schristosdnl along with this program; see the file COPYING3.  If not see
17ed0d50c3Schristosdnl <http://www.gnu.org/licenses/>.
18ed0d50c3Schristosdnl
19ed0d50c3Schristosm4_include([../bfd/version.m4])
20ed0d50c3SchristosAC_INIT([gprof], BFD_VERSION)
21ed0d50c3SchristosAC_CONFIG_SRCDIR([gprof.c])
22ed0d50c3Schristos
23ed0d50c3SchristosAC_CANONICAL_TARGET([])
24ed0d50c3SchristosAC_ISC_POSIX
25ed0d50c3Schristos
26ed0d50c3SchristosAM_INIT_AUTOMAKE
27ed0d50c3Schristos
28ed0d50c3Schristosdnl For simplicity, we use the BFD configuration file for most
29ed0d50c3Schristosdnl things.  However, we also need our own configuration file for
30ed0d50c3Schristosdnl the automake PACKAGE and VERSION macros.  We don't name it
31ed0d50c3Schristosdnl config.h, to avoid any possible confusion with the bfd config.h.
32ed0d50c3SchristosAC_CONFIG_HEADERS([gconfig.h:gconfig.in])
33ed0d50c3Schristos
34ed0d50c3SchristosAC_PROG_CC
35ed0d50c3SchristosAC_GNU_SOURCE
36ed0d50c3SchristosAC_USE_SYSTEM_EXTENSIONS
37ed0d50c3SchristosAC_PROG_INSTALL
38ed0d50c3Schristos
39ed0d50c3SchristosLT_INIT
40ed0d50c3SchristosACX_LARGEFILE
41ed0d50c3Schristos
42ed0d50c3SchristosAC_CHECK_FUNCS(setmode)
43ed0d50c3Schristos
4406324dcfSchristosALL_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"
45ed0d50c3SchristosZW_GNU_GETTEXT_SISTER_DIR
46ed0d50c3SchristosAM_PO_SUBDIRS
47ed0d50c3Schristos
48ed0d50c3SchristosAM_MAINTAINER_MODE
49ed0d50c3SchristosAM_CONDITIONAL(GENINSRC_NEVER, false)
50ed0d50c3SchristosAC_EXEEXT
51ed0d50c3Schristos
52ed0d50c3SchristosAC_CHECK_HEADERS(sys/gmon_out.h)
53ed0d50c3Schristos
54ed0d50c3SchristosAC_MSG_CHECKING(for a known getopt prototype in unistd.h)
55ed0d50c3SchristosAC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h,
56ed0d50c3Schristos[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
57ed0d50c3Schristosgprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)])
58ed0d50c3SchristosAC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h)
59ed0d50c3Schristosif test $gprof_cv_decl_getopt_unistd_h = yes; then
60ed0d50c3Schristos  AC_DEFINE([HAVE_DECL_GETOPT], 1,
61ed0d50c3Schristos	    [Is the prototype for getopt in <unistd.h> in the expected format?])
62ed0d50c3Schristosfi
63ed0d50c3Schristos
64ed0d50c3Schristos# Some systems have fabs only in -lm, not in -lc.
65ed0d50c3SchristosAC_SEARCH_LIBS(fabs, m)
66ed0d50c3Schristos
67ed0d50c3SchristosAM_BINUTILS_WARNINGS
68ed0d50c3Schristos
69ed0d50c3Schristosdnl Required by html, pdf, install-pdf and install-html
70ed0d50c3SchristosAC_SUBST(datarootdir)
71ed0d50c3SchristosAC_SUBST(docdir)
72ed0d50c3SchristosAC_SUBST(htmldir)
73ed0d50c3SchristosAC_SUBST(pdfdir)
74ed0d50c3Schristos
75ed0d50c3SchristosAC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
76ed0d50c3SchristosAC_OUTPUT
77