-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
96 lines (74 loc) · 2.24 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
AC_INIT([nnedi3], [12], [https://github.com/dubhater/vapoursynth-nnedi3/issues], [nnedi3], [https://github.com/dubhater/vapoursynth-nnedi3/])
: ${CXXFLAGS=""}
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz subdir-objects no-define])
AM_SILENT_RULES([yes])
LT_INIT([disable-static win32-dll])
AC_CANONICAL_HOST
AC_PROG_CXX
AC_SEARCH_LIBS([sqrt], [m], [], [
AC_MSG_ERROR([unable to find the sqrt() function])
])
X86="false"
PPC="false"
ARM="false"
AS_CASE(
[$host_cpu],
[i?86], [BITS="32" ASFLAGS="$ASFLAGS -DARCH_X86_64=0" X86="true"],
[x86_64], [BITS="64" ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -DPIC -m amd64" X86="true"],
[powerpc*], [PPC="true"],
[arm*], [ARM="true" ASFLAGS="$ASFLAGS -march=armv7-a"] # Maybe doesn't work for all arm systems?
[aarch*], [ARM="true"]
)
AS_CASE(
[$host_os],
[darwin*],
[
ASFLAGS="$ASFLAGS -f macho$BITS -DPREFIX"
],
[*linux*|gnu*|dragonfly*|*bsd*], # The BSDs are close enough, right?
[
ASFLAGS="$ASFLAGS -f elf"
],
[cygwin*|mingw*],
[
ASFLAGS="$ASFLAGS -f win32"
AS_IF(
[test "x$BITS" = "x32"],
[
ASFLAGS="$ASFLAGS -DPREFIX"
AC_SUBST([PLUGINLDFLAGS], ["-Wl,--kill-at"])
AC_SUBST([STACKREALIGN], ["-mstackrealign"])
]
)
],
[AC_MSG_ERROR(["Unknown host OS: $host_os"])]
)
AS_IF(
[test "x$X86" = "xtrue"],
[
AC_DEFINE([NNEDI3_X86])
ASFLAGS="$ASFLAGS -Dprivate_prefix=nnedi3"
AC_SUBST([MFLAGS], ["-mfpmath=sse -msse2"])
AC_CHECK_PROGS([YASM], [yasm])
AS_IF(
[test "x$YASM" = "x"],
[AC_MSG_ERROR([yasm required but not found])],
[AS="$YASM"]
)
]
)
AS_IF(
[test "x$PPC" = "xtrue"],
[AC_DEFINE([NNEDI3_PPC])]
)
AS_IF(
[test "x$ARM" = "xtrue"],
[AC_DEFINE([NNEDI3_ARM])]
)
AC_SUBST([ASFLAGS])
AM_CONDITIONAL([NNEDI3_X86], [test "x$X86" = "xtrue"])
AM_CONDITIONAL([NNEDI3_ARM], [test "x$ARM" = "xtrue"])
AM_CONDITIONAL([NNEDI3_PPC], [test "x$PPC" = "xtrue"])
PKG_CHECK_MODULES([VapourSynth], [vapoursynth])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT