source: trunk/third/libglade/libglade.m4 @ 17111

Revision 17111, 1.2 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17110, which included commits to RCS files with non-trunk default branches.
Line 
1# a macro to get the libs/cflags for libglade
2# serial 1
3
4dnl AM_PATH_LIBGLADE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]])
5dnl Test to see if libglade is installed, and define LIBGLADE_CFLAGS, LIBS
6dnl
7AC_DEFUN(AM_PATH_LIBGLADE,
8[dnl
9dnl Get the cflags and libraries from the libglade-config script
10dnl
11AC_ARG_WITH(libglade-config,
12[  --with-libglade-config=LIBGLADE_CONFIG  Location of libglade-config],
13LIBGLADE_CONFIG="$withval")
14
15module_args=
16for module in . $3; do
17  case "$module" in
18    gnome)
19      module_args="$module_args gnome"
20      ;;
21    bonobo)
22      module_args="$module_args bonobo"
23      ;;
24    gnomedb)
25      module_args="$module_args gnomedb"
26      ;;
27  esac
28done
29
30AC_PATH_PROG(LIBGLADE_CONFIG, libglade-config, no)
31AC_MSG_CHECKING(for libglade)
32if test "$LIBGLADE_CONFIG" = "no"; then
33  AC_MSG_RESULT(no)
34  ifelse([$2], , :, [$2])
35else
36  if $LIBGLADE_CONFIG --check $module_args; then
37    LIBGLADE_CFLAGS=`$LIBGLADE_CONFIG --cflags $module_args`
38    LIBGLADE_LIBS=`$LIBGLADE_CONFIG --libs $module_args`
39    AC_MSG_RESULT(yes)
40    ifelse([$1], , :, [$1])
41  else
42    echo "*** libglade was not compiled with support for $module_args" 1>&2
43    AC_MSG_RESULT(no)
44    ifelse([$2], , :, [$2])
45  fi
46fi
47AC_SUBST(LIBGLADE_CFLAGS)
48AC_SUBST(LIBGLADE_LIBS)
49])
Note: See TracBrowser for help on using the repository browser.