| 1 |
|
| 2 |
dnl AM_PATH_XVID([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 3 |
dnl test for libxvidcore version 4.0 |
| 4 |
dnl defines XVID4_CFLAGS and XVID4_LIBS |
| 5 |
|
| 6 |
AC_DEFUN([AM_PATH_XVID4], |
| 7 |
[ |
| 8 |
AC_AVM_CHECK_LIB(xvid4, [for xvid_global in -lxvidcore (4)], |
| 9 |
[where XviD4 is installed], [-lxvidcore], [ |
| 10 |
#include <stdio.h> |
| 11 |
#include <string.h> |
| 12 |
#include "xvid.h"], [ |
| 13 |
|
| 14 |
xvid_gbl_info_t xinfo; |
| 15 |
memset(&xinfo, 0, sizeof(xinfo)); |
| 16 |
xinfo.version = XVID_VERSION; |
| 17 |
|
| 18 |
if (xvid_global(NULL, XVID_GBL_INIT, &xinfo, NULL) == XVID_ERR_FAIL) { |
| 19 |
printf("Header file and library are out of sync. Header file supports\n" |
| 20 |
"version %d.%d API and shared library supports version %d.%d API.\n", |
| 21 |
XVID_VERSION >> 16, XVID_VERSION & 0xFFFF, |
| 22 |
xinfo.version >> 16, xinfo.version & 0xFFFF); |
| 23 |
ret = 1; |
| 24 |
}], [$1], [$2]) |
| 25 |
]) |
| 26 |
|