summaryrefslogtreecommitdiff
path: root/configure.in
blob: b315842ac65e9ddef0af444559f9023f7972ee7a (plain)
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
# Initial blurb
AC_INIT(sound-juicer, 2.11.2, http://www.burtonini.com/)
AC_PREREQ(2.52)
AM_INIT_AUTOMAKE([check-news 1.6])
AC_CONFIG_SRCDIR(src/sj-extractor.c)
AM_CONFIG_HEADER(src/config.h)
AM_MAINTAINER_MODE

# Honour user-set aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"


# 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)
ALL_LINGUAS="ar az be bg ca cs cy da de el en_CA en_GB es et eu fi fr gl gu hi hr hu id it ja ko lt mk ml ms nb ne nl no pa pl pt pt_BR ro ru rw sk sq sr sr@Latn sv ta th tr uk xh zh_CN zh_TW"
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_INTLTOOL([0.20])


# 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.11.1)
AC_SUBST(BURN_CFLAGS)
AC_SUBST(BURN_LIBS)

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

# Find GStreamer.
HAVE_GSTREAMER=no
                                                                                
# Look for 0.8
PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.8 gstreamer-gconf-0.8 gstreamer-plugins-0.8 >= 0.8.8, HAVE_GSTREAMER=yes, HAVE_GSTREAMER=no)
if test "x$HAVE_GSTREAMER" = "xyes"; then
        AC_DEFINE(GSTREAMER_0_8, 1, [GStreamer 0.8])
else
        AC_MSG_ERROR([GStreamer 0.8 not found])
fi

# If we get here we found a GStreamer we can use
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(cdparanoia,,AC_MSG_WARN([The 'cdparanoia' element was not found. This will cause Sound Juicer to fail at runtime.]))
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(filesink,,AC_MSG_WARN([The 'filesink' 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)
AC_SUBST(MEDIA_PROFILES_CFLAGS)
AC_SUBST(MEDIA_PROFILES_LIBS)

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


# Find how and where to put the GConf schemas
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


# Optionally enable a hack so that no CD-ROMs being found is not fatal. Yes, I
# use this because I code on my CD-less laptop.
AC_MSG_CHECKING([whether to ignore missing CD-ROM errors])
AC_ARG_ENABLE(ignore-missing-cd,
        [AC_HELP_STRING([--enable-ignore-missing-cd],[Ignore missing CD-ROM])],
        AC_MSG_RESULT([yes]) AC_DEFINE(IGNORE_MISSING_CD, 1, [Ignore missing CD-ROM drives]),
        AC_MSG_RESULT([no])
        )


# Optionally enable G* deprecations
AC_MSG_CHECKING([whether to enable deprecation warnings])
AC_ARG_ENABLE(deprecations,
        [AC_HELP_STRING([--enable-deprecations],
        [enable deprecation warnings [default=no]])],,
        [enable_deprecations=no])
if test "x$enable_deprecations" = "xyes"; then
        AC_MSG_RESULT([yes])
        DISABLE_DEPRECATED_CFLAGS="\
                -DG_DISABLE_DEPRECATED  -DGDK_DISABLE_DEPRECATED \
                -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED \
                -DGCONF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED"
        AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
else
        AC_MSG_RESULT([no])
fi


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


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