Annotation of libelwix/configure.in, revision 1.70
1.1 misho 1: #
2: # $Author: misho $
1.70 ! misho 3: # $Id: configure.in,v 1.69 2024/08/14 15:37:35 misho Exp $
1.1 misho 4: #
1.69 misho 5: AC_INIT(libelwix, 6.0, misho@elwix.org)
1.1 misho 6: AC_CONFIG_SRCDIR([src/elwix.c])
7: AC_CONFIG_HEADERS([inc/config.h])
8:
1.4 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
15: AC_PROG_RANLIB
16:
17: AC_CANONICAL_HOST
18: AC_CANONICAL_TARGET
19:
1.30 misho 20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
1.1 misho 21: AC_SUBST(MKDEP)
22:
1.18 misho 23: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
24: LDFLAGS="${LDFLAGS}"
1.1 misho 25:
26: AC_CHECK_LIB([pthread], [pthread_mutex_init])
27:
28: # Checks for header files.
29: AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h termios.h unistd.h])
30:
31: # Checks for typedefs, structures, and compiler characteristics.
32: AC_C_INLINE
33:
34: # Checks for library functions.
35: AC_FUNC_MALLOC
36: AC_FUNC_REALLOC
1.65 misho 37: AC_CHECK_FUNCS([memset regcomp strchr strerror link_addr strlcpy strlcat])
1.1 misho 38:
39: DEBUG=no
40: AC_MSG_CHECKING(Debug Build)
41: AC_ARG_ENABLE(debug,
42: [ --enable-debug Build library with debug information and additional messages],
43: [ DEBUG=$enableval
44: case "$enableval" in
45: yes)
46: CFLAGS="-g ${CFLAGS}"
47: ;;
48: *)
1.66 misho 49: AC_DEFINE(NDEBUG,, [Build w/o assert() support])
1.1 misho 50: ;;
51: esac ],)
52: AC_MSG_RESULT($DEBUG)
53:
1.27 misho 54: MEMMGR="elwix"
55: AC_MSG_CHECKING(Memory management)
56: AC_ARG_WITH(memmgr,
57: [ --with-memmgr=<mm> Memory manager for ELWIX (elwix|system)],
58: [ case "$withval" in
59: sys|system)
60: MEMMGR="system"
61: AC_DEFINE(MEMMGR, ELWIX_SYSM, [ELWIX memory manager])
62: ;;
63: *)
64: MEMMGR="elwix"
65: AC_DEFINE(MEMMGR, ELWIX_MPOOL, [ELWIX memory manager])
66: ;;
67: esac ], AC_DEFINE(MEMMGR, ELWIX_MPOOL, [ELWIX memory manager]))
68: AC_MSG_RESULT($MEMMGR)
69:
1.70 ! misho 70: <<<<<<< configure.in
1.69 misho 71: MPOOL_MEM_ZERO=yes
72: AC_MSG_CHECKING(MPoll zeroing allocated memory)
73: AC_ARG_ENABLE(mpool-mem-zero,
74: [ --enable-mpool-mem-zero MPool zeroing allocated memory],
75: [ case "$enableval" in
76: yes)
77: AC_DEFINE(MPOOL_MEM_ZERO,, [MPool zeroing memory])
78: MPOOL_MEM_ZERO=yes
79: ;;
80: *)
81: MPOOL_MEM_ZERO=no
82: ;;
83: esac ], [ AC_DEFINE(MPOOL_MEM_ZERO,, [MPool zeroing memory]) ])
84: AC_MSG_RESULT($MPOOL_MEM_ZERO)
85:
1.70 ! misho 86: =======
! 87: MPOOL_MEM_ZERO=no
! 88: AC_MSG_CHECKING(MPoll zeroing allocated memory)
! 89: AC_ARG_ENABLE(mpool-mem-zero,
! 90: [ --enable-mpool-mem-zero MPool zeroing allocated memory],
! 91: [ case "$enableval" in
! 92: yes)
! 93: AC_DEFINE(MPOOL_MEM_ZERO,, [MPool zeroing memory])
! 94: MPOOL_MEM_ZERO=yes
! 95: ;;
! 96: *)
! 97: MPOOL_MEM_ZERO=no
! 98: ;;
! 99: esac ],)
! 100: AC_MSG_RESULT($MPOOL_MEM_ZERO)
! 101:
! 102: >>>>>>> 1.68.2.3
1.65 misho 103: PATRICIA=no
104: AC_MSG_CHECKING(Patricia support)
105: AC_ARG_ENABLE(patricia,
106: [ --enable-patricia Patricia support for ELWIX],
107: [ case "$enableval" in
108: yes)
109: AC_DEFINE(PATRICIA_SUPPORT,, [Patricia support])
110: PATRICIA=yes
111: ;;
112: *)
113: ;;
114: esac ],)
115: AC_MSG_RESULT($PATRICIA)
116:
117: PELCO=no
118: AC_MSG_CHECKING(Pelco support)
119: AC_ARG_ENABLE(pelco,
120: [ --enable-pelco Pelco support for ELWIX],
121: [ case "$enableval" in
122: yes)
123: AC_DEFINE(PELCO_SUPPORT,, [Pelco support])
124: PELCO=yes
125: ;;
126: *)
127: ;;
128: esac ],)
129: AC_MSG_RESULT($PELCO)
130:
1.69 misho 131: DEBIAN_ARCH=$target_cpu
132: AS_IF([ test "x$target_cpu" = "xarm6l" -o "x$target_cpu" = "xarm7l" ], DEBIAN_ARCH="armhf")
133: AS_IF([ test "x$target_cpu" = "xaarch64" ], DEBIAN_ARCH="arm64")
134: AS_IF([ test "x$target_cpu" = "xi686" ], DEBIAN_ARCH="i386")
135: AS_IF([ test "x$target_cpu" = "xx86_64" ], DEBIAN_ARCH="amd64")
136: AC_SUBST(DEBIAN_ARCH)
137:
138:
1.1 misho 139: AC_CONFIG_FILES([Makefile
140: inc/Makefile
141: lib/Makefile
1.67 misho 142: debian/Makefile
1.69 misho 143: debian/control
1.1 misho 144: src/Makefile])
145: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>