forked from audacious-media-player/audacious
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
207 lines (164 loc) · 5.52 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
dnl ***
dnl *** Process this file with autoconf to produce a configure script.
dnl ***
dnl Initialize
dnl ==========
AC_PREREQ([2.59])
AC_INIT([audacious], [3.6-devel])
AC_COPYRIGHT([(C) 2005-2014 Audacious Team])
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$PACKAGE_VERSION", [Version number of package])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AUD_COMMON_PROGS
BUILDSYS_SHARED_LIB
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
dnl Byte order
dnl ==========
AC_C_BIGENDIAN([BIGENDIAN=1], [BIGENDIAN=0],
[AC_MSG_ERROR([Unknown machine byte order])],
[AC_MSG_ERROR([Universal builds are not supported, sorry])])
AC_SUBST([BIGENDIAN])
dnl Prevent symbol collisions
dnl =========================
if test "x$HAVE_MSWINDOWS" = "xyes" ; then
EXPORT="__declspec(dllexport)"
elif test "x$GCC" = "xyes" ; then
CFLAGS="$CFLAGS -fvisibility=hidden"
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
EXPORT="__attribute__((visibility(\"default\")))"
else
AC_MSG_ERROR([Unknown syntax for EXPORT keyword])
fi
AC_DEFINE_UNQUOTED([EXPORT], [$EXPORT], [Define to compiler syntax for public symbols])
dnl Headers and functions
dnl ===============================
AC_CHECK_FUNCS([sigwait])
AC_MSG_CHECKING([for /proc/self/exe])
if test -e "/proc/self/exe" ; then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_PROC_SELF_EXE], [1], [Define if the /proc/self/exe symlink is supported])
else
AC_MSG_RESULT(no)
fi
dnl iconv
dnl =====
AM_ICONV
LIBS="$LIBS $LIBICONV"
dnl gettext
dnl =======
AM_GNU_GETTEXT([external])
if test "$MSGFMT" = ":" ; then
AC_MSG_ERROR([msgfmt was not found; have you installed gettext?])
fi
LIBS="$LIBS $LIBINTL"
dnl Build stamp
dnl ===========
AC_ARG_WITH([buildstamp],
AS_HELP_STRING([--with-buildstamp=XXX], [Set build stamp to XXX]),
AC_DEFINE_UNQUOTED([BUILDSTAMP], "$withval", [Build stamp]),
AC_DEFINE_UNQUOTED([BUILDSTAMP], "unknown build", [Build stamp]))
dnl Activation of text console (MS-Windows ONLY)
dnl ============================================
AC_ARG_ENABLE([text-console],
[AS_HELP_STRING([--enable-text-console],[Enable text console for MS-Windows hosts])],
[use_text_console=$withval],
[use_text_console=no]
)
if test "x$HAVE_MSWINDOWS" = "xyes" && test "x$use_text_console" = "xno" ; then
LDFLAGS="$LDFLAGS -Wl,-subsystem,windows"
fi
dnl Character set detection
dnl =======================
AC_ARG_ENABLE(chardet,
AS_HELP_STRING(--enable-chardet, [Disable character set detection (default=auto)]),
USE_CHARDET=$enableval, USE_CHARDET=auto)
if test $USE_CHARDET != no ; then
PKG_CHECK_MODULES(LIBGUESS, libguess >= 1.2, have_libguess=yes, have_libguess=no)
if test $have_libguess = yes ; then
USE_CHARDET=yes
AC_DEFINE(USE_CHARDET, 1, [Define if character set detection enabled])
elif test $USE_CHARDET = yes ; then
AC_MSG_ERROR([Character set detection could not be enabled; check config.log])
else
USE_CHARDET=no
fi
fi
AC_SUBST(USE_CHARDET)
dnl D-Bus support
dnl =============
AC_ARG_ENABLE(dbus,
AS_HELP_STRING(--disable-dbus, [Disable D-Bus support (default=enabled)]),
USE_DBUS=$enableval, USE_DBUS=yes)
if test $USE_DBUS = yes ; then
AC_CHECK_PROG(have_dbus, gdbus-codegen, yes, no)
if test $have_dbus = no ; then
AC_MSG_ERROR([D-Bus support unavailable; use --disable-dbus for a crippled build])
fi
AC_DEFINE(USE_DBUS, 1, [Define if D-Bus support enabled])
fi
AC_SUBST(USE_DBUS)
dnl Qt support
dnl ==========
AC_ARG_ENABLE(qt,
AS_HELP_STRING(--enable-qt, [Enable Qt support (default=disabled)]),
USE_QT=$enableval, USE_QT=no)
if test $USE_QT = yes ; then
PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets])
AC_DEFINE(USE_QT, 1, [Define if Qt support enabled])
# needed if Qt was built with -reduce-relocations
QT_CFLAGS="$QT_CFLAGS -fPIC"
fi
AC_SUBST(USE_QT)
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
dnl Valgrind analysis support
dnl =========================
AC_ARG_ENABLE(valgrind,
AS_HELP_STRING(--enable-valgrind, [Valgrind analysis support (default=disabled)]),
enable_valgrind=$enableval, enable_valgrind=no)
if test $enable_valgrind = yes ; then
AC_DEFINE(VALGRIND_FRIENDLY, 1, [Define to allow Valgrind analysis])
VALGRIND_FRIENDLY=1
else
VALGRIND_FRIENDLY=0
fi
AC_SUBST([VALGRIND_FRIENDLY])
dnl Paths
dnl =====
plugindir="$libdir/audacious"
AC_SUBST([plugindir])
localedir="$datarootdir/locale"
AC_SUBST([localedir])
dnl Reliably #include "config.h" (for large file support)
dnl =====================================================
CPPFLAGS="$CPPFLAGS -include config.h"
### ---------------------------------------------------------------------------
dnl Output configuration files
dnl ==========================
AC_CONFIG_FILES([
audacious.pc
buildsys.mk
extra.mk
man/audtool.1
man/audacious.1
src/libaudcore/audio.h
src/libaudcore/tinylock.h
])
AC_OUTPUT
### ---------------------------------------------------------------------------
dnl Print out the results
dnl =====================
echo ""
echo "Configuration:"
echo ""
echo " Install path: $prefix"
echo ""
echo " Automatic character code detection: $USE_CHARDET"
echo " D-Bus support: $USE_DBUS"
echo " GTK+ support: $USE_GTK"
echo " Qt support: $USE_QT"
echo " Valgrind analysis support: $enable_valgrind"
echo ""