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])
74 AC_CHECK_HEADER([regex.h], [],
75 [AC_MSG_ERROR([Required header regex.h not found.])])
77 # Checks for typedefs, structures, and compiler characteristics.
80 AC_SUBST(GLIB_REQUIRED)
81 AC_SUBST(GTK_REQUIRED)
83 # Split this out, because pkgconfig macro doesn't return nicely what is missing
86 PKG_CHECK_MODULES([glib], glib-2.0 >= 2.10)
91 PKG_CHECK_MODULES([gobject], gobject-2.0 >= 2.4)
92 AC_SUBST(gobject_LIBS)
93 AC_SUBST(gobject_CFLAGS)
96 PKG_CHECK_MODULES([gtk], gtk+-2.0 >= 2.12)
101 PKG_CHECK_MODULES([gmodule], gmodule-2.0 >= 2.4)
102 AC_SUBST(gmodule_LIBS)
103 AC_SUBST(gmodule_CFLAGS)
106 PKG_CHECK_MODULES([libmpd], libmpd >= 0.15.3)
107 AC_SUBST(libmpd_LIBS)
108 AC_SUBST(libmpd_CFLAGS)
111 PKG_CHECK_MODULES([libglade], libglade-2.0)
112 AC_SUBST(libglade_LIBS)
113 AC_SUBST(libglade_CFLAGS)
116 PKG_CHECK_MODULES([gthread], gthread-2.0)
117 AC_SUBST(gthread_LIBS)
118 AC_SUBST(gthread_CFLAGS)
122 if test x${enable_sm} = xyes; then
123 PKG_CHECK_MODULES([sm], sm)
126 AC_DEFINE(ENABLE_SM, 1, [Enable Session Support])
130 if test x${enable_mmkeys} = xyes; then
131 AC_DEFINE(ENABLE_MMKEYS, 1, [Enable multimedia support])
133 if test x${enable_configdir} = xyes; then
134 AC_DEFINE(USE_CONFIG_DIR,1, [Use Config Dir])
136 if test x${enable_trayicon} = xyes; then
137 AC_DEFINE(ENABLE_TRAYICON,1, [Disable Tray Icon])
140 AC_MSG_CHECKING(prefix)
142 if test "x${prefix}" = "xNONE"; then
143 PACKAGE_PREFIX="${ac_default_prefix}"
145 PACKAGE_PREFIX="${prefix}"
147 AC_MSG_RESULT($PACKAGE_PREFIX)
150 dnl please keep them in alphabetical order
151 ALL_LINGUAS="de fr gl it nl nb_NO pl ru"
154 AC_SUBST(GETTEXT_PACKAGE)
155 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[GMPC gettext package])
159 #AM_GNU_GETTEXT([external])
160 # setting correct paths
161 PACKAGE_LOCALE_DIR="${PACKAGE_PREFIX}/${DATADIRNAME}/locale"
162 AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"$PACKAGE_LOCALE_DIR",[The package's locale path for gettext])
165 AC_SUBST(PACKAGE_LOCALE_DIR)
166 AC_SUBST(PACKAGE_LIBS)
173 EXTRA_CFLAGS="-Wmissing-prototypes -Wmissing-declarations"
179 *-*-mingw32* | *-*-windows)
181 EXTRA_CFLAGS="$EXTRA_CFLAGS -mno-cygwin -mwindows -mms-bitfields"
182 EXTRA_LDFLAGS="-export-all-symbols -mwindows -mms-bitfields" ;;
185 EXTRA_LDFLAGS="-export-all-symbols -mms-bitfields" ;;
187 AM_CONDITIONAL(WIN32, test x$win32 = xyes)
189 AC_SUBST(EXTRA_CFLAGS)
190 AC_SUBST(EXTRA_LDFLAGS)
195 AC_PATH_PROG(CURL_CONFIG,curl-config)
197 AC_HELP_STRING([--with-curl=PATH], [where libcurl is installed]),
198 [CURL_CONFIG="${with_curl}/bin/curl-config"])
199 if test -f "${CURL_CONFIG}"; then
200 LDFLAGS="`${CURL_CONFIG} --libs` $LDFLAGS"
201 CPPFLAGS="`${CURL_CONFIG} --cflags` $CPPFLAGS"
203 AC_MSG_WARN([curl-config not found, guessing at libcurl build settings])
205 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([unable to find libcurl header files]))
206 AC_CHECK_LIB([curl],[curl_global_init],,AC_MSG_ERROR([unable to link with libcurl]))
209 AC_ARG_ENABLE([maintainermode],
210 [--enable-maintainermode Enable maintainer mode.],
211 [case "${enableval}" in
212 yes) maintainer_mode=true;;
213 no) maintainer_mode=false;;
214 *) AC_MSG_ERROR([bad value ${enableval} for --enable-maintainermode]);;
216 [maintainer_mode=false])
218 AM_CONDITIONAL([MAINTAINER_MODE], [test x$maintainer_mode = xtrue])
232 pixmaps/icons/Makefile
233 pixmaps/icons/16x16/Makefile
234 pixmaps/icons/16x16/actions/Makefile
235 pixmaps/icons/16x16/status/Makefile
236 pixmaps/icons/16x16/apps/Makefile
237 pixmaps/icons/22x22/Makefile
238 pixmaps/icons/22x22/actions/Makefile
239 pixmaps/icons/22x22/status/Makefile
240 pixmaps/icons/22x22/apps/Makefile
241 pixmaps/icons/32x32/Makefile
242 pixmaps/icons/32x32/actions/Makefile
243 pixmaps/icons/32x32/status/Makefile
244 pixmaps/icons/32x32/apps/Makefile
245 pixmaps/icons/48x48/Makefile
246 pixmaps/icons/48x48/actions/Makefile
247 pixmaps/icons/48x48/apps/Makefile
248 pixmaps/icons/scalable/Makefile
249 pixmaps/icons/scalable/actions/Makefile
250 pixmaps/icons/scalable/status/Makefile
251 pixmaps/icons/scalable/apps/Makefile
255 echo "-------------- Status --------------"
256 if test x$maintainer_mode = xtrue; then
257 echo "Maintainer mode is: enabled"
259 echo "Maintainer mode is: disabled"
261 if test x${enable_mmkeys} = xyes; then
262 echo "Multimedia keys support is: enabled"
264 echo "Multimedia keys support is: disabled"
266 if test x${enable_sm} = xyes; then
267 echo "Session Manager support is: enabled"
269 echo "Session Manager support is: disabled"
271 if test x${enable_trayicon} = xyes; then
272 echo "Trayicon support is: enabled"
274 echo "Trayicon support is: disabled"
276 if test x${enable_configdir} = xyes; then
277 echo "Use ~/.config/ for config files: enabled"
279 echo "Use ~/.config/ for config files: disabled"
283 echo "Now type make to build"