package upload
[adaptation/xorg/driver/xserver-xorg-module-xdbg.git] / configure.ac
1 # Copyright 2013 Samsung Electronics co., Ltd. All Rights Reserved.
2 #
3 # Contact: Boram Park <boram1288.park@samsung.com>
4 #
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish,
9 # distribute, sub license, and/or sell copies of the Software, and to
10 # permit persons to whom the Software is furnished to do so, subject to
11 # the following conditions:
12 #
13 # The above copyright notice and this permission notice (including the
14 # next paragraph) shall be included in all copies or substantial portions
15 # of the Software.
16 #
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20 # IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
21 # ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
25 AC_PREREQ(2.57)
26 AC_INIT([xdbg], [0.1.0], [https://])
27 AC_CONFIG_SRCDIR([Makefile.am])
28 AC_CONFIG_AUX_DIR(.)
29 AM_INIT_AUTOMAKE()
30
31 AM_MAINTAINER_MODE
32
33 # Require xorg-macros: XORG_DEFAULT_OPTIONS
34 m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
35 XORG_MACROS_VERSION(1.3)
36 AM_CONFIG_HEADER([config.h])
37
38 # Checks for programs.
39 AC_PROG_LIBTOOL
40 AC_PROG_CC
41 XORG_DEFAULT_OPTIONS
42
43 AH_TOP([#include "xorg-server.h"])
44
45 AC_ARG_WITH(xorg-module-dir,
46             AC_HELP_STRING([--with-xorg-module-dir=DIR],
47                            [Default xorg module directory [[default=$libdir/xorg/modules]]]),
48                            [moduledir="$withval"],
49                            [moduledir="$libdir/xorg/modules"])
50
51 # Checks for pkg-config packages
52 PKG_CHECK_MODULES(XDBG, dlog xorg-server x11 xdamage xext dbus-1 bigreqsproto compositeproto damageproto dmxproto dri2proto fixesproto fontsproto gestureproto inputproto kbproto randrproto recordproto renderproto resourceproto scrnsaverproto videoproto xcmiscproto xextproto xf86bigfontproto xf86dgaproto xf86driproto xf86vidmodeproto xineramaproto xproto libdrm xcomposite libdri2 xgesture xtst xrandr xi xv)
53
54 AC_SUBST([XDBG_CFLAGS])
55 AC_SUBST([XDBG_LIBS])
56
57 XDBG_CLIENT_CFLAGS="${XDBG_CFLAGS} -DXDBG_CLIENT"
58 XDBG_CLIENT_LIBS="${XDBG_LIBS}"
59 AC_SUBST([XDBG_CLIENT_CFLAGS])
60 AC_SUBST([XDBG_CLIENT_LIBS])
61
62 # Checks for header files.
63 AC_HEADER_STDC
64
65 MODULE_NAME=xdbg
66 AC_SUBST([MODULE_NAME])
67 AC_SUBST([moduledir])
68
69 AC_DEFINE_UNQUOTED(MODULE_NAME, "$MODULE_NAME", [module name])
70
71 AC_OUTPUT([Makefile
72            common/Makefile
73            bin/Makefile
74            bin/xdbg/Makefile
75            bin/xevlog_analyze/Makefile
76            lib/Makefile
77            lib/xdbg.pc
78            module/Makefile])
79
80 echo "CFLAGS     : $CFLAGS"
81 echo "LDFLAGS    : $LDFLAGS"
82 echo "XDBG_CFLAGS: $XDBG_CFLAGS"
83 echo "XDBG_LIBS  : $XDBG_LIBS"
84 echo "XDBG_CLIENT_CFLAGS: $XDBG_CLIENT_CFLAGS"
85 echo "XDBG_CLIENT_LIBS  : $XDBG_CLIENT_LIBS"