configure.ac 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. dnl Autoconf configure script for GDB support library
  2. dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
  3. dnl
  4. dnl This program is free software; you can redistribute it and/or modify
  5. dnl it under the terms of the GNU General Public License as published by
  6. dnl the Free Software Foundation; either version 3 of the License, or
  7. dnl (at your option) any later version.
  8. dnl
  9. dnl This program is distributed in the hope that it will be useful,
  10. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. dnl GNU General Public License for more details.
  13. dnl
  14. dnl You should have received a copy of the GNU General Public License
  15. dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. dnl Process this file with autoconf to produce a configure script.
  17. AC_INIT([gdbsupport], 1.0)
  18. AC_CONFIG_SRCDIR(common-defs.h)
  19. AC_CONFIG_HEADER(config.h:config.in)
  20. # Set build, build_cpu, build_vendor and build_os.
  21. AC_CANONICAL_BUILD
  22. # Set host, host_cpu, host_vendor, and host_os.
  23. AC_CANONICAL_HOST
  24. # Set target, target_cpu, target_vendor, and target_os.
  25. AC_CANONICAL_TARGET
  26. AM_MAINTAINER_MODE
  27. AC_CONFIG_AUX_DIR(..)
  28. AM_INIT_AUTOMAKE
  29. AM_SILENT_RULES([yes])
  30. AC_PROG_CC
  31. AC_PROG_CXX
  32. AC_PROG_RANLIB
  33. AC_USE_SYSTEM_EXTENSIONS
  34. ACX_LARGEFILE
  35. # We require a C++11 compiler. Check if one is available, and if
  36. # necessary, set CXX_DIALECT to some -std=xxx switch.
  37. AX_CXX_COMPILE_STDCXX(11, , mandatory)
  38. dnl Set up for gettext.
  39. ZW_GNU_GETTEXT_SISTER_DIR
  40. libiberty_INIT
  41. GDB_AC_COMMON
  42. GDB_AC_SELFTEST
  43. AM_CONDITIONAL(SELFTEST, $enable_unittests)
  44. AM_CONDITIONAL(HAVE_PIPE_OR_PIPE2,
  45. [test x$ac_cv_func_pipe = xyes -o x$ac_cv_func_pipe2 = xyes ])
  46. # Check the return and argument types of ptrace.
  47. GDB_AC_PTRACE
  48. # Detect support warning flags.
  49. AM_GDB_COMPILER_TYPE
  50. AM_GDB_WARNINGS
  51. case ${host} in
  52. *mingw32*)
  53. AC_DEFINE(USE_WIN32API, 1,
  54. [Define if we should use the Windows API, instead of the
  55. POSIX API. On Windows, we use the Windows API when
  56. building for MinGW, but the POSIX API when building
  57. for Cygwin.])
  58. ;;
  59. esac
  60. AC_CONFIG_FILES([Makefile])
  61. AC_OUTPUT