increase version to 1.7.0
[platform/core/uifw/libtdm.git] / configure.ac
1 AC_PREREQ([2.60])
2
3 m4_define([tdm_major_version],  [1])
4 m4_define([tdm_minor_version],  [7])
5 m4_define([tdm_micro_version],  [0])
6 m4_define([tdm_version],
7           [tdm_major_version.tdm_minor_version.tdm_micro_version])
8
9 AC_INIT([libtdm],
10         [tdm_version],
11         [https://www.tizen.org],
12         [libtdm])
13
14 AC_CONFIG_HEADERS([config.h])
15 AC_CONFIG_SRCDIR([Makefile.am])
16 AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
17 AM_MAINTAINER_MODE([enable])
18
19 # Check for programs
20 AC_PROG_CC
21 AC_PROG_CXX
22
23 AC_USE_SYSTEM_EXTENSIONS
24 AC_SYS_LARGEFILE
25 AC_FUNC_ALLOCA
26
27 # Initialize libtool
28 LT_PREREQ([2.2])
29 LT_INIT([disable-static])
30
31 # Enable quiet compiles on automake 1.11.
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
33
34 AC_ARG_WITH(utest, AS_HELP_STRING([--with-utest=yes/no], [whether build/run unit tests or not]),
35                                 [ utest="$withval" ],
36                                 [ utest="no" ])
37
38 AM_CONDITIONAL(HAVE_UTEST, test "x$utest" = "xyes")
39
40 AC_PATH_PROG([wayland_scanner], [wayland-scanner])
41 if test x$wayland_scanner = x; then
42    AC_MSG_ERROR([wayland-scanner is needed to compile])
43 fi
44
45 PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner >= 1.7.0)
46
47 PKG_CHECK_MODULES(TDM, dlog libtbm libpng pixman-1 wayland-server)
48 PKG_CHECK_MODULES(TDM_CLIENT, dlog wayland-client)
49
50 PKG_CHECK_MODULES(TTRACE,
51                 [ttrace],
52                 [have_ttrace="yes"], [have_ttrace="no"])
53 if test "x$have_ttrace" = "xyes"; then
54     TDM_CFLAGS="$TDM_CFLAGS $TTRACE_CFLAGS"
55     TDM_LIBS="$TDM_LIBS $TTRACE_LIBS"
56     TDM_CLIENT_CFLAGS="$TDM_CLIENT_CFLAGS $TTRACE_CFLAGS"
57     TDM_CLIENT_LIBS="$TDM_CLIENT_LIBS $TTRACE_LIBS"
58     AC_DEFINE(HAVE_TTRACE, 1, [ttrace available])
59 fi
60
61 AC_SUBST(TDM_CFLAGS)
62 AC_SUBST(TDM_LIBS)
63
64 AC_SUBST(TDM_CLIENT_CFLAGS)
65 AC_SUBST(TDM_CLIENT_LIBS)
66
67 # set the dir for the tbm module
68 DEFAULT_TDM_MODULE_PATH="${libdir}/tdm"
69 AC_ARG_WITH(tdm-module-path, AS_HELP_STRING([--with-tdm-module-path=PATH], [tdm module dir]),
70                                 [ TDM_MODULE_PATH="$withval" ],
71                                 [ TDM_MODULE_PATH="${DEFAULT_TDM_MODULE_PATH}" ])
72 AC_DEFINE_UNQUOTED(TDM_MODULE_PATH, "${TDM_MODULE_PATH}", [Directory for the modules of tdm])
73
74 AC_SUBST([TDM_MAJOR_VERSION], [tdm_major_version])
75 AC_SUBST([TDM_MINOR_VERSION], [tdm_minor_version])
76 AC_SUBST([TDM_MICRO_VERSION], [tdm_micro_version])
77 AC_SUBST([TDM_VERSION], [tdm_version])
78
79 AC_DEFINE([TDM_MAJOR_VERSION], [tdm_major_version], [tdm ABI major version])
80 AC_DEFINE([TDM_MINOR_VERSION], [tdm_minor_version], [tdm ABI minor version])
81 AC_DEFINE([TDM_MICRO_VERSION], [tdm_micro_version], [tdm ABI macro version])
82
83 # For enumerating devices in test case
84 AC_SUBST(WARN_CFLAGS)
85 AC_OUTPUT([
86         Makefile
87         libtdm.pc
88         include/Makefile
89         protocol/Makefile
90         common/Makefile
91         src/Makefile
92         client/libtdm-client.pc
93         client/Makefile
94         tools/Makefile
95         ut/Makefile])
96
97 echo ""
98 echo "$PACKAGE_STRING will be compiled with:"
99 echo ""
100 echo "TDM_CFLAGS        : $TDM_CFLAGS"
101 echo "TDM_LIBS          : $TDM_LIBS"
102 echo "TDM_CLIENT_CFLAGS : $TDM_CLIENT_CFLAGS"
103 echo "TDM_CLIENT_LIBS   : $TDM_CLIENT_LIBS"
104 echo "TDM_MODULE_PATH   : $TDM_MODULE_PATH"
105 echo ""