gnulib: Add module strverscmp.

* lib/strverscmp.c, m4/strverscmp.m4: New files.
* lib/Makefile.am, m4/gnulib-cache.m4, m4/gnulib-comp.m4: Update.
This commit is contained in:
Alexandre Duret-Lutz 2013-09-23 11:36:15 +02:00
parent b486d4f1dc
commit 1f384c2c63
5 changed files with 174 additions and 2 deletions

View file

@ -27,7 +27,7 @@
# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=tools --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files argmatch argp error gethrxtime isatty mkstemp mkstemps progname stpcpy sys_wait
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=tools --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files argmatch argp error gethrxtime isatty mkstemp mkstemps progname stpcpy strverscmp sys_wait
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
@ -41,6 +41,7 @@ gl_MODULES([
mkstemps
progname
stpcpy
strverscmp
sys_wait
])
gl_AVOID([])

View file

@ -114,6 +114,7 @@ AC_DEFUN([gl_EARLY],
# Code from module strings:
# Code from module strndup:
# Code from module strnlen:
# Code from module strverscmp:
# Code from module sys_stat:
# Code from module sys_time:
# Code from module sys_types:
@ -361,6 +362,12 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_STRNLEN
fi
gl_STRING_MODULE_INDICATOR([strnlen])
gl_FUNC_STRVERSCMP
if test $HAVE_STRVERSCMP = 0; then
AC_LIBOBJ([strverscmp])
gl_PREREQ_STRVERSCMP
fi
gl_STRING_MODULE_INDICATOR([strverscmp])
gl_HEADER_SYS_STAT_H
AC_PROG_MKDIR_P
gl_HEADER_SYS_TIME_H
@ -624,6 +631,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strncasecmp.c
lib/strndup.c
lib/strnlen.c
lib/strverscmp.c
lib/sys_stat.in.h
lib/sys_time.in.h
lib/sys_types.in.h
@ -724,6 +732,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/strings_h.m4
m4/strndup.m4
m4/strnlen.m4
m4/strverscmp.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
m4/sys_time_h.m4

22
m4/strverscmp.m4 Normal file
View file

@ -0,0 +1,22 @@
# strverscmp.m4 serial 8
dnl Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRVERSCMP],
[
dnl Persuade glibc <string.h> to declare strverscmp().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_FUNCS([strverscmp])
if test $ac_cv_func_strverscmp = no; then
HAVE_STRVERSCMP=0
fi
])
# Prerequisites of lib/strverscmp.c.
AC_DEFUN([gl_PREREQ_STRVERSCMP], [
:
])