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