Implemented bug #768
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Aug 2009 10:07:54 +0000
changeset 1961d7af2dd0c17
parent 195 6df7a974044f
child 197 9645d3416002
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
SDL_image.pc.in
configure.in
     1.1 --- a/Makefile.am	Sun Aug 02 13:35:17 2009 +0000
     1.2 +++ b/Makefile.am	Fri Aug 07 10:07:54 2009 +0000
     1.3 @@ -49,6 +49,9 @@
     1.4  libSDL_image_la_LIBADD = $(IMG_LIBS)
     1.5  endif
     1.6  
     1.7 +pkgconfigdir = $(libdir)/pkgconfig
     1.8 +pkgconfig_DATA = SDL_image.pc
     1.9 +
    1.10  %.o : %.rc
    1.11  	$(WINDRES) $< $@
    1.12  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/SDL_image.pc.in	Fri Aug 07 10:07:54 2009 +0000
     2.3 @@ -0,0 +1,12 @@
     2.4 +prefix=@prefix@
     2.5 +exec_prefix=@exec_prefix@
     2.6 +libdir=@libdir@
     2.7 +includedir=@includedir@
     2.8 +
     2.9 +Name: SDL_image
    2.10 +Description: image loading library for Simple DirectMedia Layer
    2.11 +Version: @VERSION@
    2.12 +Requires: sdl >= @SDL_VERSION@
    2.13 +Libs: -L${libdir} -lSDL_image
    2.14 +Cflags: -I${includedir}/SDL
    2.15 +
     3.1 --- a/configure.in	Sun Aug 02 13:35:17 2009 +0000
     3.2 +++ b/configure.in	Fri Aug 07 10:07:54 2009 +0000
     3.3 @@ -80,6 +80,7 @@
     3.4  
     3.5  dnl Check for SDL
     3.6  SDL_VERSION=1.2.10
     3.7 +AC_SUBST(SDL_VERSION)
     3.8  AM_PATH_SDL($SDL_VERSION,
     3.9              :,
    3.10             AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])