Annotation of libaitsess/configure.in, revision 1.4

1.2       misho       1: #
                      2: # $Author: misho $
1.4     ! misho       3: # $Id: configure.in,v 1.3.2.2 2011/09/07 15:59:46 misho Exp $
1.2       misho       4: #
1.4     ! misho       5: AC_INIT(libaitsess, 3.0, 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.2       misho      36: 
                     37: # It's stupid, but not all platforms have union semun, even those that need it.
                     38: AC_MSG_CHECKING(looking for union semun in sys/sem.h)
                     39: AC_TRY_COMPILE([
                     40:                #include <sys/types.h>
                     41:                #include <sys/ipc.h>
                     42:                #include <sys/sem.h>
                     43:                ],[
                     44:                union semun arg;
                     45:                semctl(0, 0, 0, arg);
                     46:                ], [ 
                     47:                AC_DEFINE(HAVE_UNION_SEMUN,, [union semun])
                     48:                ] msg=yes, msg=no )
                     49: AC_MSG_RESULT([$msg])
                     50: 
                     51: DEBUG=no
                     52: AC_MSG_CHECKING(Debug Build)
                     53: AC_ARG_ENABLE(debug,
                     54:        [  --enable-debug          Build library with debug information and additional messages],
                     55:        [ DEBUG=$enableval
                     56:                case "$enableval" in
                     57:                        yes)
                     58:                                AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
                     59:                                CFLAGS="-g ${CFLAGS}"
                     60:                                ;;
                     61:                        *)
                     62:                                ;;
                     63:                esac ],)
                     64: AC_MSG_RESULT($DEBUG)
                     65: 
                     66: AC_CONFIG_FILES([Makefile
                     67:                inc/Makefile
                     68:                lib/Makefile
                     69:                src/Makefile])
                     70: AC_OUTPUT

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