gtk2/gtk/tests/pixbuf-init.c
Matthias Clasen c51f965782 Some cleanups after the module cache file change
Bring the various 'run uninstalled' hacks in line with the
new way of doing things, and fix make install for module cache
files.

Patch by Tadej Borovsak.
2010-05-18 19:23:06 -04:00

21 lines
375 B
C

#include "config.h"
#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 (void)
{
if (file_exists ("../../gdk-pixbuf/libpixbufloader-pnm.la"))
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../../gdk-pixbuf/loaders.cache", TRUE);
}