-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
164 lines (147 loc) · 4.64 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
PACKAGE=osd-lyrics
PACKAGE_NAME="OSD Lyrics"
MAJOR_VER=0
MINOR_VER=3
BUILD=20100604
AC_SUBST(BUILD)
AC_INIT([osd-lyrics], [0.3.20100604], [http://code.google.com/p/osd-lyrics/issues/list])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/ol_main.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_RANLIB
AC_CONFIG_FILES([ po/Makefile.in
Makefile
lib/Makefile
dailydeb.sh
src/Makefile
src/tests/Makefile
data/Makefile
])
#define paths
OL_ICONDIR="$datadir/$PACKAGE/icons"
AC_SUBST(OL_ICONDIR)
OL_GUIDIR="$datadir/$PACKAGE"
AC_SUBST(OL_GUIDIR)
# gprof support
AC_ARG_WITH(gprof-support,
[ --with-gprof-support=DIR Include gmon.out file renaming support
--without-gprof-support Don't do gmon.out file renaming (default)],
[ case "$withval" in
yes)
AC_MSG_RESULT(yes)
AC_DEFINE([WITH_GPROF_SUPPORT], [], [Support gprof profiling])
CFLAGS="-pg $CFLAGS"
LDFLAGS="-pg $LDFLAGS"
AC_MSG_WARN(--with-gprof-support called without argument - using default)
gmondir="/tmp"
AC_SUBST(gmondir)
;;
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
AC_DEFINE([WITH_GPROF_SUPPORT], [], [Support gprof profiling])
CFLAGS="-pg $CFLAGS"
LDFLAGS="-pg $LDFLAGS"
gmondir="$withval"
AC_SUBST(gmondir)
;;
esac
])
dnl app indicators in Ubuntu
APPINDICATOR_REQUIRED=0.0.7
AC_ARG_ENABLE(appindicator,
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators ]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
dnl MPD support
AC_ARG_ENABLE([mpd],
[AS_HELP_STRING([--disable-mpd], [Disables MPD support. You won't need libmpd if you use this option])],
[],
[enable_mpd=yes])
AC_ARG_ENABLE([xmms2],
[AS_HELP_STRING([--disable-xmms2], [Disables XMMS2 support. You won't need libxmmsclient if you use this option])],
[],
[enable_xmms2=yes])
AC_ARG_ENABLE([amarok1],
[AS_HELP_STRING([--enable-amarok1], [Enables Amarok 1.4 support])],
[],
[enable_amarok1=no])
AS_IF([test "x$enable_amarok1" != xno],
[AC_DEFINE([ENABLE_AMAROK1], [1], [Define if compile to support Amarok 1.4])])
# Checks for libraries.
PKG_CHECK_MODULES([GTK2], [gtk+-2.0 >= 2.12.0, gthread-2.0, gmodule-export-2.0])
PKG_CHECK_MODULES([X11], [x11]) dnl For XGrabKey
PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
PKG_CHECK_MODULES([CURL], [libcurl])
PKG_CHECK_MODULES([NOTIFY], [libnotify])
PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.3.0])
MPD_CFLAGS=
MPD_LIBS=
AS_IF([test "x$enable_mpd" != "xno"],
[PKG_CHECK_MODULES([MPD], [libmpd],
[AC_DEFINE([ENABLE_MPD], [1], [Define if compile to support MPD])
#BUILD_MPD_SUPPORT=1
],
[enable_mpd=no
#BUILD_MPD_SUPPORT=0
AC_MSG_WARN(
[libmpd is not available, use --disable-mpd to disable MPD support])
])
],
[BUILD_MPD_SUPPORT=0
AC_SUBST(MPD_CFLAGS)
AC_SUBST(MPD_LIBS)
]
)
XMMS2_CFLAGS=
XMMS2_LIBS=
AS_IF([test "x$enable_xmms2" != "xno"],
[PKG_CHECK_MODULES([XMMS2], [xmms2-client],
[AC_DEFINE([ENABLE_XMMS2], [1], [Define if compile to support XMMS2])
],
[enable_xmms2=no
AC_MSG_WARN(
[xmms2-client is not available, use --disable-xmms2 to disable XMMS2 support])
])
],
[BUILD_XMMS2_SUPPORT=0
AC_SUBST(XMMS2_CFLAGS)
AC_SUBST(XMMS2_LIBS)
]
)
#AM_CONDITIONAL(BUILD_MPD_SUPPORT, [test "x$enable_mpd" != "xno"])
#AC_SUBST(BUILD_MPD_SUPPORT)
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],
enable_appindicator="yes",
enable_appindicator="no")
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(APP_INDICATOR,
appindicator-0.1 >= $APPINDICATOR_REQUIRED)
AC_SUBST(APP_INDICATOR_CFLAGS)
AC_SUBST(APP_INDICATOR_LIBS)
AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
fi
AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
# i18n support from GNU gettext.
GETTEXT_PACKAGE=osd-lyrics
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_OUTPUT