aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-24 10:45:45 -0600
committerTom Tromey <tromey@redhat.com>2013-11-08 12:29:26 -0700
commit3266f10be2daf35319101f299ae988aa2bbd5297 (patch)
treee630e7c209a981097d1398996f40518cdf55810f /gdb/common
parentdb0fec5c4881dc2e65eeba47cd574379c03a4cf4 (diff)
downloadgdb-3266f10be2daf35319101f299ae988aa2bbd5297.zip
gdb-3266f10be2daf35319101f299ae988aa2bbd5297.tar.gz
gdb-3266f10be2daf35319101f299ae988aa2bbd5297.tar.bz2
introduce common.m4
It has bothered me for a while that files in common/ use macros defined via autoconf checks, but rely on each configure.ac doing the proper checks independently. This patch introduces common/common.m4 which consolidates the checks assumed by code in common. The rule I propose is that if something is needed or used by common, it should be checked for by common.m4. However, if the check is also needed by gdb or gdbserver, then it should be duplicated there. Built and regtested on x86-64 Fedora 18 (though this is hardly the most strenuous case) and using the Fedora 18 mingw cross compilers. I also examined the config.in diffs to ensure that symbols did not go missing. 2013-11-08 Tom Tromey <tromey@redhat.com> * acinclude.m4: Include common.m4. * common/common.m4: New file. * configure, config.in: Rebuild. * configure.ac: Use GDB_AC_COMMON. 2013-11-08 Tom Tromey <tromey@redhat.com> * acinclude.m4: Include common.m4, codeset.m4. * configure, config.in: Rebuild. * configure.ac: Use GDB_AC_COMMON.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/common.m438
1 files changed, 38 insertions, 0 deletions
diff --git a/gdb/common/common.m4 b/gdb/common/common.m4
new file mode 100644
index 0000000..20fbb44
--- /dev/null
+++ b/gdb/common/common.m4
@@ -0,0 +1,38 @@
+dnl Autoconf configure snippets for common.
+dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GDB.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+dnl Invoke configury needed by the files in 'common'.
+AC_DEFUN([GDB_AC_COMMON], [
+ AC_HEADER_STDC
+ AC_HEADER_DIRENT
+ AC_FUNC_ALLOCA
+
+ dnl Note that this requires codeset.m4, which is included
+ dnl by the users of common.m4.
+ AM_LANGINFO_CODESET
+
+ AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl
+ string.h strings.h dnl
+ sys/resource.h sys/socket.h sys/syscall.h dnl
+ sys/un.h sys/wait.h dnl
+ thread_db.h wait.h)
+
+ AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair])
+
+ AC_CHECK_DECLS([strerror, strstr])
+])