-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
53 lines (42 loc) · 1.42 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
# configure.ac for B-em
#
AC_PREREQ([2.61])
AC_INIT(Elkulator, 1.0, Sarah Walker <[email protected]>, elkulator)
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIRS([m4])
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [build debug executable]))
if test "$enable_debug" = "yes"; then
CFLAGS="$CFLAGS -Wall -O0 -g -D_DEBUG"
AC_MSG_RESULT([yes])
else
CFLAGS="$CFLAGS -O3"
AC_MSG_RESULT([no])
fi
#AC_MSG_CHECKING([for libz])
#AX_CHECK_ZLIB
AM_CONDITIONAL(OS_WIN, test "$OS" = "win")
AM_CONDITIONAL(OS_LINUX, test "$OS" = "linux")
# Do not run test for Allegro with Win32/MinGW version, as binary builds have
# `allegro-config' missing.
# NOTE: For the following Autoconf macro to be supported, you need to extract
# allegro.m4 from the DOS/Windows Allegro sources (the file is contained
# in `misc') and copy it to this directory or MSYS's `/share/aclocal'.
if test "$OS" != "win"; then
AM_PATH_ALLEGRO(, , AC_MSG_ERROR(building Elkulator requires Allegro to be installed))
fi
AC_CHECK_LIB([z], [gzopen], [], \
[echo "You need to install the zlib library."
exit -1])
AC_CHECK_LIB([openal], [alGetError], [], \
[echo "You need to install the OpenAL library."
exit -1])
AC_CHECK_LIB([alut], [alutInit], [], \
[echo "You need to install the ALUT library."
exit -1])
AC_CHECK_LIB([m], [sin])
AC_OUTPUT([Makefile src/Makefile])