-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
85 lines (75 loc) · 2.61 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.59])
AC_INIT([haisyo], [1.3.0], [[email protected]])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h])
cross_compiling=yes
# Checks for mingw compiler.
AC_PROG_CC([mingw32-gcc \
i686-mingw32-gcc \
i586-mingw32-gcc \
i486-mingw32-gcc \
i386-mingw32-gcc \
i686-mingw32msvc-gcc \
i586-mingw32msvc-gcc \
i486-mingw32msvc-gcc \
i386-mingw32msvc-gcc \
i686-w64-mingw32-gcc \
i586-w64-mingw32-gcc \
i486-w64-mingw32-gcc \
i386-w64-mingw32-gcc \
i686-pc-mingw32-gcc \
i586-pc-mingw32-gcc \
i486-pc-mingw32-gcc \
i386-pc-mingw32-gcc])
# Checks for mingw resource compiler.
AC_CHECK_PROGS([RC],
[mingw32-windres \
i686-mingw32-windres \
i586-mingw32-windres \
i486-mingw32-windres \
i386-mingw32-windres \
i686-mingw32msvc-windres \
i586-mingw32msvc-windres \
i486-mingw32msvc-windres \
i386-mingw32msvc-windres \
i686-w64-mingw32-windres \
i586-w64-mingw32-windres \
i486-w64-mingw32-windres \
i386-w64-mingw32-windres \
i686-pc-mingw32-windres \
i586-pc-mingw32-windres \
i486-pc-mingw32-windres \
i386-pc-mingw32-windres])
if test -z "${RC}"; then
AC_MSG_ERROR(windres command is not found.);
fi
AC_CHECK_PROGS([CC64], [x86_64-w64-mingw32-gcc \
amd64-mingw32msvc-gcc], [])
AC_CHECK_PROGS([RC64], [x86_64-w64-mingw32-windres \
amd64-mingw32msvc-windress], [])
AC_CHECK_PROG(ZIP, zip, zip)
AC_CHECK_PROG(TAR, tar, tar)
# Checks for header files.
AC_CHECK_HEADER([windows.h],
[],
[AC_MSG_ERROR([shit!])],
[])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_DECLS([lstrlen],
[AC_DEFINE(HAVE_SHGETFOLDERPATH)],
[AC_MSG_ERROR([oops! lstrlen is missing.])],
[
#include <windows.h>
])
AC_CHECK_DECLS([DSTERASE],
[AC_DEFINE(HAVE_DSTERASE)],
[],
[
#include <windows.h>
])
# Checks for library functions.
AC_CHECK_FUNCS([strstr strcmp memcpy], [], [AC_MSG_ERROR([omg!])])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT