X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=configure.ac;h=0e6978defd8790bed3ee9ff996a997b7531d19d5;hb=8344b5875279c0b4b829f077ecab6fc5f005e7b7;hp=d06bf5f6ae9c0cb9d124c4ecaf9a00af1ca99b99;hpb=f2fb74874c0b938cdb73dd50ea470bd4bc6b0c26;p=libsvgtiny-pixbuf.git diff --git a/configure.ac b/configure.ac index d06bf5f..0e6978d 100644 --- a/configure.ac +++ b/configure.ac @@ -12,12 +12,35 @@ PKG_CHECK_MODULES([GTK4], [gtk4]) PKG_CHECK_MODULES([LIBSVGTINY], [libsvgtiny]) AC_MSG_CHECKING([for gdk-pixbuf module location]) -gdk_pixbuf_moduledir=$($PKG_CONFIG --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0) +# Hack alert: we need to install our module into this specific +# location... BUT, we also want to respect --prefix, at least to the +# extent that we won't try to install something to, say, /usr when +# we've passed --prefix=/tmp. This little libdir trick prevents +# pkg-config from substituting for ${libdir} where it appears in the +# *.pc file. When we go to actually use gdk_pixbuf_moduledir, the +# variable ${libdir} will be valid in our own build system, and will +# respect the prefix. This means that if you configure this package +# with a different prefix than gdk-pixbuf was, it won't install +# correctly. But hey, make distcheck works? +gdk_pixbuf_moduledir=$($PKG_CONFIG --define-variable=libdir="\${libdir}" --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0) AC_MSG_RESULT([$gdk_pixbuf_moduledir]) AC_SUBST([gdk_pixbuf_moduledir]) +AC_MSG_CHECKING([for gdk-pixbuf-thumbnailer location]) +gdk_pixbuf_bindir=$($PKG_CONFIG --variable bindir gdk-pixbuf-2.0) +gdk_pixbuf_thumbnailer="${gdk_pixbuf_bindir}/gdk-pixbuf-thumbnailer" + +AS_IF([test -x "${gdk_pixbuf_thumbnailer}"], [ + AC_MSG_RESULT([$gdk_pixbuf_thumbnailer]) + AC_SUBST([gdk_pixbuf_thumbnailer]) +],[ + AC_MSG_RESULT([no]) +]) + + AC_CONFIG_FILES([ Makefile + libsvgtiny.thumbnailer ]) LT_INIT([disable-static])