binutils/
[binutils.git] / gprof / configure.in
blob0aed56d9a4cea7299685a3db80b3ff57b66155ce
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT
4 AC_CONFIG_SRCDIR([gprof.c])
6 AC_CANONICAL_TARGET([])
7 AC_ISC_POSIX
9 changequote(,)dnl
10 BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[         ]*\([^  ]*\)[   ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
11 changequote([,])dnl
12 AM_INIT_AUTOMAKE(gprof, ${BFD_VERSION})
14 AM_PROG_LIBTOOL
16 # Package version.  For an official FSF release, it is empty.
17 AC_ARG_WITH(pkgversion,
18   AS_HELP_STRING([--with-pkgversion=PKG],
19                  [Add PKG to the version string]),
20   [case "$withval" in
21     yes) AC_MSG_ERROR([package version not specified]) ;;
22     no)  PKGVERSION= ;;
23     *)   PKGVERSION="($withval) " ;;
24    esac],
25   PKGVERSION=
27 AC_SUBST(PKGVERSION)
29 # The location to which bugs should be reported.
30 AC_ARG_WITH(bugurl,
31   AS_HELP_STRING([--with-bugurl=URL],
32                  [Direct users to URL to report a bug]),
33   [case "$withval" in
34     yes) AC_MSG_ERROR([bug URL not specified]) ;;
35     no)  REPORT_BUGS_TO="" ;;
36     *)   REPORT_BUGS_TO="<URL:$withval>" ;;
37    esac],
38    REPORT_BUGS_TO="<URL:http://www.sourceware.org/bugzilla/>"
40 AC_SUBST(REPORT_BUGS_TO)
42 dnl For simplicity, we use the BFD configuration file for most
43 dnl things.  However, we also need our own configuration file for
44 dnl the automake PACKAGE and VERSION macros.  We don't name it
45 dnl config.h, to avoid any possible confusion with the bfd config.h.
46 AC_CONFIG_HEADERS([gconfig.h:gconfig.in])
48 AC_PROG_CC
49 AC_PROG_INSTALL
51 AC_CHECK_FUNCS(setmode)
53 ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga"
54 CY_GNU_GETTEXT
56 AM_MAINTAINER_MODE
57 AC_EXEEXT
59 AC_CHECK_HEADERS(sys/gmon_out.h)
61 AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
62 AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h,
63 [AC_TRY_COMPILE([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);],
64 gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)])
65 AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h)
66 if test $gprof_cv_decl_getopt_unistd_h = yes; then
67   AC_DEFINE([HAVE_DECL_GETOPT], 1,
68             [Is the prototype for getopt in <unistd.h> in the expected format?])
71 AM_BINUTILS_WARNINGS
73 dnl Required by html and install-html
74 AC_SUBST(datarootdir)
75 AC_SUBST(docdir)
76 AC_SUBST(htmldir)
78 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
79 AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]])
80 AC_OUTPUT