File:  [ELWIX - Embedded LightWeight unIX -] / libelwix / configure.in
Revision 1.64: download - view: text, annotated - select for diffs - revision graph
Tue Mar 14 22:36:13 2023 UTC (14 months ago) by misho
Branches: MAIN
CVS tags: elwix5_8, HEAD, ELWIX5_7
version 5.7

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.64 2023/03/14 22:36:13 misho Exp $
    4: #
    5: AC_INIT(libelwix, 5.7, 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: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
   24: LDFLAGS="${LDFLAGS}"
   25: 
   26: AC_CHECK_LIB([pthread], [pthread_mutex_init])
   27: AC_CHECK_LIB([bsd], [strlcpy])
   28: 
   29: # Checks for header files.
   30: AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h termios.h unistd.h])
   31: AC_CHECK_HEADERS([bsd/string.h])
   32: 
   33: # Checks for typedefs, structures, and compiler characteristics.
   34: AC_C_INLINE
   35: 
   36: # Checks for library functions.
   37: AC_FUNC_MALLOC
   38: AC_FUNC_REALLOC
   39: AC_CHECK_FUNCS([memset regcomp strchr strerror link_addr strlcpy])
   40: 
   41: DEBUG=no
   42: AC_MSG_CHECKING(Debug Build)
   43: AC_ARG_ENABLE(debug,
   44: 	[  --enable-debug          Build library with debug information and additional messages],
   45: 	[ DEBUG=$enableval
   46: 		case "$enableval" in
   47: 			yes)
   48: 				CFLAGS="-g ${CFLAGS}"
   49: 				;;
   50: 			*)
   51: 				AC_DEFINE(NDEBUG,, [Build w/o assert() support])
   52: 				;;
   53: 		esac ],)
   54: AC_MSG_RESULT($DEBUG)
   55: 
   56: MEMMGR="elwix"
   57: AC_MSG_CHECKING(Memory management)
   58: AC_ARG_WITH(memmgr,
   59: 	[  --with-memmgr=<mm>      Memory manager for ELWIX (elwix|system)], 
   60: 	[ case "$withval" in
   61: 		sys|system)
   62: 			MEMMGR="system"
   63: 			AC_DEFINE(MEMMGR, ELWIX_SYSM, [ELWIX memory manager])
   64: 			;;
   65: 		*)
   66: 			MEMMGR="elwix"
   67: 			AC_DEFINE(MEMMGR, ELWIX_MPOOL, [ELWIX memory manager])
   68: 			;;
   69: 	  esac ], AC_DEFINE(MEMMGR, ELWIX_MPOOL, [ELWIX memory manager]))
   70: AC_MSG_RESULT($MEMMGR)
   71: 
   72: AC_CONFIG_FILES([Makefile
   73:                  inc/Makefile
   74:                  lib/Makefile
   75:                  src/Makefile])
   76: AC_OUTPUT

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