~ubuntu-branches/debian/sid/vorbis-tools/sid

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Jesus Climent
  • Date: 2005-04-10 09:22:24 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050410092224-xtukpa3qghghhjje
Tags: 1.0.1-1.3
* Authorized NMU.
* Modified alsa to mention alsa09 (although the device might be nowadays
  alsa, back, since alsa1.0 has been already released). (Closes: #258286)
* Modified the manpage/help message for vorbiscomment to make it a bit more
  userfiendly: Closes: #252531.
* Added oggdec to the long description field, so that it triggers apt-cache
  searches: Closes: #274894.
* Typos in manpages: Closes: #302150.
* Escaped dashes in manpage: Closes: #264365.
* Quiet option is actually with -Q, not -q (Closes: #211289) Reported
  upstream but patched for Debian.
* Change input.wav with inputfile, since we accept flac-formated files:
  Closes: #262509.
* Translation bits:
  * Updated translation hu.po: Closes: #272037.
  * French translation correction: Encodage -> Codage (Closes: #248431).
  * debian/rules: remove .gmo's to avoid clash with uploaded tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
dnl ------------------------------------------------
6
6
 
7
7
AC_INIT(oggenc/encode.c)
8
 
AM_INIT_AUTOMAKE(vorbis-tools,1.0rc3)
 
8
 
 
9
dnl Apparently we need a newer version than we used to. 
 
10
AC_PREREQ(2.53)
 
11
 
 
12
AM_INIT_AUTOMAKE(vorbis-tools,1.0.1)
 
13
AM_MAINTAINER_MODE
9
14
 
10
15
dnl --------------------------------------------------  
11
16
dnl Check for programs
19
24
 
20
25
AM_PROG_LIBTOOL
21
26
 
 
27
ALL_LINGUAS="be cs da es fr hr hu nl ro ru sv"
 
28
AM_GNU_GETTEXT
22
29
 
23
30
dnl --------------------------------------------------
24
31
dnl Set build flags based on environment
26
33
 
27
34
AC_CANONICAL_HOST
28
35
 
29
 
casecflags_save="$CFLAGS"
 
36
cflags_save="$CFLAGS"
30
37
ldflags_save="$LDFLAGS"
31
38
if test -z "$GCC"; then
32
39
        case $host in
76
83
LDFLAGS="$LDFLAGS $ldflags_save"
77
84
 
78
85
dnl --------------------------------------------------
79
 
dnl Check for libraries
80
 
dnl --------------------------------------------------
81
 
 
82
 
AM_PATH_OGG(,AC_MSG_ERROR(Ogg needed!))
83
 
AM_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!))
84
 
AM_PATH_AO(,AC_MSG_ERROR(libao needed!))
85
 
AM_PATH_CURL(,AC_MSG_ERROR(libcurl needed!))
86
 
 
87
 
ACX_PTHREAD(,AC_MSG_ERROR(POSIX threads required!))
 
86
dnl Allow tools to be selectively built
 
87
dnl --------------------------------------------------
 
88
AC_ARG_ENABLE(ogg123, [  --disable-ogg123   Skip building ogg123], build_ogg123="$enableval", build_ogg123="yes")
 
89
AC_ARG_ENABLE(oggdec, [  --disable-oggdec   Skip building oggdec], build_oggdec="$enableval", build_oggdec="yes")
 
90
AC_ARG_ENABLE(oggenc, [  --disable-oggenc   Skip building oggenc], build_oggenc="$enableval", build_oggenc="yes")
 
91
AC_ARG_ENABLE(ogginfo,[  --disable-ogginfo  Skip building ogginfo], build_ogginfo="$enableval", build_ogginfo="yes")
 
92
AC_ARG_ENABLE(vcut,   [  --disable-vcut     Skip building vcut], build_vcut="$enableval", build_vcut="yes")
 
93
AC_ARG_ENABLE(vorbiscomment, [  --disable-vorbiscomment   Skip building vorbiscomment], build_vorbiscomment="$enableval", build_vorbiscomment="yes")
 
94
AC_ARG_WITH(flac,     [  --without-flac     Do not compile FLAC support], build_flac="$enableval", build_flac="yes")
 
95
AC_ARG_WITH(speex,    [  --without-speex    Do not compile Speex support], build_speex="$enableval", build_speex="yes")
 
96
 
 
97
dnl --------------------------------------------------
 
98
dnl Check for generally needed libraries
 
99
dnl --------------------------------------------------
 
100
 
 
101
XIPH_PATH_OGG(,AC_MSG_ERROR(Ogg needed!))
 
102
XIPH_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!))
 
103
 
 
104
SHARE_LIBS='$(top_builddir)/share/libutf8.a $(top_builddir)/share/libgetopt.a'
 
105
SHARE_CFLAGS='-I$(top_srcdir)/include'
 
106
 
 
107
I18N_CFLAGS='-I$(top_srcdir)/intl'
 
108
I18N_LIBS=$INTLLIBS
88
109
 
89
110
SOCKET_LIBS=
90
111
AC_CHECK_LIB(socket, socket, SOCKET_LIBS="-lsocket")
91
112
AC_CHECK_LIB(nsl, gethostbyname, SOCKET_LIBS="-lnsl $SOCKET_LIBS")
92
113
 
93
 
SHARE_LIBS='$(top_builddir)/share/libutf8.a $(top_builddir)/share/libgetopt.a'
94
 
SHARE_CFLAGS='-I$(top_srcdir)/include'
 
114
 
 
115
dnl --------------------------------------------------
 
116
dnl Check for ogg123 critical libraries and other optional libraries
 
117
dnl --------------------------------------------------
 
118
 
 
119
if test "x$build_ogg123" = xyes; then
 
120
  AC_MSG_RESULT([checking for ogg123 requirements])
 
121
  XIPH_PATH_AO(,build_ogg123=no; AC_MSG_WARN(libao missing))
 
122
  AM_PATH_CURL(,build_ogg123=no; AC_MSG_WARN(libcurl missing))
 
123
 
 
124
  ACX_PTHREAD(,build_ogg123=no; AC_MSG_WARN(POSIX threads missing))
 
125
fi
 
126
 
 
127
dnl -------------------- FLAC ----------------------
 
128
 
 
129
FLAC_LIBS=""
 
130
AC_CHECK_LIB(m,log,FLAC_LIBS="-lm")
 
131
AC_CHECK_LIB(FLAC, [FLAC__stream_decoder_process_single],
 
132
  [have_libFLAC=yes; FLAC_LIBS="-lFLAC $FLAC_LIBS"],
 
133
  AC_MSG_WARN([libFLAC missing])
 
134
  have_libFLAC=no, [$FLAC_LIBS]
 
135
)
 
136
AC_CHECK_LIB(OggFLAC, [OggFLAC__stream_decoder_new],
 
137
  [FLAC_LIBS="-lOggFLAC $FLAC_LIBS $OGG_LIBS"],
 
138
  AC_MSG_WARN([libOggFLAC missing])
 
139
  have_libFLAC=no, [$FLAC_LIBS $OGG_LIBS]
 
140
)
 
141
AC_CHECK_HEADER(FLAC/stream_decoder.h,,
 
142
  AC_MSG_WARN(libFLAC headers missing)
 
143
  have_libFLAC=no,[ ])
 
144
 
 
145
if test "x$have_libFLAC" = xyes; then
 
146
   if test "x$build_flac" = xyes; then
 
147
      AC_DEFINE(HAVE_LIBFLAC)
 
148
   fi
 
149
else
 
150
   build_flac="no"
 
151
   FLAC_LIBS=""
 
152
fi
 
153
AC_SUBST(FLAC_LIBS)
 
154
 
 
155
dnl ------------------- Speex ------------------------
 
156
 
 
157
SPEEX_LIBS=""
 
158
AC_CHECK_LIB(m,log,SPEEX_LIBS="-lm")
 
159
AC_CHECK_LIB(speex, [speex_decoder_init],
 
160
  [have_libspeex=yes; SPEEX_LIBS="-lspeex $SPEEX_LIBS"],
 
161
  AC_MSG_WARN(libspeex missing)
 
162
  have_libspeex=no, [$SPEEX_LIBS]
 
163
)
 
164
AC_CHECK_HEADER(speex.h,,
 
165
  AC_MSG_WARN(libspeex headers missing)
 
166
  have_libspeex=no,[ ])
 
167
 
 
168
if test "x$have_libspeex" = xyes; then
 
169
   if test "x$build_speex" = xyes; then
 
170
      AC_DEFINE(HAVE_LIBSPEEX)
 
171
   fi
 
172
else
 
173
   build_speex="no"
 
174
   SPEEX_LIBS=""
 
175
fi
 
176
AC_SUBST(SPEEX_LIBS)
95
177
 
96
178
dnl --------------------------------------------------
97
179
dnl Check for library functions
98
180
dnl --------------------------------------------------
99
181
 
 
182
AC_FUNC_ALLOCA
100
183
AM_ICONV
101
184
AC_CHECK_FUNCS(atexit on_exit)
102
185
AM_LANGINFO_CODESET
105
188
dnl Work around FHS stupidity
106
189
dnl --------------------------------------------------
107
190
 
108
 
if test "$prefix" = "/usr"; then
109
 
    MANDIR='$(datadir)/man'
 
191
if test -z "$mandir"; then
 
192
    if test "$prefix" = "/usr"; then
 
193
        MANDIR='$(datadir)/man'
 
194
    else
 
195
        MANDIR='$(prefix)/man'
 
196
    fi
110
197
else
111
 
    MANDIR='$(prefix)/man'
 
198
    MANDIR=$mandir
112
199
fi
113
200
AC_SUBST(MANDIR)
114
201
 
 
202
 
115
203
dnl --------------------------------------------------
116
204
dnl Do substitutions
117
205
dnl --------------------------------------------------
118
206
 
 
207
# add optional subdirs to the build
 
208
OPT_SUBDIRS=""
 
209
if test "x$build_ogg123" = xyes; then
 
210
  OPT_SUBDIRS="$OPT_SUBDIRS ogg123"
 
211
  if test "x$have_libFLAC" = xyes; then
 
212
    OGG123_FLAC_OBJS='flac_format.$(OBJEXT) easyflac.$(OBJEXT)'
 
213
    OGGENC_FLAC_OBJS='flac.$(OBJEXT) easyflac.$(OBJEXT)'
 
214
  else
 
215
    OGG123_FLAC_OBJS=''
 
216
    OGGENC_FLAC_OBJS=''
 
217
  fi
 
218
  AC_SUBST(OGG123_FLAC_OBJS)
 
219
  AC_SUBST(OGGENC_FLAC_OBJS)
 
220
  if test "x$have_libspeex" = xyes; then
 
221
    OGG123_SPEEX_OBJS='speex_format.$(OBJEXT)'
 
222
  else
 
223
    OGG123_SPEEX_OBJS=''
 
224
  fi
 
225
  AC_SUBST(OGG123_SPEEX_OBJS)
 
226
fi
 
227
if test "x$build_oggenc" = xyes; then
 
228
  OPT_SUBDIRS="$OPT_SUBDIRS oggenc"
 
229
fi
 
230
if test "x$build_oggdec" = xyes; then
 
231
  OPT_SUBDIRS="$OPT_SUBDIRS oggdec"
 
232
fi
 
233
if test "x$build_ogginfo" = xyes; then
 
234
  OPT_SUBDIRS="$OPT_SUBDIRS ogginfo"
 
235
fi
 
236
if test "x$build_vcut" = xyes; then
 
237
  OPT_SUBDIRS="$OPT_SUBDIRS vcut"
 
238
fi
 
239
if test "x$build_vorbiscomment" = xyes; then
 
240
  OPT_SUBDIRS="$OPT_SUBDIRS vorbiscomment"
 
241
fi
 
242
AC_SUBST(OPT_SUBDIRS)
 
243
 
119
244
AC_SUBST(DEBUG)
120
245
AC_SUBST(PROFILE)
121
246
AC_SUBST(SOCKET_LIBS)
123
248
AC_SUBST(SHARE_LIBS)
124
249
AC_SUBST(CURL_CFLAGS)
125
250
AC_SUBST(CURL_LIBS)
126
 
 
127
 
AC_OUTPUT(Makefile include/Makefile share/Makefile win32/Makefile oggenc/Makefile oggenc/man/Makefile ogg123/Makefile vorbiscomment/Makefile vcut/Makefile ogginfo/Makefile debian/Makefile)
 
251
AC_SUBST(I18N_CFLAGS)
 
252
AC_SUBST(I18N_LIBS)
 
253
 
 
254
AC_OUTPUT(Makefile intl/Makefile po/Makefile.in include/Makefile share/Makefile win32/Makefile oggdec/Makefile oggenc/Makefile oggenc/man/Makefile ogg123/Makefile vorbiscomment/Makefile vcut/Makefile ogginfo/Makefile debian/Makefile)
 
255
 
 
256
if test "x$build_oggenc" = xyes -a "x$have_libFLAC" != xyes; then
 
257
    AC_MSG_WARN([FLAC and OggFLAC libraries or headers missing, oggenc 
 
258
will NOT be built with FLAC read support.])
 
259
fi
 
260
 
 
261
if test "x$build_ogg123" != xyes; then
 
262
    AC_MSG_WARN([Prerequisites for ogg123 not met, ogg123 will be skipped.
 
263
Please ensure that you have POSIX threads, libcurl and libao libraries and
 
264
headers present if you would like to build ogg123.])
 
265
else
 
266
    if test "x$have_libFLAC" != xyes; then
 
267
        AC_MSG_WARN([FLAC and OggFLAC libraries or headers missing, ogg123 
 
268
will NOT be built with FLAC read support.])
 
269
    fi
 
270
    if test "x$have_libspeex" != xyes; then
 
271
        AC_MSG_WARN([Speex libraries or headers missing, ogg123 will NOT be 
 
272
built with Speex read support.])
 
273
    fi         
 
274
fi