Pass LDFLAGS to apxs using "-Wl,". This patch should be sent to the developers. --- src/Makefile.in.orig 2016-10-19 15:07:34.000000000 -0500 +++ src/Makefile.in 2019-01-16 12:02:39.000000000 -0600 @@ -208,6 +208,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign WC = -Wc,"$(CFLAGS)" +WL = -Wl,"$(LDFLAGS)" CLEANFILES = *.la *.lo *.o *.so *.slo .libs/* EXTRA_DIST = mod_maxminddb.c all: all-am @@ -402,7 +402,7 @@ # compile the DSO file module: mod_maxminddb.c $(TARGET) - $(APXS) -c $(LDFLAGS) $(LIBMAXMINDDB_LDFLAGS) $(LIBS) $(WC) $(APXS_LDFLAGS) mod_maxminddb.c + $(APXS) -c $(WL) $(LIBMAXMINDDB_LDFLAGS) $(LIBS) $(WC) $(APXS_LDFLAGS) mod_maxminddb.c install-exec-local: module $(APXS) -i -a -n maxminddb .libs/mod_maxminddb.so