do not build gbm_tbm at emulator 84/62284/3 accepted/tizen/common/20160316.160134 accepted/tizen/ivi/20160315.123554 accepted/tizen/mobile/20160315.123458 accepted/tizen/tv/20160315.123515 accepted/tizen/wearable/20160315.123538 submit/tizen/20160315.075353
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 15 Mar 2016 07:44:19 +0000 (16:44 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 15 Mar 2016 07:51:02 +0000 (16:51 +0900)
Change-Id: Id875ebab821418dce9fca4dc8f26d42efab094c5

Makefile.am
configure.ac
packaging/libgbm.spec

index 8289c37..5740071 100644 (file)
@@ -38,11 +38,12 @@ AM_CFLAGS += \
 libgbm_la_LIBADD += \
        $(TBM_LIBS)
 
+endif
+
 libgbmtbmincludedir=$(includedir)/gbm
 libgbmtbminclude_HEADERS = \
        backends/tbm/gbm_tbm.h \
        backends/tbm/gbm_tbmint.h
 
-endif
 
 CLEANFILES = 
index 7f2eb5b..274c567 100644 (file)
@@ -10,19 +10,24 @@ AM_SILENT_RULES([yes])
 AC_PROG_CC
 AC_PROG_LIBTOOL
 
-PKG_CHECK_MODULES([TBM], [libtbm wayland-tbm-server], [have_tbm=yes], [have_tbm=no])
+AC_ARG_ENABLE(tbm, AS_HELP_STRING([--disable-tbm],
+                   [use tbm or not (default: enabled)]),
+                   [have_tbm=$enableval], [have_tbm=yes])
+
 if test x$have_tbm = xyes; then
+   PKG_CHECK_MODULES([TBM], [libtbm wayland-tbm-server])
    AC_DEFINE([HAVE_TBM], [1], [Build the tbm backend])
 
    AC_ARG_ENABLE(tbm-queue, [--enable-tbm-queue],,
                  enable_tbm_queue=no)
-   AM_CONDITIONAL(USE_TBM_QUEUE, test x$enable_tbm_queue = xyes)
    if test x$enable_tbm_queue = xyes; then
       AC_DEFINE([USE_TBM_QUEUE], [1], [Build gbm_tbm with TBM surface queue])
    fi
 fi
 
 AM_CONDITIONAL(HAVE_TBM, test "x$have_tbm" = "xyes")
+AM_CONDITIONAL(USE_TBM_QUEUE, test x$enable_tbm_queue = xyes)
+
 AC_CONFIG_FILES([
    Makefile
    gbm.pc
index adc4da5..c32acea 100644 (file)
@@ -30,7 +30,11 @@ Development header files for use with Wayland GBM
 %setup -q -n %{name}
 
 %build
-%reconfigure --disable-static --enable-tbm-queue
+%if "%_repository" == "emulator32-wayland" || "%_repository" == "emulator64-wayland"
+%reconfigure --disable-static --disable-tbm
+%else
+%reconfigure --disable-static --enable-tbm --enable-tbm-queue
+%endif
 make libdir=%{_libdir} major_ver=%{MAJOR_VER} minor_ver=%{MINOR_VER}
 
 %install