]> gitweb.michael.orlitzky.com - libsvgtiny-pixbuf.git/commitdiff
configure.ac,Makefile.am: build both a library and an executable.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 4 Aug 2023 20:00:08 +0000 (16:00 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 4 Aug 2023 20:00:08 +0000 (16:00 -0400)
Makefile.am
configure.ac

index c1e0a7d2dabd2ca5c3f4b43a1f83072da1e8e749..7a697acfac87d36e563344021c89cd8967eba81a 100644 (file)
@@ -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)
index 9d34a950a28655579db7f3550ce95b5913bac419..d06bf5f6ae9c0cb9d124c4ecaf9a00af1ca99b99 100644 (file)
@@ -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