fix pkg-config handling

2012-06-01
2012-06-01
  • Mike Frysinger

    Mike Frysinger - 2012-06-01

    the current build hardcodes pkg-config rather than respecting the common $(PKG_CONFIG), and it misses gthread-2.0 linking (even though the code base uses gthread funcs)

    respect $(PKG_CONFIG), and add missing gthread-2.0
    
    --- a/Makefile
    +++ b/Makefile
    @@ -42,14 +42,18 @@ LIBS +=
    
     .SUFFIXES: .c .o .po .mo
    
    -GTK_CFLAGS = `pkg-config --cflags gtk+-2.0 gconf-2.0 libmtp id3tag flac vorbisfile`
    -GTK_LDFLAGS = `pkg-config --libs gtk+-2.0 gconf-2.0 libmtp id3tag flac vorbisfile`
    +PKG_CONFIG ?= pkg-config
    
     ifeq ($(MAKECMDGOALS),gtk3)
    -GTK_CFLAGS = `pkg-config --cflags gtk+-3.0 gio-2.0 libmtp id3tag flac vorbisfile`
    -GTK_LDFLAGS = `pkg-config --libs gtk+-3.0 gio-2.0 libmtp id3tag flac vorbisfile`
    +PKGS = gtk+-3.0 gio-2.0
     CFLAGS += -DGMTP_USE_GTK3
    +else
    +PKGS = gtk+-2.0 gconf-2.0
     endif
    +PKGS += gthread-2.0 libmtp id3tag flac vorbisfile
    +
    +GTK_CFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)`
    +GTK_LDFLAGS = `$(PKG_CONFIG) --libs $(PKGS)`
    
     objects = src/main.o src/mtp.o src/interface.o src/callbacks.o src/prefs.o src/dnd.o src/metatag_info.o
     headers = src/main.h src/mtp.h src/interface.h src/callbacks.h src/prefs.h src/dnd.h src/metatag_info.h src/config.h
    
     
  • D.Kartaschew

    D.Kartaschew - 2012-06-01

    Hi Mike,

    Thank you for the patch, and it has been applied in CVS.

    --
    Regards
    Darran

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks