1 # Process this file with autoconf to produce a configure script.
2 m4_define([gmpc_major_version], [0])
3 m4_define([gmpc_minor_version], [15])
4 m4_define([gmpc_micro_version], [6])
5 m4_define([gmpc_version],
6 [gmpc_major_version.gmpc_minor_version.gmpc_micro_version])
9 AM_CONFIG_HEADER([config.h])
10 AM_INIT_AUTOMAKE([gmpc], [gmpc_version],qball@sarine.nl)
13 GMPC_MAJOR_VERSION=gmpc_major_version
14 GMPC_MINOR_VERSION=gmpc_minor_version
15 GMPC_MICRO_VERSION=gmpc_micro_version
16 AC_DEFINE(GMPC_MAJOR_VERSION, gmpc_major_version, ["Major version of gmpc"])
17 AC_DEFINE(GMPC_MINOR_VERSION, gmpc_minor_version, ["Minor version of gmpc"])
18 AC_DEFINE(GMPC_MICRO_VERSION, gmpc_micro_version, ["Micro version of gmpc"])
21 # Checks for programs.
24 AC_PROG_INTLTOOL([0.21])
31 AM_CONDITIONAL([INTLTOOL_HIGHER_04000], [test ${INTLTOOL_APPLIED_VERSION_AS_INT} -ge 4000])
33 AM_CONDITIONAL(HAVE_RC, test "x$RC" != "xno")
35 AC_ARG_ENABLE(configdir,
36 [ --enable-configdir Use .config instead of .gmpc or .covers.],
37 [ if test "x$enableval" = "xyes"; then
43 AC_ARG_ENABLE(trayicon,
44 [ --disable-trayicon Disable the tray icon.],
45 [ if test "x$enableval" = "xyes"; then
52 [ --disable-sm Disable Session Support.],
53 [ if test "x$enableval" = "xyes"; then
60 [ --disable-mmkeys Disable multimedia keys support.],
61 [ if test "x$enableval" = "xyes"; then
69 # Checks for libraries.
71 # Checks for header files.
73 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
75 # Checks for typedefs, structures, and compiler characteristics.
78 AC_SUBST(GLIB_REQUIRED)
79 AC_SUBST(GTK_REQUIRED)
81 # Split this out, because pkgconfig macro doesn't return nicely what is missing
84 PKG_CHECK_MODULES([glib], glib-2.0 >= 2.10)
89 PKG_CHECK_MODULES([gobject], gobject-2.0 >= 2.4)
90 AC_SUBST(gobject_LIBS)
91 AC_SUBST(gobject_CFLAGS)
94 PKG_CHECK_MODULES([gtk], gtk+-2.0 >= 2.12)
99 PKG_CHECK_MODULES([gmodule], gmodule-2.0 >= 2.4)
100 AC_SUBST(gmodule_LIBS)
101 AC_SUBST(gmodule_CFLAGS)
104 PKG_CHECK_MODULES([libmpd], libmpd >= 0.15.3)
105 AC_SUBST(libmpd_LIBS)
106 AC_SUBST(libmpd_CFLAGS)
109 PKG_CHECK_MODULES([libglade], libglade-2.0)
110 AC_SUBST(libglade_LIBS)
111 AC_SUBST(libglade_CFLAGS)
114 PKG_CHECK_MODULES([gthread], gthread-2.0)
115 AC_SUBST(gthread_LIBS)
116 AC_SUBST(gthread_CFLAGS)
120 if test x${enable_sm} = xyes; then
121 PKG_CHECK_MODULES([sm], sm)
124 AC_DEFINE(ENABLE_SM, 1, [Enable Session Support])
128 if test x${enable_mmkeys} = xyes; then
129 AC_DEFINE(ENABLE_MMKEYS, 1, [Enable multimedia support])
131 if test x${enable_configdir} = xyes; then
132 AC_DEFINE(USE_CONFIG_DIR,1, [Use Config Dir])
134 if test x${enable_trayicon} = xyes; then
135 AC_DEFINE(ENABLE_TRAYICON,1, [Disable Tray Icon])
138 AC_MSG_CHECKING(prefix)
140 if test "x${prefix}" = "xNONE"; then
141 PACKAGE_PREFIX="${ac_default_prefix}"
143 PACKAGE_PREFIX="${prefix}"
145 AC_MSG_RESULT($PACKAGE_PREFIX)
148 dnl please keep them in alphabetical order
149 ALL_LINGUAS="de es fr gl it nl nb_NO pl ru sv zh_CN"
152 AC_SUBST(GETTEXT_PACKAGE)
153 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[GMPC gettext package])
157 #AM_GNU_GETTEXT([external])
158 # setting correct paths
159 PACKAGE_LOCALE_DIR="${PACKAGE_PREFIX}/${DATADIRNAME}/locale"
160 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"$PACKAGE_LOCALE_DIR",[The package's locale path for gettext])
163 AC_SUBST(PACKAGE_LOCALE_DIR)
164 AC_SUBST(PACKAGE_LIBS)
171 EXTRA_CFLAGS="-Wmissing-prototypes -Wmissing-declarations"
177 *-*-mingw32* | *-*-windows)
179 EXTRA_CFLAGS="$EXTRA_CFLAGS -mno-cygwin -mwindows -mms-bitfields"
180 EXTRA_LDFLAGS="-export-all-symbols -mwindows -mms-bitfields" ;;
183 EXTRA_LDFLAGS="-export-all-symbols -mms-bitfields" ;;
185 AM_CONDITIONAL(WIN32, test x$win32 = xyes)
187 AC_SUBST(EXTRA_CFLAGS)
188 AC_SUBST(EXTRA_LDFLAGS)
193 AC_PATH_PROG(CURL_CONFIG,curl-config)
195 AC_HELP_STRING([--with-curl=PATH], [where libcurl is installed]),
196 [CURL_CONFIG="${with_curl}/bin/curl-config"])
197 if test -f "${CURL_CONFIG}"; then
198 LDFLAGS="`${CURL_CONFIG} --libs` $LDFLAGS"
199 CPPFLAGS="`${CURL_CONFIG} --cflags` $CPPFLAGS"
201 AC_MSG_WARN([curl-config not found, guessing at libcurl build settings])
203 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([unable to find libcurl header files]))
204 AC_CHECK_LIB([curl],[curl_global_init],,AC_MSG_ERROR([unable to link with libcurl]))
207 AC_ARG_ENABLE([maintainermode],
208 [--enable-maintainermode Enable maintainer mode.],
209 [case "${enableval}" in
210 yes) maintainer_mode=true;;
211 no) maintainer_mode=false;;
212 *) AC_MSG_ERROR([bad value ${enableval} for --enable-maintainermode]);;
214 [maintainer_mode=false])
216 AM_CONDITIONAL([MAINTAINER_MODE], [test x$maintainer_mode = xtrue])
230 pixmaps/icons/Makefile
231 pixmaps/icons/16x16/Makefile
232 pixmaps/icons/16x16/actions/Makefile
233 pixmaps/icons/16x16/status/Makefile
234 pixmaps/icons/16x16/apps/Makefile
235 pixmaps/icons/22x22/Makefile
236 pixmaps/icons/22x22/actions/Makefile
237 pixmaps/icons/22x22/status/Makefile
238 pixmaps/icons/22x22/apps/Makefile
239 pixmaps/icons/32x32/Makefile
240 pixmaps/icons/32x32/actions/Makefile
241 pixmaps/icons/32x32/status/Makefile
242 pixmaps/icons/32x32/apps/Makefile
243 pixmaps/icons/48x48/Makefile
244 pixmaps/icons/48x48/actions/Makefile
245 pixmaps/icons/48x48/apps/Makefile
246 pixmaps/icons/scalable/Makefile
247 pixmaps/icons/scalable/actions/Makefile
248 pixmaps/icons/scalable/status/Makefile
249 pixmaps/icons/scalable/apps/Makefile
253 echo "-------------- Status --------------"
254 if test x$maintainer_mode = xtrue; then
255 echo "Maintainer mode is: enabled"
257 echo "Maintainer mode is: disabled"
259 if test x${enable_mmkeys} = xyes; then
260 echo "Multimedia keys support is: enabled"
262 echo "Multimedia keys support is: disabled"
264 if test x${enable_sm} = xyes; then
265 echo "Session Manager support is: enabled"
267 echo "Session Manager support is: disabled"
269 if test x${enable_trayicon} = xyes; then
270 echo "Trayicon support is: enabled"
272 echo "Trayicon support is: disabled"
274 if test x${enable_configdir} = xyes; then
275 echo "Use ~/.config/ for config files: enabled"
277 echo "Use ~/.config/ for config files: disabled"
281 echo "Now type make to build"