06a73e8d64de6ec8be47dc8f9114bc69b243b8ce
[openblackhole/openblackhole-enigma2.git] / configure.ac
1 AC_INIT([enigma2],[2.4])
2 AM_INIT_AUTOMAKE(enigma2,2.4)
3
4 TUXBOX_APPS
5 TUXBOX_APPS_DIRECTORY
6 TUXBOX_APPS_PKGCONFIG
7
8 AC_PROG_CC
9 AC_PROG_CXX
10 AC_PROG_RANLIB
11 AC_CONFIG_MACRO_DIR([m4])
12
13 AC_ARG_WITH(boxtype,
14         [  --with-boxtype=NAME box type [[none,dm7025,dm800...]]],
15         [BOXTYPE="$withval"],[BOXTYPE="dm800"])
16
17 AC_SUBST(BOXTYPE)
18 AC_DEFINE_UNQUOTED(BOXTYPE,"$BOXTYPE",[box type])
19
20 if test x"$BOXTYPE" == "xdm8000" ; then
21         AC_DEFINE(KEY_PLAY_ACTUALLY_IS_KEY_PLAYPAUSE, 1,[define when rc sends a KEY_PLAY event for its KEY_PLAYPAUSE key])
22 fi
23
24 AC_ARG_WITH(libsdl,
25         AS_HELP_STRING([--with-libsdl],[use sdl, yes or no]),
26         [[withsdl=$withval]],
27         [[withsdl=yes]]
28 )
29
30 AC_ARG_WITH(alsa,
31         AC_HELP_STRING([--with-alsa=mixername], [use alsa 'mixername' for volume control, e.g. Master]),
32         [[withalsa=$withval]],
33         [[withalsa=no]]
34 )
35
36 if test x"$withalsa" != xno ; then
37         _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(ALSA, alsa, HAVE_ALSA)
38         LDFLAGS="$LDFLAGS $ALSA_LIBS"
39         AC_DEFINE_UNQUOTED(ALSA_VOLUME_MIXER, "$withval",[Defines which alsa mixer to use for volume control])
40 fi
41
42 AC_ARG_WITH(textlcd,
43         AC_HELP_STRING([--with-textlcd], [use ascii based lcd, yes or no]),
44         [[withtextlcd=$withval]],
45         [[withtextlcd=no]]
46 )
47 if test x"$withtextlcd" != xno ; then
48         AC_DEFINE(HAVE_TEXTLCD, 1,[Define when using an ascii based lcd device])
49 fi
50 AM_CONDITIONAL(HAVE_TEXTLCD, test x"$withtextlcd" != xno)
51
52 AC_ARG_WITH(colorlcd,
53         AC_HELP_STRING([--with-colorlcd], [use 96x64 16bpp color display, yes or no]),
54         [[withcolorlcd=$withval]],
55         [[withcolorlcd=no]]
56 )
57 if test x"$withcolorlcd" != xno ; then
58         AC_DEFINE(HAVE_COLORLCD, 1,[Define when using a 96x64 color display device])
59 fi
60 AM_CONDITIONAL(HAVE_COLORLCD, test x"$withcolorlcd" != xno)
61
62 AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
63 if test x"${have_ddvdlib}" = xyes ; then
64         AC_DEFINE(HAVE_DDVDLIB, 1,[Define if ddvdlib is available])
65 else
66         AC_MSG_NOTICE([ddvdlib not found... dont build dvd plugin])
67 fi
68 AM_CONDITIONAL(HAVE_DDVDLIB, test "$have_ddvdlib" = "yes")
69
70 AM_PATH_PYTHON
71 AX_PYTHON_DEVEL
72 #AM_PATH_XINE(1.1.0,, AC_MSG_ERROR([*** Please install xine-lib (devel) first ***]))
73
74 TUXBOX_APPS_DVB
75
76 _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(FREETYPE, freetype2, HAVE_FREETYPE2)
77 if test "$HAVE_FREETYPE2" = "no" ; then
78         TUXBOX_APPS_LIB_CONFIG(FREETYPE, freetype-config)
79 fi
80 TUXBOX_APPS_LIB_PKGCONFIG(FRIBIDI,fribidi)
81 TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag)
82 TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
83 #TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins)
84 TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
85 TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2)
86 TUXBOX_APPS_LIB_PKGCONFIG(DVBSI,libdvbsi++)
87 _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMER,gstreamer,HAVE_GSTREAMER)
88 _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMERPBUTILS,gstreamer-pbutils,HAVE_GSTSTREAMERPBUTILS)
89 _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(LIBXINE,libxine,HAVE_LIBXINE)
90 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
91 JPEG_LIBS="-ljpeg"
92 AC_SUBST(JPEG_LIBS)
93
94 AC_SUBST(LIBUNGIF_LIBS,"")
95 AC_CHECK_HEADERS(gif_lib.h,
96         AC_CHECK_LIB(ungif,DGifOpen,
97         [AC_DEFINE(HAVE_LIBUNGIF,1,[Define if you have libgif/libungif including devel headers])
98                 LIBUNGIF_LIBS="-lungif"],
99                 [AC_CHECK_LIB(gif,DGifOpen,
100                         [AC_DEFINE(HAVE_LIUNBGIF,1)
101                         LIBUNGIF_LIBS="-lgif"])]))
102
103 TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
104
105 # ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
106 # and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
107 AC_LANG_SAVE
108 AC_LANG_CPLUSPLUS
109 TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
110 AC_LANG_RESTORE
111
112 if test "$withsdl" = "yes" ; then
113         _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(SDL,sdl,WITH_SDL)
114         if test "$WITH_SDL" = "no" ; then
115                 TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
116                 AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
117         fi
118 fi
119 # allow 'if WITH_SDL' conditionals in Makefile.am
120 AM_CONDITIONAL(WITH_SDL, test "$WITH_SDL" = "yes")
121
122 CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)'
123 CPPFLAGS="$CPPFLAGS -D_REENTRANT $PYTHON_CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SDL_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS $DVBSI_CFLAGS $GSTREAMER_CFLAGS $GSTREAMERPBUTILS_CFLAGS $LIBXINE_CFLAGS $LIBUNGIF_CFLAGS"
124 #CPPFLAGS="$CPPFLAGS -DMEMLEAK_CHECK"
125 CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
126
127 #if test "$GCC" = "yes"
128 #then
129 #        gccmajor=`$CC -dumpversion | head -n 1 | awk '{print $NF;}' | cut -d. -f1`
130 #        if test "$gccmajor" -gt "3"
131 #        then
132 #                CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics"
133 #        fi
134 #fi
135
136 LDFLAGS="$LDFLAGS -pthread $PYTHON_LDFLAGS $SDL_LDFLAGS $GSTREAMER_LDFLAGS $GSTREAMERPBUTILS_LDFLAGS $LIBXINE_LDFLAGS $LIBUNGIF_LDFLAGS"
137 #LDFLAGS="-rdynamic $LDFLAGS"
138
139 TUXBOX_APPS_GETTEXT
140
141 AC_CONFIG_FILES([
142 Makefile
143 data/Makefile
144 data/fonts/Makefile
145 data/countries/Makefile
146 data/defaults/Makefile
147 data/defaults/Dream/Makefile
148 data/defaults/Dream/hdbouquets/Makefile
149 data/defaults/Dream/sdbouquets/Makefile
150 data/extensions/Makefile
151 data/skin_default/Makefile
152 data/skin_default/menu/Makefile
153 data/skin_default/icons/Makefile
154 data/skin_default/buttons/Makefile
155 data/skin_default/spinner/Makefile
156 include/Makefile
157 lib/Makefile
158 lib/actions/Makefile
159 lib/base/Makefile
160 lib/driver/Makefile
161 lib/dvb/Makefile
162 lib/dvb/lowlevel/Makefile
163 lib/dvb_ci/Makefile
164 lib/gdi/Makefile
165 lib/gui/Makefile
166 lib/mmi/Makefile
167 lib/nav/Makefile
168 lib/network/Makefile
169 lib/python/Makefile
170 lib/python/Components/Makefile
171 lib/python/Components/Converter/Makefile
172 lib/python/Components/Renderer/Makefile
173 lib/python/Components/Sources/Makefile
174 lib/python/Screens/Makefile
175 lib/python/Plugins/Makefile
176 lib/python/Plugins/SystemPlugins/SoftwareUpdate/Makefile
177 lib/python/Plugins/SystemPlugins/ConfigurationBackup/Makefile
178 lib/python/Plugins/SystemPlugins/CableScan/Makefile
179 lib/python/Plugins/SystemPlugins/FastScan/Makefile
180 lib/python/Plugins/DemoPlugins/Makefile
181 lib/python/Plugins/DemoPlugins/TPMDemo/Makefile
182 lib/python/Plugins/DemoPlugins/TestPlugin/Makefile
183 lib/python/Plugins/Extensions/CutListEditor/Makefile
184 lib/python/Plugins/Extensions/CutListEditor/meta/Makefile
185 lib/python/Plugins/Extensions/DVDBurn/Makefile
186 lib/python/Plugins/Extensions/DVDBurn/meta/Makefile
187 lib/python/Plugins/Extensions/DVDPlayer/Makefile
188 lib/python/Plugins/Extensions/DVDPlayer/meta/Makefile
189 lib/python/Plugins/Extensions/DVDPlayer/src/Makefile
190 lib/python/Plugins/Extensions/GraphMultiEPG/Makefile
191 lib/python/Plugins/Extensions/GraphMultiEPG/meta/Makefile
192 lib/python/Plugins/Extensions/Makefile
193 lib/python/Plugins/Extensions/MediaPlayer/Makefile
194 lib/python/Plugins/Extensions/MediaPlayer/meta/Makefile
195 lib/python/Plugins/Extensions/MediaScanner/Makefile
196 lib/python/Plugins/Extensions/MediaScanner/meta/Makefile
197 lib/python/Plugins/Extensions/Modem/Makefile
198 lib/python/Plugins/Extensions/PicturePlayer/Makefile
199 lib/python/Plugins/Extensions/PicturePlayer/meta/Makefile
200 lib/python/Plugins/Extensions/PicturePlayer/data/Makefile
201 lib/python/Plugins/Extensions/SocketMMI/Makefile
202 lib/python/Plugins/Extensions/SocketMMI/meta/Makefile
203 lib/python/Plugins/Extensions/SocketMMI/src/Makefile
204 lib/python/Plugins/Extensions/TuxboxPlugins/Makefile
205 lib/python/Plugins/Extensions/TuxboxPlugins/meta/Makefile
206 lib/python/Plugins/SystemPlugins/CleanupWizard/Makefile
207 lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile
208 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/Makefile
209 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/Makefile
210 lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/Makefile
211 lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile
212 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/Makefile
213 lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/Makefile
214 lib/python/Plugins/SystemPlugins/DiseqcTester/Makefile
215 lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile
216 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/Makefile
217 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/meta/Makefile
218 lib/python/Plugins/SystemPlugins/Hotplug/Makefile
219 lib/python/Plugins/SystemPlugins/Hotplug/meta/Makefile
220 lib/python/Plugins/SystemPlugins/Makefile
221 lib/python/Plugins/SystemPlugins/TempFanControl/Makefile
222 lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile
223 lib/python/Plugins/SystemPlugins/NetworkWizard/Makefile
224 lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile
225 lib/python/Plugins/SystemPlugins/NFIFlash/Makefile
226 lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile
227 lib/python/Plugins/SystemPlugins/PositionerSetup/Makefile
228 lib/python/Plugins/SystemPlugins/PositionerSetup/meta/Makefile
229 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/Makefile
230 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/Makefile
231 lib/python/Plugins/SystemPlugins/Satfinder/Makefile
232 lib/python/Plugins/SystemPlugins/Satfinder/meta/Makefile
233 lib/python/Plugins/SystemPlugins/SkinSelector/Makefile
234 lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile
235 lib/python/Plugins/SystemPlugins/SoftwareManager/Makefile
236 lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile
237 lib/python/Plugins/SystemPlugins/VideoEnhancement/Makefile
238 lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile
239 lib/python/Plugins/SystemPlugins/VideoTune/Makefile
240 lib/python/Plugins/SystemPlugins/VideoTune/meta/Makefile
241 lib/python/Plugins/SystemPlugins/Videomode/Makefile
242 lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile
243 lib/python/Plugins/SystemPlugins/WirelessLan/Makefile
244 lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile
245 lib/python/Tools/Makefile
246 lib/service/Makefile
247 lib/components/Makefile
248 po/Makefile
249 main/Makefile
250 tools/Makefile
251 enigma2.pc
252 ])
253 AC_OUTPUT
254
255 #lib/python/Plugins/Extensions/SimpleRSS/Makefile
256 #lib/python/Plugins/Extensions/FileManager/Makefile