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