-AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
-AM_INIT_AUTOMAKE([dist-bzip2 no-define])
+AC_INIT([enigma2],[3.0.0],[enigma2-devel@lists.elitedvb.net])
+AM_INIT_AUTOMAKE([dist-bzip2 no-define tar-pax -Wno-portability])
+AC_CONFIG_HEADERS([enigma2_config.h])
-TUXBOX_APPS
-TUXBOX_APPS_DIRECTORY
+# Silent rules are available since 1.11, but older versions
+# are still in use. So don't use them unconditionally.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AC_PROG_CC
AC_PROG_CXX
-LT_INIT
+m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
AC_CONFIG_MACRO_DIR([m4])
-AC_ARG_WITH(libsdl,
- AS_HELP_STRING([--with-libsdl],[use sdl, yes or no]),
- [[with_sdl=$withval]],
- [[with_sdl=no]]
-)
-
-AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
-if test x"${have_ddvdlib}" = xyes ; then
- AC_DEFINE(HAVE_DDVDLIB, 1,[Define if ddvdlib is available])
-else
- AC_MSG_NOTICE([ddvdlib not found... dont build dvd plugin])
-fi
-AM_CONDITIONAL(HAVE_DDVDLIB, test "$have_ddvdlib" = "yes")
+AC_CHECK_HEADERS([dbox/fp.h dbox/lcd-ks0713.h])
+
+AC_PATH_PROG(MSGFMT, msgfmt, AC_MSG_ERROR(Could not find msgfmt))
AM_PATH_PYTHON
AX_PYTHON_DEVEL
+AX_PKG_SWIG
+AX_SWIG_ENABLE_CXX
+AX_SWIG_PYTHON
+AX_PTHREAD
TUXBOX_APPS_DVB
-PKG_CHECK_MODULES(FREETYPE, freetype2)
-PKG_CHECK_MODULES(FRIBIDI, fribidi)
-PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10, HAVE_GSTREAMER="yes", HAVE_GSTREAMER="no")
-PKG_CHECK_MODULES(GSTREAMERPBUTILS, gstreamer-pbutils-0.10, HAVE_GSTSTREAMERPBUTILS="yes", HAVE_GSTSTREAMERPBUTILS="no")
-PKG_CHECK_MODULES(ID3TAG, id3tag)
-PKG_CHECK_MODULES(DVBSI, libdvbsi++)
-PKG_CHECK_MODULES(PNG, libpng)
-PKG_CHECK_MODULES(LIBXINE, libxine, HAVE_LIBXINE="yes", HAVE_LIBXINE="no")
-PKG_CHECK_MODULES(XML2, libxml-2.0)
-PKG_CHECK_MODULES(MAD, mad)
-PKG_CHECK_MODULES(SIGC, sigc++-1.2)
-AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
-JPEG_LIBS="-ljpeg"
-AC_SUBST(JPEG_LIBS)
-
-AC_SUBST(LIBUNGIF_LIBS,"")
-AC_CHECK_HEADERS(gif_lib.h,
- AC_CHECK_LIB(ungif,DGifOpen,
- [AC_DEFINE(HAVE_LIBUNGIF,1,[Define if you have libgif/libungif including devel headers])
- LIBUNGIF_LIBS="-lungif"],
- [AC_CHECK_LIB(gif,DGifOpen,
- [AC_DEFINE(HAVE_LIUNBGIF,1)
- LIBUNGIF_LIBS="-lgif"])]))
-
-# ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
-# and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
-AC_LANG_RESTORE
-
-if test "$with_sdl" = "yes" ; then
- PKG_CHECK_MODULES(SDL, sdl)
- AC_DEFINE_UNQUOTED([WITH_SDL],[1],[Define to 1 if you have libsdl])
+AM_CONDITIONAL(HAVE_GIT_DIR, test -d "$srcdir/.git")
+AM_CONDITIONAL(HAVE_FAKE_GIT_DIR, test -f "$srcdir/.git/last_commit_info")
+
+PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-0.10 gstreamer-pbutils-0.10 libdvbsi++ libpng libxml-2.0 sigc++-1.2])
+PKG_CHECK_MODULES(LIBDDVD, libdreamdvd, HAVE_LIBDDVD="yes", HAVE_LIBDDVD="no")
+AM_CONDITIONAL(HAVE_LIBDDVD, test "$HAVE_LIBDDVD" = "yes")
+
+AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"], [AC_MSG_ERROR([Could not find libdl])])
+AC_SUBST(LIBDL_LIBS)
+AC_CHECK_LIB([jpeg], [jpeg_set_defaults], [LIBJPEG_LIBS="-ljpeg"], [AC_MSG_ERROR([Could not find libjpeg])])
+AC_SUBST(LIBJPEG_LIBS)
+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])])])
+AC_SUBST(LIBGIF_LIBS)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_LIB([xmlccwrap], [exit], [LIBXMLCCWRAP_LIBS="-lxmlccwrap"], [AC_MSG_ERROR([Could not find libxmlccwrap])])
+AC_SUBST(LIBXMLCCWRAP_LIBS)
+AC_LANG_POP
+
+AC_ARG_WITH(libsdl,
+ AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
+ [with_libsdl=$withval],[with_libsdl=no])
+if test "$with_libsdl" = "yes"; then
+ PKG_CHECK_MODULES(LIBSDL, sdl)
+fi
+AM_CONDITIONAL(HAVE_LIBSDL, test "$with_libsdl" = "yes")
+
+AC_ARG_WITH(libxine,
+ AS_HELP_STRING([--with-libxine],[use libxine, yes or no]),
+ [with_libxine=$withval],[with_libxine=no])
+if test "$with_libxine" = "yes"; then
+ PKG_CHECK_MODULES(LIBXINE, libxine)
+ AC_DEFINE([WITH_XINE],[1],[Define to 1 if you have libxine])
fi
-# allow 'if WITH_SDL' conditionals in Makefile.am
-AM_CONDITIONAL(WITH_SDL, test "$with_sdl" = "yes")
+AM_CONDITIONAL(HAVE_LIBXINE, test "$with_libxine" = "yes")
-CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)'
-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"
-#CPPFLAGS="$CPPFLAGS -DMEMLEAK_CHECK"
-CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
-LDFLAGS="$LDFLAGS -pthread $PYTHON_LDFLAGS $SDL_LDFLAGS $GSTREAMER_LDFLAGS $GSTREAMERPBUTILS_LDFLAGS $LIBXINE_LDFLAGS $LIBUNGIF_LDFLAGS"
-#LDFLAGS="-rdynamic $LDFLAGS"
+AC_ARG_WITH(debug,
+ AS_HELP_STRING([--without-debug],[disable debugging code]),
+ [with_debug="$withval"],[with_debug="yes"])
+if test "$with_debug" = "yes"; then
+ DEBUG_CFLAGS="-ggdb3"
+ AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code])
+fi
-TUXBOX_APPS_GETTEXT
+AC_ARG_WITH(memcheck,
+ AS_HELP_STRING([--with-memcheck],[enable memory leak checks]),
+ [with_memcheck="$withval"],[with_memcheck="no"])
+if test "$with_memcheck" = "yes"; then
+ AC_DEFINE([MEMLEAK_CHECK],[1],[Define to 1 to enable memory leak checks])
+fi
+
+AC_ARG_WITH(po,
+ AS_HELP_STRING([--with-po],[enable updating of po files]),
+ [with_po="$withval"],[with_po="no"])
+if test "$with_po" = "yes"; then
+ AC_PATH_PROG(MSGINIT, msginit)
+ AC_PATH_PROG(MSGMERGE, msgmerge)
+ AC_PATH_PROG(MSGUNIQ, msguniq)
+ AC_PATH_PROG(XGETTEXT, xgettext)
+ if test -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
+ AC_MSG_ERROR([Could not find required gettext tools])
+ fi
+fi
+AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
+
+ENIGMA2_CFLAGS="-fno-rtti -fno-exceptions"
+AC_SUBST(ENIGMA2_CFLAGS)
+
+CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+CFLAGS="$CFLAGS $DEBUG_CFLAGS -Wall"
+CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS -Wall $BASE_CFLAGS $ENIGMA2_CFLAGS $PTHREAD_CFLAGS"
AC_CONFIG_FILES([
Makefile
data/defaults/Dream/hdbouquets/Makefile
data/defaults/Dream/sdbouquets/Makefile
data/extensions/Makefile
+data/keymaps/Makefile
data/skin_default/Makefile
data/skin_default/menu/Makefile
data/skin_default/icons/Makefile
lib/Makefile
lib/actions/Makefile
lib/base/Makefile
+lib/base/eenv.cpp
lib/driver/Makefile
lib/dvb/Makefile
lib/dvb/lowlevel/Makefile
po/Makefile
main/Makefile
tools/Makefile
+tools/enigma2.sh
enigma2.pc
])
AC_OUTPUT
-
-#lib/python/Plugins/Extensions/SimpleRSS/Makefile
-#lib/python/Plugins/Extensions/FileManager/Makefile