configure/m4: use PKG_CHECK_MODULES, update configure.ac
authorAndreas Oberritter <obi@opendreambox.org>
Fri, 22 Oct 2010 00:09:53 +0000 (00:09 +0000)
committerAndreas Oberritter <obi@opendreambox.org>
Tue, 16 Nov 2010 16:09:12 +0000 (17:09 +0100)
configure.ac
m4/tuxbox.m4

index b835d4c..429a686 100644 (file)
@@ -1,5 +1,5 @@
-AC_INIT([enigma2],[2.4],[enigma2-devel@lists.elitedvb.net])
-AM_INIT_AUTOMAKE(enigma2,2.4)
+AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
+AM_INIT_AUTOMAKE([dist-bzip2 no-define])
 
 TUXBOX_APPS
 TUXBOX_APPS_DIRECTORY
 
 TUXBOX_APPS
 TUXBOX_APPS_DIRECTORY
@@ -11,8 +11,8 @@ AC_CONFIG_MACRO_DIR([m4])
 
 AC_ARG_WITH(libsdl,
        AS_HELP_STRING([--with-libsdl],[use sdl, yes or no]),
 
 AC_ARG_WITH(libsdl,
        AS_HELP_STRING([--with-libsdl],[use sdl, yes or no]),
-       [[withsdl=$withval]],
-       [[withsdl=yes]]
+       [[with_sdl=$withval]],
+       [[with_sdl=no]]
 )
 
 AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
 )
 
 AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
@@ -25,24 +25,20 @@ AM_CONDITIONAL(HAVE_DDVDLIB, test "$have_ddvdlib" = "yes")
 
 AM_PATH_PYTHON
 AX_PYTHON_DEVEL
 
 AM_PATH_PYTHON
 AX_PYTHON_DEVEL
-#AM_PATH_XINE(1.1.0,, AC_MSG_ERROR([*** Please install xine-lib (devel) first ***]))
 
 TUXBOX_APPS_DVB
 
 
 TUXBOX_APPS_DVB
 
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(FREETYPE, freetype2, HAVE_FREETYPE2)
-if test "$HAVE_FREETYPE2" = "no" ; then
-       TUXBOX_APPS_LIB_CONFIG(FREETYPE, freetype-config)
-fi
-TUXBOX_APPS_LIB_PKGCONFIG(FRIBIDI,fribidi)
-TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag)
-TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
-#TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins)
-TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
-TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2)
-TUXBOX_APPS_LIB_PKGCONFIG(DVBSI,libdvbsi++)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMER,gstreamer,HAVE_GSTREAMER)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMERPBUTILS,gstreamer-pbutils,HAVE_GSTSTREAMERPBUTILS)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(LIBXINE,libxine,HAVE_LIBXINE)
+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_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
 JPEG_LIBS="-ljpeg"
 AC_SUBST(JPEG_LIBS)
@@ -56,8 +52,6 @@ AC_CHECK_HEADERS(gif_lib.h,
                        [AC_DEFINE(HAVE_LIUNBGIF,1)
                        LIBUNGIF_LIBS="-lgif"])]))
 
                        [AC_DEFINE(HAVE_LIUNBGIF,1)
                        LIBUNGIF_LIBS="-lgif"])]))
 
-TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
-
 # 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
 # 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
@@ -65,15 +59,12 @@ AC_LANG_CPLUSPLUS
 TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
 AC_LANG_RESTORE
 
 TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
 AC_LANG_RESTORE
 
-if test "$withsdl" = "yes" ; then
-       _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(SDL,sdl,WITH_SDL)
-       if test "$WITH_SDL" = "no" ; then
-               TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
-               AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
-       fi
+if test "$with_sdl" = "yes" ; then
+       PKG_CHECK_MODULES(SDL, sdl)
+       AC_DEFINE_UNQUOTED([WITH_SDL],[1],[Define to 1 if you have libsdl])
 fi
 # allow 'if WITH_SDL' conditionals in Makefile.am
 fi
 # allow 'if WITH_SDL' conditionals in Makefile.am
-AM_CONDITIONAL(WITH_SDL, test "$WITH_SDL" = "yes")
+AM_CONDITIONAL(WITH_SDL, test "$with_sdl" = "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 "'-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"
index a6cdf93..1232fda 100644 (file)
@@ -191,42 +191,6 @@ AC_DEFUN([TUXBOX_APPS_LIB_CONFIG_CHECK],[
 _TUXBOX_APPS_LIB_CONFIG($1,$2,WARN)
 ])
 
 _TUXBOX_APPS_LIB_CONFIG($1,$2,WARN)
 ])
 
-AC_DEFUN([TUXBOX_APPS_PKGCONFIG],[
-AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
-if test "$PKG_CONFIG" = "no" ; then
-       AC_MSG_ERROR([could not find pkg-config]);
-fi
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_PKGCONFIG],[
-PKG_CHECK_MODULES($1,$2)
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL],[
-PKG_CHECK_MODULES($1,$2,$3="yes",$3="no")
-if test "$$3" = "yes"; then
-       AC_DEFINE($3, 1, [$2 available])
-else
-       $1_CFLAGS=""
-       $1_LIBS=""
-fi
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG],[
-_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
-if test -z "$$1_CFLAGS" ; then
-       AC_MSG_ERROR([could not find package $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG_CHECK],[
-_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
-])
-
 AC_DEFUN([_TUXBOX_APPS_LIB_SYMBOL],[
 AC_CHECK_LIB($2,$3,HAVE_$1="yes",HAVE_$1="no")
 if test "$HAVE_$1" = "yes"; then
 AC_DEFUN([_TUXBOX_APPS_LIB_SYMBOL],[
 AC_CHECK_LIB($2,$3,HAVE_$1="yes",HAVE_$1="no")
 if test "$HAVE_$1" = "yes"; then