1 # Copyright 2013 Samsung Electronics co., Ltd. All Rights Reserved.
3 # Contact: Boram Park <boram1288.park@samsung.com>
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:
13 # The above copyright notice and this permission notice (including the
14 # next paragraph) shall be included in all copies or substantial portions
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.
26 AC_INIT([xdbg], [0.1.0], [https://])
27 AC_CONFIG_SRCDIR([Makefile.am])
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])
38 # Checks for programs.
43 AH_TOP([#include "xorg-server.h"])
45 AC_ARG_WITH(xorg-module-dir,
46 AC_HELP_STRING([--with-xorg-module-dir=DIR],
47 [directory of xorg module [[default=$libdir/xorg/modules]]]),
48 [moduledir="$withval"],
49 [moduledir="$libdir/xorg/modules"])
50 AC_ARG_WITH(dbus-busconfig-dir,
51 AC_HELP_STRING([--with-dbus-busconfig-dir=DIR],
52 [directory of the xdbg's dbus busconfig file [[default=$sysconfdir/dbus-1/system.d]]]),
53 [dbusbusconfigdir="$withval"],
54 [dbusbusconfigdir="$sysconfdir/dbus-1/system.d"])
55 AC_ARG_ENABLE(secure-log,
56 AS_HELP_STRING([--enable-secure-log],
57 [Enable secure log (default: disabled)]),
58 [SECURELOG=$enableval], [SECURELOG=no])
60 AC_ARG_ENABLE(normal-log,
61 AS_HELP_STRING([--enable-normal-log],
62 [Enable normal log instead of secure log (default: disabled)]),
63 [NORMALLOG=$enableval], [NORMALLOG=no])
65 # Checks for pkg-config packages
66 PKG_CHECK_MODULES(XDBG, dlog xorg-server x11 xdamage xext dbus-1 bigreqsproto compositeproto damageproto dri2proto fixesproto fontsproto gestureproto inputproto kbproto randrproto recordproto renderproto resourceproto videoproto xcmiscproto xextproto xf86vidmodeproto xproto dri3proto presentproto libdrm xcomposite libdri2 xgesture xtst xrandr xi xv xcb)
68 PKG_CHECK_MODULES(HWC, libhwc hwcproto,
69 [SAVE_CPPFLAGS="$CPPFLAGS"
70 CPPFLAGS="$CPPFLAGS $HWC_CFLAGS"
71 AC_CHECK_HEADERS([X11/extensions/hwc.h],[have_hwc_h="yes"],[have_hwc_h="no"])
72 CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
74 AM_CONDITIONAL(HAVE_HWC, [test "x$have_hwc_h" = xyes])
75 if test "x$have_hwc_h" = xyes; then
76 AC_DEFINE(HAVE_HWC, 1, [Have libhwc])
77 XDBG_CFLAGS="$XDBG_CFLAGS $HWC_CFLAGS"
78 XDBG_LIBS="$XDBG_LIBS $HWC_LIBS"
81 AC_SUBST([XDBG_CFLAGS])
84 XDBG_CLIENT_CFLAGS="${XDBG_CFLAGS} -DXDBG_CLIENT"
85 XDBG_CLIENT_LIBS="${XDBG_LIBS}"
86 AC_SUBST([XDBG_CLIENT_CFLAGS])
87 AC_SUBST([XDBG_CLIENT_LIBS])
89 # Checks for header files.
93 AC_SUBST([MODULE_NAME])
95 AC_SUBST([dbusbusconfigdir])
97 AC_DEFINE_UNQUOTED(MODULE_NAME, "$MODULE_NAME", [module name])
100 if test "x$SECURELOG" = xyes; then
101 TIZEN_ENGINEER_MODE=1
102 AC_SUBST([TIZEN_ENGINEER_MODE])
106 if test "x$NORMALLOG" = xyes; then
108 AC_SUBST([USE_NORMAL_LOG])
115 bin/xevlog_analyze/Makefile
117 lib/xdbg_log_secure.h
121 echo "CFLAGS : $CFLAGS"
122 echo "LDFLAGS : $LDFLAGS"
123 echo "LOG : secure($SECURELOG) normal($NORMALLOG)"
124 echo "XDBG_CFLAGS: $XDBG_CFLAGS"
125 echo "XDBG_LIBS : $XDBG_LIBS"
126 echo "XDBG_CLIENT_CFLAGS: $XDBG_CLIENT_CFLAGS"
127 echo "XDBG_CLIENT_LIBS : $XDBG_CLIENT_LIBS"