+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'.
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],
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],
-# 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,
])
# 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[.])
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
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],
configure.ac:
gl_CLOEXEC
-gl_MODULE_INDICATOR([cloexec])
+gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
Makefile.am:
configure.ac:
gl_FUNC_FDOPENDIR
gl_DIRENT_MODULE_INDICATOR([fdopendir])
+gl_MODULE_INDICATOR([fdopendir])
Makefile.am:
configure.ac:
gl_FUNC_GETOPT_GNU
-gl_MODULE_INDICATOR([getopt-gnu])
+gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
Makefile.am:
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
uninorm/decompose-internal
configure.ac:
-gl_MODULE_INDICATOR([uninorm/u32-normalize])
+gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u32-normalize])
Makefile.am:
lib_SOURCES += uninorm/u32-normalize.c
uninorm/decompose-internal
configure.ac:
-gl_MODULE_INDICATOR([uninorm/u8-normalize])
+gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u8-normalize])
Makefile.am:
lib_SOURCES += uninorm/u8-normalize.c