[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
string_h.m4 simplification
From: |
Bruno Haible |
Subject: |
string_h.m4 simplification |
Date: |
Sun, 18 Feb 2007 01:26:29 +0100 |
User-agent: |
KMail/1.5.4 |
This patch merges gl_HEADER_STRING_H_DEFAULTS and
gl_STRING_MODULE_INDICATOR_DEFAULTS into a single macro.
Since both initialize a part of the variables needed to create string.h,
and the other part is needed as well for the same purpose, it's hard to
imagine a situation where one of the two is needed but not the other one.
And even if so, the added "cost" is only a dozen of lines in configure.ac.
2007-02-17 Bruno Haible <address@hidden>
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
gl_STRING_MODULE_INDICATOR_DEFAULTS.
(gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
(gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
*** m4/string_h.m4 15 Feb 2007 03:07:04 -0000 1.20
--- m4/string_h.m4 18 Feb 2007 00:13:23 -0000
***************
*** 18,58 ****
[
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_REQUIRE([gl_STRING_MODULE_INDICATOR_DEFAULTS])
gl_ABSOLUTE_HEADER([string.h])
ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
AC_SUBST([ABSOLUTE_STRING_H])
])
- AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
- [
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
- HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
- HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
- HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
- HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
- HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
- HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
- HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
- HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
- HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
- HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
- HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
- HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
- HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
- HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
- HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
- ])
-
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once
only.
! AC_REQUIRE([gl_STRING_MODULE_INDICATOR_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
])
! AC_DEFUN([gl_STRING_MODULE_INDICATOR_DEFAULTS],
[
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
--- 18,36 ----
[
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
gl_ABSOLUTE_HEADER([string.h])
ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
AC_SUBST([ABSOLUTE_STRING_H])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once
only.
! AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
])
! AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
[
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
***************
*** 80,83 ****
--- 58,78 ----
GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
+ HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
+ HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
+ HAVE_STRCASECMP=1; AC_SUBST([HAVE_STRCASECMP])
+ HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
+ HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
+ HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
+ HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
+ HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
+ HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
+ HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
+ HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
+ HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- string_h.m4 simplification,
Bruno Haible <=