Annotation of libaitcli/configure.in, revision 1.24
1.1 misho 1: #
2: # $Author: misho $
1.24 ! misho 3: # $Id: configure.in,v 1.23.2.1 2025/12/17 23:32:00 misho Exp $
1.1 misho 4: #
1.24 ! misho 5: AC_INIT(libaitcli, 4.7, misho@elwix.org)
1.1 misho 6: AC_CONFIG_SRCDIR([src/aitcli.c])
7: AC_CONFIG_HEADERS([inc/config.h])
8:
1.7 misho 9: ac_cv_func_malloc_0_nonnull="yes"
10: ac_cv_func_realloc_0_nonnull="yes"
11:
1.1 misho 12: # Checks for programs.
13: AC_PROG_CC
14: AC_PROG_INSTALL
1.17 misho 15: AC_PROG_RANLIB
1.1 misho 16:
17: AC_CANONICAL_HOST
18: AC_CANONICAL_TARGET
19:
1.17 misho 20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
1.1 misho 21: AC_SUBST(MKDEP)
22:
1.23 misho 23: if test x"${prefix}" = x"NONE"; then
24: prefix="/usr/local"
25: fi
26: if test x"${exec_prefix}" = x"NONE"; then
27: exec_prefix=${prefix}
28: fi
29:
30: if test "${ac_cv_env_CFLAGS_set}" != "set"; then
31: CFLAGS="-Wall -O2 -I${includedir}"
32: else
33: CFLAGS="${ac_cv_env_CFLAGS_value}"
34: fi
35: if test "${ac_cv_env_LDFLAGS_set}" = "set"; then
36: LDFLAGS="${ac_cv_env_LDFLAGS_value}"
37: else
38: LDFLAGS="-L$(eval echo ${libdir})"
39: fi
40:
1.1 misho 41:
42: # Checks for libraries.
1.2 misho 43: AC_CHECK_LIB(util, [forkpty])
1.7 misho 44: AC_CHECK_LIB(elwix, [str_Trim])
1.1 misho 45:
46: # Checks for header files.
1.4 misho 47: AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h termios.h unistd.h libutil.h])
1.1 misho 48:
49: # Checks for typedefs, structures, and compiler characteristics.
50: AC_C_INLINE
51:
52: # Checks for library functions.
53: AC_CHECK_FUNCS([memset strdup strerror])
1.7 misho 54: AC_CHECK_FUNCS([str_Trim])
1.2 misho 55: AC_CHECK_FUNCS([forkpty])
1.1 misho 56:
57: DEBUG=no
58: AC_MSG_CHECKING(Debug Build)
59: AC_ARG_ENABLE(debug,
60: [ --enable-debug Build library with debug information and additional messages],
61: [ DEBUG=$enableval
62: case "$enableval" in
63: yes)
64: AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
65: CFLAGS="-g ${CFLAGS}"
66: ;;
67: *)
1.23 misho 68: AC_DEFINE(NDEBUG,, [Turn off debug asserts])
1.1 misho 69: ;;
1.23 misho 70: esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
1.1 misho 71: AC_MSG_RESULT($DEBUG)
72:
1.23 misho 73: DEBIAN_ARCH=$target_cpu
74: AS_IF([ test "x$target_cpu" = "xarm6l" -o "x$target_cpu" = "xarm7l" ], DEBIAN_ARCH="armhf")
75: AS_IF([ test "x$target_cpu" = "xaarch64" ], DEBIAN_ARCH="arm64")
76: AS_IF([ test "x$target_cpu" = "xi686" ], DEBIAN_ARCH="i386")
77: AS_IF([ test "x$target_cpu" = "xx86_64" ], DEBIAN_ARCH="amd64")
78: AC_SUBST(DEBIAN_ARCH)
79:
1.1 misho 80: AC_CONFIG_FILES([Makefile
1.23 misho 81: inc/Makefile
82: lib/Makefile
83: debian/Makefile
84: debian/control
85: src/Makefile])
1.1 misho 86: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>