use autoconf macros for determining xml2 and xmlccwrap linking
[enigma2.git] / configure.ac
1 AC_INIT(tuxbox-enigma,0.0.1)
2 AM_INIT_AUTOMAKE(tuxbox-enigma,0.0.1)
3
4 TUXBOX_APPS
5 TUXBOX_APPS_DIRECTORY
6
7 AC_PROG_CC
8 AC_PROG_CXX
9 AC_PROG_RANLIB
10
11 AC_ARG_WITH(libsdl,
12         AC_HELP_STRING([--with-libsdl], [use sdl, yes or no]),
13         [[withsdl=$withval]],
14         [[withsdl=yes]]
15 )
16
17 AM_PATH_PYTHON()
18 AC_PYTHON_DEVEL
19 #AM_PATH_XINE(1.1.0,, AC_MSG_ERROR([*** Please install xine-lib (devel) first ***]))
20
21 TUXBOX_APPS_DVB
22
23 TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config)
24 TUXBOX_APPS_LIB_PKGCONFIG(FRIBIDI,fribidi)
25 TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag)
26 TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
27 #TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins)
28 TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
29 TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2)
30 TUXBOX_APPS_LIB_PKGCONFIG(DVBSI,libdvbsi++)
31 _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMER,gstreamer,HAVE_GSTREAMER)
32 AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
33 JPEG_LIBS="-ljpeg"
34 AC_SUBST(JPEG_LIBS)
35
36 AC_CHECK_LIB(ungif, DGifOpenFileName, HAVE_LIBUNGIF="yes", HAVE_LIBUNGIF="no")
37 LIBUNGIF_LIBS="-lungif"
38 AC_SUBST(LIBUNGIF_LIBS)
39
40 TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
41
42 # ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
43 # and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
44 TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
45
46 if test "$withsdl" = "yes" ; then
47         TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
48         AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
49 fi
50
51 CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)'
52 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 $LIBUNGIF_CLFAGS"
53 CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
54 LDFLAGS="$LDFLAGS -pthread $PYTHON_LDFLAGS $SDL_LDFLAGS $GSTREAMER_LDFLAGS $LIBUNGIF_LDFLAGS"
55
56 TUXBOX_APPS_GETTEXT
57
58 AC_OUTPUT([
59 Makefile
60 data/Makefile
61 data/fonts/Makefile
62 data/countries/Makefile
63 data/defaults/Makefile
64 data/extensions/Makefile
65 data/skin_default/Makefile
66 data/skin_default/menu/Makefile
67 lib/Makefile
68 lib/actions/Makefile
69 lib/base/Makefile
70 lib/driver/Makefile
71 lib/dvb/Makefile
72 lib/dvb_ci/Makefile
73 lib/gdi/Makefile
74 lib/gui/Makefile
75 lib/nav/Makefile
76 lib/python/Makefile
77 lib/python/Components/Makefile
78 lib/python/Components/Converter/Makefile
79 lib/python/Components/Renderer/Makefile
80 lib/python/Components/Sources/Makefile
81 lib/python/Screens/Makefile
82 lib/python/Plugins/Makefile
83 lib/python/Plugins/SystemPlugins/Makefile
84 lib/python/Plugins/SystemPlugins/SoftwareUpdate/Makefile
85 lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/Makefile
86 lib/python/Plugins/SystemPlugins/PositionerSetup/Makefile
87 lib/python/Plugins/SystemPlugins/ConfigurationBackup/Makefile
88 lib/python/Plugins/SystemPlugins/Satfinder/Makefile
89 lib/python/Plugins/SystemPlugins/SkinSelector/Makefile
90 lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/Makefile
91 lib/python/Plugins/DemoPlugins/Makefile
92 lib/python/Plugins/DemoPlugins/TestPlugin/Makefile
93 lib/python/Plugins/Extensions/Makefile
94 lib/python/Plugins/Extensions/IpkgInstaller/Makefile
95 lib/python/Plugins/Extensions/TuxboxPlugins/Makefile
96 lib/python/Plugins/Extensions/FileManager/Makefile
97 lib/python/Plugins/Extensions/CutListEditor/Makefile
98 lib/python/Plugins/Extensions/MediaScanner/Makefile
99 lib/python/Plugins/Extensions/MediaPlayer/Makefile
100 lib/python/Plugins/Extensions/PicturePlayer/Makefile
101 lib/python/Plugins/Extensions/PicturePlayer/data/Makefile
102 lib/python/Plugins/Extensions/GraphMultiEPG/Makefile
103 lib/python/Tools/Makefile
104 lib/service/Makefile
105 lib/components/Makefile
106 po/Makefile
107 main/Makefile
108 tools/Makefile
109 ])
110
111 #lib/python/Plugins/Extensions/SimpleRSS/Makefile