Hi,
authorSam Lantinga <slouken@libsdl.org>
Sat, 19 Sep 2009 14:31:34 +0000
changeset 392c9adf3866e87
parent 391 b4bc5ee8b0d6
child 393 77a8a337cd2b
Hi,
I'm attaching a patche to add pkg-config support to SDL_mixer.

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.in
SDL_mixer.pc.in
configure.in
     1.1 --- a/Makefile.in	Fri Jun 05 16:08:18 2009 +0000
     1.2 +++ b/Makefile.in	Sat Sep 19 14:31:34 2009 +0000
     1.3 @@ -36,7 +36,7 @@
     1.4  SOURCES = @SOURCES@
     1.5  OBJECTS = @OBJECTS@
     1.6  
     1.7 -DIST = CHANGES COPYING CWProjects.sea.bin MPWmake.sea.bin Makefile.in README SDL_mixer.h SDL_mixer.qpg.in SDL_mixer.spec SDL_mixer.spec.in VisualC.zip Watcom-OS2.zip Xcode.tar.gz acinclude autogen.sh build-scripts configure configure.in dynamic_mp3.c dynamic_mp3.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h gcc-fat.sh load_aiff.c load_aiff.h load_ogg.c load_ogg.h load_voc.c load_voc.h mikmod mixer.c music.c music_cmd.c music_cmd.h music_mad.c music_mad.h music_ogg.c music_ogg.h native_midi native_midi_gpl playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
     1.8 +DIST = CHANGES COPYING CWProjects.sea.bin MPWmake.sea.bin Makefile.in SDL_mixer.pc.in README SDL_mixer.h SDL_mixer.qpg.in SDL_mixer.spec SDL_mixer.spec.in VisualC.zip Watcom-OS2.zip Xcode.tar.gz acinclude autogen.sh build-scripts configure configure.in dynamic_mp3.c dynamic_mp3.h dynamic_ogg.c dynamic_ogg.h effect_position.c effect_stereoreverse.c effects_internal.c effects_internal.h gcc-fat.sh load_aiff.c load_aiff.h load_ogg.c load_ogg.h load_voc.c load_voc.h mikmod mixer.c music.c music_cmd.c music_cmd.h music_mad.c music_mad.h music_ogg.c music_ogg.h native_midi native_midi_gpl playmus.c playwave.c timidity wavestream.c wavestream.h version.rc
     1.9  
    1.10  LT_AGE      = @LT_AGE@
    1.11  LT_CURRENT  = @LT_CURRENT@
    1.12 @@ -86,6 +86,8 @@
    1.13  	    file=`echo $$src | sed -e 's|^.*/||'`; \
    1.14  	    $(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
    1.15  	done
    1.16 +	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
    1.17 +	$(INSTALL) -m 644 SDL_mixer.pc $(libdir)/pkgconfig/
    1.18  install-lib: $(objects) $(objects)/$(TARGET)
    1.19  	$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
    1.20  	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
    1.21 @@ -101,6 +103,8 @@
    1.22  	    rm -f $(includedir)/SDL/$$file; \
    1.23  	done
    1.24  	-rmdir $(includedir)/SDL
    1.25 +	rm -f $(libdir)/pkgconfig/SDL_mixer.pc
    1.26 +	-rmdir $(libdir)/pkgconfig
    1.27  uninstall-lib:
    1.28  	$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
    1.29  uninstall-bin:
    1.30 @@ -114,6 +118,7 @@
    1.31  	rm -f Makefile
    1.32  	rm -f SDL_mixer.qpg
    1.33  	rm -f config.status config.cache config.log libtool $(depend)
    1.34 +	rm -f SDL_mixer.pc
    1.35  	rm -rf $(srcdir)/autom4te*
    1.36  	find $(srcdir) \( \
    1.37  	    -name '*~' -o \
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/SDL_mixer.pc.in	Sat Sep 19 14:31:34 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_mixer
    2.10 +Description: mixer library for Simple DirectMedia Layer
    2.11 +Version: @VERSION@
    2.12 +Requires: sdl >= @SDL_VERSION@
    2.13 +Libs: -L${libdir} -lSDL_mixer
    2.14 +Cflags: -I${includedir}/SDL
    2.15 +
     3.1 --- a/configure.in	Fri Jun 05 16:08:18 2009 +0000
     3.2 +++ b/configure.in	Sat Sep 19 14:31:34 2009 +0000
     3.3 @@ -420,11 +420,12 @@
     3.4  AC_SUBST(EXTRA_LDFLAGS)
     3.5  AC_SUBST(EXE)
     3.6  AC_SUBST(WINDRES)
     3.7 +AC_SUBST(SDL_VERSION)
     3.8  AC_SUBST(SDL_CFLAGS)
     3.9  AC_SUBST(SDL_LIBS)
    3.10  
    3.11  AC_OUTPUT([
    3.12 -    Makefile SDL_mixer.spec SDL_mixer.qpg
    3.13 +    Makefile SDL_mixer.spec SDL_mixer.qpg SDL_mixer.pc
    3.14  ], [
    3.15      : >build-deps
    3.16      if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend