File: configure.ac

package info (click to toggle)
innduct 2.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 664 kB
  • sloc: sh: 4,270; ansic: 3,114; perl: 130; makefile: 33
file content (48 lines) | stat: -rw-r--r-- 1,503 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#  innduct
#  tailing reliable realtime streaming feeder for inn
#  configure.ac
#
#  Copyright Ian Jackson <ijackson@chiark.greenend.org.uk>
#  and contributors; see LICENCE.txt.
#  SPDX-License-Identifier: GPL-3.0-or-later

AC_INIT([innduct],[1.0],[ijackson@chiark.greenend.org.uk])
AC_CONFIG_AUX_DIR(autoconf-aux)
AM_INIT_AUTOMAKE([])

AC_PROG_CC

LDFLAGS="$LDFLAGS -L/usr/lib/news"
AC_CHECK_HEADERS(sys/inotify.h)

LIBS="-Wl,-Bdynamic $LIBS"

# 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.  So we need to
# temporarily put -Bstatic in LDFLAGS so that it ends up before
# the actual libraries in the following tests.
LDFLAGS="$LDFLAGS -Wl,-Bstatic"

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)])
])

# Now move the -Bstatic to LIBS where it belongs.
# LDFLAGS and LIBS are automatically included in link lines by automake
# so nothing is needed in Makefile.am.)
LDFLAGS="${LDFLAGS% -Wl,-Bstatic}"
LIBS="-Wl,-Bstatic $LIBS"

AM_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT