add the initial source code
[archive/platform/adaptation/samsung_exynos/libtbm-exynos4412.git] / configure.ac
1 #
2 #  Permission is hereby granted, free of charge, to any person obtaining a
3 #  copy of this software and associated documentation files (the "Software"),
4 #  to deal in the Software without restriction, including without limitation
5 #  on the rights to use, copy, modify, merge, publish, distribute, sub
6 #  license, and/or sell copies of the Software, and to permit persons to whom
7 #  the Software is furnished to do so, subject to the following conditions:
8 #
9 #  The above copyright notice and this permission notice (including the next
10 #  paragraph) shall be included in all copies or substantial portions of the
11 #  Software.
12 #
13 #  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 #  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 #  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
16 #  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20 AC_PREREQ(2.60)
21 AC_INIT(libtbm-exynos4412, 1.0.0)
22 AC_USE_SYSTEM_EXTENSIONS
23 AC_CONFIG_SRCDIR([Makefile.am])
24 AM_INIT_AUTOMAKE([dist-bzip2])
25
26 AM_CONFIG_HEADER([config.h])
27
28 AC_DISABLE_STATIC
29 AC_PROG_LIBTOOL
30 AC_PROG_CC
31
32 AC_HEADER_STDC
33 AC_SYS_LARGEFILE
34 AC_FUNC_ALLOCA
35
36 # Enable quiet compiles on automake 1.11.
37 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
38
39 PKG_CHECK_MODULES(LIBDRM, libdrm)
40 PKG_CHECK_MODULES(LIBDRM_EXYNOS, libdrm_exynos)
41 PKG_CHECK_MODULES(LIBTBM, libtbm)
42
43 AC_ARG_ENABLE(cachectrl,
44               AS_HELP_STRING([--enable-cache-crtl],
45               [Enable cache control (default: enable)]),
46               [CACHE_CTRL=$enableval], [CACHE_CTRL=yes])
47
48 if test "x$CACHE_CTRL" = xyes; then
49     AC_DEFINE(ENABLE_CACHECRTL, 1, [Enable cache control])
50 fi
51
52 LIBTBM_EXYNOS4412_CFLAGS="$LIBDRM_CFLAGS $LIBDRM_EXYNOS_CFLAGS $LIBTBM_CFLAGS "
53 LIBTBM_EXYNOS4412_LIBS="$LIBDRM_LIBS $LIBDRM_EXYNOS_LIBS $LIBTBM_LIBS "
54 AC_SUBST(LIBTBM_EXYNOS4412_CFLAGS)
55 AC_SUBST(LIBTBM_EXYNOS4412_LIBS)
56
57 bufmgr_dir=${libdir#*/}
58 AC_SUBST(bufmgr_dir)
59
60 AC_OUTPUT([
61         Makefile
62         src/Makefile])
63
64 echo ""
65 echo "CFLAGS  : $CFLAGS"
66 echo "LDFLAGS : $LDFLAGS"
67 echo "LIBTBM_EXYNOS4412_CFLAGS : $LIBTBM_EXYNOS4412_CFLAGS"
68 echo "LIBTBM_EXYNOS4412_LIBS   : $LIBTBM_EXYNOS4412_LIBS"
69 echo "bufmgr_dir : $bufmgr_dir"
70 echo ""
71