forked from audacious-media-player/audacious
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
138 lines (105 loc) · 3.48 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
dnl ***
dnl *** Process this file with autoconf to produce a configure script.
dnl ***
dnl Initialize
dnl ==========
AC_PREREQ([2.59])
AC_INIT([audacious], [4.0-beta1])
AC_COPYRIGHT([Copyright (C) 2001-2020 Audacious developers and others])
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$PACKAGE_VERSION", [Version number of package])
COPYRIGHT="Copyright (C) 2001-2020 Audacious developers and others"
AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT", [Copyright])
AC_SUBST(COPYRIGHT)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AUD_COMMON_PROGS
BUILDSYS_INIT
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 Headers and functions
dnl ===============================
AC_CHECK_FUNCS([sigwait])
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]),
BUILDSTAMP="$withval", BUILDSTAMP="unknown build")
AC_DEFINE_UNQUOTED(BUILDSTAMP, "$BUILDSTAMP", [Build stamp])
AC_SUBST(BUILDSTAMP)
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 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 ==========================
define(GENERATED_FILES,
audacious.pc
buildsys.mk
extra.mk
man/audtool.1
man/audacious.1
src/libaudcore/audio.h
win32/audacious.nsi
win32/override/README.txt)
[GENERATED_FILES]="m4_normalize(GENERATED_FILES)"
AC_SUBST([GENERATED_FILES])
AC_CONFIG_FILES(GENERATED_FILES)
AC_OUTPUT
### ---------------------------------------------------------------------------
dnl Print out the results
dnl =====================
echo ""
echo "Configuration:"
echo ""
echo " Install path: $prefix"
echo ""
echo " D-Bus support: $USE_DBUS"
echo " GTK+ support: $USE_GTK"
echo " Qt support: $USE_QT"
echo " Valgrind analysis support: $enable_valgrind"
echo ""