-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
67 lines (60 loc) · 1.29 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
#Prelude
AC_INIT([icestreamer],[0.5],[radio-list@culture.uoc.gr])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign -Wall -Werror dist-bzip2])
# Configuration / define macros
AC_ARG_WITH([gtk],
AS_HELP_STRING([--without-gtk],
[Don't build the GUI]),
[],
[with_gtk=yes])
# Check for programs
AC_PROG_CC
# Check for libraries
PKG_CHECK_MODULES(GStreamer,
[
gstreamer-1.0 >= 1.14.0
gstreamer-base-1.0 >= 1.14.0
gstreamer-audio-1.0 >= 1.14.0
],
[
AC_SUBST(GStreamer_CFLAGS)
AC_SUBST(GStreamer_LIBS)
],
[
AC_MSG_ERROR([Could not find GStreamer 1.0 libraries])
])
PKG_CHECK_MODULES(GLib,
[
gio-2.0
],
[
AC_SUBST(GLib_CFLAGS)
AC_SUBST(GLib_LIBS)
],
[
AC_MSG_ERROR([Could not find GLib 2.0 libraries])
])
AS_IF([test "x$with_gtk" != xno],
[PKG_CHECK_MODULES([GTK],
[
gtk+-3.0 >= 3.16.0
],
[
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
],
[
AC_MSG_ERROR([Could not find GTK+ >= 3.16])
])
],
[
AC_DEFINE([DISABLE_GUI], [1],
[GUI disabled during config])
])
AM_CONDITIONAL([GUI], [test "x$with_gtk" != xno])
# Output files
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT