# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AC_PREREQ(2.60)
-AC_INIT(libtbm, 1.1.0)
+AC_INIT(libtbm, 3.0.0)
AC_USE_SYSTEM_EXTENSIONS
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
+AC_PROG_CXX
AC_HEADER_STDC
AC_SYS_LARGEFILE
[ BUFMGR_MODULE_PATH="$withval" ],
[ BUFMGR_MODULE_PATH="${DEFAULT_BUFMGR_MODULE_PATH}" ])
-# set the window system platform where the bufmgr initializes
-AC_ARG_WITH(tbm-platform, AS_HELP_STRING([--with-tbm-platform=WINSYS], [tbm platform (default: X11)]),
- [ TBM_PLATFORM="$withval" ],
- [ TBM_PLATFORM="X11" ])
-AC_SUBST(TBM_PLATFORM)
+AC_ARG_WITH(haltests, AS_HELP_STRING([--with-haltests=yes/no], [whether build/run unit tests or not]),
+ [ haltests="$withval" ],
+ [ haltests="no" ])
+
+AM_CONDITIONAL(HAVE_HALTESTS, test "x$haltests" = "xyes")
#AC_DEFINE(BUFMGR_MODULE_DIR, "${BUFMGR_MODULE_PATH}", [Directory for the modules of tbm_bufmgr])
AC_DEFINE_UNQUOTED(BUFMGR_MODULE_DIR, "${BUFMGR_MODULE_PATH}", [Directory for the modules of tbm_bufmgr])
[AC_MSG_ERROR([Couldn't find clock_gettime])])])
AC_SUBST([CLOCK_LIB])
-
-if test "x$TBM_PLATFORM" = "xX11"; then
- PKG_CHECK_MODULES(LIBDRI2, libdri2)
- PKG_CHECK_MODULES(X11, x11)
- LIBTBM_CFLAGS="$LIBDRI2_CFLAGS $X11_CFLAGS"
- LIBTBM_LIBS="$LIBDRI2_LIBS $X11_LIBS"
-fi
-
-if test "x$TBM_PLATFORM" = "xWAYLAND"; then
- PKG_CHECK_MODULES(WAYLAND_CLIENT, wayland-client wayland-server)
- LIBTBM_CFLAGS="$WAYLAND_CLIENT_CFLAGS"
- LIBTBM_LIBS="$WAYLAND_CLIENT_LIBS"
-
- WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client wayland-server`
- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
- [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
+AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+if test x$wayland_scanner = x; then
+ AC_MSG_ERROR([wayland-scanner is needed to compile wayland-tbm])
fi
PKG_CHECK_MODULES(CAPI, [capi-base-common >= 0.1.1], [capi_0_1_1=yes], [capi_0_1_1=no])
fi
PKG_CHECK_MODULES(LIBDRM, libdrm)
-PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
+PKG_CHECK_MODULES(WL_CLIENT, wayland-client)
+PKG_CHECK_MODULES(WL_SERVER, wayland-server)
+PKG_CHECK_MODULES(WL_SCANNER, wayland-scanner)
+PKG_CHECK_MODULES(LIBPNG, libpng)
+PKG_CHECK_MODULES(LIBPIXMAN, pixman-1)
-LIBTBM_CFLAGS+="$LIBTBM_CFALGS $LIBDRM_CFLAGS $PTHREADSTUBS_CFLAGS $CAPI_CFLAGS"
-LIBTBM_LIBS+="$LIBTBM_LIBS $LIBDRM_LIBS $PTHREADSTUBS_LIBS $CAPI_LIBS"
-AC_SUBST(LIBTBM_CFLAGS)
-AC_SUBST(LIBTBM_LIBS)
+LIBTBM_CFLAGS+="$LIBTBM_CFALGS $LIBDRM_CFLAGS $CAPI_CFLAGS $WL_CLIENT_CFLAGS $WL_SERVER_CFLAGS $LIBPNG_CFLAGS $LIBPIXMAN_CFLAGS "
+LIBTBM_LIBS+="$LIBTBM_LIBS $LIBDRM_LIBS $CAPI_LIBS $WL_CLIENT_LIBS $WL_SERVER_LIBS $LIBPNG_LIBS $LIBPIXMAN_LIBS "
+
+PKG_CHECK_EXISTS([dlog], [have_dlog="yes"], [have_dlog="no"])
+AC_MSG_CHECKING([Have dlog logger])
+AC_MSG_RESULT([${have_dlog}])
+if test "x${have_dlog}" = "xyes"; then
+ AC_DEFINE([HAVE_DLOG], [1], [Define to 1 if you have dlog])
+
+ PKG_CHECK_MODULES(DLOG, dlog)
-if test "x$TBM_PLATFORM" = "xX11"; then
- AC_DEFINE(HAVE_X11,1,[The window system is X11.])
-else
- AC_DEFINE(HAVE_WAYLAND,1,[The window system is WAYLAND.])
+ LIBTBM_CFLAGS+="$DLOG_CFLAGS "
+ LIBTBM_LIBS+="$DLOG_LIBS "
fi
+AC_SUBST(LIBTBM_CFLAGS)
+AC_SUBST(LIBTBM_LIBS)
+
HOST_CPU_X86_64=no
case $host_cpu in
x86_64*|amd64*)
HOST_CPU_X86_64=yes
esac
-AM_CONDITIONAL(HAVE_TBM_PLATFORM_X11, test "x$TBM_PLATFORM" = "xX11")
-AM_CONDITIONAL(HAVE_TBM_PLATFORM_WAYLAND, test "x$TBM_PLATFORM" = "xWAYLAND")
AM_CONDITIONAL(HOST_CPU_X86_64, test "x$HOST_CPU_X86_64" = "xyes")
AC_OUTPUT([
- src/Makefile
+ include/Makefile
+ src/Makefile
Makefile
- libtbm.pc])
+ libtbm.pc
+ haltests/Makefile])
echo ""
echo "CFLAGS : $CFLAGS"
echo "LIBTBM_CFLAGS : $LIBTBM_CFLAGS"
echo "LIBTBM_LIBS : $LIBTBM_LIBS"
echo "BUFMGR_MODULE_DIR : $BUFMGR_MODULE_PATH"
-echo "TBM_PLATFORM : $TBM_PLATFORM"
echo ""