Annotation of libelwix/configure.in, revision 1.81.2.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>