-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
93 lines (79 loc) · 2.27 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
dnl ***
dnl *** Process this file with autoconf to produce a configure script.
dnl ***
dnl Initialize
dnl ==========
AC_PREREQ([2.59])
AC_INIT([libaudclient], [3.5-rc2])
AC_COPYRIGHT([(C) 2005-2014 Audacious Team])
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])
AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED([VERSION], "$VERSION", [Version number of package])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
AUD_COMMON_PROGS
BUILDSYS_INIT
BUILDSYS_SHARED_LIB
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
dnl Platform
dnl ========
AC_MSG_CHECKING([for Microsoft Windows])
case "$target" in
*mingw*)
AC_MSG_RESULT([yes])
HAVE_MSWINDOWS="yes"
;;
*)
AC_MSG_RESULT([no])
HAVE_MSWINDOWS="no"
;;
esac
AC_SUBST([HAVE_MSWINDOWS])
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 D-Bus support
dnl =============
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.60 dbus-glib-1 >= 0.60])
AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
if test "x$DBUS_BINDING_TOOL" = "xno" ; then
AC_MSG_ERROR([dbus-binding-tool not found])
else
LIBAUDCLIENT_LDFLAGS="-laudclient"
AC_SUBST([DBUS_CFLAGS])
AC_SUBST([DBUS_LIBS])
AC_SUBST([DBUS_BINDING_TOOL])
AC_SUBST([LIBAUDCLIENT_LDFLAGS])
fi
dnl Reliably #include "config.h" (for large file support)
dnl =====================================================
CPPFLAGS="$CPPFLAGS -include config.h"
dnl Output configuration files
dnl ==========================
AC_CONFIG_FILES([
audclient.pc
buildsys.mk
extra.mk
])
BUILDSYS_TOUCH_DEPS
AC_OUTPUT
dnl Print out the results
dnl =====================
echo ""
echo "Configuration:"
echo ""
echo " Install path: $prefix"
echo ""