1 dnl Process this file with autoconf to produce a configure script.
4 AC_CONFIG_SRCDIR([gprof.c])
6 AC_CANONICAL_TARGET([])
10 BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
12 AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION})
14 dnl For simplicity, we use the BFD configuration file for most
15 dnl things. However, we also need our own configuration file for
16 dnl the automake PACKAGE and VERSION macros. We don't name it
17 dnl config.h, to avoid any possible confusion with the bfd config.h.
18 AC_CONFIG_HEADERS([gconfig.h:gconfig.in])
22 AC_USE_SYSTEM_EXTENSIONS
28 AC_CHECK_FUNCS(setmode)
30 ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga ms fi nl bg eo ja sr"
31 ZW_GNU_GETTEXT_SISTER_DIR
35 AM_CONDITIONAL(GENINSRC_NEVER, false)
38 AC_CHECK_HEADERS(sys/gmon_out.h)
40 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
41 AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h,
42 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
43 gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)])
44 AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h)
45 if test $gprof_cv_decl_getopt_unistd_h = yes; then
46 AC_DEFINE([HAVE_DECL_GETOPT], 1,
47 [Is the prototype for getopt in <unistd.h> in the expected format?])
50 # Some systems have fabs only in -lm, not in -lc.
51 AC_SEARCH_LIBS(fabs, m)
55 dnl Required by html, pdf, install-pdf and install-html
61 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])