forked from celluloid-player/celluloid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
87 lines (73 loc) · 2.31 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
AC_PREREQ([2.69])
AC_INIT( [gnome-mpv],
[0.6],
[http://github.com/gnome-mpv/gnome-mpv/issues],
[gnome-mpv],
[http://github.com/gnome-mpv/gnome-mpv] )
AC_CONFIG_SRCDIR([src/main.c])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([1.12 tar-pax dist-xz no-dist-gzip subdir-objects foreign -Wall -Wno-portability])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([enable])
# i18n
IT_PROG_INTLTOOL([0.40.6])
GETTEXT_PACKAGE=gnome-mpv
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GLIB_GNU_GETTEXT
GLIB_GSETTINGS
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging]))
AC_ARG_ENABLE([opengl-cb], AS_HELP_STRING([--disable-opengl-cb], [disable support for opengl-cb, which is required to work on Wayland]))
AC_DEFUN([GM_CHECK_AX_MACRO],
[m4_ifndef([$1], [m4_fatal($1[ is not defined. Is autoconf-archive installed?])])])
GM_CHECK_AX_MACRO([AX_APPEND_COMPILE_FLAGS])
GM_CHECK_AX_MACRO([AX_APPEND_LINK_FLAGS])
AS_IF([test "x$enable_debug" = "xyes"], [
AX_APPEND_COMPILE_FLAGS([-O0 -g -fsanitize=address])
], [
AX_APPEND_COMPILE_FLAGS([-O2])
])
AX_APPEND_COMPILE_FLAGS([ \
-std=gnu99 \
-funsigned-char \
-fstack-protector-strong \
-fPIE \
-fPIC \
-Wall \
-Wextra \
-Wconversion \
-Winline \
-Wno-padded \
-Wno-unused-parameter \
-Wstrict-prototypes \
-Wmissing-prototypes \
-Werror=implicit-function-declaration \
-Werror=pointer-arith \
-Werror=init-self \
-Werror=format-security \
-Werror=format=2 \
-Werror=missing-include-dirs \
-Werror=date-time \
])
AX_APPEND_LINK_FLAGS([ \
-pie \
-Wl,-z,relro \
-Wl,-z,now \
])
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_STDC
# Checks for libraries.
AS_IF([test "x$enable_opengl_cb" != "xno"], [
AC_DEFINE([OPENGL_CB_ENABLED])
PKG_CHECK_MODULES(DEPS, [gtk+-3.0 >= 3.16 glib-2.0 >= 2.40 mpv >= 1.16 epoxy])
], [
PKG_CHECK_MODULES(DEPS, [gtk+-3.0 >= 3.14 glib-2.0 >= 2.40 mpv >= 1.16])
])
AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_40], [Dont warn using older APIs])
AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_40], [Prevents using newer APIs])
# Checks for header files.
AC_CHECK_HEADERS([string.h stdio.h stdlib.h locale.h ctype.h execinfo.h])
AC_CHECK_FUNCS([setlocale backtrace backtrace_symbols_fd exit])
AC_CONFIG_FILES([Makefile src/Makefile data/Makefile po/Makefile.in])
AC_OUTPUT