clean up build #2
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 25 Oct 2010 22:29:45 +0000 (22:29 +0000)
committerAndreas Oberritter <obi@opendreambox.org>
Tue, 16 Nov 2010 16:09:12 +0000 (17:09 +0100)
* use swig macros from autoconf archive
* generate and use enigma2_config.h (include from command-line)
* check for dbox/fp.h and dbox/lcd-ks0713.h
* clean up checks for libdreamdvd and lib*gif
* fix some dependencies for generated files and header files

19 files changed:
configure.ac
lib/actions/Makefile.am
lib/base/Makefile.am
lib/components/Makefile.am
lib/driver/Makefile.am
lib/dvb/Makefile.am
lib/dvb_ci/Makefile.am
lib/gdi/Makefile.am
lib/gui/Makefile.am
lib/mmi/Makefile.am
lib/nav/Makefile.am
lib/python/Makefile.am
lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
lib/python/Plugins/Extensions/SocketMMI/src/Makefile.am
lib/service/Makefile.am
m4/ax_pkg_swig.m4 [new file with mode: 0644]
m4/ax_swig_enable_cxx.m4 [new file with mode: 0644]
m4/ax_swig_python.m4 [new file with mode: 0644]
main/Makefile.am

index 91de157..b7faa7d 100644 (file)
@@ -1,5 +1,6 @@
 AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
 AM_INIT_AUTOMAKE([dist-bzip2 no-define silent-rules])
 AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
 AM_INIT_AUTOMAKE([dist-bzip2 no-define silent-rules])
+AC_CONFIG_HEADERS([enigma2_config.h])
 
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
 
 AC_USE_SYSTEM_EXTENSIONS
 AC_SYS_LARGEFILE
@@ -17,36 +18,27 @@ AC_ARG_WITH(libsdl,
        [[with_sdl=no]]
 )
 
        [[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])
 
 AM_PATH_PYTHON
 AX_PYTHON_DEVEL
 
 AM_PATH_PYTHON
 AX_PYTHON_DEVEL
+AX_PKG_SWIG
+AX_SWIG_ENABLE_CXX
+AX_SWIG_PYTHON
 AX_PTHREAD
 
 TUXBOX_APPS_DVB
 
 PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-0.10 gstreamer-pbutils-0.10 libdvbsi++ libpng libxml-2.0 sigc++-1.2])
 AX_PTHREAD
 
 TUXBOX_APPS_DVB
 
 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_DDVDLIB="yes", HAVE_DDVDLIB="no")
+AM_CONDITIONAL(HAVE_DDVDLIB, test "$HAVE_DDVDLIB" = "yes")
 PKG_CHECK_MODULES(LIBXINE, libxine, HAVE_LIBXINE="yes", HAVE_LIBXINE="no")
 
 AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"])
 AC_SUBST(LIBDL_LIBS)
 AC_CHECK_LIB([jpeg], [jpeg_set_defaults])
 AC_CHECK_LIB([xmlccwrap], [exit])
 PKG_CHECK_MODULES(LIBXINE, libxine, HAVE_LIBXINE="yes", HAVE_LIBXINE="no")
 
 AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"])
 AC_SUBST(LIBDL_LIBS)
 AC_CHECK_LIB([jpeg], [jpeg_set_defaults])
 AC_CHECK_LIB([xmlccwrap], [exit])
-
-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"])]))
-AC_SUBST(LIBUNGIF_LIBS)
+AC_CHECK_LIB([ungif], [DGifOpen], , [AC_CHECK_LIB([gif], [DGifOpen])])
 
 if test "$with_sdl" = "yes" ; then
        PKG_CHECK_MODULES(SDL, sdl)
 
 if test "$with_sdl" = "yes" ; then
        PKG_CHECK_MODULES(SDL, sdl)
index 45f0177..9f62e2e 100644 (file)
@@ -1,7 +1,8 @@
 AM_CPPFLAGS = \
        -I$(top_builddir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_builddir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 EXTRA_DIST = parseactions.py
 
 
 EXTRA_DIST = parseactions.py
 
@@ -11,11 +12,12 @@ libenigma_actions_la_SOURCES = \
        action.cpp \
        action.h
 
        action.cpp \
        action.h
 
+nodist_libenigma_actions_la_SOURCES = \
+       actionids.h
+
 BUILT_SOURCES = actionids.h
 CLEANFILES = actionids.h
 
 BUILT_SOURCES = actionids.h
 CLEANFILES = actionids.h
 
-action.cpp: actionids.h
-
-actionids.h: $(top_srcdir)/lib/gui/*.h
+actionids.h: $(srcdir)/parseactions.py $(top_srcdir)/lib/gui/*.h
        $(PYTHON) $(srcdir)/parseactions.py include $(top_srcdir)/lib/gui/*.h > $@
        $(PYTHON) $(srcdir)/parseactions.py parse $(top_srcdir)/lib/gui/*.h >> $@
        $(PYTHON) $(srcdir)/parseactions.py include $(top_srcdir)/lib/gui/*.h > $@
        $(PYTHON) $(srcdir)/parseactions.py parse $(top_srcdir)/lib/gui/*.h >> $@
index 5fd3eaf..498244f 100644 (file)
@@ -1,14 +1,47 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_base.la
 
 libenigma_base_la_SOURCES = \
 
 noinst_LTLIBRARIES = libenigma_base.la
 
 libenigma_base_la_SOURCES = \
-       buffer.cpp ebase.cpp eerror.cpp elock.cpp \
-       init.cpp message.cpp thread.cpp \
-       smartptr.cpp estring.cpp connection.cpp \
-       filepush.cpp encoding.cpp console.cpp rawfile.cpp \
-       nconfig.cpp ioprio.cpp etpm.cpp
-
+       buffer.cpp \
+       buffer.h \
+       connection.cpp \
+       console.cpp \
+       console.h \
+       ebase.cpp \
+       ebase.h \
+       eerror.cpp \
+       eerror.h \
+       elock.cpp \
+       elock.h \
+       encoding.cpp \
+       encoding.h \
+       eptrlist.h \
+       estring.cpp \
+       estring.h \
+       etpm.cpp \
+       etpm.h \
+       filepush.cpp \
+       filepush.h \
+       i18n.h \
+       init.cpp \
+       init.h \
+       init_num.h \
+       ioprio.cpp \
+       ioprio.h \
+       message.cpp \
+       message.h \
+       nconfig.cpp \
+       nconfig.h \
+       object.h \
+       rawfile.cpp \
+       rawfile.h \
+       ringbuffer.h \
+       smartptr.cpp \
+       smartptr.h \
+       thread.cpp \
+       thread.h
index 960e101..cef5890 100644 (file)
@@ -1,8 +1,13 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_components.la
 
 
 noinst_LTLIBRARIES = libenigma_components.la
 
-libenigma_components_la_SOURCES = scan.cpp file_eraser.cpp
+libenigma_components_la_SOURCES = \
+       file_eraser.cpp \
+       file_eraser.h \
+       scan.cpp \
+       scan.h
index 4b8fc08..74d24fa 100644 (file)
@@ -1,9 +1,26 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_driver.la
 
 libenigma_driver_la_SOURCES = \
 
 noinst_LTLIBRARIES = libenigma_driver.la
 
 libenigma_driver_la_SOURCES = \
-       rc.cpp rcinput.cpp rcconsole.cpp avswitch.cpp rfmod.cpp etimezone.cpp misc_options.cpp
+       avswitch.cpp \
+       avswitch.h \
+       etimezone.cpp \
+       etimezone.h \
+       input_fake.h \
+       misc_options.cpp \
+       misc_options.h \
+       rc.cpp \
+       rc.h \
+       rcconsole.cpp \
+       rcconsole.h \
+       rcdbox.h \
+       rcdreambox2.h \
+       rcinput.cpp \
+       rcinput.h \
+       rfmod.cpp \
+       rfmod.h
index cef7140..9146498 100644 (file)
@@ -3,12 +3,59 @@ SUBDIRS = lowlevel
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_dvb.la
 
 
 noinst_LTLIBRARIES = libenigma_dvb.la
 
-libenigma_dvb_la_SOURCES = dvb.cpp demux.cpp frontend.cpp esection.cpp db.cpp \
-       sec.cpp scan.cpp crc32.cpp pmt.cpp decoder.cpp eit.cpp rotor_calc.cpp \
-       epgcache.cpp dvbtime.cpp metaparser.cpp volume.cpp tstools.cpp pvrparse.cpp \
-       pesparse.cpp teletext.cpp radiotext.cpp subtitle.cpp
-
+libenigma_dvb_la_SOURCES = \
+       crc32.cpp \
+       crc32.h \
+       db.cpp \
+       db.h \
+       decoder.cpp \
+       decoder.h \
+       demux.cpp \
+       demux.h \
+       dvb.cpp \
+       dvb.h \
+       dvbtime.cpp \
+       dvbtime.h \
+       eit.cpp \
+       eit.h \
+       epgcache.cpp \
+       epgcache.h \
+       esection.cpp \
+       esection.h \
+       frontend.cpp \
+       frontend.h \
+       frontendparms.h \
+       idemux.h \
+       idvb.h \
+       isection.h \
+       list.h \
+       metaparser.cpp \
+       metaparser.h \
+       pesparse.cpp \
+       pesparse.h \
+       pmt.cpp \
+       pmt.h \
+       pvrparse.cpp \
+       pvrparse.h \
+       radiotext.cpp \
+       radiotext.h \
+       rotor_calc.cpp \
+       rotor_calc.h \
+       scan.cpp \
+       scan.h \
+       sec.cpp \
+       sec.h \
+       specs.h \
+       subtitle.cpp \
+       subtitle.h \
+       teletext.cpp \
+       teletext.h \
+       tstools.cpp \
+       tstools.h \
+       volume.cpp \
+       volume.h
index 153f8c0..af839e7 100644 (file)
@@ -1,12 +1,25 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_dvb_ci.la
 
 
 noinst_LTLIBRARIES = libenigma_dvb_ci.la
 
-libenigma_dvb_ci_la_SOURCES = dvbci.cpp dvbci_session.cpp dvbci_resmgr.cpp \
-                                                                                                                dvbci_appmgr.cpp dvbci_camgr.cpp \
-                                                                                                                dvbci_datetimemgr.cpp dvbci_mmi.cpp \
-                                                                                                                dvbci_ui.cpp
-
+libenigma_dvb_ci_la_SOURCES = \
+       dvbci.cpp \
+       dvbci.h \
+       dvbci_appmgr.cpp \
+       dvbci_appmgr.h \
+       dvbci_camgr.cpp \
+       dvbci_camgr.h \
+       dvbci_datetimemgr.cpp \
+       dvbci_datetimemgr.h \
+       dvbci_mmi.cpp \
+       dvbci_mmi.h \
+       dvbci_resmgr.cpp \
+       dvbci_resmgr.h \
+       dvbci_session.cpp \
+       dvbci_session.h \
+       dvbci_ui.cpp \
+       dvbci_ui.h
index 192990b..f1f69ef 100644 (file)
@@ -1,15 +1,49 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_gdi.la
 
 libenigma_gdi_la_SOURCES = \
 
 noinst_LTLIBRARIES = libenigma_gdi.la
 
 libenigma_gdi_la_SOURCES = \
-       region.cpp grc.cpp epng.cpp erect.cpp fb.cpp font.cpp font_arabic.cpp gfbdc.cpp  \
-       glcddc.cpp gpixmap.cpp lcd.cpp gfont.cpp accel.cpp picload.cpp picexif.cpp \
-       compositing.cpp bcm.cpp
+       accel.cpp \
+       accel.h \
+       bcm.cpp \
+       compositing.cpp \
+       compositing.h \
+       epng.cpp \
+       epng.h \
+       epoint.h \
+       erect.cpp \
+       erect.h \
+       esize.h \
+       fb.cpp \
+       fb.h \
+       font.cpp \
+       font.h \
+       font_arabic.cpp \
+       gfbdc.cpp \
+       gfbdc.h \
+       gfont.cpp \
+       gfont.h \
+       glcddc.cpp \
+       glcddc.h \
+       gpixmap.cpp \
+       gpixmap.h \
+       grc.cpp \
+       grc.h \
+       lcd.cpp \
+       lcd.h \
+       picexif.cpp \
+       picexif.h \
+       picload.cpp \
+       picload.h \
+       region.cpp \
+       region.h
 
 if WITH_SDL
 
 if WITH_SDL
-libenigma_gdi_la_SOURCES += sdl.cpp
+libenigma_gdi_la_SOURCES += \
+       sdl.cpp \
+       sdl.h
 endif
 endif
index 290eaab..39c05d9 100644 (file)
@@ -1,12 +1,47 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_gui.la
 
 libenigma_gui_la_SOURCES = \
 
 noinst_LTLIBRARIES = libenigma_gui.la
 
 libenigma_gui_la_SOURCES = \
-       ebutton.cpp elabel.cpp eslider.cpp ewidget.cpp ewidgetdesktop.cpp  \
-       ewindow.cpp ewindowstyle.cpp elistbox.cpp elistboxcontent.cpp \
-       epixmap.cpp ewindowstyleskinned.cpp einput.cpp einputstring.cpp einputnumber.cpp \
-       ewidgetanimation.cpp epositiongauge.cpp evideo.cpp esubtitle.cpp ecanvas.cpp
+       ebutton.cpp \
+       ebutton.h \
+       ecanvas.cpp \
+       ecanvas.h \
+       einput.cpp \
+       einput.h \
+       einputnumber.cpp \
+       einputnumber.h \
+       einputstring.cpp \
+       einputstring.h \
+       elabel.cpp \
+       elabel.h \
+       elistbox.cpp \
+       elistbox.h \
+       elistboxcontent.cpp \
+       elistboxcontent.h \
+       epixmap.cpp \
+       epixmap.h \
+       epositiongauge.cpp \
+       epositiongauge.h \
+       eslider.cpp \
+       eslider.h \
+       esubtitle.cpp \
+       esubtitle.h \
+       evideo.cpp \
+       evideo.h \
+       ewidget.cpp \
+       ewidget.h \
+       ewidgetanimation.cpp \
+       ewidgetanimation.h \
+       ewidgetdesktop.cpp \
+       ewidgetdesktop.h \
+       ewindow.cpp \
+       ewindow.h \
+       ewindowstyle.cpp \
+       ewindowstyle.h \
+       ewindowstyleskinned.cpp \
+       ewindowstyleskinned.h
index f72d158..a082949 100644 (file)
@@ -1,8 +1,11 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_mmi.la
 
 
 noinst_LTLIBRARIES = libenigma_mmi.la
 
-libenigma_mmi_la_SOURCES = mmi_ui.cpp
+libenigma_mmi_la_SOURCES = \
+       mmi_ui.cpp \
+       mmi_ui.h
index 9346869..c6d1c92 100644 (file)
@@ -1,11 +1,13 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_nav.la
 
 libenigma_nav_la_SOURCES = \
 
 noinst_LTLIBRARIES = libenigma_nav.la
 
 libenigma_nav_la_SOURCES = \
-       core.cpp pcore.cpp
-
-
+       core.cpp \
+       core.h \
+       pcore.cpp \
+       pcore.h
index 03dcedb..3c213a1 100644 (file)
@@ -1,18 +1,30 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 SUBDIRS = Components Tools Screens Plugins
 
 noinst_LTLIBRARIES = libenigma_python.la
 
 libenigma_python_la_SOURCES = \
 
 SUBDIRS = Components Tools Screens Plugins
 
 noinst_LTLIBRARIES = libenigma_python.la
 
 libenigma_python_la_SOURCES = \
-       python.cpp enigma_python_wrap.cxx connections.cpp
+       connections.cpp \
+       connections.h \
+       python.cpp \
+       python.h \
+       swig.h
 
 
-enigma_python_wrap.cxx: enigma_python.i
-       swig -I$(top_srcdir)/ -c++ -python -O -nortti -nothreads enigma_python.i
-       python enigma_py_patcher.py
+nodist_libenigma_python_la_SOURCES = \
+       enigma_python_wrap.cxx
+
+EXTRA_DIST = \
+       enigma_py_patcher.py \
+       enigma_python.i
+
+enigma_python_wrap.cxx: $(srcdir)/enigma_python.i
+       $(SWIG) $(AX_SWIG_PYTHON_OPT) -I$(top_srcdir) -O -nortti -nothreads -o $@ $<
+       $(PYTHON) $(srcdir)/enigma_py_patcher.py
 
 enigma.py: enigma_python_wrap.cxx
 
 
 enigma.py: enigma_python_wrap.cxx
 
@@ -22,3 +34,4 @@ installdir = $(pkglibdir)/python
 
 install_PYTHON = \
        enigma.py
 
 install_PYTHON = \
        enigma.py
+
index e79688b..5bfc8af 100644 (file)
@@ -1,6 +1,7 @@
 CPPFLAGS += \
        -I$(top_srcdir) \
 CPPFLAGS += \
        -I$(top_srcdir) \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 OBJS = servicedvd.cpp
 
 
 OBJS = servicedvd.cpp
 
index 914371e..9fb7209 100644 (file)
@@ -1,6 +1,7 @@
 CPPFLAGS += \
        -I$(top_srcdir) \
 CPPFLAGS += \
        -I$(top_srcdir) \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 OBJS = socket_mmi.cpp
 
 
 OBJS = socket_mmi.cpp
 
index c4dabeb..78d9b64 100644 (file)
@@ -1,7 +1,8 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LTLIBRARIES = libenigma_service.la
 
 
 noinst_LTLIBRARIES = libenigma_service.la
 
diff --git a/m4/ax_pkg_swig.m4 b/m4/ax_pkg_swig.m4
new file mode 100644 (file)
index 0000000..81226fb
--- /dev/null
@@ -0,0 +1,133 @@
+# ===========================================================================
+#        http://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found])
+#
+# DESCRIPTION
+#
+#   This macro searches for a SWIG installation on your system. If found,
+#   then SWIG is AC_SUBST'd; if not found, then $SWIG is empty.  If SWIG is
+#   found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd.
+#
+#   You can use the optional first argument to check if the version of the
+#   available SWIG is greater than or equal to the value of the argument. It
+#   should have the format: N[.N[.N]] (N is a number between 0 and 999. Only
+#   the first N is mandatory.) If the version argument is given (e.g.
+#   1.3.17), AX_PKG_SWIG checks that the swig package is this version number
+#   or higher.
+#
+#   As usual, action-if-found is executed if SWIG is found, otherwise
+#   action-if-not-found is executed.
+#
+#   In configure.in, use as:
+#
+#     AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ])
+#     AX_SWIG_ENABLE_CXX
+#     AX_SWIG_MULTI_MODULE_SUPPORT
+#     AX_SWIG_PYTHON
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
+#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
+#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 7
+
+AC_DEFUN([AX_PKG_SWIG],[
+        AC_PATH_PROG([SWIG],[swig])
+        if test -z "$SWIG" ; then
+                m4_ifval([$3],[$3],[:])
+        elif test -n "$1" ; then
+                AC_MSG_CHECKING([SWIG version])
+                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
+                AC_MSG_RESULT([$swig_version])
+                if test -n "$swig_version" ; then
+                        # Calculate the required version number components
+                        [required=$1]
+                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_major" ; then
+                                [required_major=0]
+                        fi
+                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_minor" ; then
+                                [required_minor=0]
+                        fi
+                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
+                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
+                        if test -z "$required_patch" ; then
+                                [required_patch=0]
+                        fi
+                        # Calculate the available version number components
+                        [available=$swig_version]
+                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
+                        if test -z "$available_major" ; then
+                                [available_major=0]
+                        fi
+                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
+                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
+                        if test -z "$available_minor" ; then
+                                [available_minor=0]
+                        fi
+                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
+                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
+                        if test -z "$available_patch" ; then
+                                [available_patch=0]
+                        fi
+                        # Convert the version tuple into a single number for easier comparison.
+                        # Using base 100 should be safe since SWIG internally uses BCD values
+                        # to encode its version number.
+                        required_swig_vernum=`expr $required_major \* 10000 \
+                            \+ $required_minor \* 100 \+ $required_patch`
+                        available_swig_vernum=`expr $available_major \* 10000 \
+                            \+ $available_minor \* 100 \+ $available_patch`
+
+                        if test $available_swig_vernum -lt $required_swig_vernum; then
+                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.])
+                                SWIG=''
+                                m4_ifval([$3],[$3],[])
+                        else
+                                AC_MSG_CHECKING([for SWIG library])
+                                SWIG_LIB=`$SWIG -swiglib`
+                                AC_MSG_RESULT([$SWIG_LIB])
+                                m4_ifval([$2],[$2],[])
+                        fi
+                else
+                        AC_MSG_WARN([cannot determine SWIG version])
+                        SWIG=''
+                        m4_ifval([$3],[$3],[])
+                fi
+        fi
+        AC_SUBST([SWIG_LIB])
+])
diff --git a/m4/ax_swig_enable_cxx.m4 b/m4/ax_swig_enable_cxx.m4
new file mode 100644 (file)
index 0000000..348c15d
--- /dev/null
@@ -0,0 +1,53 @@
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_swig_enable_cxx.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_SWIG_ENABLE_CXX
+#
+# DESCRIPTION
+#
+#   Enable SWIG C++ support. This affects all invocations of $(SWIG).
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
+#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
+#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 6
+
+AU_ALIAS([SWIG_ENABLE_CXX], [AX_SWIG_ENABLE_CXX])
+AC_DEFUN([AX_SWIG_ENABLE_CXX],[
+        AC_REQUIRE([AX_PKG_SWIG])
+        AC_REQUIRE([AC_PROG_CXX])
+        SWIG="$SWIG -c++"
+])
diff --git a/m4/ax_swig_python.m4 b/m4/ax_swig_python.m4
new file mode 100644 (file)
index 0000000..8fd3df5
--- /dev/null
@@ -0,0 +1,64 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_swig_python.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_SWIG_PYTHON([use-shadow-classes = {no, yes}])
+#
+# DESCRIPTION
+#
+#   Checks for Python and provides the $(AX_SWIG_PYTHON_CPPFLAGS), and
+#   $(AX_SWIG_PYTHON_OPT) output variables.
+#
+#   $(AX_SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
+#   code for Python. Shadow classes are enabled unless the value of the
+#   optional first argument is exactly 'no'. If you need multi module
+#   support (provided by the AX_SWIG_MULTI_MODULE_SUPPORT macro) use
+#   $(AX_SWIG_PYTHON_LIBS) to link against the appropriate library. It
+#   contains the SWIG Python runtime library that is needed by the type
+#   check system for example.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
+#   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
+#   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
+#   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 7
+
+AU_ALIAS([SWIG_PYTHON], [AX_SWIG_PYTHON])
+AC_DEFUN([AX_SWIG_PYTHON],[
+        AC_REQUIRE([AX_PKG_SWIG])
+        AC_REQUIRE([AX_PYTHON_DEVEL])
+        test "x$1" != "xno" || swig_shadow=" -noproxy"
+        AC_SUBST([AX_SWIG_PYTHON_OPT],[-python$swig_shadow])
+        AC_SUBST([AX_SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
+])
index 4eebe99..9f2b118 100644 (file)
@@ -1,7 +1,8 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
-       -include Python.h
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 bin_PROGRAMS = enigma2
 
 
 bin_PROGRAMS = enigma2
 
@@ -44,7 +45,6 @@ version.h: entries
 enigma2_LDADD = \
        $(top_builddir)/lib/libenigma.la \
        @BASE_LIBS@ \
 enigma2_LDADD = \
        $(top_builddir)/lib/libenigma.la \
        @BASE_LIBS@ \
-       @LIBUNGIF_LIBS@ \
        @LIBXINE_LIBS@ \
        @PTHREAD_LIBS@ \
        @SDL_LIBS@ \
        @LIBXINE_LIBS@ \
        @PTHREAD_LIBS@ \
        @SDL_LIBS@ \