diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2000-04-04 02:08:52 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2000-04-04 02:08:52 +0000 |
commit | 8898755195dbdc1b44c494477ddc0367ab32cd9a (patch) | |
tree | 6109bad94af5367f9c510dc49dbce041b89cdbf2 /gdb/configure.in | |
parent | afc05dd4fd2d4e7faee1d8b210a740275e19e329 (diff) | |
download | gdb-8898755195dbdc1b44c494477ddc0367ab32cd9a.zip gdb-8898755195dbdc1b44c494477ddc0367ab32cd9a.tar.gz gdb-8898755195dbdc1b44c494477ddc0367ab32cd9a.tar.bz2 |
2000-04-03 H.J. Lu <hjl@gnu.org>
* gdb_regex.h: New. Include "regex.h" if USE_INCLUDED_REGEX
is defined and <regex.h> otherwise.
* irix5-nat.c: Include "gdb_regex.h" instead of "gnu-regex.h".
* monitor.c: Likewise.
* osfsolib.c: Likewise.
* solib.c: Likewise.
* source.c: Likewise.
* symtab.c: Likewise.
* Makefile.in (REGEX): Changed to @REGEX@.
(REGEX_CFLAGS): New.
(REGEX1): Removed.
(ADD_DEPS): Use $(REGEX) instead of $(REGEX1).
(INTERNAL_WARN_CFLAGS): Add $(REGEX_CFLAGS).
* configure.in (--with-included-regex): New switch.
(REGEX): New. Subsstitue @REGEX@ in Makefile.in.
(REGEX_CFLAGS): New. Subsstitue @REGEX_CFLAGS@ in Makefile.in.
* configure: Regenerated.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r-- | gdb/configure.in | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index c2c5df6..e486cb5 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -503,6 +503,36 @@ if test x$want_mmalloc = xtrue; then MMALLOC='../mmalloc/libmmalloc.a' fi +AC_ARG_WITH(included-regex, +[ --with-included-regex Use included regex], +[case "${withval}" in + yes) want_included_regex=true ;; + no) want_included_regex=false;; + *) AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;; +esac],[want_included_regex=true])dnl + +REGEX="gnu-regex.o" +REGEX_CFLAGS="-DUSE_INCLUDED_REGEX" +if test $want_included_regex = false; then + AC_MSG_CHECKING(for GNU regex) + AC_CACHE_VAL(gdb_cv_have_gnu_regex, +[AC_TRY_COMPILE([#include <gnu-versions.h> +#include <sys/types.h> +#include <regex.h>], +[#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2 +#error No valid GNU regex. +#endif +], + [gdb_cv_have_gnu_regex=yes], + [gdb_cv_have_gnu_regex=no])]) + AC_MSG_RESULT($gdb_cv_have_gnu_regex) + if test $gdb_cv_have_gnu_regex = yes; then + REGEX= + REGEX_CFLAGS= + fi +fi +AC_SUBST(REGEX) +AC_SUBST(REGEX_CFLAGS) # In the Cygwin environment, we need some additional flags. AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin, |