diff --git a/configure.ac b/configure.ac index c2102c153..ca06c9904 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,11 @@ AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB +AC_PATH_PROGS(CONVERT, [convert], []) +if test -z "$CONVERT" +then AC_MSG_FAILURE([aegisub needs convert (from ImageMagick) to produce xpms from the supplied bitmaps/icons]) +fi + AC_C_FLAG([-pthread]) AC_CXX_FLAG([-pthread]) AC_CHECK_LIB([pthread], [pthread_join]) diff --git a/core/bitmaps/Makefile.am b/core/bitmaps/Makefile.am index 89b33d94d..bdb1c141f 100644 --- a/core/bitmaps/Makefile.am +++ b/core/bitmaps/Makefile.am @@ -9,6 +9,6 @@ Makefile.bitmaps: $(srcdir)/genxpm.sh $(srcdir)/../res.rc all: all-bitmaps all-bitmaps: Makefile.bitmaps - make -f Makefile.bitmaps all + make -f Makefile.bitmaps CONVERT=$(CONVERT) all diff --git a/core/bitmaps/genxpm.sh b/core/bitmaps/genxpm.sh index 52ef6669b..dd0efc63f 100644 --- a/core/bitmaps/genxpm.sh +++ b/core/bitmaps/genxpm.sh @@ -13,7 +13,7 @@ all: bmp2xpm wxicon_xpm.xpm srcdir=${SRCDIR} wxicon_xpm.xpm: \$(srcdir)/icon.ico - convert \$(srcdir)/'icon.ico[2]' wxicon_xpm.xpm + \$(CONVERT) \$(srcdir)/'icon.ico[2]' wxicon_xpm.xpm EOF @@ -23,7 +23,7 @@ for I in *.bmp do DNAME="`grep "bitmaps/$I" $RESFILE | cut -d ' ' -f 1`" echo -e "${DNAME}_xpm.xpm: \$(srcdir)/$I -\tconvert -transparent \\#c0c0c0 \$(srcdir)/$I ${DNAME}_xpm.xpm +\t\$(CONVERT) -transparent \\#c0c0c0 \$(srcdir)/$I ${DNAME}_xpm.xpm " XPMNAMES="${XPMNAMES} ${DNAME}_xpm.xpm" done