| Revision 288,
834 bytes
checked in by martin, 6 years ago
(diff) |
|
Now supports Berkeley DB versions >= 4.1 in addition to 1.x. The versions inbetween are not supported because they require code changes and I don't have them available to test against.
|
| Line | |
|---|
| 1 | dnl @synopsis AX_SPLIT_VERSION(DEFINE, VERSION) |
|---|
| 2 | dnl |
|---|
| 3 | dnl Splits a version number in the format MAJOR.MINOR.POINT into it's |
|---|
| 4 | dnl separate components and AC_DEFINES <DEFINE>_MAJOR etc with the values. |
|---|
| 5 | dnl |
|---|
| 6 | dnl @category Automake |
|---|
| 7 | dnl @author Martin Ebourne <martin@zepler.org> |
|---|
| 8 | dnl @version |
|---|
| 9 | dnl @license AllPermissive |
|---|
| 10 | |
|---|
| 11 | AC_DEFUN([AX_SPLIT_VERSION],[ |
|---|
| 12 | ax_major_version=`echo "$2" | sed 's/\([[^.]][[^.]]*\).*/\1/'` |
|---|
| 13 | ax_minor_version=`echo "$2" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` |
|---|
| 14 | ax_point_version=`echo "$2" | sed 's/[[^.]][[^.]]*.[[^.]][[^.]]*.\(.*\)/\1/'` |
|---|
| 15 | |
|---|
| 16 | AC_DEFINE_UNQUOTED([$1_MAJOR], [$ax_major_version], [Define to major version for $1]) |
|---|
| 17 | AC_DEFINE_UNQUOTED([$1_MINOR], [$ax_minor_version], [Define to minor version for $1]) |
|---|
| 18 | AC_DEFINE_UNQUOTED([$1_POINT], [$ax_point_version], [Define to point version for $1]) |
|---|
| 19 | ]) |
|---|
Note: See
TracBrowser
for help on using the repository browser.