forked from FLIF-hub/FLIF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
70 lines (58 loc) · 2.04 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([FLIF], [0.2rc2], [[email protected]])
AM_INIT_AUTOMAKE([1.11])
LT_INIT
#AC_SUBST([LIBTOOL_DEPS])
AC_CONFIG_SRCDIR([Makefile.am])
# Checks for programs.
AC_PROG_CXX
#AM_CONDITIONAL(COMPILER_IS_GCC, [test x"$CXX" = x"g++"])
AC_PROG_CC
AC_PROG_LN_S
# Checks for header files.
AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([memset select strcasecmp strrchr strtol])
PKG_PROG_PKG_CONFIG()
dnl ==============================================================
dnl png lib
dnl ==============================================================
PKG_CHECK_MODULES([LIBPNG], [libpng], [:],
AC_MSG_ERROR([*** Libpng development files not found!]))
dnl ==============================================================
dnl sdl2 lib
dnl ==============================================================
PKG_CHECK_MODULES([SDL2], [sdl2], [:],
AC_MSG_ERROR([*** Libsdl2 development files not found!]))
dnl ==============================================================
dnl zlib
dnl ==============================================================
PKG_CHECK_MODULES([ZLIB], [zlib], [:],
AC_MSG_ERROR([*** zlib development files not found!]))
AC_ARG_ENABLE([magic],
[AS_HELP_STRING([--disable-magic],
[Don't add file signature to magic file])],
[],
[enable_magic=yes])
OPTIMIZATIONS = "-std=gnu++11 -DNDEBUG -O3 -ftree-vectorize -g0 -Wall"
LIB_OPTIMIZATIONS = "-DNDEBUG -O3"
if test x"$CXX" = x"g++"; then
OPTIMIZATIONS = "$OPTIMIZATIONS -flto -fwhole-program"
LIB_OPTIMIZATIONS = "$LIB_OPTIMIZATIONS -flto"
fi
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT