diff options
author | Martin Szulecki | 2011-04-06 13:01:13 +0200 |
---|---|---|
committer | Martin Szulecki | 2011-04-06 13:01:13 +0200 |
commit | c181d4d29f89fea20432b02abcc0d89731087cc4 (patch) | |
tree | c119646f6d62da46f7977ff9339db63f060e2141 | |
parent | 8a1c38b26b47e4ca1e3d5770b2f33e5922f4e232 (diff) | |
download | gdk-pixbuf-psd-c181d4d29f89fea20432b02abcc0d89731087cc4.tar.gz gdk-pixbuf-psd-c181d4d29f89fea20432b02abcc0d89731087cc4.tar.bz2 |
Add autofoo build system
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | Makefile.am | 12 | ||||
-rwxr-xr-x | autogen.sh | 15 | ||||
-rw-r--r-- | configure.ac | 47 | ||||
-rw-r--r-- | io-psd.c | 5 |
5 files changed, 79 insertions, 18 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index da40814..0000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -CC = gcc -CFLAGS=-Wall -std=c99 - -DESTDIR= - -all: - $(CC) $(CFLAGS) io-psd.c -o libpixbufloader-psd.so \ - `pkg-config --libs --cflags glib-2.0 gmodule-2.0 gdk-pixbuf-2.0` \ - -shared -fpic -DGDK_PIXBUF_ENABLE_BACKEND - -clean: - rm libpixbufloader-psd.so - -install: - chmod 644 libpixbufloader-psd.so - mkdir -p $(DESTDIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/ - cp libpixbufloader-psd.so $(DESTDIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/ - gdk-pixbuf-query-loaders --update-cache diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e5ea9f0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,12 @@ +AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +loaderdir = $(GDK_PIXBUF_DIR) +loader_LTLIBRARIES = libpixbufloader-psd.la + +INCLUDES = $(GDKPIXBUF_CFLAGS) $(GLIB_CFLAGS) $(GMODULE_CLAGS) + +libpixbufloader_psd_la_SOURCES = io-psd.c +libpixbufloader_psd_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined $(AM_CPPFLAGS) +libpixbufloader_psd_la_LIBADD = $(GDKPIXBUF_LIBS) $(GLIB_LIBS) $(GMODULE_LIBS) + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..3292973 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,15 @@ +#!/bin/sh +gprefix=`which glibtoolize 2>&1 >/dev/null` +if [ $? -eq 0 ]; then + glibtoolize --force +else + libtoolize --force +fi +aclocal -I m4 +autoheader +automake --add-missing +autoconf + +if [ -z "$NOCONFIGURE" ]; then + ./configure "$@" +fi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..7f2f9a5 --- /dev/null +++ b/configure.ac @@ -0,0 +1,47 @@ +AC_PREREQ(2.61) + +AC_INIT(io-psd, 0.1.0, nospam@nowhere.com) +AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip]) +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +AC_CONFIG_SRCDIR([.]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) + +# Checks for programs +AC_PROG_CC +AC_PROG_CXX +AM_PROG_CC_C_O +AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG + +# Checks for libraries +PKG_CHECK_MODULES(GLIB, glib-2.0) +PKG_CHECK_MODULES(GMODULE, gmodule-2.0) +PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0) + +GDK_PIXBUF_DIR=`$PKG_CONFIG --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0` +if test -z "$GDK_PIXBUF_DIR" ; then + GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0` + GDK_PIXBUF_DIR="$libdir/gtk-2.0/$GTK_VERSION/loaders" +fi +AC_SUBST(GDK_PIXBUF_DIR) + +# Checks for header files0 +AC_HEADER_STDC +AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) + +AC_OUTPUT( +Makefile +) + +echo " +Configuration for $PACKAGE $VERSION: +------------------------------------------- + + Install prefix .....: $prefix + Module directory ...: $GDK_PIXBUF_DIR + + Now type 'make' to build $PACKAGE $VERSION, + and then 'make install' for installation. +" @@ -27,9 +27,14 @@ * - i18n */ +#define GDK_PIXBUF_ENABLE_BACKEND + +#include "config.h" + #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <gmodule.h> #include <gdk-pixbuf/gdk-pixbuf.h> typedef struct |