From fe5d071784eaa97925c75db5ebadd395ae796410 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 31 May 2011 08:52:53 +0200 Subject: libjpeg versioning --- GNUmakefile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index 73cd13f..1a3aed4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -28,6 +28,12 @@ endif include $(srcdir)/mk/Autoconf.mk +ac_jpeg_ver = $(shell \ + $(call ac_init,for libjpeg version);\ + $(call ac_s_cmd,echo -e '\#include \nJPEG_LIB_VERSION' \ + | cpp | tail -n 1);\ + $(call ac_fini)) + define make-config LIB := $(LIB) RESDIR := $(call ac_resdir) @@ -45,8 +51,12 @@ HAVE_LIBSANE := $(call ac_lib,sane_init,sane) HAVE_LIBCURL := $(call ac_lib,curl_easy_init,curl) HAVE_LIBLIRC := $(call ac_lib,lirc_init,lirc_client) HAVE_MOTIF := $(call ac_lib,XmStringGenerate,Xm,-L/usr/X11R6/$(LIB) -lXpm -lXt -lXext -lX11) +JPEG_VER := $(call ac_jpeg_ver) endef +# transposing +CFLAGS += -Ijpeg/$(JPEG_VER) + # transparent http/ftp access using curl depends on fopencookie (glibc) ifneq ($(HAVE_GLIBC),yes) HAVE_LIBCURL := no @@ -110,7 +120,8 @@ fbi : LDLIBS += $(call ac_lib_mkvar,$(fbi_libs),LDLIBS) exiftran : LDLIBS += -ljpeg -lexif -lm thumbnail.cgi : LDLIBS += -lexif -lm -exiftran: exiftran.o genthumbnail.o jpegtools.o jpeg/transupp.o \ +exiftran: exiftran.o genthumbnail.o jpegtools.o \ + jpeg/$(JPEG_VER)/transupp.o \ filter.o op.o readers.o rd/read-jpeg.o thumbnail.cgi: thumbnail.cgi.o @@ -122,7 +133,7 @@ thumbnail.cgi: thumbnail.cgi.o OBJS_IDA := \ ida.o man.o hex.o x11.o viewer.o dither.o icons.o \ parseconfig.o idaconfig.o fileops.o desktop.o \ - RegEdit.o selections.o xdnd.o jpeg/transupp.o \ + RegEdit.o selections.o xdnd.o jpeg/$(JPEG_VER)/transupp.o \ filebutton.o filelist.o browser.o jpegtools.o \ op.o filter.o lut.o color.o \ rd/read-xwd.o rd/read-xpm.o @@ -159,7 +170,7 @@ ida.o: Ida.ad.h logo.h OBJS_FBI := \ fbi.o fbtools.o fb-gui.o desktop.o \ parseconfig.o fbiconfig.o \ - jpegtools.o jpeg/transupp.o \ + jpegtools.o jpeg/$(JPEG_VER)/transupp.o \ dither.o filter.o op.o OBJS_FBI += $(filter-out wr/%,$(call ac_lib_mkvar,$(fbi_libs),OBJS)) @@ -197,7 +208,7 @@ ifeq ($(HAVE_MOTIF),yes) endif clean: - -rm -f *.o jpeg/*.o rd/*.o wr/*.o $(depfiles) core core.* + -rm -f *.o jpeg/$(JPEG_VER)/*.o rd/*.o wr/*.o $(depfiles) core core.* realclean distclean: clean -rm -f Make.config -- cgit