X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=4016e6c89178156d7b996abe78b2ad7fb3b08711;hb=58c4d6b2503bb987ead49b10ae1ac707fd51286d;hp=22571562777deb12b04d3501a9d923be9dbc76b7;hpb=da97a150b570cd934e5ba7bd38eb7ab5881520fd;p=platform%2Fcore%2Fuifw%2Flibtbm.git diff --git a/configure.ac b/configure.ac index 2257156..4016e6c 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AC_PREREQ(2.60) -AC_INIT(libtbm, 2.0.0) +AC_INIT(libtbm, 3.0.0) AC_USE_SYSTEM_EXTENSIONS AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) @@ -28,6 +28,7 @@ AM_CONFIG_HEADER([config.h]) AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +AC_PROG_CXX AC_HEADER_STDC AC_SYS_LARGEFILE @@ -50,6 +51,12 @@ AC_ARG_WITH(bufmgr-module-path, AS_HELP_STRING([--with-bufmgr-module-path=PATH], [ BUFMGR_MODULE_PATH="$withval" ], [ BUFMGR_MODULE_PATH="${DEFAULT_BUFMGR_MODULE_PATH}" ]) +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]) @@ -68,16 +75,37 @@ if test x"$capi_0_1_1" = xyes; then AC_DEFINE(HAVE_CAPI_0_1_1,1,[The version of capi-base-common is over 0.1.1]) fi +PKG_CHECK_MODULES(HAL_API_TBM, hal-api-tbm) 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) +PKG_CHECK_MODULES(GMOCK, gmock) + +LIBTBM_CFLAGS+="$LIBTBM_CFALGS $HAL_API_TBM_CFLAGS $LIBDRM_CFLAGS $CAPI_CFLAGS $WL_CLIENT_CFLAGS $WL_SERVER_CFLAGS $LIBPNG_CFLAGS $LIBPIXMAN_CFLAGS " +LIBTBM_LIBS+="$LIBTBM_LIBS $HAL_API_TBM_LIBS $LIBDRM_LIBS $CAPI_LIBS $WL_CLIENT_LIBS $WL_SERVER_LIBS $LIBPNG_LIBS $LIBPIXMAN_LIBS " + +LIBTBM_TEST_CFLAGS="$GMOCK_CFLAGS" +LIBTBM_TEST_LIBS="$GMOCK_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) + + LIBTBM_CFLAGS+="$DLOG_CFLAGS " + LIBTBM_LIBS+="$DLOG_LIBS " +fi -LIBTBM_CFLAGS+="$LIBTBM_CFALGS $LIBDRM_CFLAGS $PTHREADSTUBS_CFLAGS $CAPI_CFLAGS $WL_CLIENT_CFLAGS $WL_SERVER_CFLAGS" -LIBTBM_LIBS+="$LIBTBM_LIBS $LIBDRM_LIBS $PTHREADSTUBS_LIBS $CAPI_LIBS $WL_CLIENT_LIBS $WL_SERVER_LIBS" AC_SUBST(LIBTBM_CFLAGS) AC_SUBST(LIBTBM_LIBS) +AC_SUBST(LIBTBM_TEST_CFLAGS) +AC_SUBST(LIBTBM_TEST_LIBS) HOST_CPU_X86_64=no case $host_cpu in @@ -88,9 +116,11 @@ esac 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"