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