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