Merge branch 'master' of https://github.com/OpenPLi/enigma2
[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(libvugles2,
92         AS_HELP_STRING([--with-libvugles2],[use libvugles2, yes or no]),
93         [with_libvugles2=$withval],[with_libvugles2=no])
94 if test "$with_libvugles2" = "yes"; then
95         PKG_CHECK_MODULES(LIBVUGLES2, [libvugles2])
96         GLES_CFLAGS="-DUSE_LIBVUGLES2"
97 fi
98 AM_CONDITIONAL(HAVE_LIBVUGLES2, test "$with_libvugles2" = "yes")
99
100 AC_ARG_WITH(libsdl,
101         AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
102         [with_libsdl=$withval],[with_libsdl=no])
103 if test "$with_libsdl" = "yes"; then
104         PKG_CHECK_MODULES(LIBSDL, sdl)
105 fi
106 AM_CONDITIONAL(HAVE_LIBSDL, test "$with_libsdl" = "yes")
107
108 AC_ARG_WITH(libxine,
109         AS_HELP_STRING([--with-libxine],[use libxine, yes or no]),
110         [with_libxine=$withval],[with_libxine=no])
111 if test "$with_libxine" = "yes"; then
112         PKG_CHECK_MODULES(LIBXINE, libxine)
113         AC_DEFINE([WITH_XINE],[1],[Define to 1 if you have libxine])
114 fi
115 AM_CONDITIONAL(HAVE_LIBXINE, test "$with_libxine" = "yes")
116
117 AC_ARG_WITH(debug,
118         AS_HELP_STRING([--without-debug],[disable debugging code]),
119         [with_debug="$withval"],[with_debug="yes"])
120 if test "$with_debug" = "yes"; then
121         DEBUG_CFLAGS="-ggdb3"
122         AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code])
123 fi
124
125 AC_ARG_WITH(memcheck,
126         AS_HELP_STRING([--with-memcheck],[enable memory leak checks]),
127         [with_memcheck="$withval"],[with_memcheck="no"])
128 if test "$with_memcheck" = "yes"; then
129         AC_DEFINE([MEMLEAK_CHECK],[1],[Define to 1 to enable memory leak checks])
130 fi
131
132 AC_ARG_WITH(po,
133         AS_HELP_STRING([--with-po],[enable updating of po files]),
134         [with_po="$withval"],[with_po="no"])
135 if test "$with_po" = "yes"; then
136         AC_PATH_PROG(MSGINIT, msginit)
137         AC_PATH_PROG(MSGMERGE, msgmerge)
138         AC_PATH_PROG(MSGUNIQ, msguniq)
139         AC_PATH_PROG(XGETTEXT, xgettext)
140         if test -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
141                 AC_MSG_ERROR([Could not find required gettext tools])
142         fi
143 fi
144 AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
145
146 AC_ARG_WITH(alsa,
147         AC_HELP_STRING([--with-alsa], [Enable ALSA support]),
148         [[with_alse=$withval]],
149         [[with_alse=no]]
150 )
151 if test x"$with_alsa" == xyes ; then
152         AC_DEFINE(HAVE_ALSA, 1,[Enables ALSA support])
153         PKG_CHECK_MODULES(ALSA, alsa)
154 fi
155
156 AC_ARG_WITH(alsacard,
157         AC_HELP_STRING([--with-alsacard=card], [use 'card' for alsa card device, e.g. hw:0]),
158         [[with_alsacard=$withval]],
159         [[with_alsacard=no]]
160 )
161 if test x"$with_alsacard" != xno ; then
162         AC_DEFINE_UNQUOTED(ALSA_CARD, "$withval",[Defines which alsa card to use])
163 fi
164
165 AC_ARG_WITH(alsamixer,
166         AC_HELP_STRING([--with-alsamixer=mixername], [use alsa 'mixername' for volume control, e.g. Master]),
167         [[with_alsamixer=$withval]],
168         [[with_alsamixer=no]]
169 )
170 if test x"$with_alsamixer" != xno ; then
171         AC_DEFINE_UNQUOTED(ALSA_VOLUME_MIXER, "$withval",[Defines which alsa mixer to use for volume control])
172 fi
173
174 AC_ARG_WITH(fbdev,
175         AC_HELP_STRING([--with-fbdev=devicename], [use devicename for framebuffer device, e.g. /dev/fb0 ]),
176         [[with_fbdev=$withval]],
177         [[with_fbdev=no]]
178 )
179 if test x"$with_fbdev" != xno ; then
180         AC_DEFINE_UNQUOTED(FB_DEV, "$withval", [Defines which device to use for main framebuffer (e.g. /dev/fb0)])
181 fi
182
183 AC_ARG_WITH(lcddev,
184         AC_HELP_STRING([--with-lcddev=devicename], [use devicename for lcd framebuffer device, e.g. /dev/fb1 ]),
185         [[with_lcddev=$withval]],
186         [[with_lcddev=no]]
187 )
188 if test x"$with_lcddev" != xno ; then
189         AC_DEFINE_UNQUOTED(LCD_DEV, "$withval", [Defines which device to use for lcd (e.g. /dev/fb1)])
190 fi
191
192 ENIGMA2_CFLAGS="-fno-rtti -fno-exceptions"
193 AC_SUBST(ENIGMA2_CFLAGS)
194
195 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
196 CFLAGS="$CFLAGS $DEBUG_CFLAGS -Wall"
197 CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS -Wall $BASE_CFLAGS $ENIGMA2_CFLAGS $PTHREAD_CFLAGS $OPENMP_CFLAGS $ALSA_CFLAGS"
198
199 AC_CONFIG_FILES([
200 Makefile
201 data/Makefile
202 data/fonts/Makefile
203 data/countries/Makefile
204 data/extensions/Makefile
205 data/keymaps/Makefile
206 data/hw_info/Makefile
207 data/rc_models/Makefile
208 data/skin_default/Makefile
209 data/skin_default/menu/Makefile
210 data/skin_default/icons/Makefile
211 data/skin_default/buttons/Makefile
212 data/skin_default/spinner/Makefile
213 data/skin_default/LCDIcons/Makefile
214 include/Makefile
215 lib/Makefile
216 lib/base/eenv.cpp
217 lib/python/Makefile
218 lib/python/Components/Makefile
219 lib/python/Components/Converter/Makefile
220 lib/python/Components/Renderer/Makefile
221 lib/python/Components/Sources/Makefile
222 lib/python/Screens/Makefile
223 lib/python/Plugins/Makefile
224 lib/python/Plugins/SystemPlugins/CableScan/Makefile
225 lib/python/Plugins/SystemPlugins/FastScan/Makefile
226 lib/python/Plugins/SystemPlugins/OSDPositionSetup/Makefile
227 lib/python/Plugins/SystemPlugins/OSD3DSetup/Makefile
228 lib/python/Plugins/SystemPlugins/HdmiCEC/Makefile
229 lib/python/Plugins/SystemPlugins/VideoClippingSetup/Makefile
230 lib/python/Plugins/Extensions/CutListEditor/Makefile
231 lib/python/Plugins/Extensions/CutListEditor/meta/Makefile
232 lib/python/Plugins/Extensions/DVDBurn/Makefile
233 lib/python/Plugins/Extensions/DVDBurn/meta/Makefile
234 lib/python/Plugins/Extensions/DVDPlayer/Makefile
235 lib/python/Plugins/Extensions/DVDPlayer/meta/Makefile
236 lib/python/Plugins/Extensions/GraphMultiEPG/Makefile
237 lib/python/Plugins/Extensions/GraphMultiEPG/meta/Makefile
238 lib/python/Plugins/Extensions/Makefile
239 lib/python/Plugins/Extensions/MediaPlayer/Makefile
240 lib/python/Plugins/Extensions/MediaPlayer/meta/Makefile
241 lib/python/Plugins/Extensions/MediaScanner/Makefile
242 lib/python/Plugins/Extensions/MediaScanner/meta/Makefile
243 lib/python/Plugins/Extensions/PicturePlayer/Makefile
244 lib/python/Plugins/Extensions/PicturePlayer/meta/Makefile
245 lib/python/Plugins/Extensions/PicturePlayer/data/Makefile
246 lib/python/Plugins/Extensions/SocketMMI/Makefile
247 lib/python/Plugins/Extensions/SocketMMI/meta/Makefile
248 lib/python/Plugins/Extensions/SocketMMI/src/Makefile
249 lib/python/Plugins/Extensions/TuxboxPlugins/Makefile
250 lib/python/Plugins/Extensions/TuxboxPlugins/meta/Makefile
251 lib/python/Plugins/PLi/Makefile
252 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/Makefile
253 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/Makefile
254 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/Makefile
255 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/Makefile
256 lib/python/Plugins/SystemPlugins/DiseqcTester/Makefile
257 lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile
258 lib/python/Plugins/SystemPlugins/Hotplug/Makefile
259 lib/python/Plugins/SystemPlugins/Hotplug/meta/Makefile
260 lib/python/Plugins/SystemPlugins/Makefile
261 lib/python/Plugins/SystemPlugins/TempFanControl/Makefile
262 lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile
263 lib/python/Plugins/SystemPlugins/NetworkWizard/Makefile
264 lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile
265 lib/python/Plugins/SystemPlugins/PositionerSetup/Makefile
266 lib/python/Plugins/SystemPlugins/PositionerSetup/meta/Makefile
267 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/Makefile
268 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/Makefile
269 lib/python/Plugins/SystemPlugins/Satfinder/Makefile
270 lib/python/Plugins/SystemPlugins/Satfinder/meta/Makefile
271 lib/python/Plugins/SystemPlugins/SkinSelector/Makefile
272 lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile
273 lib/python/Plugins/SystemPlugins/SoftwareManager/Makefile
274 lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile
275 lib/python/Plugins/SystemPlugins/VideoEnhancement/Makefile
276 lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile
277 lib/python/Plugins/SystemPlugins/VideoTune/Makefile
278 lib/python/Plugins/SystemPlugins/VideoTune/meta/Makefile
279 lib/python/Plugins/SystemPlugins/Videomode/Makefile
280 lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile
281 lib/python/Plugins/SystemPlugins/WirelessLan/Makefile
282 lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile
283 lib/python/Tools/Makefile
284 po/Makefile
285 main/Makefile
286 tools/Makefile
287 tools/enigma2.sh
288 enigma2.pc
289 ])
290 AC_OUTPUT