This repository was archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.in
More file actions
93 lines (82 loc) · 1.85 KB
/
configure.in
File metadata and controls
93 lines (82 loc) · 1.85 KB
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
AC_PREREQ(2.53)
AC_INIT(src/main.cpp)
#AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(dejavu,0.0)
dnl we don't want the stupid autoconf default -g -O2 (makes debugging harder)
test ".$CXXFLAGS" = "." && CXXFLAGS=" "
AC_PROG_CXX
#AC_PROG_RANLIB
AC_PROG_LIBTOOL
dnl
dnl our flags
dnl
CXXFLAGS="$CXXFLAGS -ffast-math -Wall -W -Wcast-align -Wshadow -Wundef"
dnl
dnl --enable-debug
dnl
AC_ARG_ENABLE(debug, [ --enable-debug enable debug])
AC_MSG_CHECKING(for debug)
AC_MSG_RESULT($enable_debug)
if test x$enable_debug = xyes; then
CXXFLAGS="$CXXFLAGS -g -ggdb -fno-inline -O0"
fi
dnl
dnl --enable-prof
dnl
AC_ARG_ENABLE(prof, [ --enable-prof enable profiling])
AC_MSG_CHECKING(for profiling)
AC_MSG_RESULT($enable_prof)
if test x$enable_prof = xyes; then
CXX_FLAGS="$CXXFLAGS -pg"
LDFLAGS=" -pg"
fi
dnl
dnl check of ccache
dnl
AC_PATH_PROG(CCACHE, ccache)
if test "$CCACHE" ; then
CXX="ccache $CXX"
fi
dnl
dnl lua
dnl
AC_MSG_CHECKING(for lua-config)
AC_PATH_PROGS(LUA_CONFIG, [lua-config50 lua-config])
if test x$LUA_CONFIG != "x"; then
LUA_CFLAGS=`$LUA_CONFIG --include`
LUA_LIBS=`$LUA_CONFIG --static`
else
AC_MSG_ERROR([liblua required. Aborting.])
fi
AC_SUBST(LUA_LIBS)
AC_SUBST(LUA_CFLAGS)
CXXFLAGS="$CXXFLAGS $LUA_CFLAGS"
LIBS="$LIBS $LUA_LIBS"
dnl
dnl luabind
dnl
AC_SEARCH_LIBS([_ZN7luabind5scopeC1Ev], luabind)
LIBS="$LIBS -lluabind"
AC_CHECK_HEADERS([luabind/luabind.hpp])
dnl
dnl gosu
dnl
AC_MSG_CHECKING(for gosu)
AC_PATH_PROG(GOSU_CONFIG, gosu-config)
if test x$GOSU_CONFIG != "x"; then
GOSU_CXXFLAGS="`$GOSU_CONFIG --cxxflags`"
GOSU_LIBS="-lgosu `$GOSU_CONFIG --libs`"
else
AC_MSG_ERROR([libgosu required. Aborting.])
fi
AC_SUBST(GOSU_LIBS)
AC_SUBST(GOSU_CFLAGS)
CXXFLAGS="$CXXFLAGS $GOSU_CXXFLAGS"
LIBS="$LIBS $GOSU_LIBS"
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT