m4/: remove the AM_GNU_GETTEXT* calls, they need to be in configure.ac
authorThomas Vander Stichele <thomas@apestaart.org>
Sun, 16 Oct 2005 12:04:41 +0000 (12:04 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sun, 16 Oct 2005 12:04:41 +0000 (12:04 +0000)
Original commit message from CVS:

* m4/Makefile.am:
* m4/gst-gettext.m4:
remove the AM_GNU_GETTEXT* calls, they need to be in configure.ac
* m4/gst-glib2.m4:
clean up and re-use in core soon
* m4/gst-plugindir.m4:
macro to set up PLUGINDIR and plugindir define/var

ChangeLog
m4/Makefile.am
m4/gst-gettext.m4
m4/gst-glib2.m4
m4/gst-plugindir.m4 [new file with mode: 0644]

index f26e74e..0d666c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-10-16  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * m4/Makefile.am:
+       * m4/gst-gettext.m4:
+         remove the AM_GNU_GETTEXT* calls, they need to be in configure.ac
+       * m4/gst-glib2.m4:
+         clean up and re-use in core soon
+       * m4/gst-plugindir.m4:
+         macro to set up PLUGINDIR and plugindir define/var
+
 2005-10-15  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * m4/Makefile.am:
index 541e541..96ac11a 100644 (file)
@@ -24,5 +24,6 @@ EXTRA_DIST = \
        gst-libxml2.m4 \
        gst-makecontext.m4 \
        gst-mcsc.m4 \
+       gst-plugindir.m4 \
        gst-valgrind.m4 \
        pkg.m4
index 31df4d4..e0a8eb9 100644 (file)
@@ -1,12 +1,10 @@
 dnl gettext setup
 
 dnl GST_GETTEXT([gettext-package])
+dnl defines GETTEXT_PACKAGE and LOCALEDIR
 
 AC_DEFUN([GST_GETTEXT],
 [
-  AM_GNU_GETTEXT_VERSION(0.11.5)
-  AM_GNU_GETTEXT([external])
-
   GETTEXT_PACKAGE=[$1]
   AC_SUBST(GETTEXT_PACKAGE)
   AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
index 021ae55..1aa15e4 100644 (file)
@@ -1,18 +1,24 @@
-AC_DEFUN([GST_GLIB2_CHECK], [
-dnl === GLib 2 ===
-dnl Minimum required version of GLib2
-GLIB2_REQ="1.3.12"
-AC_SUBST(GLIB2_REQ)
+dnl check for a minimum version of GLib
 
-dnl Check for glib2
-PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQ gobject-2.0 gthread-2.0 gmodule-2.0,
-  HAVE_GLIB2=yes,HAVE_GLIB2=no)
-GLIB_LIBS=$GLIB2_LIBS
-GLIB_CFLAGS=$GLIB2_CFLAGS
-AC_SUBST(GLIB_LIBS)
-AC_SUBST(GLIB_CFLAGS)
+dnl GST_GLIB_CHECK([minimum-version-required])
 
-if test "x$HAVE_GLIB2" = "xno"; then
-  AC_MSG_ERROR([This package requires GLib 2.0 to compile.])
-fi
+AC_DEFUN([GST_GLIB_CHECK],
+[
+  AC_REQUIRE([AS_SCRUB_INCLUDE])
+
+  dnl Minimum required version of GLib
+  GLIB_REQ=[$1]
+  AC_SUBST(GLIB_REQ)
+
+  dnl Check for glib with everything
+  PKG_CHECK_MODULES(GLIB,
+    glib-2.0 >= $GLIB_REQ gobject-2.0 gthread-2.0 gmodule-2.0,
+    HAVE_GLIB=yes,HAVE_GLIB=no)
+
+  if test "x$HAVE_GLIB" = "xno"; then
+    AC_MSG_ERROR([This package requires GLib >= GLIB_REQ to compile.])
+  fi
+
+  dnl for the poor souls who for example have glib in /usr/local
+  AS_SCRUB_INCLUDE(GLIB_CFLAGS)
 ])
diff --git a/m4/gst-plugindir.m4 b/m4/gst-plugindir.m4
new file mode 100644 (file)
index 0000000..89c780e
--- /dev/null
@@ -0,0 +1,19 @@
+dnl GST_SET_PLUGINDIR
+
+dnl AC_DEFINE PLUGINDIR to the full location where plug-ins will be installed
+dnl AC_SUBST plugindir, to be used in Makefile.am's
+
+AC_DEFUN([GST_SET_PLUGINDIR],
+[
+  AC_REQUIRE([AS_AC_EXPAND])
+
+  dnl define location of plugin directory
+  AS_AC_EXPAND(PLUGINDIR, ${libdir}/gstreamer-$GST_MAJORMINOR)
+  AC_DEFINE_UNQUOTED(PLUGINDIR, "$PLUGINDIR",
+    [directory where plugins are located])
+  AC_MSG_NOTICE([Using $PLUGINDIR as the plugin install location])
+
+  dnl plugin directory configure-time variable for use in Makefile.am
+  plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
+  AC_SUBST(plugindir)
+])