configure.ac 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. dnl Process this file with autoconf to produce a configure script.
  2. dnl
  3. dnl Copyright (C) 2012-2015 Free Software Foundation, Inc.
  4. dnl
  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.
  9. dnl
  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.
  14. dnl
  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/>.
  18. dnl
  19. AC_PREREQ(2.59)
  20. m4_include([../bfd/version.m4])
  21. AC_INIT([gprof], BFD_VERSION)
  22. AC_CONFIG_SRCDIR([gprof.c])
  23. AC_CANONICAL_TARGET([])
  24. AC_ISC_POSIX
  25. AM_INIT_AUTOMAKE
  26. dnl For simplicity, we use the BFD configuration file for most
  27. dnl things. However, we also need our own configuration file for
  28. dnl the automake PACKAGE and VERSION macros. We don't name it
  29. dnl config.h, to avoid any possible confusion with the bfd config.h.
  30. AC_CONFIG_HEADERS([gconfig.h:gconfig.in])
  31. AC_PROG_CC
  32. AC_GNU_SOURCE
  33. AC_USE_SYSTEM_EXTENSIONS
  34. AC_PROG_INSTALL
  35. LT_INIT
  36. ACX_LARGEFILE
  37. AC_CHECK_FUNCS(setmode)
  38. ALL_LINGUAS="fr tr sv es id da pt_BR de vi rw ga ms fi nl bg eo ja sr hu"
  39. ZW_GNU_GETTEXT_SISTER_DIR
  40. AM_PO_SUBDIRS
  41. AM_MAINTAINER_MODE
  42. AM_CONDITIONAL(GENINSRC_NEVER, false)
  43. AC_EXEEXT
  44. AC_CHECK_HEADERS(sys/gmon_out.h)
  45. AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
  46. AC_CACHE_VAL(gprof_cv_decl_getopt_unistd_h,
  47. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
  48. gprof_cv_decl_getopt_unistd_h=yes, gprof_cv_decl_getopt_unistd_h=no)])
  49. AC_MSG_RESULT($gprof_cv_decl_getopt_unistd_h)
  50. if test $gprof_cv_decl_getopt_unistd_h = yes; then
  51. AC_DEFINE([HAVE_DECL_GETOPT], 1,
  52. [Is the prototype for getopt in <unistd.h> in the expected format?])
  53. fi
  54. # Some systems have fabs only in -lm, not in -lc.
  55. AC_SEARCH_LIBS(fabs, m)
  56. AM_BINUTILS_WARNINGS
  57. dnl Required by html, pdf, install-pdf and install-html
  58. AC_SUBST(datarootdir)
  59. AC_SUBST(docdir)
  60. AC_SUBST(htmldir)
  61. AC_SUBST(pdfdir)
  62. AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
  63. AC_OUTPUT