File: configure.ac

package info (click to toggle)
goobox 3.0.1-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,728 kB
  • sloc: ansic: 16,719; sh: 11,046; makefile: 363; xml: 18
file content (205 lines) | stat: -rw-r--r-- 6,205 bytes parent folder | download
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
AC_PREREQ(2.61)
AC_INIT([goobox], [3.0.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=goobox])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])

GNOME_COMMON_INIT
AC_PROG_CXX
AM_PROG_LIBTOOL
GNOME_DOC_INIT
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
GLIB_GSETTINGS

GLIB_REQUIRED=2.30
GTK_REQUIRED=3.2.0
GSTREAMER_REQUIRED=0.10.12
LIBNOTIFY_REQUIRED=0.4.3
LIBMUSICBRAINZ3_REQUIRED=3.0.0

dnl ===========================================================================

PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_REQUIRED])
AC_SUBST([GTK_CFLAGS])
AC_SUBST([GTK_LIBS])

PKG_CHECK_MODULES(GOO, [
	glib-2.0 >= $GLIB_REQUIRED
	gthread-2.0
	gtk+-3.0 >= $GTK_REQUIRED
	gstreamer-0.10 >= $GSTREAMER_REQUIRED
	libbrasero-media3
	libmusicbrainz3 >= $LIBMUSICBRAINZ3_REQUIRED
	libdiscid
])
AC_SUBST(GOO_CFLAGS)
AC_SUBST(GOO_LIBS)

dnl ===========================================================================

AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)

AC_ARG_ENABLE(run_in_place,
	      AS_HELP_STRING([--enable-run-in-place],[load ui data and extensions from the source tree]),
	      [case "${enableval}" in
	      yes) enable_run_in_place=yes ;;
	      no) enable_run_in_place=no ;;
	      *) AC_MSG_ERROR([bad value ${enableval} for --enable-run-in-place]) ;;
	      esac],
	      [enable_run_in_place=no])
AM_CONDITIONAL(RUN_IN_PLACE, test "x$enable_run_in_place" != xno)

if test x$enable_run_in_place = xyes; then
	AC_DEFINE(RUN_IN_PLACE, 1, [load ui data and extensions from the source tree])
fi

dnl ===========================================================================

SAVE_CFLAGS="$CFLAGS"
CFLAGS=""
AC_CHECK_LIB(m, floor,, AC_MSG_ERROR([math library not found]))
M_LIBS="-lm"
CFLAGS="$SAVE_CFLAGS"
unset SAVE_CFLAGS
AC_SUBST(M_LIBS)

dnl ===========================================================================
dnl
dnl libnotify
dnl

AC_ARG_ENABLE(notification,[AC_HELP_STRING([--enable-notification],[enable current track notification if libnotify is available [default=yes]])],, [enable_notification="yes"])
AM_CONDITIONAL(ENABLE_NOTIFICATION, test "x$enable_notification" = xyes)

LIBNOTIFY_LIBS=""
LIBNOTIFY_CFLAGS=""
if test x"$enable_notification" = xyes; then
   AC_MSG_CHECKING(for notification support)

   if pkg-config --atleast-version=$LIBNOTIFY_REQUIRED libnotify; then
      LIBNOTIFY_LIBS=`pkg-config --libs libnotify`
      LIBNOTIFY_CFLAGS=`pkg-config --cflags libnotify`
      AC_DEFINE(ENABLE_NOTIFICATION, 1, [Have libnotify])
   else
      enable_notification=no
   fi
fi
AC_MSG_RESULT($enable_notification)
AC_SUBST(LIBNOTIFY_LIBS)
AC_SUBST(LIBNOTIFY_CFLAGS)

dnl ===========================================================================

AC_ARG_ENABLE(media-keys,[AC_HELP_STRING([--enable-media-keys],[enable use of the keyboard media keys [default=yes]])],, [enable_media_keys="yes"])
AM_CONDITIONAL(ENABLE_MEDIA_KEYS, test "x$enable_media_keys" = xyes)

DBUS_LIBS=""
DBUS_CFLAGS=""
if test x"$enable_media_keys" = xyes; then
   AC_DEFINE(ENABLE_MEDIA_KEYS, 1, [enable media keys support])
fi
AC_MSG_RESULT($enable_media_keys)

dnl ===========================================================================

SYSTEM_LIBS=""
host=`uname -s`
case "$host" in
*FreeBSD*)
	DEFAULT_DEVICE="/dev/acd0c"
	AC_DEFINE(HAVE_BSD, 1, [Define to 1 if this is a BSD system])
	SYSTEM_LIBS="-lcam"
	;;
*NetBSD*)
	DEFAULT_DEVICE="/dev/rcd0d"
	AC_DEFINE(HAVE_BSD, 1, [Define to 1 if this is a BSD system])
	;;
*Linux*)
	DEFAULT_DEVICE="/dev/cdrom"
	AC_DEFINE(HAVE_LINUX, 1, [Define to 1 if this is a Linux system])
	;;
*SunOS*)
	DEFAULT_DEVICE="/vol/dev/aliases/cdrom0"
	AC_DEFINE(HAVE_SOLARIS, 1, [Define to 1 if this is a Solaris system])
	;;
esac

AC_DEFINE_UNQUOTED(DEFAULT_DEVICE, "$DEFAULT_DEVICE", [Default CD device])
AC_SUBST(SYSTEM_LIBS)

dnl ===========================================================================

IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=goobox
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GetText Package])
AM_GLIB_GNU_GETTEXT

if test "x${prefix}" = "xNONE"; then
	AC_DEFINE_UNQUOTED(LOCALEDIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Locale directory])
else
	AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Locale directory])
fi

dnl ===========================================================================

AC_ARG_ENABLE(deprecated,
	      AS_HELP_STRING([--disable-deprecated], [do not use deprecated API]),
	      disable_deprecated=yes,
	      disable_deprecated=no)
if test x$disable_deprecated = xyes; then
	CFLAGS="$CFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
	CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
	CFLAGS="$CFLAGS -DGSEAL_ENABLE"
fi

dnl ===========================================================================

AC_ARG_ENABLE(schemas-install,[AC_HELP_STRING([--disable-schemas-install],
					      [Disable installation of the gconf schemas])])
AM_CONDITIONAL(SCHEMAS_INSTALL, test x$enable_schemas_install != xno)

AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
	AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2

dnl ===========================================================================

AC_CONFIG_FILES([
Makefile
copy-n-paste/Makefile
data/Makefile
data/goobox.desktop.in
data/ui/Makefile
data/icons/Makefile
data/icons/256x256/Makefile
data/icons/256x256/apps/Makefile
data/icons/48x48/Makefile
data/icons/48x48/apps/Makefile
help/Makefile
src/Makefile
src/icons/Makefile
po/Makefile.in
])

AC_OUTPUT

echo "

Configuration:

	Source code location : ${srcdir}
	Compiler             : ${CC}
	Prefix               : ${prefix}
	CFLAGS		     : ${CFLAGS}
	Run in place         : ${enable_run_in_place}
	Enable notification  : ${enable_notification}
	Enable media keys    : ${enable_media_keys}
"