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})
16 # The trailing component of the string reported as the version number
17 # by gdb. For an official FSF release, it is empty.
18 AC_ARG_WITH(versuffix,
19 AS_HELP_STRING([--with-versuffix=SFX],
20 [Append SFX to the version string]),
22 yes) AC_MSG_ERROR([version suffix not specified]) ;;
23 no) VERSUFFIX=" (CodeSourcery Unofficial)" ;;
24 *) VERSUFFIX=" ($withval)" ;;
31 # The location to which bugs should be reported.
33 AS_HELP_STRING([--with-bugurl=URL],
34 [Direct users to URL to report a bug]),
36 yes) AC_MSG_ERROR([bug URL not specified]) ;;
37 no) REPORT_BUGS_TO="" ;;
38 *) REPORT_BUGS_TO="<URL:$withval>" ;;
42 AC_SUBST(REPORT_BUGS_TO)
44 dnl For simplicity, we use the BFD configuration file for most
45 dnl things. However, we also need our own configuration file for
46 dnl the automake PACKAGE and VERSION macros. We don't name it
47 dnl config.h, to avoid any possible confusion with the bfd config.h.
48 AC_CONFIG_HEADERS([gconfig.h:gconfig.in])
53 AC_CHECK_FUNCS(setmode)
55 ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga"
61 AC_CHECK_HEADERS(sys/gmon_out.h)
63 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
64 AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h,
65 [AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
66 gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)])
67 AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h)
68 if test $gprof_cv_decl_getopt_unistd_h = yes; then
69 AC_DEFINE([HAVE_DECL_GETOPT], 1,
70 [Is the prototype for getopt in <unistd.h> in the expected format?])
75 dnl Required by html and install-html
80 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
81 AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]])