summaryrefslogtreecommitdiff
path: root/m4macros
diff options
context:
space:
mode:
authorcarlosg <carlosg>2005-01-03 02:21:01 +0000
committercarlosg <carlosg>2005-01-03 02:21:01 +0000
commit207391f36ffa451a3624d144dc4aa032ef1dae5a (patch)
treec1e7b84279bdc7d9ef5cf52c23ecdc9fbf1aed5b /m4macros
parentdf363a9915670e6ef772ce24c0a701c7f436ed1f (diff)
2005-01-03 Carlos Garnacho Parro <carlosg@gnome.org>
* m4macros/system-tools-backends.m4, Makefile.am: added, for other modules which may depend on this, setting STB_SCRIPTS_DIR with the backends path * configure.in, Makefile.am: ditto
Diffstat (limited to 'm4macros')
-rw-r--r--m4macros/Makefile.am6
-rw-r--r--m4macros/system-tools-backends.m431
2 files changed, 37 insertions, 0 deletions
diff --git a/m4macros/Makefile.am b/m4macros/Makefile.am
new file mode 100644
index 0000000..459b2cb
--- /dev/null
+++ b/m4macros/Makefile.am
@@ -0,0 +1,6 @@
+installed_m4= system-tools-backends.m4
+
+EXTRA_DIST=$(installed_m4)
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = $(installed_m4)
diff --git a/m4macros/system-tools-backends.m4 b/m4macros/system-tools-backends.m4
new file mode 100644
index 0000000..0f53818
--- /dev/null
+++ b/m4macros/system-tools-backends.m4
@@ -0,0 +1,31 @@
+# configure scripts & files path to the backends
+# Carlos Garnacho 2004
+
+dnl AM_PATH_SYSTEM_TOOLS_BACKENDS([MINIMUM-VERSION [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Tests for the system tools backends and define STB_SCRIPTS_DIR
+
+AC_DEFUN([AM_PATH_SYSTEM_TOOLS_BACKENDS],
+[
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ stb="system-tools-backends"
+
+ if test x$PKG_CONFIG != xno ; then
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.12 ; then
+ min_version=ifelse([$1], ,1.0.0, $1)
+ AC_MSG_CHECKING(for $stb >= $min_version)
+
+ if $PKG_CONFIG --atleast-version $min_version $stb ; then
+ STB_SCRIPTS_DIR=`$PKG_CONFIG --variable=backenddir $stb`
+ AC_MSG_RESULT(yes ($STB_SCRIPTS_DIR))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+ else
+ echo "*** pkg-config too old; version 0.12 or better required."
+ fi
+ fi
+
+ AC_SUBST(STB_SCRIPTS_DIR)
+])