Mercurial > hg > octave-lyh > gnulib-hg
changeset 13071:b2385e7b332e
Distinguish two kinds of module indicators.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 28 Mar 2010 00:31:39 +0100 |
parents | 71d59ec8c75f |
children | 385f7bc58923 |
files | ChangeLog m4/dirent_h.m4 m4/fcntl_h.m4 m4/gnulib-common.m4 m4/langinfo_h.m4 m4/locale_h.m4 m4/math_h.m4 m4/pty_h.m4 m4/search_h.m4 m4/signal_h.m4 m4/spawn_h.m4 m4/stdio_h.m4 m4/stdlib_h.m4 m4/string_h.m4 m4/sys_ioctl_h.m4 m4/sys_select_h.m4 m4/sys_socket_h.m4 m4/sys_stat_h.m4 m4/sys_time_h.m4 m4/time_h.m4 m4/unistd_h.m4 m4/wchar_h.m4 modules/cloexec modules/fdopendir modules/getopt-gnu modules/uninorm/u16-normalize modules/uninorm/u32-normalize modules/uninorm/u8-normalize |
diffstat | 28 files changed, 92 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +2010-03-27 Bruno Haible <bruno@clisp.org> + + Distinguish two kinds of module indicators. + * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_FOR_TESTS): Renamed from + gl_MODULE_INDICATOR. + (gl_MODULE_INDICATOR): New macro. + * m4/dirent_h.m4 (gl_DIRENT_MODULE_INDICATOR): Invoke + gl_MODULE_INDICATOR_FOR_TESTS instead of gl_MODULE_INDICATOR. + * m4/fcntl_h.m4 (gl_FCNTL_MODULE_INDICATOR): Likewise. + * m4/langinfo_h.m4 (gl_LANGINFO_MODULE_INDICATOR): Likewise. + * m4/locale_h.m4 (gl_LOCALE_MODULE_INDICATOR): Likewise. + * m4/math_h.m4 (gl_MATH_MODULE_INDICATOR): Likewise. + * m4/pty_h.m4 (gl_PTY_MODULE_INDICATOR): Likewise. + * m4/search_h.m4 (gl_SEARCH_MODULE_INDICATOR): Likewise. + * m4/signal_h.m4 (gl_SIGNAL_MODULE_INDICATOR): Likewise. + * m4/spawn_h.m4 (gl_SPAWN_MODULE_INDICATOR): Likewise. + * m4/stdio_h.m4 (gl_STDIO_MODULE_INDICATOR): Likewise. + * m4/stdlib_h.m4 (gl_STDLIB_MODULE_INDICATOR): Likewise. + * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Likewise. + * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_MODULE_INDICATOR): Likewise. + * m4/sys_select_h.m4 (gl_SYS_SELECT_MODULE_INDICATOR): Likewise. + * m4/sys_socket_h.m4 (gl_SYS_SOCKET_MODULE_INDICATOR): Likewise. + * m4/sys_stat_h.m4 (gl_SYS_STAT_MODULE_INDICATOR): Likewise. + * m4/sys_time_h.m4 (gl_SYS_TIME_MODULE_INDICATOR): Likewise. + * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): Likewise. + * m4/unistd_h.m4 (gl_UNISTD_MODULE_INDICATOR): Likewise. + * m4/wchar_h.m4 (gl_WCHAR_MODULE_INDICATOR): Likewise. + * modules/cloexec (configure.ac): Likewise. + * modules/getopt-gnu (configure.ac): Likewise. + * modules/uninorm/u8-normalize (configure.ac): Likewise. + * modules/uninorm/u16-normalize (configure.ac): Likewise. + * modules/uninorm/u32-normalize (configure.ac): Likewise. + * modules/fdopendir (configure.ac): Invoke gl_MODULE_INDICATOR. + 2010-03-27 Bruno Haible <bruno@clisp.org> New module description field 'Comment'.
--- a/m4/dirent_h.m4 +++ b/m4/dirent_h.m4 @@ -34,7 +34,7 @@ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_DIRENT_H_DEFAULTS],
--- a/m4/fcntl_h.m4 +++ b/m4/fcntl_h.m4 @@ -26,7 +26,7 @@ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_FCNTL_H_DEFAULTS],
--- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 15 +# gnulib-common.m4 serial 16 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -52,9 +52,39 @@ ]) # gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module. +# defines a C macro indicating the presence of the given module +# in a location where it can be used. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 0 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ AC_DEFUN([gl_MODULE_INDICATOR], [ + AC_DEFINE_UNQUOTED([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), + [gl_MODULE_INDICATOR_CONDITION], + [Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module ]$1[ shall be considered present.]) +]) + +# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) +# defines a C macro indicating the presence of the given module +# in lib or tests. This is useful to determine whether the module +# should be tested. +# | Value | Value | +# | in lib/ | in tests/ | +# --------------------------------------------+---------+-----------+ +# Module present among main modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module present among tests-related modules: | 1 | 1 | +# --------------------------------------------+---------+-----------+ +# Module not present at all: | 0 | 0 | +# --------------------------------------------+---------+-----------+ +AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], +[ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], [Define to 1 when using the gnulib module ]$1[.]) ])
--- a/m4/langinfo_h.m4 +++ b/m4/langinfo_h.m4 @@ -65,7 +65,7 @@ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
--- a/m4/locale_h.m4 +++ b/m4/locale_h.m4 @@ -80,7 +80,7 @@ AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_LOCALE_H_DEFAULTS],
--- a/m4/math_h.m4 +++ b/m4/math_h.m4 @@ -49,7 +49,7 @@ AC_REQUIRE([gl_MATH_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_MATH_H_DEFAULTS],
--- a/m4/pty_h.m4 +++ b/m4/pty_h.m4 @@ -50,7 +50,7 @@ AC_REQUIRE([gl_PTY_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_PTY_H_DEFAULTS],
--- a/m4/search_h.m4 +++ b/m4/search_h.m4 @@ -28,7 +28,7 @@ AC_REQUIRE([gl_SEARCH_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SEARCH_H_DEFAULTS],
--- a/m4/signal_h.m4 +++ b/m4/signal_h.m4 @@ -29,7 +29,7 @@ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
--- a/m4/spawn_h.m4 +++ b/m4/spawn_h.m4 @@ -79,7 +79,7 @@ AC_REQUIRE([gl_SPAWN_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SPAWN_H_DEFAULTS],
--- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -46,7 +46,7 @@ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDIO_H_DEFAULTS],
--- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -45,7 +45,7 @@ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS],
--- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -36,7 +36,7 @@ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
--- a/m4/sys_ioctl_h.m4 +++ b/m4/sys_ioctl_h.m4 @@ -57,7 +57,7 @@ AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS],
--- a/m4/sys_select_h.m4 +++ b/m4/sys_select_h.m4 @@ -74,7 +74,7 @@ AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS],
--- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -127,7 +127,7 @@ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
--- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -40,7 +40,7 @@ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
--- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -58,7 +58,7 @@ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
--- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -67,7 +67,7 @@ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
--- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -48,7 +48,7 @@ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_UNISTD_H_DEFAULTS],
--- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -109,7 +109,7 @@ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR([$1]) + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_WCHAR_H_DEFAULTS],
--- a/modules/cloexec +++ b/modules/cloexec @@ -13,7 +13,7 @@ configure.ac: gl_CLOEXEC -gl_MODULE_INDICATOR([cloexec]) +gl_MODULE_INDICATOR_FOR_TESTS([cloexec]) Makefile.am:
--- a/modules/fdopendir +++ b/modules/fdopendir @@ -18,6 +18,7 @@ configure.ac: gl_FUNC_FDOPENDIR gl_DIRENT_MODULE_INDICATOR([fdopendir]) +gl_MODULE_INDICATOR([fdopendir]) Makefile.am:
--- a/modules/getopt-gnu +++ b/modules/getopt-gnu @@ -9,7 +9,7 @@ configure.ac: gl_FUNC_GETOPT_GNU -gl_MODULE_INDICATOR([getopt-gnu]) +gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) Makefile.am:
--- a/modules/uninorm/u16-normalize +++ b/modules/uninorm/u16-normalize @@ -15,7 +15,7 @@ uninorm/decompose-internal configure.ac: -gl_MODULE_INDICATOR([uninorm/u16-normalize]) +gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u16-normalize]) Makefile.am: lib_SOURCES += uninorm/u16-normalize.c