2 # tailing reliable realtime streaming feeder for inn
5 # Copyright Ian Jackson <ijackson@chiark.greenend.org.uk>
6 # and contributors; see LICENCE.txt.
7 # SPDX-License-Identifier: GPL-3.0-or-later
9 AC_INIT([innduct],[1.0],[ijackson@chiark.greenend.org.uk])
10 AC_CONFIG_AUX_DIR(autoconf-aux)
15 LDFLAGS="$LDFLAGS -L/usr/lib/news"
16 AC_CHECK_HEADERS(sys/inotify.h)
18 LIBS="-Wl,-Bdynamic $LIBS"
20 # Possibly, we could link dynamically. But the ABI stability of
21 # the inn libraries is questionable. On Debian only the .a files
22 # are in inn2-dev. The .so's are in inn2.deb, which isn't depended on
23 # by inn2-dev, and which doesn't have a # shlibs file for them.
24 # So right now we can't sensibly link dynamically.
26 # So we pass -Bstatic.
28 # Recall that LIBS is generally *prepended* to. So we need to
29 # temporarily put -Bstatic in LDFLAGS so that it ends up before
30 # the actual libraries in the following tests.
31 LDFLAGS="$LDFLAGS -Wl,-Bstatic"
33 AC_SEARCH_LIBS(NNTPconnect, [inn], [],[
34 AC_MSG_ERROR([failed to find libinn])
36 AC_SEARCH_LIBS(SMinit, [innstorage storage], [],[
37 AC_MSG_ERROR([Failed to find INN storage library (-linnstorage, -lstorage)])
40 # Now move the -Bstatic to LIBS where it belongs.
41 # LDFLAGS and LIBS are automatically included in link lines by automake
42 # so nothing is needed in Makefile.am.)
43 LDFLAGS="${LDFLAGS% -Wl,-Bstatic}"
44 LIBS="-Wl,-Bstatic $LIBS"
46 AM_CONFIG_HEADER(config.h)
47 AC_CONFIG_FILES([Makefile])