-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
138 lines (124 loc) · 3.28 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
AC_INIT([Moldeo Player], [1.4.0.2], [info@moldeointeractive.com.ar], [moldeoplayer])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER(config.h)
AC_LIBTOOL_CONFIG
AC_PROG_CC
AC_PROG_CC_STDC
AC_C_CONST
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_CXX_C_O
dnl Set install paths.
if test "x$prefix" = "xNONE" ; then
prefix="/usr/local"
fi
if test "x$exec_prefix" = "xNONE" ; then
exec_prefix=$prefix
fi
case "$host" in
*-*-mingw*|*-*-cygwin*)
AC_DEFINE(PLATFORM_WIN32, 1, [Platform is Win32])
PLATFORM_STRING="Win32"
;;
*-*-linux*)
AC_DEFINE(PLATFORM_LINUX, 1, [Platform is Linux])
PLATFORM_STRING="Linux"
;;
*-*-darwin*)
AC_MSG_WARN([Hello])
AC_DEFINE(PLATFORM_APPLE, 1, [Platform is Apple])
PLATFORM_STRING="Apple"
;;
*)
AC_MSG_WARN([*** Please add $host to configure.ac checks!])
;;
esac
case "$host" in
i?86-* | k?-* | athlon-* | pentium*-)
AC_DEFINE(ARCH_X86, 1, [Architecture is x86])
ARCH_SPECIFIC_CFLAGS=""
ARCH_STRING="X86"
;;
x86_64-*)
AC_DEFINE(ARCH_X86_64, 1, [Architecture is x86-64])
ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
ARCH_STRING="X86-64"
libdir=$prefix"/lib"
;;
armv7l-*)
AC_DEFINE(ARCH_X86_64, 1, [Architecture is armv7l x86-64])
ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
ARCH_STRING="X86-64"
libdir=$prefix"/lib"
;;
ppc-* | powerpc-*)
AC_MSG_WARN([HI THERE!])
AC_DEFINE(ARCH_PPC, 1, [Architecture is PowerPC])
ARCH_SPECIFIC_CFLAGS=""
ARCH_STRING="PowerPC"
;;
*)
AC_MSG_ERROR([Unknown Architecture])
;;
esac
moldeoplayerexe=${prefix}/bin/moldeoplayersdl2
AC_SUBST([moldeoplayerexe],$moldeoplayerexe)
AC_CONFIG_FILES([moldeoplayer], [chmod +x moldeoplayer])
AC_CONFIG_SUBDIRS(
moldeoplayersdl2
moldeoplayerx11
)
# moldeoplayerx11
dnl autoscan results
AC_CHECK_FUNCS([floor])
AC_CHECK_FUNCS([getcwd])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([pow])
AC_CHECK_FUNCS([rint])
AC_CHECK_FUNCS([sqrt])
AC_CHECK_FUNCS([strchr])
AC_CHECK_FUNCS([strstr])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([float.h])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADERS([string.h])
AC_CHECK_TYPES([ptrdiff_t])
AC_C_INLINE
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_HEADER_STDBOOL
AC_HEADER_STDC
AC_PREREQ
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT
AC_STRUCT_TM
AC_TYPE_SIZE_T
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
dnl Makefile outputs
AC_OUTPUT(
Makefile
moldeoplayer.desktop
)