summaryrefslogtreecommitdiffstats
path: root/m4/libglade.m4
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2001-12-17 19:04:24 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2001-12-17 19:04:24 +0000
commit74d9b173358a2b66dd7ce010aedbdbefd836c859 (patch)
tree19a014f2586d6b46133627a1fda3374bd0c71884 /m4/libglade.m4
parentf0bb7eef82576f581bdd205f2c9eb4278223fcc7 (diff)
more of the same
Original commit message from CVS: more of the same
Diffstat (limited to 'm4/libglade.m4')
-rw-r--r--m4/libglade.m449
1 files changed, 49 insertions, 0 deletions
diff --git a/m4/libglade.m4 b/m4/libglade.m4
new file mode 100644
index 00000000..f3f76da6
--- /dev/null
+++ b/m4/libglade.m4
@@ -0,0 +1,49 @@
+# a macro to get the libs/cflags for libglade
+# serial 1
+
+dnl AM_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]])
+dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS
+dnl
+AC_DEFUN(AM_PATH_LIBGLADE,
+[dnl
+dnl Get the cflags and libraries from the libglade-config script
+dnl
+AC_ARG_WITH(libglade-config,
+[ --with-libglade-config=LIBGLADE_CONFIG Location of libglade-config],
+LIBGLADE_CONFIG="$withval")
+
+module_args=
+for module in . $3; do
+ case "$module" in
+ gnome)
+ module_args="$module_args gnome"
+ ;;
+ bonobo)
+ module_args="$module_args bonobo"
+ ;;
+ gnomedb)
+ module_args="$module_args gnomedb"
+ ;;
+ esac
+done
+
+AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no)
+AC_MSG_CHECKING(for libglade)
+if test "$LIBGLADE_CONFIG" = "no"; then
+ AC_MSG_RESULT(no)
+ ifelse([$2], , :, [$2])
+else
+ if $LIBGLADE_CONFIG --check $module_args; then
+ LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args`
+ LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args`
+ AC_MSG_RESULT(yes)
+ ifelse([$1], , :, [$1])
+ else
+ echo "*** libglade was not compiled with support for $module_args" 1>&2
+ AC_MSG_RESULT(no)
+ ifelse([$2], , :, [$2])
+ fi
+fi
+AC_SUBST(LIBGLADE_CFLAGS)
+AC_SUBST(LIBGLADE_LIBS)
+]) \ No newline at end of file