-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
85 lines (71 loc) · 2.03 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([rott], [1.1.2])
AM_INIT_AUTOMAKE([foreign no-define])
AC_CONFIG_SRCDIR([rott/version.h])
#AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
# Checks for libraries.
AC_DEFINE([USE_SDL])
PKG_CHECK_MODULES([SDL], [sdl])
PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer])
# Checks for header files.
AC_DEFINE([PLATFORM_UNIX])
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stddef.h stdlib.h string.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
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove memset mkdir pow strcasecmp strerror strrchr strstr strtol])
# Set to build the shareware version
AC_ARG_ENABLE([shareware],
[AS_HELP_STRING([--enable-shareware],
[set to build the shareware version])],
[AC_DEFINE([SHAREWARE])],
[])
# Set executable file name suffix
AC_ARG_ENABLE([suffix],
[AS_HELP_STRING([--enable-suffix],
[set executable file name suffix])],
[suffix="$enableval"],
[suffix=no])
case "$suffix" in
no|yes)
suffix=
;;
*)
# Add leading dash
suffix=-${suffix}
;;
esac
SUFFIX=${suffix}
AC_SUBST([SUFFIX])
# Set data file directory
AC_ARG_ENABLE([datadir],
[AS_HELP_STRING([--enable-datadir],
[set data file directory])],
[datadir="$enableval"],
[datadir=no])
# Remove duplicate and trailing slashes
datadir=`echo ${datadir} | tr -s '/' | sed 's|/*$||'`
case "$datadir" in
no|yes)
;;
*)
AC_DEFINE_UNQUOTED([DATADIR], ["$datadir/"])
;;
esac
AC_CONFIG_FILES([Makefile rott/Makefile rott/audiolib/Makefile])
AC_OUTPUT