Add tizen files to Common rpm
[platform/core/uifw/dali-csharp-binder.git] / build / tizen / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 m4_define([dali_version],[0.1.0])
5 AC_INIT([dali], [dali_version])
6 AM_INIT_AUTOMAKE([-Wall foreign])
7 AC_CONFIG_MACRO_DIR([m4])
8
9 # Checks for programs.
10 AC_PROG_CXX
11 AC_PROG_LIBTOOL
12 AC_PROG_MKDIR_P
13
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
15
16 LT_INIT
17
18 DALI_CSHARP_BINDER_VERSION=dali_version
19 AC_SUBST(DALI_CSHARP_BINDER_VERSION)
20
21 AC_ARG_ENABLE([debug],
22               [AC_HELP_STRING([--enable-debug],
23                               [Turns on debugging])],
24               [enable_debug=$enableval],
25               [enable_debug=no])
26
27 if test "x$enable_debug" = "xyes"; then
28   DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -DDEBUG_ENABLED"
29 fi
30
31 # Tizen Profile options
32 AC_ARG_ENABLE([profile],
33               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,IVI,UBUNTU],
34                             [Select the variant of tizen])],
35               [enable_profile=$enableval],
36               [enable_profile=UBUNTU])
37
38 # Ensure valid profile selected
39 if test "x$enable_profile" != "xCOMMON" -a "x$enable_profile" != "xMOBILE" -a "x$enable_profile" != "xWEARABLE" -a "x$enable_profile" != "xTV" -a "x$enable_profile" != "xIVI" -a "x$enable_profile" != "xUBUNTU"; then
40   AC_MSG_ERROR([$enable_profile is an invalid profile])
41 fi
42
43
44 AC_ARG_ENABLE(wayland,
45               [  --enable-wayland       Build on Wayland],
46               enable_wayland=yes,
47               enable_wayland=no)
48
49 AC_ARG_ENABLE(ecore_wayland2,
50               [  --enable-ecore-wayland2  Build on Ecore Wayland2],
51               enable_ecore_wayland2=yes,
52               enable_ecore_wayland2=no)
53
54 DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -DDALI_PROFILE_${enable_profile}"
55 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
56 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
57 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
58 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
59 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
60 AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
61 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
62 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
63 AM_CONDITIONAL([ECORE_WAYLAND2], [test x$enable_ecore_wayland2 = xyes])
64 AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
65
66
67 ### AM_CONDITIONAL([TIZENBUILD], [test x$enable_tizenBuild = xyes])
68 ### AM_CONDITIONAL([ECOREWL2], [test x$enable_ecoreWl2 = xyes])
69
70 PKG_CHECK_MODULES(DALICORE, dali-core)
71 PKG_CHECK_MODULES(DALIADAPTOR, dali-adaptor)
72 PKG_CHECK_MODULES(DALITOOLKIT, dali-toolkit)
73
74 if test "x$enable_profile" = "xMOBILE" -o "x$enable_profile" = "xWEARABLE" -o "x$enable_profile" = "xTV" -o "x$enable_profile" = "xIVI" -o "x$enable_profile" = "xCOMMON"; then
75   PKG_CHECK_MODULES(DALIWIDGET, widget_viewer_dali)
76   if test x$enable_ecore_wayland2 = xyes; then
77     PKG_CHECK_MODULES(ECORE_WL2, ecore-wl2)
78   else
79     PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
80   fi
81 fi
82
83
84 # Checks for libraries. added for widget_viewer_dali binding only for tizen
85 # added for key grab binding only for tizen
86 ## if test x$enable_tizenBuild = xyes; then
87 ##  PKG_CHECK_MODULES(DALI, dali-core dali-adaptor dali-toolkit widget_viewer_dali)
88 ##   if test x$enable_ecoreWl2 = xyes; then
89 ##     PKG_CHECK_MODULES(ECORE_WL2, ecore-wl2)
90 ##   else
91 ##     PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
92 ##   fi
93 ##  else
94 ##   PKG_CHECK_MODULES(DALI, dali-core dali-adaptor dali-toolkit)
95 ## fi
96
97
98 if test x$DALI_DATA_RW_DIR != x; then
99   dataReadWriteDir=$DALI_DATA_RW_DIR
100 else
101   dataReadWriteDir=${prefix}/share/dali/
102 fi
103
104 if test x$DALI_DATA_RO_DIR != x; then
105   dataReadOnlyDir=$DALI_DATA_RO_DIR
106 else
107   dataReadOnlyDir=${prefix}/share/dali/
108 fi
109
110 AC_SUBST(dataReadWriteDir)
111 AC_SUBST(dataReadOnlyDir)
112 AC_SUBST(DALI_CSHARP_BINDER_CFLAGS)
113 AC_SUBST(DALI_PROFILE_CFLAGS)
114
115 AC_CONFIG_FILES([Makefile])
116 AC_CONFIG_FILES([dali-csharp-binder.pc])
117
118 AC_OUTPUT
119
120
121 echo "
122 Configuration
123 -------------
124   Prefix:                           $prefix
125   Debug Build:                      $enable_debug
126   Compile flags:                    $DALI_CSHARP_BINDER_CFLAGS
127   Profile:                          $enable_profile
128   Data Dir (Read/Write):            $dataReadWriteDir
129   Data Dir (Read Only):             $dataReadOnlyDir
130 "