From: Michael Orlitzky Date: Fri, 4 Aug 2023 20:00:08 +0000 (-0400) Subject: configure.ac,Makefile.am: build both a library and an executable. X-Git-Tag: 0.0.1~39 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f2fb74874c0b938cdb73dd50ea470bd4bc6b0c26;p=libsvgtiny-pixbuf.git configure.ac,Makefile.am: build both a library and an executable. --- diff --git a/Makefile.am b/Makefile.am index c1e0a7d..7a697ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,18 @@ -bin_PROGRAMS = example -example_CPPFLAGS = $(CAIRO_CFLAGS) \ - $(GDKPIXBUF_CFLAGS) \ - $(GTK4_CFLAGS) \ - $(LIBSVGTINY_CFLAGS) \ - -DGDK_PIXBUF_ENABLE_BACKEND -example_LDADD = $(CAIRO_LIBS) \ - $(GDKPIXBUF_LIBS) \ - $(GTK4_LIBS) \ - $(LIBSVGTINY_LIBS) -example_SOURCES = example.c +ACLOCAL_AMFLAGS = -I m4 + +gdk_pixbuf_module_LTLIBRARIES = libpixbufloader-svg.la +libpixbufloader_svg_la_SOURCES = io-svg.c + +libpixbufloader_svg_la_CPPFLAGS = $(CAIRO_CFLAGS) \ + $(GDKPIXBUF_CFLAGS) \ + $(GTK4_CFLAGS) \ + $(LIBSVGTINY_CFLAGS) \ + -DGDK_PIXBUF_ENABLE_BACKEND +libpixbufloader_svg_la_LIBADD = $(CAIRO_LIBS) \ + $(GDKPIXBUF_LIBS) \ + $(GTK4_LIBS) \ + $(LIBSVGTINY_LIBS) +bin_PROGRAMS = svg2png +svg2png_SOURCES = $(libpixbufloader_svg_la_SOURCES) +svg2png_CPPFLAGS = $(libpixbufloader_svg_la_CPPFLAGS) +svg2png_LDADD = $(libpixbufloader_svg_la_LIBADD) diff --git a/configure.ac b/configure.ac index 9d34a95..d06bf5f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,16 +1,24 @@ -AC_INIT([libsvgtiny-pixbuf],[0.0.1]) +AC_INIT([libsvgtiny-pixbuf],[0.0.1],[michael@orlitzky.com]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz tar-ustar]) +AC_CONFIG_MACRO_DIRS([m4]) AC_PROG_CC +AM_PROG_AR PKG_CHECK_MODULES([CAIRO], [cairo]) PKG_CHECK_MODULES([GDKPIXBUF], [gdk-pixbuf-2.0]) 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) +AC_MSG_RESULT([$gdk_pixbuf_moduledir]) +AC_SUBST([gdk_pixbuf_moduledir]) + AC_CONFIG_FILES([ Makefile ]) +LT_INIT([disable-static]) AC_OUTPUT