2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([libsmf],[1.1],[trasz@FreeBSD.org])
6 AM_INIT_AUTOMAKE([-Wall foreign])
7 AC_CONFIG_SRCDIR([src/smf.c])
8 AC_CONFIG_HEADER([config.h])
10 # Checks for programs.
18 # Checks for libraries.
19 AC_CHECK_LIB([m], [pow])
20 AC_ARG_WITH([readline],
21 [AS_HELP_STRING([--with-readline],
22 [support fancy command line editing @<:@default=check@:>@])],
24 [with_readline=check])
26 AS_IF([test "x$with_readline" != xno],
27 [AC_CHECK_LIB([readline], [main],
28 [AC_SUBST([READLINE_LIBS], ["-lreadline -lncurses"])
29 AC_DEFINE([HAVE_LIBREADLINE], [1], [Define if you have libreadline])],
30 [if test "x$with_readline" != xcheck; then
32 [--with-readline was given, but test for readline failed])
37 # Checks for header files.
39 AC_CHECK_HEADERS([arpa/inet.h stdint.h stdlib.h string.h])
41 # Checks for typedefs, structures, and compiler characteristics.
47 # Checks for library functions.
52 AC_CHECK_FUNCS([memset pow strdup strerror strtol strchr])
54 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.2)
58 AC_CONFIG_FILES([Makefile smf.pc src/Makefile man/Makefile])