Makefile.am
author Sam Lantinga <slouken@libsdl.org>
Mon, 01 May 2006 09:09:45 +0000
changeset 137 b42b657ab1ac
parent 136 35d4f2737971
child 164 4da51f0c28e4
permissions -rw-r--r--
Date: Wed, 26 Apr 2006 17:02:52 +0200
From: Julien Lecomte
Subject: Re: [SDL] SDL_image & libtiff

On 26/04/2006 13:43, I wrote:
> When configuring SDL_image with libtiff, libtiff wasn't found in my ca
se.
> I solved the problem by adding: 'LIBS="$LIBS $IMG_LIBS"' after line 16
3
> of configure.in ('if test x$enable_tif = xyes; then').
> I guess the problem is that my libtiff is a static lib, I didn't bothe
r
> to create the shared one, and that libtiff depends on libjpeg and libz
.
>
> I also guess that other static libraries (like possibly libpng) might
> share (sic) this problem.
>
> If I have a time, I'll review the configure.in and post a patch (don't

> use my solution above, it's ugly !)
>

Attached is a patch that modifies configure.in and makefile.am for
SDL_image.
*Changes are:*

- Checks for dependency libs before checking for other libraries (z is
checked before png, z and jpeg are checked before tiff) which was the
fix I was targetting (at the start)
     1 # Makefile.am for the SDL sample image loading library and viewer
     2 
     3 lib_LTLIBRARIES = libSDL_image.la
     4 
     5 libSDL_imageincludedir = $(includedir)/SDL
     6 libSDL_imageinclude_HEADERS =	\
     7 	SDL_image.h
     8 
     9 libSDL_image_la_SOURCES =		\
    10 	IMG.c			\
    11 	IMG_bmp.c		\
    12 	IMG_gif.c		\
    13 	IMG_jpg.c		\
    14 	IMG_lbm.c		\
    15 	IMG_pcx.c		\
    16 	IMG_png.c		\
    17 	IMG_pnm.c		\
    18 	IMG_tga.c		\
    19 	IMG_tif.c		\
    20 	IMG_xcf.c		\
    21 	IMG_xpm.c		\
    22 	IMG_xv.c
    23 
    24 EXTRA_DIST =			\
    25 	CHANGES			\
    26 	VisualC.zip		\
    27 	Xcode.tar.gz		\
    28 	MPWmake.sea.bin		\
    29 	Watcom-OS2.zip		\
    30 	IMG_xxx.c		\
    31 	SDL_image.spec		\
    32 	SDL_image.spec.in	\
    33 	gcc-fat.sh		\
    34 	autogen.sh
    35 
    36 libSDL_image_la_LDFLAGS = 	\
    37 	-no-undefined		\
    38 	-release $(LT_RELEASE)	\
    39 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    40 libSDL_image_la_LIBADD = $(IMG_LIBS)
    41 
    42 noinst_PROGRAMS = showimage
    43 
    44 showimage_LDADD = libSDL_image.la
    45 
    46 # Rule to build tar-gzipped distribution package
    47 $(PACKAGE)-$(VERSION).tar.gz: distcheck
    48 
    49 # Rule to build RPM distribution package
    50 rpm: $(PACKAGE)-$(VERSION).tar.gz
    51 	rpm -ta $(PACKAGE)-$(VERSION).tar.gz
    52