47 lines
1.3 KiB
Text
47 lines
1.3 KiB
Text
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ([2.67])
|
|
AC_INIT(vzlogger, 0.2, info@steffenvogel.de)
|
|
AM_INIT_AUTOMAKE(vzlogger, 0.2)
|
|
AC_CONFIG_SRCDIR([src/main.c])
|
|
AC_CONFIG_HEADERS([config.h])
|
|
AC_CONFIG_FILES([Makefile src/Makefile])
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CC
|
|
|
|
# Checks for libraries.
|
|
PKG_CHECK_MODULES([DEPS], [json >= 0.9 libcurl >= 7.21.0 libmicrohttpd >= 0.9.3])
|
|
|
|
# Checks for header files.
|
|
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h sys/time.h termios.h unistd.h])
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_TYPE_MODE_T
|
|
AC_TYPE_SIZE_T
|
|
|
|
# Checks for library functions.
|
|
AC_FUNC_MALLOC
|
|
AC_FUNC_REALLOC
|
|
AC_FUNC_STRERROR_R
|
|
AC_CHECK_FUNCS([gettimeofday memset sqrt strchr strtol])
|
|
|
|
# debug compilation support
|
|
AC_MSG_CHECKING([whether to build with debug information])
|
|
AC_ARG_ENABLE([debug],
|
|
[AS_HELP_STRING([--enable-debug],
|
|
[enable debug data generation (def=no)])],
|
|
[debugit="$enableval"],
|
|
[debugit=no])
|
|
AC_MSG_RESULT([$debugit])
|
|
|
|
if test x"$debugit" = x"yes"; then
|
|
AC_DEFINE([DEBUG],[],[Debug Mode])
|
|
AM_CXXFLAGS="$AM_CXXFLAGS -g -Wall -Werror -Wno-uninitialized -O0"
|
|
else
|
|
AC_DEFINE([NDEBUG],[],[No-debug Mode])
|
|
AM_CXXFLAGS="$AM_CXXFLAGS -O3"
|
|
fi
|
|
|
|
AC_OUTPUT
|