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