This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Cleanup configure.in (5/n)
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 2 Jan 2003 12:14:44 +0100 (CET)
- Subject: [PATCH] Cleanup configure.in (5/n)
This addresses the checks for headers and adds a few more comments
that name a few other sections. It turned out that we checked for a
few headers that are no longer used in out sources. I removed the
relevant checks.
Checked in.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* acconfig.h (_MSE_INT_H): Remove.
* configure.in: Create "Checks for header files" section, and move
appropriate tests there. Don't check for objlist.h, wchar.h,
wctype.h and asm/debugreg.h. Rewrite Solaris 2.[78] <curses.h>
misdetection fix. Also add "Checks for types", "Checks for
compiler characteristics" and "Checks for library functions"
sections.
* config.in, configure: Regenerated.
Index: acconfig.h
===================================================================
RCS file: /cvs/src/src/gdb/acconfig.h,v
retrieving revision 1.19
diff -u -p -r1.19 acconfig.h
--- acconfig.h 26 Nov 2002 01:23:46 -0000 1.19
+++ acconfig.h 2 Jan 2003 11:07:25 -0000
@@ -1,6 +1,3 @@
-/* Define if compiling on Solaris 7. */
-#undef _MSE_INT_H
-
/* Define if your struct reg has r_fs. */
#undef HAVE_STRUCT_REG_R_FS
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.100
diff -u -p -r1.100 configure.in
--- configure.in 2 Jan 2003 00:51:28 -0000 1.100
+++ configure.in 2 Jan 2003 11:07:26 -0000
@@ -139,32 +139,70 @@ AC_CHECK_FUNC(wctype, [],
# Some systems (e.g. Solaris) have `socketpair' in libsocket.
AC_SEARCH_LIBS(socketpair, socket)
-AC_TYPE_SIGNAL
+# ------------------------- #
+# Checks for header files. #
+# ------------------------- #
AC_HEADER_DIRENT
+AC_HEADER_STAT
AC_HEADER_STDC
+AC_CHECK_HEADERS(link.h)
+AC_CHECK_HEADERS(nlist.h)
+AC_CHECK_HEADERS(poll.h sys/poll.h)
+AC_CHECK_HEADERS(proc_service.h thread_db.h)
+AC_CHECK_HEADERS(stddef.h)
+AC_CHECK_HEADERS(stdlib.h)
+AC_CHECK_HEADERS(stdint.h)
+AC_CHECK_HEADERS(string.h memory.h strings.h)
+AC_CHECK_HEADERS(sys/fault.h)
+AC_CHECK_HEADERS(sys/file.h)
+AC_CHECK_HEADERS(sys/filio.h)
+AC_CHECK_HEADERS(sys/ioctl.h)
+AC_CHECK_HEADERS(sys/param.h)
+AC_CHECK_HEADERS(sys/proc.h)
+AC_CHECK_HEADERS(sys/procfs.h)
+AC_CHECK_HEADERS(sys/ptrace.h ptrace.h)
+AC_CHECK_HEADERS(sys/reg.h sys/debugreg.h)
+AC_CHECK_HEADERS(sys/select.h)
+AC_CHECK_HEADERS(sys/syscall.h)
+AC_CHECK_HEADERS(sys/user.h)
+AC_CHECK_HEADERS(sys/wait.h wait.h)
+AC_CHECK_HEADERS(termios.h termio.h sgtty.h)
+AC_CHECK_HEADERS(unistd.h)
-dnl Solaris 7 needs _MSE_INT_H defined to avoid a clash between <widec.h>
-dnl and <wchar.h> that causes AC_CHECK_HEADERS to think <curses.h> doesn't
-dnl exist.
-
-case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
- AC_DEFINE(_MSE_INT_H)
-esac; esac
-
-AC_CHECK_HEADERS(ctype.h nlist.h link.h thread_db.h proc_service.h \
- memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
- string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
- term.h termio.h termios.h unistd.h wait.h sys/wait.h \
- wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
- time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
- sys/filio.h \
- curses.h ncurses.h \
- poll.h sys/poll.h)
-AC_HEADER_STAT
+# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
+# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
+# think that we don't have <curses.h> if we're using GCC.
+case $host_os in
+ solaris2.[[78]])
+ if test "$GCC" = yes; then
+ AC_DEFINE(_MSE_INT_H, 1,
+ [[Define to 1 to avoid a clash between <widec.h> and <wchar.h> on
+ Solaris 2.[78] when using GCC. ]])
+ fi ;;
+esac
+AC_CHECK_HEADERS(curses.h ncurses.h term.h)
+
+# FIXME: kettenis/20030102: In most cases we include these
+# unconditionally, so what's the point in checking these?
+AC_CHECK_HEADERS(ctype.h time.h)
+
+# ------------------ #
+# Checks for types. #
+# ------------------ #
+
+AC_TYPE_SIGNAL
+
+# ------------------------------------- #
+# Checks for compiler characteristics. #
+# ------------------------------------- #
AC_C_CONST
AC_C_INLINE
+
+# ------------------------------ #
+# Checks for library functions. #
+# ------------------------------ #
AC_CHECK_FUNCS(btowc canonicalize_file_name isascii poll \
realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask )