Merge "DALi Version 2.1.26" into devel/master
[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],[2.0.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 DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -std=c++17 "
28 if test "x$enable_debug" = "xyes"; then
29   DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -DDEBUG_ENABLED"
30 fi
31
32 # Tizen Profile options
33 AC_ARG_ENABLE([profile],
34               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,IVI,UBUNTU],
35                             [Select the variant of tizen])],
36               [enable_profile=$enableval],
37               [enable_profile=UBUNTU])
38
39 # Ensure valid profile selected
40 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
41   AC_MSG_ERROR([$enable_profile is an invalid profile])
42 fi
43
44
45 AC_ARG_ENABLE(wayland,
46               [  --enable-wayland       Build on Wayland],
47               enable_wayland=yes,
48               enable_wayland=no)
49
50 AC_ARG_ENABLE(ecore_wayland2,
51               [  --enable-ecore-wayland2  Build on Ecore Wayland2],
52               enable_ecore_wayland2=yes,
53               enable_ecore_wayland2=no)
54
55 AC_ARG_ENABLE([rive-animation-view],
56               [AC_HELP_STRING([--enable-rive-animation-view],
57               [enables the rive animation view])],
58               [enable_rive_animation_view=yes],
59               [enable_rive_animation_view=no])
60
61
62 DALI_CSHARP_BINDER_CFLAGS="$DALI_CSHARP_BINDER_CFLAGS -DDALI_PROFILE_${enable_profile}"
63 DALI_PROFILE_CFLAGS=" -DDALI_PROFILE_${enable_profile}"
64 AM_CONDITIONAL([COMMON_PROFILE], [test x$enable_profile = xCOMMON])
65 AM_CONDITIONAL([MOBILE_PROFILE], [test x$enable_profile = xMOBILE])
66 AM_CONDITIONAL([WEARABLE_PROFILE], [test x$enable_profile = xWEARABLE])
67 AM_CONDITIONAL([TV_PROFILE], [test x$enable_profile = xTV])
68 AM_CONDITIONAL([IVI_PROFILE], [test x$enable_profile = xIVI])
69 AM_CONDITIONAL([UBUNTU_PROFILE], [test x$enable_profile = xUBUNTU])
70 AM_CONDITIONAL([WAYLAND], [test x$enable_wayland = xyes])
71 AM_CONDITIONAL([ECORE_WAYLAND2], [test x$enable_ecore_wayland2 = xyes])
72 AM_CONDITIONAL([ENABLE_RENAME_SO], [test x$enable_rename_so = xyes])
73 AM_CONDITIONAL([RIVE_ANIMATION], [test x$enable_rive_animation_view = xyes])
74
75 ### AM_CONDITIONAL([TIZENBUILD], [test x$enable_tizenBuild = xyes])
76 ### AM_CONDITIONAL([ECOREWL2], [test x$enable_ecoreWl2 = xyes])
77
78 PKG_CHECK_MODULES(DALICORE, dali2-core)
79 PKG_CHECK_MODULES(DALIADAPTOR, dali2-adaptor)
80 PKG_CHECK_MODULES(DALITOOLKIT, dali2-toolkit)
81
82 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
83   PKG_CHECK_MODULES(DALIWIDGET, widget_viewer_dali)
84   if test "x$enable_rive_animation_view" = "xyes"; then
85     PKG_CHECK_MODULES(DALIRIVEVIEW, dali2-extension-rive-animation-view)
86   fi
87
88   if test x$enable_ecore_wayland2 = xyes; then
89     PKG_CHECK_MODULES(ECORE_WL2, ecore-wl2)
90   else
91     PKG_CHECK_MODULES(ECORE_WAYLAND, ecore-wayland)
92   fi
93 fi
94
95 if test "x$enable_profile" = "xWEARABLE"; then
96   PKG_CHECK_MODULES(DALIWATCHVIEW, watch_viewer_dali)
97   PKG_CHECK_MODULES(DALIWATCHHOLDERBASE, watch-holder-base)
98 fi
99
100 if test x$DALI_DATA_RW_DIR != x; then
101   dataReadWriteDir=$DALI_DATA_RW_DIR
102 else
103   dataReadWriteDir=${prefix}/share/dali/
104 fi
105
106 if test x$DALI_DATA_RO_DIR != x; then
107   dataReadOnlyDir=$DALI_DATA_RO_DIR
108 else
109   dataReadOnlyDir=${prefix}/share/dali/
110 fi
111
112 if test x$includedir != x; then
113   INCLUDE_DIR=$includedir
114 else
115   INCLUDE_DIR=$prefix/include/
116 fi
117 if test x$libdir != x; then
118   LIB_DIR=$libdir
119 else
120   LIB_DIR=$prefix/lib/
121 fi
122 if test x$bindir != x; then
123   BIN_DIR=$bindir
124 else
125   BIN_DIR=$prefix/bin/
126 fi
127
128 PREFIX=$prefix
129 EXEC_PREFIX=$exec_prefix
130 DEV_INCLUDE_PATH=$INCLUDE_DIR
131
132 AC_SUBST(dataReadWriteDir)
133 AC_SUBST(dataReadOnlyDir)
134 AC_SUBST(DALI_CSHARP_BINDER_CFLAGS)
135 AC_SUBST(DALI_PROFILE_CFLAGS)
136
137 AC_SUBST(INCLUDE_DIR)
138 AC_SUBST(LIB_DIR)
139 AC_SUBST(BIN_DIR)
140
141 AC_SUBST(PREFIX)
142 AC_SUBST(EXEC_PREFIX)
143 AC_SUBST(DEV_INCLUDE_PATH)
144
145 AC_CONFIG_FILES([Makefile])
146 AC_CONFIG_FILES([dali2-csharp-binder.pc])
147
148 AC_OUTPUT
149
150
151 echo "
152 Configuration
153 -------------
154   Prefix:                           $prefix
155   EXEC_PREFIX:                      $EXEC_PREFIX
156   INCLUDE_DIR:                      $INCLUDE_DIR
157   LIB_DIR:                          $LIB_DIR
158   BIN_DIR:                          $BIN_DIR
159   Debug Build:                      $enable_debug
160   Compile flags:                    $DALI_CSHARP_BINDER_CFLAGS
161   Profile:                          $enable_profile
162   Data Dir (Read/Write):            $dataReadWriteDir
163   Data Dir (Read Only):             $dataReadOnlyDir
164 "