From decb51529889b8f2afd67811d635379f030a1b19 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Fri, 13 Feb 2026 06:29:03 +0100 Subject: Replace thumbnail Makefile with configure script The thumbnail subproject has dependencies against dynstr and ImageMagick6, which might or might not be available on the system, or might have been installed to non-standard paths. Therefore, it is more robust to rely on a configure script that checks whether the packages are available and how to deal with CFLAGS/LDFLAGS. --- configure | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 4f42953..35a0743 100755 --- a/configure +++ b/configure @@ -177,7 +177,7 @@ EOF if [ $build_thumbnail -ne 0 ] then cat <<"EOF" >> $F - +cd thumbnail && $(MAKE) PREFIX=$(PREFIX) install + +test -f $(THUMBNAIL_MK) && cd thumbnail && $(MAKE) install || : EOF fi @@ -218,9 +218,13 @@ if [ $build_thumbnail -ne 0 ] then cat <<"EOF" >> $F THUMBNAIL = thumbnail/thumbnail +THUMBNAIL_MK = thumbnail/Makefile thumbnail $(PROJECT): $(THUMBNAIL) -$(THUMBNAIL): FORCE +$(THUMBNAIL_MK): + cd thumbnail && CFLAGS="$(CFLAGS)" ./configure --prefix=$(PREFIX) +$(THUMBNAIL): $(THUMBNAIL_MK) FORCE +cd thumbnail && $(MAKE) CC=$(CC) +all: $(THUMBNAIL) EOF fi @@ -250,6 +254,13 @@ cat <<"EOF" >> $F EOF fi +if [ $build_thumbnail -ne 0 ] +then +cat <<"EOF" >> $F + +test -f $(THUMBNAIL_MK) && cd thumbnail && $(MAKE) clean || : +EOF +fi + cat <<"EOF" >> $F distclean: clean rm -f slcl usergen @@ -275,7 +286,7 @@ fi if [ $build_thumbnail -ne 0 ] then cat <<"EOF" >> $F - +cd thumbnail && $(MAKE) distclean + +test -f $(THUMBNAIL_MK) && cd thumbnail && $(MAKE) distclean || : EOF fi -- cgit v1.2.3