diff --git a/Makefile.am b/Makefile.am index 1ad5d72..a3b4c17 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,8 @@ AUTOMAKE_OPTIONS=foreign subdir-objects SUBDIRS = include compat +ACLOCAL_AMFLAGS = -I m4 + bin_PROGRAMS=bgpq4 bgpq4_SOURCES=bgpq4.c bgpq4.h config.h bgpq4_printer.c bgpq_expander.c \ diff --git a/compat/Makefile.am b/compat/Makefile.am index 4eb89b5..8697638 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -6,6 +6,8 @@ noinst_LTLIBRARIES = libcompat.la libcompatnoopt.la libcompatnoopt_la_CFLAGS = -O0 libcompatnoopt_la_SOURCES = +libcompat_la_SOURCES = + if !HAVE_STRLCPY libcompat_la_SOURCES += strlcpy.c endif diff --git a/configure.ac b/configure.ac index bcb4e2f..7485d4a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,8 @@ AC_INIT(bgpq4,0.0.7,job@sobornost.net) AM_INIT_AUTOMAKE + +AC_CONFIG_MACRO_DIR([m4]) + AC_PACKAGE_URL(https://github.com/bgp/bgpq4) AC_CONFIG_HEADERS([config.h]) AM_SILENT_RULES([yes]) @@ -8,8 +11,12 @@ AC_PROG_CC CC=cc CFLAGS="${CFLAGS} -std=gnu11" +AC_PROG_LIBTOOL + AC_PROG_INSTALL +AM_CONDITIONAL([HAVE_STRLCPY], [test "x$ac_cv_func_strlcpy" = xyes]) + AC_CHECK_HEADERS([sys/cdefs.h sys/queue.h sys/tree.h sys/select.h]) AC_MSG_CHECKING([for STAILQ_ interface in queue.h])