1: #
2: # $Author: misho $
3: # $Id: configure.in,v 1.22 2024/03/19 10:06:37 misho Exp $
4: #
5: AC_INIT(libaitcli, 4.5, misho@elwix.org)
6: AC_CONFIG_SRCDIR([src/aitcli.c])
7: AC_CONFIG_HEADERS([inc/config.h])
8:
9: ac_cv_func_malloc_0_nonnull="yes"
10: ac_cv_func_realloc_0_nonnull="yes"
11:
12: # Checks for programs.
13: AC_PROG_CC
14: AC_PROG_INSTALL
15: AC_PROG_RANLIB
16:
17: AC_CANONICAL_HOST
18: AC_CANONICAL_TARGET
19:
20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
21: AC_SUBST(MKDEP)
22:
23: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
24: LDFLAGS="${LDFLAGS}"
25:
26: # Checks for libraries.
27: AC_CHECK_LIB(util, [forkpty])
28: AC_CHECK_LIB(elwix, [str_Trim])
29:
30: # Checks for header files.
31: AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h termios.h unistd.h libutil.h])
32:
33: # Checks for typedefs, structures, and compiler characteristics.
34: AC_C_INLINE
35:
36: # Checks for library functions.
37: AC_CHECK_FUNCS([memset strdup strerror])
38: AC_CHECK_FUNCS([str_Trim])
39: AC_CHECK_FUNCS([forkpty])
40:
41: DEBUG=no
42: AC_MSG_CHECKING(Debug Build)
43: AC_ARG_ENABLE(debug,
44: [ --enable-debug Build library with debug information and additional messages],
45: [ DEBUG=$enableval
46: case "$enableval" in
47: yes)
48: AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
49: CFLAGS="-g ${CFLAGS}"
50: ;;
51: *)
52: AC_DEFINE(NDEBUG,, [Build w/o assert() support])
53: ;;
54: esac ],)
55: AC_MSG_RESULT($DEBUG)
56:
57: AC_CONFIG_FILES([Makefile
58: inc/Makefile
59: lib/Makefile
60: debian/Makefile
61: src/Makefile])
62: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>