~ubuntu-branches/ubuntu/gutsy/sound-juicer/gutsy-proposed

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
AC_INIT([Sound Juicer],[2.20.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=sound-juicer],[sound-juicer])

AC_PREREQ(2.52)

AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 check-news])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([libjuicer/sj-extractor.c])
AM_CONFIG_HEADER([config.h])

GNOME_COMMON_INIT

# Do the gettext/i18n stuff
GETTEXT_PACKAGE=sound-juicer
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The name of the gettext package.])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT


# Standard C and C++ compiler mojo
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PROG_INSTALL
IT_PROG_INTLTOOL([0.35.0])

GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS
GNOME_DEBUG_CHECK
GNOME_MAINTAINER_MODE_DEFINES

# Use the GNOME documentation framework
GNOME_DOC_INIT

# Find GLib and GObject
PKG_CHECK_MODULES(GLIB, glib-2.0 gthread-2.0 gobject-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

# Find nautilus-burn
PKG_CHECK_MODULES(BURN, libnautilus-burn >= 2.15.3)
AC_SUBST(BURN_CFLAGS)
AC_SUBST(BURN_LIBS)

# Find the UI libraries
PKG_CHECK_MODULES(UI, gtk+-2.0 >= 2.8  libglade-2.0  gconf-2.0  libgnomeui-2.0 >= 2.13.0  gnome-vfs-2.0 >= 2.9 gnome-vfs-module-2.0 > 2.9 gmodule-export-2.0)
AC_SUBST(UI_CFLAGS)
AC_SUBST(UI_LIBS)

PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 >= 0.10.5 gstreamer-plugins-base-0.10)
AC_SUBST(GSTREAMER_CFLAGS)
AC_SUBST(GSTREAMER_LIBS)

# Find the GStreamer elements we use, and warn if they are not present.
AM_GST_ELEMENT_CHECK(vorbisenc,,AC_MSG_WARN([The 'vorbisenc' element was not found. This will cause encoding to Ogg Vorbis to fail.]))
AM_GST_ELEMENT_CHECK(flacenc,,AC_MSG_WARN([The 'flacenc' element was not found. This will cause encoding to FLAC to fail.]))
AM_GST_ELEMENT_CHECK(wavenc,,AC_MSG_WARN([The 'wavenc' element was not found. This will cause encoding to Wave to fail.]))
AM_GST_ELEMENT_CHECK(gnomevfssink,,AC_MSG_WARN([The 'gnomevfssink' element was not found. This will cause Sound Juicer to fail at runtime.]))

# Find GNOME Media Profiles
PKG_CHECK_MODULES(MEDIA_PROFILES, gnome-media-profiles >= 2.11.91)
AC_SUBST(MEDIA_PROFILES_CFLAGS)
AC_SUBST(MEDIA_PROFILES_LIBS)

# Find MusicBrainz
PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= 2.1.3)
AC_SUBST(MUSICBRAINZ_CFLAGS)
AC_SUBST(MUSICBRAINZ_LIBS)

oldlibs=$LIBS
LIBS="$LIBS $MUSICBRAINZ_LIBS"
AC_CHECK_FUNCS(mb_SetProxyCreds)
LIBS="$oldlibs"

# Find the optional dependency libcdio
PKG_CHECK_MODULES([CDIO],[libcdio >= 0.70],[have_cdio=yes],[have_cdio=no])
AC_SUBST([CDIO_CFLAGS])
AC_SUBST([CDIO_LIBS])

if test "$have_cdio" != "yes"; then
	AC_MSG_WARN([libcdio not found, cannot get track names from CD-TEXT])
fi

AM_CONDITIONAL([HAVE_CDIO],[test "$have_cdio" = "yes"])

# Find TagLib for the internal copy of id3mux
PKG_CHECK_MODULES([TAGLIB],[taglib],[have_taglib=yes],[have_taglib=no])
AC_SUBST([TAGLIB_CFLAGS]) 
AC_SUBST([TAGLIB_LIBS])

if test "$have_taglib" != "yes"; then
	AC_MSG_WARN([taglib not found, cannot handle missing id3mux])
fi

AM_CONDITIONAL([HAVE_TAGLIB],[test "$have_taglib" = "yes"])

# Find how and where to put the GConf schemas
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test "$GCONFTOOL" = "no"; then
        AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2


# Optionally enable G* deprecations
AC_MSG_CHECKING([whether to enable deprecation warnings])
AC_ARG_ENABLE([deprecations],
        [AS_HELP_STRING([--enable-deprecations],
        [enable deprecation warnings [default=no]])],
        [],[enable_deprecations=no])
AC_MSG_RESULT([$enable_deprecations])

if test "$enable_deprecations" = "no"; then
	DISABLE_DEPRECATED=""
	AC_SUBST(DISABLE_DEPRECATED)
fi

# We require Scroll Keeper 0.3.5 or above for the help
SCROLLKEEPER_BUILD_REQUIRED=0.3.5
AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)

AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])

# Finally, generate the files
AC_CONFIG_FILES([
sound-juicer.spec
Makefile
data/Makefile
data/sound-juicer.desktop.in
help/Makefile
help/sound-juicer/Makefile
libjuicer/Makefile
po/Makefile.in
src/Makefile
tests/Makefile
])

AC_OUTPUT