From c877cd27456c1045662c75344705939638e25d04 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Aug 2009 10:07:54 +0000 Subject: [PATCH] Implemented bug #768 Description From Luca Bigliardi 2009-07-07 03:35:39 (-) [reply] patch to add pkg-config for SDL_image Hi, I'm attaching two patches to add pkg-config support to SDL_image. pkg-config is used to retrieve information about installed libraries and it's well integrated with build configurators (for instance PKG_CHECK_MODULES autoconf macro). Thank you, Luca --- Makefile.am | 3 +++ SDL_image.pc.in | 12 ++++++++++++ configure.in | 1 + 3 files changed, 16 insertions(+) create mode 100644 SDL_image.pc.in diff --git a/Makefile.am b/Makefile.am index bec2ec4c..9b0482f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,9 @@ libSDL_image_la_LDFLAGS = \ libSDL_image_la_LIBADD = $(IMG_LIBS) endif +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = SDL_image.pc + %.o : %.rc $(WINDRES) $< $@ diff --git a/SDL_image.pc.in b/SDL_image.pc.in new file mode 100644 index 00000000..6f3853d4 --- /dev/null +++ b/SDL_image.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: SDL_image +Description: image loading library for Simple DirectMedia Layer +Version: @VERSION@ +Requires: sdl >= @SDL_VERSION@ +Libs: -L${libdir} -lSDL_image +Cflags: -I${includedir}/SDL + diff --git a/configure.in b/configure.in index 7eb61625..93836cf5 100644 --- a/configure.in +++ b/configure.in @@ -80,6 +80,7 @@ AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue) dnl Check for SDL SDL_VERSION=1.2.10 +AC_SUBST(SDL_VERSION) AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])