summaryrefslogtreecommitdiff
path: root/m4/efl_check_libs.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/efl_check_libs.m4')
-rw-r--r--m4/efl_check_libs.m473
1 files changed, 0 insertions, 73 deletions
diff --git a/m4/efl_check_libs.m4 b/m4/efl_check_libs.m4
deleted file mode 100644
index c64013b..0000000
--- a/m4/efl_check_libs.m4
+++ /dev/null
@@ -1,73 +0,0 @@
1dnl Copyright (C) 2012 Vincent Torri <vincent dot torri at gmail dot com>
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro that check dependencies libraries for the EFL:
5
6dnl libjpeg
7dnl zlib
8
9dnl _EFL_CHECK_LIB_LIBJPEG is for internal use
10dnl _EFL_CHECK_LIB_LIBJPEG(EFL)
11dnl it will abort (AC_MSG_ERROR) if libjpeg is not found.
12
13AC_DEFUN([_EFL_CHECK_LIB_LIBJPEG],
14[dnl
15EFL_CHECK_LIB_CODE([$1], [-ljpeg], [have_fct], [[
16#include <stdio.h>
17#include <jpeglib.h>
18]], [[
19struct jpeg_error_mgr er; void *error = jpeg_std_error(&er);
20]])
21
22if test "${have_fct}" = "no"; then
23 AC_MSG_ERROR([Cannot find libjpeg. Make sure your CFLAGS and LDFLAGS environment variable are set properly.])
24fi
25])
26
27dnl _EFL_CHECK_LIB_ZLIB is for internal use
28dnl _EFL_CHECK_LIB_ZLIB(EFL)
29dnl it will abort (AC_MSG_ERROR) if zlib is not found.
30
31AC_DEFUN([_EFL_CHECK_LIB_ZLIB],
32[dnl
33m4_pushdef([DOWNEFL], m4_translit([$1], [-A-Z], [_a-z]))dnl
34
35PKG_CHECK_EXISTS([zlib >= 1.2.3], [_efl_have_lib="yes"], [_efl_have_lib="no"])
36
37if test "${_efl_have_lib}" = "yes"; then
38 requirements_pc_[]m4_defn([DOWNEFL])="${requirements_pc_[]m4_defn([DOWNEFL])} zlib >= 1.2.3"
39 requirements_pc_deps_[]m4_defn([DOWNEFL])="${requirements_pc_deps_[]m4_defn([DOWNEFL])} zlib >= 1.2.3"
40else
41 EFL_CHECK_LIB_CODE([$1], [-lz], [have_fct], [[
42#include <zlib.h>
43]], [[const char *v = zlibVersion();]])
44
45 if test "${have_fct}" = "no"; then
46 AC_MSG_ERROR([Cannot find zlib. Make sure your CFLAGS and LDFLAGS environment variable are set properly.])
47 fi
48fi
49m4_popdef([DOWNEFL])dnl
50])
51
52dnl Macro that checks for a library
53dnl
54dnl EFL_CHECK_LIB(EFL, LIBRARY)
55dnl it will abort if library is not found
56
57AC_DEFUN([EFL_CHECK_LIB],
58[dnl
59m4_pushdef([UP], m4_translit([$2], [-a-z], [_A-Z]))dnl
60m4_default([_EFL_CHECK_LIB_]m4_defn([UP]))($1)
61AC_MSG_CHECKING([for $2])
62AC_MSG_RESULT([yes])
63m4_popdef([UP])dnl
64])
65
66dnl Macro that iterates over a sequence of white separated libraries
67dnl and that calls EFL_CHECK_LIB() for each of these libraries
68dnl
69dnl EFL_CHECK_LIBS(EFL, LIBRARIES)
70dnl it will abort if libraries are not found
71
72AC_DEFUN([EFL_CHECK_LIBS],
73[m4_foreach_w([lib], [$2], [EFL_CHECK_LIB($1, m4_defn([lib]))])])