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)
slouken@0
     1
# Makefile.am for the SDL sample image loading library and viewer
slouken@0
     2
slouken@0
     3
lib_LTLIBRARIES = libSDL_image.la
slouken@0
     4
slouken@0
     5
libSDL_imageincludedir = $(includedir)/SDL
slouken@0
     6
libSDL_imageinclude_HEADERS =	\
slouken@0
     7
	SDL_image.h
slouken@0
     8
slouken@0
     9
libSDL_image_la_SOURCES =		\
slouken@0
    10
	IMG.c			\
slouken@0
    11
	IMG_bmp.c		\
slouken@0
    12
	IMG_gif.c		\
slouken@0
    13
	IMG_jpg.c		\
slouken@45
    14
	IMG_lbm.c		\
slouken@0
    15
	IMG_pcx.c		\
slouken@0
    16
	IMG_png.c		\
slouken@25
    17
	IMG_pnm.c		\
slouken@0
    18
	IMG_tga.c		\
slouken@7
    19
	IMG_tif.c		\
slouken@26
    20
	IMG_xcf.c		\
slouken@119
    21
	IMG_xpm.c		\
slouken@119
    22
	IMG_xv.c
slouken@0
    23
slouken@0
    24
EXTRA_DIST =			\
slouken@0
    25
	CHANGES			\
slouken@0
    26
	VisualC.zip		\
slouken@107
    27
	Xcode.tar.gz		\
slouken@30
    28
	MPWmake.sea.bin		\
slouken@136
    29
	Watcom-OS2.zip		\
slouken@0
    30
	IMG_xxx.c		\
slouken@37
    31
	SDL_image.spec		\
slouken@37
    32
	SDL_image.spec.in	\
slouken@131
    33
	gcc-fat.sh		\
slouken@0
    34
	autogen.sh
slouken@0
    35
slouken@94
    36
libSDL_image_la_LDFLAGS = 	\
slouken@94
    37
	-no-undefined		\
slouken@37
    38
	-release $(LT_RELEASE)	\
slouken@0
    39
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
slouken@137
    40
libSDL_image_la_LIBADD = $(IMG_LIBS)
slouken@0
    41
slouken@77
    42
noinst_PROGRAMS = showimage
slouken@0
    43
slouken@0
    44
showimage_LDADD = libSDL_image.la
slouken@0
    45
slouken@0
    46
# Rule to build tar-gzipped distribution package
slouken@37
    47
$(PACKAGE)-$(VERSION).tar.gz: distcheck
slouken@0
    48
slouken@0
    49
# Rule to build RPM distribution package
slouken@0
    50
rpm: $(PACKAGE)-$(VERSION).tar.gz
slouken@37
    51
	rpm -ta $(PACKAGE)-$(VERSION).tar.gz
slouken@0
    52