File:  [ELWIX - Embedded LightWeight unIX -] / libaitsess / configure.in
Revision 1.7: download - view: text, annotated - select for diffs - revision graph
Thu Jan 17 13:01:27 2013 UTC (11 years, 4 months ago) by misho
Branches: MAIN
CVS tags: sess4_0, SESS3_3, HEAD
version 3.3

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.7 2013/01/17 13:01:27 misho Exp $
    4: #
    5: AC_INIT(libaitsess, 3.3, misho@elwix.org)
    6: AC_CONFIG_SRCDIR([src/aitsess.c])
    7: AC_CONFIG_HEADERS([inc/config.h])
    8: 
    9: # Checks for programs.
   10: AC_PROG_CC
   11: AC_PROG_INSTALL
   12: 
   13: AC_CANONICAL_HOST
   14: AC_CANONICAL_TARGET
   15: 
   16: AC_CHECK_TOOL(MKDEP, mkdep, no)
   17: AC_SUBST(MKDEP)
   18: 
   19: CFLAGS="-Wall -O2 -fPIC -I/usr/local/include ${CFLAGS}"
   20: LDFLAGS="-L/usr/local/lib ${LDFLAGS}"
   21: 
   22: # Checks for libraries.
   23: AC_CHECK_LIB(pthread, [pthread_create])
   24: AC_CHECK_LIB(aitio, [io_arrayInit])
   25: 
   26: # Checks for header files.
   27: 
   28: # Checks for typedefs, structures, and compiler characteristics.
   29: AC_C_CONST
   30: AC_C_INLINE
   31: 
   32: # Checks for library functions.
   33: AC_FUNC_MALLOC
   34: AC_FUNC_MMAP
   35: AC_CHECK_FUNCS([bzero memset munmap])
   36: AC_CHECK_FUNCS([pthread_create pthread_exit])
   37: AC_CHECK_FUNCS([shm_open shm_unlink])
   38: 
   39: # It's stupid, but not all platforms have union semun, even those that need it.
   40: AC_MSG_CHECKING(looking for union semun in sys/sem.h)
   41: AC_TRY_COMPILE([
   42: 		#include <sys/types.h>
   43: 		#include <sys/ipc.h>
   44: 		#include <sys/sem.h>
   45: 		],[
   46: 		union semun arg;
   47: 		semctl(0, 0, 0, arg);
   48: 		], [ 
   49: 		AC_DEFINE(HAVE_UNION_SEMUN,, [union semun])
   50: 		] msg=yes, msg=no )
   51: AC_MSG_RESULT([$msg])
   52: 
   53: DEBUG=no
   54: AC_MSG_CHECKING(Debug Build)
   55: AC_ARG_ENABLE(debug,
   56: 	[  --enable-debug          Build library with debug information and additional messages],
   57: 	[ DEBUG=$enableval
   58: 		case "$enableval" in
   59: 			yes)
   60: 				AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
   61: 				CFLAGS="-g ${CFLAGS}"
   62: 				;;
   63: 			*)
   64: 				;;
   65: 		esac ],)
   66: AC_MSG_RESULT($DEBUG)
   67: 
   68: AC_CONFIG_FILES([Makefile
   69: 		inc/Makefile
   70: 		lib/Makefile
   71: 		src/Makefile])
   72: AC_OUTPUT

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