File:  [ELWIX - Embedded LightWeight unIX -] / libelwix / configure.in
Revision 1.76: download - view: text, annotated - select for diffs - revision graph
Wed Dec 4 17:47:28 2024 UTC (2 months, 2 weeks ago) by misho
Branches: MAIN
CVS tags: elwix6_7, HEAD, ELWIX6_6
Version 6.6

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.76 2024/12/04 17:47:28 misho Exp $
    4: #
    5: AC_INIT(libelwix, 6.6, misho@elwix.org)
    6: AC_CONFIG_SRCDIR([src/elwix.c])
    7: AC_CONFIG_HEADERS([inc/config.h])
    8: 
    9: ac_cv_func_malloc_0_nonnull="yes"
   10: ac_cv_func_realloc_0_nonnull="yes"
   11: 
   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: 
   20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
   21: AC_SUBST(MKDEP)
   22: 
   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
   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
   39: 
   40: # Checks for library functions.
   41: AC_FUNC_MALLOC
   42: AC_FUNC_REALLOC
   43: AC_CHECK_FUNCS([memset regcomp strchr strerror link_addr strlcpy strlcat])
   44: 
   45: DEBUG=no
   46: AC_MSG_CHECKING(Debug Build)
   47: AC_ARG_ENABLE(debug,
   48: 	[  --enable-debug          Build library with debug information and additional messages],
   49: 	[ DEBUG=$enableval
   50: 		case "$enableval" in
   51: 			yes)
   52: 				CFLAGS="-g ${CFLAGS}"
   53: 				;;
   54: 			*)
   55: 				AC_DEFINE(NDEBUG,, [Build w/o assert() support])
   56: 				;;
   57: 		esac ],)
   58: AC_MSG_RESULT($DEBUG)
   59: 
   60: MEMMGR="elwix"
   61: AC_MSG_CHECKING(Memory management)
   62: AC_ARG_WITH(memmgr,
   63: 	[  --with-memmgr=<mm>      Memory manager for ELWIX (elwix|system)], 
   64: 	[ case "$withval" in
   65: 		sys|system)
   66: 			MEMMGR="system"
   67: 			AC_DEFINE(MEMMGR, ELWIX_SYSM, [ELWIX memory manager])
   68: 			;;
   69: 		*)
   70: 			MEMMGR="elwix"
   71: 			AC_DEFINE(MEMMGR, ELWIX_MPOOL, [ELWIX memory manager])
   72: 			;;
   73: 	  esac ], AC_DEFINE(MEMMGR, ELWIX_MPOOL, [ELWIX memory manager]))
   74: AC_MSG_RESULT($MEMMGR)
   75: 
   76: MPOOL_MEM_ZERO=no
   77: AC_MSG_CHECKING(MPoll zeroing allocated memory)
   78: AC_ARG_ENABLE(mpool-mem-zero, 
   79: 	      [  --enable-mpool-mem-zero MPool zeroing allocated memory], 
   80: 	      [ case "$enableval" in 
   81: 		 	yes)
   82: 				AC_DEFINE(MPOOL_MEM_ZERO,, [MPool zeroing memory])
   83: 				MPOOL_MEM_ZERO=yes
   84: 				;;
   85: 			*)
   86: 				MPOOL_MEM_ZERO=no
   87: 				;;
   88: 		  esac ],)
   89: AC_MSG_RESULT($MPOOL_MEM_ZERO)
   90: 
   91: PATRICIA=no
   92: AC_MSG_CHECKING(Patricia support)
   93: AC_ARG_ENABLE(patricia, 
   94: 	      [  --enable-patricia       Patricia support for ELWIX], 
   95: 	      [ case "$enableval" in 
   96: 		 	yes)
   97: 				AC_DEFINE(PATRICIA_SUPPORT,, [Patricia support])
   98: 				PATRICIA=yes
   99: 				;;
  100: 			*)
  101: 				;;
  102: 		  esac ],)
  103: AC_MSG_RESULT($PATRICIA)
  104: 
  105: PELCO=no
  106: AC_MSG_CHECKING(Pelco support)
  107: AC_ARG_ENABLE(pelco, 
  108: 	      [  --enable-pelco          Pelco support for ELWIX], 
  109: 	      [ case "$enableval" in 
  110: 		 	yes)
  111: 				AC_DEFINE(PELCO_SUPPORT,, [Pelco support])
  112: 				PELCO=yes
  113: 				;;
  114: 			*)
  115: 				;;
  116: 		  esac ],)
  117: AC_MSG_RESULT($PELCO)
  118: 
  119: DEBIAN_ARCH=$target_cpu
  120: AS_IF([ test "x$target_cpu" = "xarm6l" -o "x$target_cpu" = "xarm7l" ], DEBIAN_ARCH="armhf") 
  121: AS_IF([ test "x$target_cpu" = "xaarch64" ], DEBIAN_ARCH="arm64") 
  122: AS_IF([ test "x$target_cpu" = "xi686" ], DEBIAN_ARCH="i386") 
  123: AS_IF([ test "x$target_cpu" = "xx86_64" ], DEBIAN_ARCH="amd64") 
  124: AC_SUBST(DEBIAN_ARCH)
  125: 
  126: 
  127: AC_CONFIG_FILES([Makefile
  128:                  inc/Makefile
  129:                  lib/Makefile
  130: 		 debian/Makefile
  131: 		 debian/control
  132:                  src/Makefile])
  133: AC_OUTPUT

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