From 9ae673e291cf0107034065dff25dd35e7db09f02 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Fri, 18 Aug 2000 23:31:30 +0000 Subject: [PATCH] Test for a working libglade-gnome, and compile gstplay only if there is one. Original commit message from CVS: Test for a working libglade-gnome, and compile gstplay only if there is one. --- Makefile.am | 15 ++++++++++++++- configure.in | 34 ++++++++++++++++++++++++++-------- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 9a897d6539..efb89834fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,17 @@ -SUBDIRS = gst libs plugins gstplay test editor tools docs tests + +if HAVE_LIBGLADE_GNOME +# The following line mustn't be indented - automake is _very_ fussy.. +gstplay_subdir=gstplay +else +# The following line mustn't be indented - automake is _very_ fussy.. +gstplay_subdir= +endif + +# These are the subdirs which might get used. +SUBDIRS = gst libs plugins . $(gstplay_subdir) test editor tools docs tests + +# These are all the possible subdirs +DIST_SUBDIRS = gst libs plugins . gstplay test editor tools docs tests bin_SCRIPTS = gstreamer-config diff --git a/configure.in b/configure.in index f60a6a6e51..55c3449e19 100644 --- a/configure.in +++ b/configure.in @@ -115,6 +115,23 @@ AC_CHECK_LIB(ghttp, ghttp_request_new, AC_SUBST(GHTTP_LIBS) AC_SUBST(GST_HTTPSRC_GET_TYPE) +dnl Check for libglade +HAVE_LIBGLADE_GNOME="no" +AC_PATH_PROG(LIBGLADE_CONFIG_PATH, libglade-config, no) +if test x$LIBGLADE_CONFIG_PATH = xno; then + AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay) +else + libglade_save_CFLAGS=${CFLAGS} + CFLAGS="$CFLAGS `$LIBGLADE_CONFIG_PATH --libs gnome` `$LIBGLADE_CONFIG_PATH --cflags gnome`" + AC_TRY_LINK([#include ],[glade_gnome_init();], + HAVE_LIBGLADE_GNOME="yes", + AC_MSG_WARN( + [Couldn't find gnome libraries for libglade - Can't build gstplay]) + ) + CFLAGS=${libglade_save_CFLAGS} + AC_MSG_WARN() +fi + dnl Check for atomic.h dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter dnl defines the wrong default symbol as well (HAVE_ASM_ATOMIC_H) @@ -314,14 +331,15 @@ dnl ############################# dnl These should be "USE_*" instead of "HAVE_*", but some packages expect dnl HAVE_ and it is likely to be easier to stick with the old name -AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes") -AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes") -AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes") -AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes") -AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes") -AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes") -AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes") -AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC) +AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$USE_GDK_PIXBUF" = "xyes") +AM_CONDITIONAL(HAVE_LIBGHTTP, test "x$USE_LIBGHTTP" = "xyes") +AM_CONDITIONAL(HAVE_LIBMMX, test "x$USE_LIBMMX" = "xyes") +AM_CONDITIONAL(HAVE_ATOMIC_H, test "x$USE_ATOMIC_H" = "xyes") +AM_CONDITIONAL(HAVE_XAUDIO, test "x$HAVE_XAUDIO" = "xyes") +AM_CONDITIONAL(HAVE_CSSAUTH, test "x$HAVE_CSSAUTH" = "xyes") +AM_CONDITIONAL(HAVE_NASM, test "x$HAVE_NASM" = "xyes") +AM_CONDITIONAL(HAVE_LIBGLADE_GNOME, test "x$HAVE_LIBGLADE_GNOME" = "xyes") +AM_CONDITIONAL(HAVE_GTK_DOC, $HAVE_GTK_DOC) dnl FIXME: having to AC_SUBST these is messy. Not sure if CPPFLAGS and LDFLAGS