-
Notifications
You must be signed in to change notification settings - Fork 5
/
configure.ac
100 lines (68 loc) · 2.29 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
dnl Process this file with autoconf to produce a configure script
dnl ------------------------------------------------
dnl Initialization and Versioning
dnl ------------------------------------------------
AC_INIT([libtween],[0.1])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([libtween/tween.c])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
dnl Library versioning
TWEEN_LIB_CURRENT=0
TWEEN_LIB_REVISION=1
TWEEN_LIB_AGE=0
AC_SUBST(TWEEN_LIB_CURRENT)
AC_SUBST(TWEEN_LIB_REVISION)
AC_SUBST(TWEEN_LIB_AGE)
dnl --------------------------------------------------
dnl Check for programs
dnl --------------------------------------------------
AC_PROG_CC
LT_INIT
dnl Add parameters for aclocal
AC_CONFIG_MACRO_DIR([m4])
dnl --------------------------------------------------
dnl Checks for support libraries and headers
dnl --------------------------------------------------
dnl check for SDL2
HAVE_SDL2=no
SDL2_VERSION=2.0.0
AM_PATH_SDL2([$SDL2_VERSION], [HAVE_SDL2=yes], [HAVE_SDL2=no])
dnl --------------------------------------------------
dnl Overall build configuration options
dnl --------------------------------------------------
dnl Configuration option for examples
ac_enable_examples=yes
AC_ARG_ENABLE(examples,
AS_HELP_STRING([--disable-examples], [Disable examples]),
[ac_enable_examples=$enableval], [ac_enable_examples=yes] )
if test "x${ac_enable_examples}" != "xno"; then
if test "x$HAVE_SDL2" = "xno"; then
ac_enable_examples=no
AC_MSG_WARN([*** Unable to find SDL2 -- Examples will not be built ***])
fi
fi
AM_CONDITIONAL(TWEEN_ENABLE_EXAMPLES, [test "x${ac_enable_examples}" != xno])
AC_CONFIG_FILES([
Makefile
libtween/Makefile
examples/Makefile
m4/Makefile
])
AC_OUTPUT
AS_AC_EXPAND(LIBDIR, ${libdir})
AS_AC_EXPAND(INCLUDEDIR, ${includedir})
AC_MSG_RESULT([
------------------------------------------------------------------------
$PACKAGE $VERSION: Automatic configuration OK.
General configuration:
Build examples: .............. ${ac_enable_examples}
Installation paths:
libtween: .................... ${LIBDIR}
C header files: .............. ${INCLUDEDIR}/libtween
Building:
Type 'make' to compile $PACKAGE.
Type 'make install' to install $PACKAGE.
------------------------------------------------------------------------
])