#!/usr/bin/make -f

#export DH_VERBOSE=1

# mafm: introduced but commented out for new upstream 1.2.11-1, to uncomment
# later when 1.2.11 is known to work fine
#
#export DEB_CFLAGS_MAINT_APPEND = -pipe -Wall
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-undefined -Wl,-Bsymbolic -Wl,--as-needed


# according to help: speeds up one-time build
confflags = --disable-dependency-tracking

# features -- disable building as plugins, otherwise dh_shlibs
confflags += --disable-jpg-shared
confflags += --disable-tif-shared
confflags += --disable-png-shared
confflags += --disable-webp-shared

%:
	dh $@ --with autoreconf --parallel

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- $(confflags)

# mafm: is this really needed?
#
#override_dh_makeshlibs:
#	dh_makeshlibs -V 'libsdl-image1.2 (>= 1.2.11)'

override_dh_compress:
	dh_compress -Xshowimage.c

override_dh_install:
	dh_install --fail-missing -XlibSDL_image.la

override_dh_auto_installchangelogs:
	dh_auto_installchangelogs -- CHANGES
