File:  [ELWIX - Embedded LightWeight unIX -] / mqtt / configure.in
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Sun Oct 8 22:49:24 2017 UTC (6 years, 7 months ago) by misho
Branches: MAIN
CVS tags: mqtt2_1, MQTT2_0, HEAD
version 2.0

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.4 2017/10/08 22:49:24 misho Exp $
    4: #
    5: AC_INIT(mqtt, 2.0, misho@elwix.org)
    6: AC_CONFIG_HEADERS(inc/config.h)
    7: AC_CONFIG_SRCDIR(src/mqttd.c)
    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_RANLIB
   15: AC_PROG_INSTALL
   16: 
   17: AC_CANONICAL_HOST
   18: AC_CANONICAL_TARGET
   19: 
   20: AC_CHECK_TOOL(MKDEP, mkdep, no)
   21: AC_SUBST(MKDEP)
   22: 
   23: CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
   24: LDFLAGS="${LDFLAGS}"
   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)
   32: AC_CHECK_LIB([elwix], ait_allocVar)
   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: 
   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: 
   74: AC_CONFIG_FILES([Makefile
   75:                  bin/Makefile
   76:                  inc/Makefile
   77:                  lib/Makefile
   78:                  src/Makefile])
   79: AC_OUTPUT

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