~ubuntu-branches/debian/sid/link-monitor-applet/sid

« back to all changes in this revision

Viewing changes to m4/gdk-pixbuf-loader.m4

  • Committer: Bazaar Package Importer
  • Author(s): Adriaan Peeters
  • Date: 2008-03-30 22:26:13 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080330222613-5aubcuo9mgg2n7st
Tags: upstream-3.0
ImportĀ upstreamĀ versionĀ 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This file is part of Link Monitor Applet
2
 
#
3
 
# Copyright (C) 2006 Jean-Yves Lefort.
4
 
#
5
 
# As a special exception to the Link Monitor Applet licensing terms,
6
 
# Jean-Yves Lefort gives unlimited permission to copy, distribute and
7
 
# modify this file.
8
 
 
9
 
dnl AC_GDK_PIXBUF_LOADER(SAMPLE_IMAGE, MIME_TYPE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10
 
dnl
11
 
AC_DEFUN([AC_GDK_PIXBUF_LOADER],
12
 
[success=yes
13
 
 
14
 
PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0],, [success=no])
15
 
 
16
 
if test $success = yes; then
17
 
        ac_save_CFLAGS="$CFLAGS"
18
 
        ac_save_LIBS="$LIBS"
19
 
        CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
20
 
        LIBS="$LIBS $GDK_PIXBUF_LIBS"
21
 
 
22
 
        AC_MSG_CHECKING([if GTK+ can load [$2] images])
23
 
 
24
 
        AC_RUN_IFELSE([
25
 
#include <gdk-pixbuf/gdk-pixbuf.h>
26
 
 
27
 
int main() {
28
 
  g_type_init();
29
 
  if (gdk_pixbuf_new_from_file("[$1]", NULL))
30
 
    exit(0);
31
 
  else
32
 
    exit(1);
33
 
}
34
 
],, [success=no])
35
 
 
36
 
        AC_MSG_RESULT([$success])
37
 
 
38
 
        CFLAGS="$ac_save_CFLAGS"
39
 
        LIBS="$ac_save_LIBS"
40
 
fi
41
 
 
42
 
if test $success = yes; then
43
 
        ifelse([$3],, :, [$3])
44
 
else
45
 
        ifelse([$4],, :, [$4])
46
 
fi])