Skip to content

Commit

Permalink
Hi,
Browse files Browse the repository at this point in the history
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
  • Loading branch information
slouken committed Sep 19, 2009
1 parent a3f0309 commit d1aca72
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile.in
Expand Up @@ -36,7 +36,7 @@ TARGET = libSDL_mixer.la
SOURCES = @SOURCES@
OBJECTS = @OBJECTS@

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
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

LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
Expand Down Expand Up @@ -86,6 +86,8 @@ install-hdrs:
file=`echo $$src | sed -e 's|^.*/||'`; \
$(INSTALL) -m 644 $$src $(includedir)/SDL/$$file; \
done
$(SHELL) $(auxdir)/mkinstalldirs $(libdir)/pkgconfig
$(INSTALL) -m 644 SDL_mixer.pc $(libdir)/pkgconfig/
install-lib: $(objects) $(objects)/$(TARGET)
$(SHELL) $(auxdir)/mkinstalldirs $(libdir)
$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(libdir)/$(TARGET)
Expand All @@ -101,6 +103,8 @@ uninstall-hdrs:
rm -f $(includedir)/SDL/$$file; \
done
-rmdir $(includedir)/SDL
rm -f $(libdir)/pkgconfig/SDL_mixer.pc
-rmdir $(libdir)/pkgconfig
uninstall-lib:
$(LIBTOOL) --mode=uninstall rm -f $(libdir)/$(TARGET)
uninstall-bin:
Expand All @@ -114,6 +118,7 @@ distclean: clean
rm -f Makefile
rm -f SDL_mixer.qpg
rm -f config.status config.cache config.log libtool $(depend)
rm -f SDL_mixer.pc
rm -rf $(srcdir)/autom4te*
find $(srcdir) \( \
-name '*~' -o \
Expand Down
12 changes: 12 additions & 0 deletions SDL_mixer.pc.in
@@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: SDL_mixer
Description: mixer library for Simple DirectMedia Layer
Version: @VERSION@
Requires: sdl >= @SDL_VERSION@
Libs: -L${libdir} -lSDL_mixer
Cflags: -I${includedir}/SDL

3 changes: 2 additions & 1 deletion configure.in
Expand Up @@ -420,11 +420,12 @@ AC_SUBST(BUILD_LDFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
AC_SUBST(EXE)
AC_SUBST(WINDRES)
AC_SUBST(SDL_VERSION)
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)

AC_OUTPUT([
Makefile SDL_mixer.spec SDL_mixer.qpg
Makefile SDL_mixer.spec SDL_mixer.qpg SDL_mixer.pc
], [
: >build-deps
if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend
Expand Down

0 comments on commit d1aca72

Please sign in to comment.