File:  [ELWIX - Embedded LightWeight unIX -] / libelwix / configure.in
Revision 1.68.2.1: download - view: text, annotated - select for diffs - revision graph
Mon Apr 15 10:43:20 2024 UTC (6 months, 2 weeks ago) by misho
Branches: elwix5_12
Diff to: branchpoint 1.68: preferred, unified
new ver 5.12

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.68.2.1 2024/04/15 10:43:20 misho Exp $
    4: #
    5: AC_INIT(libelwix, 5.12, 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: 
   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
   37: AC_CHECK_FUNCS([memset regcomp strchr strerror link_addr strlcpy strlcat])
   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: 			*)
   49: 				AC_DEFINE(NDEBUG,, [Build w/o assert() support])
   50: 				;;
   51: 		esac ],)
   52: AC_MSG_RESULT($DEBUG)
   53: 
   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: 
   70: PATRICIA=no
   71: AC_MSG_CHECKING(Patricia support)
   72: AC_ARG_ENABLE(patricia, 
   73: 	      [  --enable-patricia       Patricia support for ELWIX], 
   74: 	      [ case "$enableval" in 
   75: 		 	yes)
   76: 				AC_DEFINE(PATRICIA_SUPPORT,, [Patricia support])
   77: 				PATRICIA=yes
   78: 				;;
   79: 			*)
   80: 				;;
   81: 		  esac ],)
   82: AC_MSG_RESULT($PATRICIA)
   83: 
   84: PELCO=no
   85: AC_MSG_CHECKING(Pelco support)
   86: AC_ARG_ENABLE(pelco, 
   87: 	      [  --enable-pelco          Pelco support for ELWIX], 
   88: 	      [ case "$enableval" in 
   89: 		 	yes)
   90: 				AC_DEFINE(PELCO_SUPPORT,, [Pelco support])
   91: 				PELCO=yes
   92: 				;;
   93: 			*)
   94: 				;;
   95: 		  esac ],)
   96: AC_MSG_RESULT($PELCO)
   97: 
   98: AC_CONFIG_FILES([Makefile
   99:                  inc/Makefile
  100:                  lib/Makefile
  101: 		 debian/Makefile
  102:                  src/Makefile])
  103: AC_OUTPUT

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