vuplus event driver: add vusolo4k and vuzero to the models that need the event driver...
[openblackhole/openblackhole-enigma2.git] / configure.ac
1 AC_INIT([enigma2],[4],[forum@openpli.org])
2 AM_INIT_AUTOMAKE([dist-bzip2 no-define tar-pax -Wno-portability])
3 AC_CONFIG_HEADERS([enigma2_config.h])
4
5 # Silent rules are available since 1.11, but older versions
6 # are still in use. So don't use them unconditionally.
7 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
8
9 AC_USE_SYSTEM_EXTENSIONS
10 AC_SYS_LARGEFILE
11
12 AC_PROG_CC
13 AC_PROG_CXX
14 m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
15 AC_CONFIG_MACRO_DIR([m4])
16 AC_OPENMP()
17
18 AC_PATH_PROG(MSGFMT, msgfmt, AC_MSG_ERROR(Could not find msgfmt))
19
20 AM_PATH_PYTHON
21 AX_PYTHON_DEVEL
22 AX_PKG_SWIG
23 AX_SWIG_ENABLE_CXX
24 AX_SWIG_PYTHON
25 AX_PTHREAD
26
27 TUXBOX_APPS_DVB
28
29 AM_CONDITIONAL(HAVE_GIT_DIR, test -d "$srcdir/.git")
30 AM_CONDITIONAL(HAVE_FAKE_GIT_DIR, test -f "$srcdir/.git/last_commit_info")
31
32 dnl versions of gstreamer and plugins-base
33 AC_ARG_WITH(gstversion,
34         AS_HELP_STRING([--with-gstversion],[use gstreamer version (major.minor)]),
35         [GST_MAJORMINOR=$withval],[GST_MAJORMINOR=0.10])
36
37 PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_MAJORMINOR gstreamer-pbutils-$GST_MAJORMINOR)
38 PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-$GST_MAJORMINOR gstreamer-pbutils-$GST_MAJORMINOR libdvbsi++ libpng libxml-2.0 sigc++-1.2 libssl libcrypto])
39 PKG_CHECK_MODULES(LIBDDVD, libdreamdvd, HAVE_LIBDDVD="yes", HAVE_LIBDDVD="no")
40 AM_CONDITIONAL(HAVE_LIBDDVD, test "$HAVE_LIBDDVD" = "yes")
41
42 AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"], [AC_MSG_ERROR([Could not find libdl])])
43 AC_SUBST(LIBDL_LIBS)
44 AC_CHECK_LIB([jpeg], [jpeg_set_defaults], [LIBJPEG_LIBS="-ljpeg"], [AC_MSG_ERROR([Could not find libjpeg])])
45 AC_SUBST(LIBJPEG_LIBS)
46 AC_CHECK_LIB([ungif], [DGifOpen], [LIBGIF_LIBS="-lungif"], [AC_CHECK_LIB([gif], [DGifOpen], [LIBGIF_LIBS="-lgif"], [AC_MSG_ERROR([Could not find libgif or libungif])])])
47 AC_SUBST(LIBGIF_LIBS)
48
49 AC_ARG_WITH(boxtype,
50         [  --with-boxtype=NAME box type [[none,dm7025,dm800...]]],
51         [BOXTYPE="$withval"],[BOXTYPE="dm800"])
52 AC_SUBST(BOXTYPE)
53 AC_DEFINE_UNQUOTED(BOXTYPE,"$BOXTYPE",[box type])
54
55 AM_CONDITIONAL(DREAMBOX, test `echo "$BOXTYPE" | cut -b 1-2` == "dm")
56 AM_CONDITIONAL(HAVE_TEMPFANCONTROL, test "$BOXTYPE" == dm8000 -o "$BOXTYPE" == dm800se -o "$BOXTYPE" == dm500hd)
57 if test `echo "$BOXTYPE" | cut -b 1-2` == "dm"; then
58         AC_DEFINE(DREAMBOX, 1, [Dreambox hardware])
59         AC_DEFINE(KEY_PLAY_ACTUALLY_IS_KEY_PLAYPAUSE, 1,[define when rc sends a KEY_PLAY event for its KEY_PLAYPAUSE key])
60 fi
61 if test "$BOXTYPE" == "vusolo2" -o "$BOXTYPE" == "vuduo2" -o "$BOXTYPE" == "vusolose" -o "$BOXTYPE" == "vusolo4k" -o "$BOXTYPE" == "vuzero"; then
62         AC_DEFINE(VUPLUS_RC_WORKAROUND, 1, [workaround for problem with vuplus event/rc driver])
63 fi
64
65 AC_ARG_WITH(textlcd,
66         AC_HELP_STRING([--with-textlcd], [use ascii based lcd, yes or no]),
67         [[withtextlcd=$withval]],
68         [[withtextlcd=no]]
69 )
70 if test x"$withtextlcd" != xno ; then
71         AC_DEFINE(HAVE_TEXTLCD, 1,[Define when using an ascii based lcd device])
72 fi
73 AM_CONDITIONAL(HAVE_TEXTLCD, test x"$withtextlcd" != xno)
74
75 AC_ARG_WITH(oldpvr,
76         AC_HELP_STRING([--with-oldpvr], [use /dev/misc/pvr instead of /dev/dvb/adapterX/dvrX, yes or no]),
77         [[witholdpvr=$withval]],
78         [[witholdpvr=no]]
79 )
80 if test x"$witholdpvr" != xno ; then
81         AC_DEFINE(HAVE_OLDPVR, 1,[Define when using /dev/misc/pvr])
82 fi
83 AM_CONDITIONAL(HAVE_OLDPVR, test x"$witholdpvr" != xno)
84
85 if test `echo "$BOXTYPE" | cut -b 1-2` == "vu"; then
86         AC_DEFINE(FORCE_NO_BLENDING_ACCELERATION, 1,[define when the framebuffer acceleration does not have alphablending support, though the autodetection might indicate that it does])
87         AC_DEFINE(FORCE_NO_FILL_ACCELERATION, 1,[define when the framebuffer acceleration does not have fill support])
88         AC_DEFINE(FORCE_ADVANCED_REMOTE, 1,[define to fixup the input device identification when the remote control is actually an 'advanced' remote (with play/forward/rewind keys)])
89 fi
90
91 AC_ARG_WITH(libsdl,
92         AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
93         [with_libsdl=$withval],[with_libsdl=no])
94 if test "$with_libsdl" = "yes"; then
95         PKG_CHECK_MODULES(LIBSDL, sdl)
96 fi
97 AM_CONDITIONAL(HAVE_LIBSDL, test "$with_libsdl" = "yes")
98
99 AC_ARG_WITH(libxine,
100         AS_HELP_STRING([--with-libxine],[use libxine, yes or no]),
101         [with_libxine=$withval],[with_libxine=no])
102 if test "$with_libxine" = "yes"; then
103         PKG_CHECK_MODULES(LIBXINE, libxine)
104         AC_DEFINE([WITH_XINE],[1],[Define to 1 if you have libxine])
105 fi
106 AM_CONDITIONAL(HAVE_LIBXINE, test "$with_libxine" = "yes")
107
108 AC_ARG_WITH(debug,
109         AS_HELP_STRING([--without-debug],[disable debugging code]),
110         [with_debug="$withval"],[with_debug="yes"])
111 if test "$with_debug" = "yes"; then
112         DEBUG_CFLAGS="-ggdb3"
113         AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code])
114 fi
115
116 AC_ARG_WITH(memcheck,
117         AS_HELP_STRING([--with-memcheck],[enable memory leak checks]),
118         [with_memcheck="$withval"],[with_memcheck="no"])
119 if test "$with_memcheck" = "yes"; then
120         AC_DEFINE([MEMLEAK_CHECK],[1],[Define to 1 to enable memory leak checks])
121 fi
122
123 AC_ARG_WITH(po,
124         AS_HELP_STRING([--with-po],[enable updating of po files]),
125         [with_po="$withval"],[with_po="no"])
126 if test "$with_po" = "yes"; then
127         AC_PATH_PROG(MSGINIT, msginit)
128         AC_PATH_PROG(MSGMERGE, msgmerge)
129         AC_PATH_PROG(MSGUNIQ, msguniq)
130         AC_PATH_PROG(XGETTEXT, xgettext)
131         if test -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
132                 AC_MSG_ERROR([Could not find required gettext tools])
133         fi
134 fi
135 AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
136
137 AC_ARG_WITH(alsa,
138         AC_HELP_STRING([--with-alsa], [Enable ALSA support]),
139         [[with_alse=$withval]],
140         [[with_alse=no]]
141 )
142 if test x"$with_alsa" == xyes ; then
143         AC_DEFINE(HAVE_ALSA, 1,[Enables ALSA support])
144         PKG_CHECK_MODULES(ALSA, alsa)
145 fi
146
147 AC_ARG_WITH(alsacard,
148         AC_HELP_STRING([--with-alsacard=card], [use 'card' for alsa card device, e.g. hw:0]),
149         [[with_alsacard=$withval]],
150         [[with_alsacard=no]]
151 )
152 if test x"$with_alsacard" != xno ; then
153         AC_DEFINE_UNQUOTED(ALSA_CARD, "$withval",[Defines which alsa card to use])
154 fi
155
156 AC_ARG_WITH(alsamixer,
157         AC_HELP_STRING([--with-alsamixer=mixername], [use alsa 'mixername' for volume control, e.g. Master]),
158         [[with_alsamixer=$withval]],
159         [[with_alsamixer=no]]
160 )
161 if test x"$with_alsamixer" != xno ; then
162         AC_DEFINE_UNQUOTED(ALSA_VOLUME_MIXER, "$withval",[Defines which alsa mixer to use for volume control])
163 fi
164
165 AC_ARG_WITH(fbdev,
166         AC_HELP_STRING([--with-fbdev=devicename], [use devicename for framebuffer device, e.g. /dev/fb0 ]),
167         [[with_fbdev=$withval]],
168         [[with_fbdev=no]]
169 )
170 if test x"$with_fbdev" != xno ; then
171         AC_DEFINE_UNQUOTED(FB_DEV, "$withval", [Defines which device to use for main framebuffer (e.g. /dev/fb0)])
172 fi
173
174 AC_ARG_WITH(lcddev,
175         AC_HELP_STRING([--with-lcddev=devicename], [use devicename for lcd framebuffer device, e.g. /dev/fb1 ]),
176         [[with_lcddev=$withval]],
177         [[with_lcddev=no]]
178 )
179 if test x"$with_lcddev" != xno ; then
180         AC_DEFINE_UNQUOTED(LCD_DEV, "$withval", [Defines which device to use for lcd (e.g. /dev/fb1)])
181 fi
182
183 ENIGMA2_CFLAGS="-fno-rtti -fno-exceptions"
184 AC_SUBST(ENIGMA2_CFLAGS)
185
186 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
187 CFLAGS="$CFLAGS $DEBUG_CFLAGS -Wall"
188 CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS -Wall $BASE_CFLAGS $ENIGMA2_CFLAGS $PTHREAD_CFLAGS $OPENMP_CFLAGS $ALSA_CFLAGS"
189
190 AC_CONFIG_FILES([
191 Makefile
192 data/Makefile
193 data/fonts/Makefile
194 data/countries/Makefile
195 data/extensions/Makefile
196 data/keymaps/Makefile
197 data/hw_info/Makefile
198 data/rc_models/Makefile
199 data/skin_default/Makefile
200 data/skin_default/menu/Makefile
201 data/skin_default/icons/Makefile
202 data/skin_default/buttons/Makefile
203 data/skin_default/spinner/Makefile
204 data/skin_default/LCDIcons/Makefile
205 include/Makefile
206 lib/Makefile
207 lib/base/eenv.cpp
208 lib/python/Makefile
209 lib/python/Components/Makefile
210 lib/python/Components/Converter/Makefile
211 lib/python/Components/Renderer/Makefile
212 lib/python/Components/Sources/Makefile
213 lib/python/Screens/Makefile
214 lib/python/Plugins/Makefile
215 lib/python/Plugins/SystemPlugins/CableScan/Makefile
216 lib/python/Plugins/SystemPlugins/FastScan/Makefile
217 lib/python/Plugins/SystemPlugins/OSDPositionSetup/Makefile
218 lib/python/Plugins/SystemPlugins/OSD3DSetup/Makefile
219 lib/python/Plugins/SystemPlugins/HdmiCEC/Makefile
220 lib/python/Plugins/SystemPlugins/VideoClippingSetup/Makefile
221 lib/python/Plugins/Extensions/CutListEditor/Makefile
222 lib/python/Plugins/Extensions/CutListEditor/meta/Makefile
223 lib/python/Plugins/Extensions/DVDBurn/Makefile
224 lib/python/Plugins/Extensions/DVDBurn/meta/Makefile
225 lib/python/Plugins/Extensions/DVDPlayer/Makefile
226 lib/python/Plugins/Extensions/DVDPlayer/meta/Makefile
227 lib/python/Plugins/Extensions/GraphMultiEPG/Makefile
228 lib/python/Plugins/Extensions/GraphMultiEPG/meta/Makefile
229 lib/python/Plugins/Extensions/Makefile
230 lib/python/Plugins/Extensions/MediaPlayer/Makefile
231 lib/python/Plugins/Extensions/MediaPlayer/meta/Makefile
232 lib/python/Plugins/Extensions/MediaScanner/Makefile
233 lib/python/Plugins/Extensions/MediaScanner/meta/Makefile
234 lib/python/Plugins/Extensions/PicturePlayer/Makefile
235 lib/python/Plugins/Extensions/PicturePlayer/meta/Makefile
236 lib/python/Plugins/Extensions/PicturePlayer/data/Makefile
237 lib/python/Plugins/Extensions/SocketMMI/Makefile
238 lib/python/Plugins/Extensions/SocketMMI/meta/Makefile
239 lib/python/Plugins/Extensions/SocketMMI/src/Makefile
240 lib/python/Plugins/Extensions/TuxboxPlugins/Makefile
241 lib/python/Plugins/Extensions/TuxboxPlugins/meta/Makefile
242 lib/python/Plugins/PLi/Makefile
243 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/Makefile
244 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/Makefile
245 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/Makefile
246 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/Makefile
247 lib/python/Plugins/SystemPlugins/DiseqcTester/Makefile
248 lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile
249 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/Makefile
250 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/meta/Makefile
251 lib/python/Plugins/SystemPlugins/Hotplug/Makefile
252 lib/python/Plugins/SystemPlugins/Hotplug/meta/Makefile
253 lib/python/Plugins/SystemPlugins/Makefile
254 lib/python/Plugins/SystemPlugins/TempFanControl/Makefile
255 lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile
256 lib/python/Plugins/SystemPlugins/NetworkWizard/Makefile
257 lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile
258 lib/python/Plugins/SystemPlugins/NFIFlash/Makefile
259 lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile
260 lib/python/Plugins/SystemPlugins/PositionerSetup/Makefile
261 lib/python/Plugins/SystemPlugins/PositionerSetup/meta/Makefile
262 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/Makefile
263 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/Makefile
264 lib/python/Plugins/SystemPlugins/Satfinder/Makefile
265 lib/python/Plugins/SystemPlugins/Satfinder/meta/Makefile
266 lib/python/Plugins/SystemPlugins/SkinSelector/Makefile
267 lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile
268 lib/python/Plugins/SystemPlugins/SoftwareManager/Makefile
269 lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile
270 lib/python/Plugins/SystemPlugins/VideoEnhancement/Makefile
271 lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile
272 lib/python/Plugins/SystemPlugins/VideoTune/Makefile
273 lib/python/Plugins/SystemPlugins/VideoTune/meta/Makefile
274 lib/python/Plugins/SystemPlugins/Videomode/Makefile
275 lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile
276 lib/python/Plugins/SystemPlugins/WirelessLan/Makefile
277 lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile
278 lib/python/Tools/Makefile
279 po/Makefile
280 main/Makefile
281 tools/Makefile
282 tools/enigma2.sh
283 enigma2.pc
284 ])
285 AC_OUTPUT