diff options
Diffstat (limited to 'unicode/courier-unicode-version.m4.in')
| -rw-r--r-- | unicode/courier-unicode-version.m4.in | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/unicode/courier-unicode-version.m4.in b/unicode/courier-unicode-version.m4.in new file mode 100644 index 0000000..94b0c04 --- /dev/null +++ b/unicode/courier-unicode-version.m4.in @@ -0,0 +1,45 @@ +dnl Checks for the correct version of the courier-unicode library. + +AC_DEFUN([AX_COURIER_UNICODE_VERSION],[ + +AC_MSG_CHECKING(courier-unicode library and version) + +vers="$1" + +if test "$vers" = "" +then + vers=@VERSION@ +fi + +set -- `echo "$vers" | tr '.' ' '` + +v=$[]1 +r=`echo "00"$[]2 | sed 's/.*(...)$/$[]1/'` + +p=$[]3 + +if test "$p" = "" + then p="0" +fi + +p=`echo "00"$p | sed 's/.*(...)$/$[]1/'` + +AC_TRY_COMPILE([ +#include <courier-unicode.h> +#ifndef COURIER_UNICODE_VERSION +#define COURIER_UNICODE_VERSION 0 +#endif + +#if COURIER_UNICODE_VERSION < ]$v$r$p[ +#error "courier-unicode ]$vers[ library is required" +#endif + +],[],[], +AC_MSG_ERROR([ +ERROR: The Courier Unicode Library ]$vers[ header files appear not to be installed. +You may need to upgrade the library or install a separate development +subpackage in addition to the main package.]) +) + +AC_MSG_RESULT([ok]) +]) |
