-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
77 lines (59 loc) · 1.86 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
71
72
73
74
75
76
77
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
m4_define([bflibrary_version], [0.1.2.0])
AC_INIT([bullfrog-library], [bflibrary_version], [[email protected]], [bflibrary])
AC_CONFIG_SRCDIR([src/general/gfile.c])
AC_CONFIG_HEADERS([include/bfconfig.h])
#AC_CONFIG_LINKS([include:include])
# custom command for AC_CONFIG_LINKS([referenc/:tests/referenc/*.png])
AC_CONFIG_COMMANDS([tests_referenc], [
mkdir -p "$ac_builddir/referenc"
cp -f "$ac_srcdir/tests/referenc/"*.png "$ac_builddir/referenc"
])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
# Checks for libraries.
AM_PATH_SDL([1.2.0], [], [
AC_MSG_ERROR([SDL not found])
])
PKG_CHECK_MODULES([PNG], [libpng], [], [
AC_MSG_ERROR([libpng not found])
])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdint.h unistd.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_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([getcwd memmove memset mkdir rmdir])
# Arguments
AC_ARG_ENABLE([bflib-wscreen-control],
AS_HELP_STRING([--disable-bflib-wscreen-control],
[disallow the bflibrary to change value of lbDisplay.WScreen]),
[bflib_wscreen_control=$enableval], [bflib_wscreen_control=no])
AS_IF([test "$bflib_wscreen_control" = "yes"], [
AC_DEFINE([BFLIB_WSCREEN_CONTROL], 1,
[Define to 1 if the bflibrary should change value of lbDisplay.WScreen])
])
# Flags
CFLAGS="$CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
CFLAGS="$CFLAGS $PNG_CFLAGS"
LIBS="$LIBS $PNG_LIBS"
# Final commands
AC_CONFIG_FILES([Makefile])
AC_OUTPUT