summaryrefslogtreecommitdiff
path: root/demos/pixbuf-init.c
blob: 3d4edee090a92c5320bf47450727b43c9d4c5c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <glib.h>

#include <sys/stat.h>
#include <stdlib.h>

static gboolean
file_exists (const char *filename)
{
  struct stat statbuf;

  return stat (filename, &statbuf) == 0;
}

void
pixbuf_init ()
{
  if (file_exists ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so"))
    putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
}