Annotation of mqtt/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 2017/10/08 22:50:40 misho Exp $
1.2 misho 4: #
1.4.2.1 misho 5: AC_INIT(mqtt, 2.1, misho@elwix.org)
1.2 misho 6: AC_CONFIG_HEADERS(inc/config.h)
7: AC_CONFIG_SRCDIR(src/mqttd.c)
8:
1.4 misho 9: ac_cv_func_malloc_0_nonnull="yes"
10: ac_cv_func_realloc_0_nonnull="yes"
11:
1.2 misho 12: # Checks for programs.
13: AC_PROG_CC
14: AC_PROG_RANLIB
15: AC_PROG_INSTALL
16:
17: AC_CANONICAL_HOST
18: AC_CANONICAL_TARGET
19:
1.4.2.2 ! misho 20: AC_CHECK_TOOL(MKDEP, mkdep, ../mkdep)
1.2 misho 21: AC_SUBST(MKDEP)
22:
1.3 misho 23: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
24: LDFLAGS="${LDFLAGS}"
1.2 misho 25:
26:
27: # Checks for libraries.
28: AC_CHECK_LIB([util], openpty)
29: AC_CHECK_LIB([crypto], BF_set_key)
30: AC_CHECK_LIB([pthread], pthread_create)
31: AC_CHECK_LIB([sqlite3], sqlite3_reset)
1.4 misho 32: AC_CHECK_LIB([elwix], ait_allocVar)
1.2 misho 33: AC_CHECK_LIB([aitcfg], cfgLoadConfig)
34: AC_CHECK_LIB([aitmqtt], mqtt_msgAlloc)
35: AC_CHECK_LIB([aitsched], schedRun)
36:
37: # Checks for header files.
38: AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h syslog.h unistd.h])
39:
40: # Checks for typedefs, structures, and compiler characteristics.
41: AC_C_INLINE
42:
43: # Checks for library functions.
44: AC_FUNC_FORK
45: AC_FUNC_MALLOC
46: AC_FUNC_MMAP
47: AC_FUNC_REALLOC
48: AC_CHECK_FUNCS([dup2 gettimeofday memmove memset mkdir munmap regcomp strchr strdup strerror strtol])
49:
50: DEBUG=no
51: AC_MSG_CHECKING(Debug Build)
52: AC_ARG_ENABLE(debug,
53: [ --enable-debug Build library with debug information and additional messages],
54: [ DEBUG=$enableval
55: case "$enableval" in
56: yes)
57: AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
58: CFLAGS="-g ${CFLAGS}"
59: ;;
60: *)
61: AC_DEFINE(NDEBUG,, [Turn off debug asserts])
62: ;;
63: esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
64: AC_MSG_RESULT($DEBUG)
65:
1.3 misho 66: SQLITE3DIR="/usr/local"
67: AC_MSG_CHECKING(SQLite3 install directory)
68: AC_ARG_WITH(sqlite3dir,
69: [ --with-sqlite3dir=<dir> Custom SQLite3 install directory ],
70: [ SQLITE3DIR="$withval" ], )
71: AC_MSG_RESULT($SQLITE3DIR)
72: AC_SUBST(SQLITE3DIR)
73:
1.4.2.2 ! misho 74: SQLITE3INC=""
! 75: AC_MSG_CHECKING(SQLite3 include directory)
! 76: AC_ARG_WITH(sqlite3inc,
! 77: [ --with-sqlite3inc=<dir> Custom SQLite3 include directory ],
! 78: [ SQLITE3INC="$withval" ], )
! 79: AC_MSG_RESULT($SQLITE3INC)
! 80: AC_SUBST(SQLITE3INC)
! 81: SQLITE3LIB=""
! 82: AC_MSG_CHECKING(SQLite3 library directory)
! 83: AC_ARG_WITH(sqlite3lib,
! 84: [ --with-sqlite3lib=<dir> Custom SQLite3 library directory ],
! 85: [ SQLITE3LIB="$withval" ], )
! 86: AC_MSG_RESULT($SQLITE3LIB)
! 87: AC_SUBST(SQLITE3LIB)
! 88:
1.2 misho 89: AC_CONFIG_FILES([Makefile
90: bin/Makefile
91: inc/Makefile
92: lib/Makefile
93: src/Makefile])
94: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>