AM_CFLAGS = -Wall --std=gnu99 $(GRITS_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
-AM_LDFLAGS = -module -avoid-version -no-undefined
+AM_LDFLAGS = -shared -module -avoid-version -Wl,--as-needed
LIBS = $(GRITS_LIBS)
pluginsdir = $(pkglibdir)
endif
if WIN32
+AM_LDFLAGS += -no-undefined
dots = ..
endif