Mercurial > hg > octave-shane > gnulib-hg
annotate m4/libunistring-base.m4 @ 17480:f40b3156a43e
selinux-at: omit unnecessary include
* lib/selinux-at.c: Don't include dosname.h; not needed, since
this source file doesn't use its macros, and subsidiary files that
use the macros already include it.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 23 Aug 2013 13:53:46 -0700 |
parents | e542fd46ad6f |
children | 344018b6e5d7 |
rev | line source |
---|---|
13388
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
1 # libunistring-base.m4 serial 5 |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16201
diff
changeset
|
2 dnl Copyright (C) 2010-2013 Free Software Foundation, Inc. |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 dnl From Paolo Bonzini and Bruno Haible. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
13388
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
9 dnl gl_LIBUNISTRING_MODULE([VERSION], [Module]) |
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
10 dnl Declares that the source files of Module should be compiled, unless we |
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
11 dnl are linking with libunistring and its version is >= the given VERSION. |
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
12 dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is |
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
13 dnl true if the source files of Module should be compiled. |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 dnl This macro is to be used for public libunistring API, not for |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 dnl undocumented API. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 dnl |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 dnl You have to bump the VERSION argument to the next projected version |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 dnl number each time you make a change that affects the behaviour of the |
13388
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
19 dnl functions defined in Module (even if the sources of Module itself do not |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 dnl change). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
13388
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
22 AC_DEFUN([gl_LIBUNISTRING_MODULE], |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 [ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 dnl gl_LIBUNISTRING_CORE if that macro has been run. |
13388
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
27 AM_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]), |
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
28 [gl_LIBUNISTRING_VERSION_CMP([$1])]) |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 ]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 dnl Declares that HeaderFile should be created, unless we are linking |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 dnl with libunistring and its version is >= the given VERSION. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 dnl HeaderFile should be relative to the lib directory and end in '.h'. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 dnl |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 dnl When we are linking with the already installed libunistring and its version |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 dnl is < VERSION, we create HeaderFile here, because we may compile functions |
13388
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
39 dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed |
9ef3893d2c73
Don't use AC_LIBOBJ with file names in subdirectories.
Bruno Haible <bruno@clisp.org>
parents:
13387
diff
changeset
|
40 dnl version. |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 dnl When we are linking with the already installed libunistring and its version |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 dnl is > VERSION, we don't create HeaderFile here: it could cause compilation |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 dnl errors in other libunistring header files if some types are missing. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 dnl |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 dnl You have to bump the VERSION argument to the next projected version |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 dnl number each time you make a non-comment change to the HeaderFile. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 [ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 dnl gl_LIBUNISTRING_CORE if that macro has been run. |
13387
c8df5a4f551f
Simplify gl_LIBUNISTRING_VERSION_CMP expansion.
Bruno Haible <bruno@clisp.org>
parents:
13381
diff
changeset
|
53 if gl_LIBUNISTRING_VERSION_CMP([$1]); then |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
54 LIBUNISTRING_[]AS_TR_CPP([$2])='$2' |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 else |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 LIBUNISTRING_[]AS_TR_CPP([$2])= |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 fi |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2])) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 ]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
61 dnl Miscellaneous preparations/initializations. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
62 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE], |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 [ |
13381
25bed74b17cc
Avoid expanding two macros in the wrong order.
Bruno Haible <bruno@clisp.org>
parents:
13357
diff
changeset
|
65 dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point. |
25bed74b17cc
Avoid expanding two macros in the wrong order.
Bruno Haible <bruno@clisp.org>
parents:
13357
diff
changeset
|
66 m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])]) |
25bed74b17cc
Avoid expanding two macros in the wrong order.
Bruno Haible <bruno@clisp.org>
parents:
13357
diff
changeset
|
67 |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
68 AC_REQUIRE([AC_PROG_AWK]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
69 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
70 dnl Sed expressions to extract the parts of a version number. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
71 changequote(,) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
72 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
73 i\ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
74 0 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
75 q |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
76 ' |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
77 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
78 i\ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
79 0 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
80 q |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
81 ' |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
82 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
83 i\ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
84 0 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
85 q |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
86 ' |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
87 changequote([,]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
88 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
89 if test "$HAVE_LIBUNISTRING" = yes; then |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
90 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
91 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
92 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
93 fi |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
94 ]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
95 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
96 dnl gl_LIBUNISTRING_VERSION_CMP([VERSION]) |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
97 dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
98 dnl is less than the VERSION argument. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
99 AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP], |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
100 [ { test "$HAVE_LIBUNISTRING" != yes \ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
101 || { |
13357
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
102 dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least. |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
103 AS_LITERAL_IF([$1], |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
104 [dnl This is the optimized variant, that assumes the argument is a literal: |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
105 m4_pushdef([requested_version_major], |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
106 [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])]) |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
107 m4_pushdef([requested_version_minor], |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
108 [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
109 m4_pushdef([requested_version_subminor], |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
110 [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])]) |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
111 test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
112 || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
113 && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
114 || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
115 && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
116 } |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
117 } |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
118 } |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
119 m4_popdef([requested_version_subminor]) |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
120 m4_popdef([requested_version_minor]) |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
121 m4_popdef([requested_version_major]) |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
122 ], |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
123 [dnl This is the unoptimized variant: |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
124 requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"` |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
125 requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"` |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
126 requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"` |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
127 test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
128 || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
129 && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
130 || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \ |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
131 && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
132 } |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
133 } |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
134 } |
b5887f4fd7df
Clean up dead code in recent commit.
Bruno Haible <bruno@clisp.org>
parents:
13354
diff
changeset
|
135 ]) |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
136 } |
13387
c8df5a4f551f
Simplify gl_LIBUNISTRING_VERSION_CMP expansion.
Bruno Haible <bruno@clisp.org>
parents:
13381
diff
changeset
|
137 }]) |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
138 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
139 dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
140 dnl same as ORIG, otherwise to 0. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
141 m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])]) |