You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
1.9 KiB
82 lines
1.9 KiB
# -*- Autoconf -*- |
|
# Process this file with autoconf to produce a configure script. |
|
|
|
AC_PREREQ([2.69]) |
|
AC_INIT([hvif-light], [0.1.0], [commits@schurr.at]) |
|
AC_CONFIG_MACRO_DIR(m4) |
|
AM_INIT_AUTOMAKE([subdir-objects foreign 1.16]) |
|
AM_SILENT_RULES([yes]) |
|
AC_CONFIG_SRCDIR([src/hvif-light.h]) |
|
AC_CONFIG_HEADERS([src/config.h]) |
|
|
|
# Checks C compiler (with empty default flags). |
|
: ${CFLAGS=""} |
|
AC_PROG_CC |
|
|
|
AX_CHECK_COMPILE_FLAG([-std=c11], |
|
[ CFLAGS+=" -std=c11" ], |
|
[ AC_MSG_ERROR([C compiler doesn't support C11 mode])] ) |
|
|
|
# Other tools |
|
AC_PROG_RANLIB |
|
AM_PROG_AR |
|
AC_PROG_INSTALL |
|
AC_PROG_CPP |
|
AC_PROG_MKDIR_P |
|
AC_PROG_RANLIB |
|
|
|
# Checks for header files. |
|
AC_CHECK_HEADERS([assert.h math.h stdint.h stdlib.h stdbool.h stdio.h]) |
|
|
|
# Checks for typedefs, structures, and compiler characteristics. |
|
AC_CHECK_HEADER_STDBOOL |
|
AC_C_INLINE |
|
AC_TYPE_SIZE_T |
|
AC_TYPE_UINT16_T |
|
AC_TYPE_UINT32_T |
|
AC_TYPE_UINT8_T |
|
|
|
# Checks for library functions. |
|
AC_FUNC_MALLOC |
|
|
|
# User defined options: debug |
|
AC_ARG_ENABLE([debug], |
|
[AS_HELP_STRING([--enable-debug],[compile with debug options])], |
|
[debug=${enableval}], [debug=no]) |
|
|
|
# Libraries |
|
PKG_CHECK_MODULES([CAIRO], [cairo]) |
|
|
|
AC_MSG_NOTICE([Setting up compiler flags]) |
|
CFLAGS+=" -Wall -Wpedantic -Wextra" |
|
|
|
if test x$debug = xyes; then |
|
CFLAGS+=" -O0" |
|
CFLAGS+=" -g -g3 -gdwarf-2" |
|
CFLAGS+=" -ftrapv" |
|
CPPFLAGS+="-DDEBUG" |
|
YFLAGS+=" --debug -v" |
|
else |
|
CFLAGS+=" -O3" |
|
CPPFLAGS+=" -DNDEBUG" |
|
fi |
|
|
|
AC_CONFIG_FILES([Makefile]) |
|
|
|
# Documentation |
|
AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
|
if test -z "$DOXYGEN"; |
|
then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support]) |
|
fi |
|
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) |
|
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])]) |
|
|
|
AC_OUTPUT |
|
|
|
AS_ECHO("") |
|
AS_ECHO("Configuration summary") |
|
AS_ECHO("CC = $CC") |
|
AS_ECHO("CFLAGS = $CFLAGS") |
|
AS_ECHO("CPPLAGS = $CPPFLAGS") |
|
AS_ECHO("YFLAGS = $YFLAGS") |
|
AS_ECHO("LFLAGS = $LFLAGS")
|
|
|