Annotation of libaitsess/configure.in, revision 1.4.2.2
1.2 misho 1: #
2: # $Author: misho $
1.4.2.2 ! misho 3: # $Id: configure.in,v 1.4.2.1 2012/02/10 23:39:22 misho Exp $
1.2 misho 4: #
1.4.2.1 misho 5: AC_INIT(libaitsess, 3.1, misho@elwix.org)
1.2 misho 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.
1.4 misho 23: AC_CHECK_LIB(pthread, [pthread_create])
1.2 misho 24:
25: # Checks for header files.
26:
27: # Checks for typedefs, structures, and compiler characteristics.
28: AC_C_CONST
29: AC_C_INLINE
30:
31: # Checks for library functions.
32: AC_FUNC_MALLOC
33: AC_FUNC_MMAP
34: AC_CHECK_FUNCS([bzero memset munmap])
1.4 misho 35: AC_CHECK_FUNCS([pthread_create pthread_exit])
1.4.2.2 ! misho 36: AC_CHECK_FUNCS([shm_open shm_unlink])
1.2 misho 37:
38: # It's stupid, but not all platforms have union semun, even those that need it.
39: AC_MSG_CHECKING(looking for union semun in sys/sem.h)
40: AC_TRY_COMPILE([
41: #include <sys/types.h>
42: #include <sys/ipc.h>
43: #include <sys/sem.h>
44: ],[
45: union semun arg;
46: semctl(0, 0, 0, arg);
47: ], [
48: AC_DEFINE(HAVE_UNION_SEMUN,, [union semun])
49: ] msg=yes, msg=no )
50: AC_MSG_RESULT([$msg])
51:
52: DEBUG=no
53: AC_MSG_CHECKING(Debug Build)
54: AC_ARG_ENABLE(debug,
55: [ --enable-debug Build library with debug information and additional messages],
56: [ DEBUG=$enableval
57: case "$enableval" in
58: yes)
59: AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
60: CFLAGS="-g ${CFLAGS}"
61: ;;
62: *)
63: ;;
64: esac ],)
65: AC_MSG_RESULT($DEBUG)
66:
67: AC_CONFIG_FILES([Makefile
68: inc/Makefile
69: lib/Makefile
70: src/Makefile])
71: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>