X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=configure.ac;h=4f7c559c10bcee6f4bcd653450b28aa1302ffb8b;hb=60b582b4cf746b00217963aeb6990b0cb47e805b;hp=4c9a08f97c6e697a9400c85303b893b18a793b2b;hpb=d5e969b53acb9f724c8b33aed7cbf64a0ec0a017;p=innduct.git diff --git a/configure.ac b/configure.ac index 4c9a08f..4f7c559 100644 --- a/configure.ac +++ b/configure.ac @@ -28,8 +28,29 @@ AM_INIT_AUTOMAKE([]) AC_PROG_CC +LDFLAGS="$LDFLAGS -L/usr/lib/news" AC_CHECK_HEADERS(sys/inotify.h) +LIBS="-Wl,-Bdynamic $LIBS" + +AC_SEARCH_LIBS(NNTPconnect, [inn], [],[ + AC_MSG_ERROR([failed to find libinn]) +]) +AC_SEARCH_LIBS(SMinit, [innstorage storage], [],[ + AC_MSG_ERROR([Failed to find INN storage library (-linnstorage, -lstorage)]) +]) + +# Possibly, we could link dynamically. But the ABI stability of +# the inn libraries is questionable. On Debian only the .a files +# are in inn2-dev. The .so's are in inn2.deb, which isn't depended on +# by inn2-dev, and which doesn't have a # shlibs file for them. +# So right now we can't sensibly link dynamically. +# +# So we pass -Bstatic. (Recall that LIBS is generally *prepended* to, +# and that it is automatically included in link lines by automake +# so nothing is needed in Makefile.am.) +LIBS="-Wl,-Bstatic $LIBS" + AM_CONFIG_HEADER(config.h) AC_CONFIG_FILES([Makefile]) AC_OUTPUT