try this one
[platform/upstream/gstreamer.git] / configure.base
index d944188..f1ba986 100644 (file)
@@ -44,9 +44,11 @@ AC_SUBST(GST_LIBVERSION)
 
 AM_MAINTAINER_MODE
 
+dnl you need automake 1.5 for AM_PROG_AS to work !
+dnl we moved AM_PROG_AS up before CC, maybe that helps the substition ?
+AM_PROG_AS
 AC_PROG_CC
 AM_PROG_CC_STDC
-AM_PROG_AS
 AC_PROG_CXX
 AC_PROG_CXXCPP
 AC_ISC_POSIX
@@ -250,15 +252,17 @@ AC_SUBST(GTK_LIBS)
 AC_SUBST(GTK_CFLAGS)
 
 dnl Check for libxml
-AC_PATH_PROG(XML_CONFIG, xml-config, no)
+dnl Thomas tries to convert this to pkg-config
+PKG_CHECK_MODULES(XML, libxml >= 1.8.1, XML_CONFIG=yes, XML_CONFIG=no)
+dnl AC_PATH_PROG(XML_CONFIG, xml-config, no)
 if test x$XML_CONFIG = xno; then
   AC_MSG_ERROR(Couldn't find xml-config)
 fi
-XML_LIBS="`xml-config --libs`"
-XML_CFLAGS="`xml-config --cflags`"
-AC_CHECK_LIB(xml, xmlDocGetRootElement, :,
-  [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
-  $XML_LIBS)
+dnl XML_LIBS="`xml-config --libs`"
+dnl XML_CFLAGS="`xml-config --cflags`"
+dnl AC_CHECK_LIB(xml, xmlDocGetRootElement, :,
+dnl  [ AC_MSG_ERROR(Need version 1.8.1 or better of libxml) ],
+dnl  $XML_LIBS)
 AC_SUBST(XML_LIBS)
 AC_SUBST(XML_CFLAGS)
 
@@ -400,19 +404,19 @@ if test x$USE_GLIB2 = xyes; then
   LIBGLADE_GNOME_CFLAGS=
   AC_MSG_WARN(libglade disabled for glib2.0)
 else
-  AC_PATH_PROG(LIBGLADE_CONFIG_PATH, libglade-config, no)
-  if test x$LIBGLADE_CONFIG_PATH = xno; then
+  AM_PATH_LIBGLADE(HAVE_LIBGLADE_GNOME="yes", HAVE_LIBGLADE_GNOME="no", gnome)
+  if test x$HAVE_LIBGLADE_GNOME = xno; then
     AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
     LIBGLADE_GNOME_LIBS=
     LIBGLADE_GNOME_CFLAGS=
   else
-    LIBGLADE_GNOME_LIBS=`libglade-config --libs gnome`
-    LIBGLADE_GNOME_CFLAGS=`libglade-config --cflags gnome`
-    AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
-               HAVE_LIBGLADE_GNOME="yes",
-               AC_MSG_WARN(
-      [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
-            )
+    LIBGLADE_GNOME_LIBS=$LIBGLADE_LIBS
+    LIBGLADE_GNOME_CFLAGS=$LIBGLADE_CFLAGS
+        AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
+                HAVE_LIBGLADE_GNOME="yes"
+                AC_MSG_WARN(
+        [Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
+               )
   fi
 fi
 AC_SUBST(LIBGLADE_GNOME_LIBS)
@@ -630,9 +634,11 @@ AC_CHECK_HEADER(FLAC/all.h, :, HAVE_FLACLIB=no)
 dnl Check for librtp
 AC_MSG_CHECKING(rtp library)
 AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_LIBRTP=yes, HAVE_LIBRTP=no, $GLIB_LIBS $GLIB_CFLAGS)
-AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
-AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
-AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
+
+dnl FIXME can somebody add $GLIB_CFLAGS to the CFLAGS for these next checks?
+dnl AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
+dnl AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
+dnl AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
 
 dnl Check for libraw1394
 AC_MSG_CHECKING(raw1394 library)
@@ -663,7 +669,7 @@ AC_CHECK_LIB(dvdread, DVDOpen, HAVE_LIBDVDREAD=yes, HAVE_LIBDVDREAD=no, )
 AC_CHECK_HEADER(dvdread/dvd_reader.h, :, HAVE_LIBDVDREAD=no)
 
 dnl Check for SDL library
-AM_PATH_SDL( , , HAVE_LIBSDL=no)
+AM_PATH_SDL( ,HAVE_LIBSDL=yes, HAVE_LIBSDL=no)
 
 if test "x$HAVE_LIBSDL" = "xno"; then
   AC_MSG_WARN(
@@ -969,6 +975,10 @@ if test "x$HAVE_LIBGSM" = xyes; then
   AC_DEFINE(HAVE_LIBGSM)
 fi
 
+if test "x$HAVE_LIBRTP" = xyes; then
+  AC_DEFINE(HAVE_LIBRTP)
+fi
+
 dnl #############################
 dnl # Set automake conditionals #
 dnl #############################