+# Enable csharp plugin
+build_csharp_plugin=no
+build_ruby_flag=no
+if test x$enable_csharp = xyes; then
+ [build_csharp_plugin=yes]
+ AC_MSG_NOTICE(Building DALi csharp plugin ...)
+
+ PKG_CHECK_MODULES(DALIADAPTOR, dali-adaptor)
+ AC_PATH_PROG([SWIG], [swig])
+
+ # if gbs enable, then only use swig, without ruby or mcs
+ if test "x$dali_profile" = "xUBUNTU"; then
+ [build_ruby_flag=yes]
+ AC_PATH_PROG([RUBY], [ruby])
+ AC_PATH_PROGS([MCS], [mcs gmcs gmcs2])
+ AC_MSG_NOTICE(swig ruby mcs working ...)
+ else
+ [build_ruby_flag=no]
+ AC_PATH_PROG([RUBY], [ruby])
+ #AC_PATH_PROGS([MCS], [mcs gmcs gmcs2])
+ #AC_MSG_NOTICE(swig only working ...)
+ fi
+
+ # Set varaibles for dali-toolkit
+ DALITOOLKIT_CFLAGS="-I${prefix}/include -I${prefix}/include/dali-toolkit"
+ DALITOOLKIT_LIBS="-L${prefix}/lib -ldali-toolkit -ldali-core"
+ AC_SUBST(DALITOOLKIT_CFLAGS)
+ AC_SUBST(DALITOOLKIT_LIBS)
+fi
+
+#set a variable for the makefile to force compile the csharp plugin
+AM_CONDITIONAL([ENABLE_CSHARP_PLUGIN], [test x$build_csharp_plugin = xyes])
+AM_CONDITIONAL([ENABLE_RUBY_FLAG], [test x$build_ruby_flag = xyes])
+