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