File: configure.in

package info (click to toggle)
fusionsound 0.9.25-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,924 kB
  • ctags: 1,275
  • sloc: ansic: 13,230; sh: 8,306; perl: 668; makefile: 285
file content (338 lines) | stat: -rw-r--r-- 9,188 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/ifusionsound.c)

AC_PREREQ(2.52)

#
# Making releases:
#   FUSIONSOUND_MICRO_VERSION += 1;
#   FUSIONSOUND_INTERFACE_AGE += 1;
#   FUSIONSOUND_BINARY_AGE += 1;
# if any functions have been added, set FUSIONSOUND_INTERFACE_AGE to 0.
# if backwards compatibility has been broken,
# set FUSIONSOUND_BINARY_AGE and FUSIONSOUND_INTERFACE_AGE to 0.
#
FUSIONSOUND_MAJOR_VERSION=0
FUSIONSOUND_MINOR_VERSION=9
FUSIONSOUND_MICRO_VERSION=25
FUSIONSOUND_INTERFACE_AGE=0
FUSIONSOUND_BINARY_AGE=0
FUSIONSOUND_VERSION=$FUSIONSOUND_MAJOR_VERSION.$FUSIONSOUND_MINOR_VERSION.$FUSIONSOUND_MICRO_VERSION

AC_SUBST(FUSIONSOUND_MAJOR_VERSION)
AC_SUBST(FUSIONSOUND_MINOR_VERSION)
AC_SUBST(FUSIONSOUND_MICRO_VERSION)
AC_SUBST(FUSIONSOUND_INTERFACE_AGE)
AC_SUBST(FUSIONSOUND_BINARY_AGE)
AC_SUBST(FUSIONSOUND_VERSION)

AC_DEFINE_UNQUOTED(FUSIONSOUND_VERSION,"$FUSIONSOUND_VERSION",[The FusionSound version])

# libtool versioning
LT_RELEASE=$FUSIONSOUND_MAJOR_VERSION.$FUSIONSOUND_MINOR_VERSION
LT_CURRENT=`expr $FUSIONSOUND_MICRO_VERSION - $FUSIONSOUND_INTERFACE_AGE`
LT_REVISION=$FUSIONSOUND_INTERFACE_AGE
LT_AGE=`expr $FUSIONSOUND_BINARY_AGE - $FUSIONSOUND_INTERFACE_AGE`

AC_SUBST(LT_RELEASE) 
AC_SUBST(LT_CURRENT) 
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

# The earliest version that this release has binary compatibility with.
# This is used for module locations.
BINARY_VERSION=$FUSIONSOUND_MAJOR_VERSION.$FUSIONSOUND_MINOR_VERSION.$LT_CURRENT


VERSION=$FUSIONSOUND_VERSION
PACKAGE=FusionSound

AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)

AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_DISABLE_STATIC 
AM_PROG_LIBTOOL
AM_SANITY_CHECK
AC_ISC_POSIX
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_C_BIGENDIAN
AC_PROG_CPP

AC_CHECK_TYPE(long)

dnl Clear default CFLAGS
if test x"$CFLAGS" = x"-g -O2"; then
  CFLAGS=
fi

CFLAGS="-O3 -ffast-math -pipe $CFLAGS"

CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"


AC_ARG_ENABLE(extra-warnings,
  [  --enable-extra-warnings enable extra warnings [[default=no]]],,
  enable_extra_warnings=no)
if test "x$enable_extra_warnings" = xyes; then
  CFLAGS="-W -Wno-sign-compare -Wno-unused-parameter -Wundef -Wcast-qual -Wcast-align -Waggregate-return -Wmissing-declarations -Winline $CFLAGS"
fi

AC_ARG_ENABLE(debug,
  [  --enable-debug          enable debugging support [[default=no]]],,
  enable_debug=no)
if test "x$enable_debug" = xyes; then
  CFLAGS="$CFLAGS -g3 -fno-inline"
  CPPFLAGS="$CPPFLAGS -DDIRECT_FORCE_DEBUG"
fi

if test "x$GCC" = xyes; then
  CFLAGS="-Wall $CFLAGS"
fi


AC_ARG_ENABLE(ieee-floats,
  [  --enable-ieee-floats    enable using IEEE floats for internal mixing routines [[default=no]]],,
  enable_ieee_floats=no)
if test "x$enable_ieee_floats" = xyes; then
  AC_DEFINE(FS_USE_IEEE_FLOATS,1,[Define to 1 to enable IEEE floats for mixing routines.])
fi

AC_ARG_ENABLE(accuracy,
  [  --enable-accuracy       enable privileging accuracy over speed [[default=no]]],,
  enable_accuracy=no)
if test "x$enable_accuracy" = xyes; then
  AC_DEFINE(FS_ENABLE_ACCURACY,1,[Define to 1 to enable accuracy.])
fi

AC_ARG_ENABLE(examples, 
  [  --enable-examples       enable examples [[default=yes]]],, enable_examples=yes)
AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_examples" = xyes)

AC_ARG_ENABLE(module,
  [  --enable-module         enable module for DirectFB [[default=yes]]],, enable_module=yes)
AM_CONDITIONAL(BUILD_MODULE, test "x$enable_module" = xyes)


#
# Find pkg-config
#
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG = xno ; then
  AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
fi

if ! pkg-config --atleast-pkgconfig-version 0.9 ; then
  AC_MSG_ERROR([*** pkg-config too old; version 0.9 or better required.])
fi


#
# Check for DirectFB-Internal
#
DIRECTFB_REQUIRED_VERSION=$FUSIONSOUND_VERSION

AC_MSG_CHECKING(for DirectFB-Internal)
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb-internal ; then
  MODULEDIR=$libdir/`$PKG_CONFIG --variable=moduledirname directfb-internal`
  DFB_CFLAGS=`$PKG_CONFIG --cflags directfb-internal`
  DFB_LIBS=`$PKG_CONFIG --libs directfb-internal`
  AC_MSG_RESULT(found)
else
  AC_MSG_ERROR([*** DirectFB $DIRECTFB_VERSION or newer is required. ])
fi

 
#
#
# Check for LiTE
#
AC_ARG_WITH(lite, [  --with-lite             enable lite examples [[default=yes]]],, with_lite=yes)
if test "x$with_lite" = xyes; then
  LITE_REQUIRED_VERSION=0.0.1

  AC_MSG_CHECKING(for LiTE)

  if $PKG_CONFIG --atleast-version $LITE_REQUIRED_VERSION lite ; then
    have_lite=yes
    LITE_CFLAGS=`$PKG_CONFIG --cflags lite`
    LITE_LIBS=`$PKG_CONFIG --libs lite`
    AC_MSG_RESULT(found)
  else
    AC_MSG_WARN([
*** LiTE $LITE_REQUIRED_VERSION or newer is required for some examples, they've been disabled now. ])
  fi
fi
AM_CONDITIONAL(HAVE_LITE, test "x$have_lite" = xyes)


#
# Check for Timidity
#
timidty="no"
AC_ARG_ENABLE(timidity,
  [  --enable-timidity       build Timidity music provider [[default=yes]]],
  timidity="$enableval", timidity="yes")
AM_CONDITIONAL(BUILD_TIMIDITY, test "x$timidity" = "xyes")


#
# Check for Wave
#
wave="no"
AC_ARG_ENABLE(wave,
  [  --enable-wave           build Wave music provider [[default=yes]]],
  wave="$enableval", wave="yes")
AM_CONDITIONAL(BUILD_WAVE, test "x$wave" = "xyes")


#
# Check for Vorbis
#
vorbis="no"
AC_ARG_ENABLE(vorbis,
  [  --enable-vorbis         build Ogg/Vorbis music provider [[default=yes]]],
  enable_vorbis="$enableval", enable_vorbis="yes")

if test "x$enable_vorbis" = "xyes"; then
  VORBIS_REQUIRED_VERSION=1.0.0
  
  AC_MSG_CHECKING(for vorbisfile >= $VORBIS_REQUIRED_VERSION)
  
  if $PKG_CONFIG --atleast-version $VORBIS_REQUIRED_VERSION vorbisfile; then
    vorbis="yes"
    VORBISFILE_CFLAGS=`$PKG_CONFIG --cflags vorbisfile`
    VORBISFILE_LIBS=`$PKG_CONFIG --libs vorbisfile`
    AC_MSG_RESULT(yes)
  else
    AC_MSG_RESULT(no)
    AC_MSG_WARN([
*** vorbisfile $VORBIS_REQUIRED_VERSION or newer is required - Ogg/Vorbis music provider will not be built.])
  fi
fi

AC_SUBST(VORBISFILE_CFLAGS)
AC_SUBST(VORBISFILE_LIBS)
AM_CONDITIONAL(BUILD_VORBIS, test "x$vorbis" = "xyes")


#
# Check for MAD
#
have_mad="no"
AC_ARG_ENABLE(mad,            
  [  --enable-mad            build MAD MP3 music provider [[default=yes]]],
  enable_mad="$enableval", enable_mad="yes")

if test "x$enable_mad" = "xyes"; then
  AC_CHECK_LIB(mad, mad_timer_add, have_mad="yes", have_mad="no")
  if test "x$have_mad" = "xyes"; then
    AC_CHECK_HEADER(mad.h, have_mad="yes", have_mad="no")
    if test "x$have_mad" = "xno"; then
      AC_MSG_WARN([
*** MAD header not found - MAD music provider will not be built.])
    else
      MAD_LIBS="-lmad"
    fi
  else
    AC_MSG_WARN([
*** MAD library not found - MAD music provider will not be built.])
  fi
fi

AC_SUBST(MAD_LIBS)
AM_CONDITIONAL(BUILD_MAD, test "x$have_mad" = "xyes")


#
# Check for CD-DA
#
cdda="no"
AC_ARG_ENABLE(cdda,            
  [  --enable-cdda           build CD-DA music provider [[default=yes]]],
  enable_cdda="$enableval", enable_cdda="yes")
  
if test "x$enable_cdda" = "xyes"; then
  cdda="yes"
  if $PKG_CONFIG --atleast-version 1.0.0 libcddb; then
    AC_DEFINE(HAVE_CDDB,1,[Define to 1 if you have libcddb.])
    CDDB_CFLAGS=`$PKG_CONFIG --cflags libcddb`
    CDDB_LIBS=`$PKG_CONFIG --libs libcddb`
  else
    AC_MSG_WARN([
*** libcddb 1.0.0 or newer not found - CD-DA Music Provider will be built without CDDB support.])
  fi
fi

AC_SUBST(CDDB_CFLAGS)
AC_SUBST(CDDB_LIBS)
AM_CONDITIONAL(BUILD_CDDA, test "x$cdda" = "xyes")   


DATADIR=$datadir/fusionsound
INCLUDEDIR=$includedir/fusionsound
INTERNALINCLUDEDIR=$includedir/fusionsound-internal

CFLAGS="$CFLAGS -Werror-implicit-function-declaration"

# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

AM_CONDITIONAL(BUILD_STATIC, test "$enable_static" = "yes")

AC_SUBST(DFB_CFLAGS)
AC_SUBST(DFB_LIBS)
AC_SUBST(LITE_CFLAGS)
AC_SUBST(LITE_LIBS)
AC_SUBST(DATADIR)
AC_SUBST(INCLUDEDIR)
AC_SUBST(INTERNALINCLUDEDIR)
AC_SUBST(MODULEDIR)
AC_SUBST(PACKAGE)

AC_OUTPUT([
fusionsound.pc
Makefile
docs/Makefile
docs/html/Makefile
examples/Makefile
include/Makefile
include/fusionsound_version.h
interfaces/Makefile
interfaces/IFusionSound/Makefile
interfaces/IFusionSoundMusicProvider/Makefile
interfaces/IFusionSoundMusicProvider/timidity/Makefile
src/Makefile
src/core/Makefile
src/media/Makefile
src/misc/Makefile
tools/Makefile
])

AC_MSG_RESULT([
Build options: 
  Version                   $VERSION
  Install prefix	    $prefix
  Build shared libs         $enable_shared
  Build static libs         $enable_static
  Build Examples            $enable_examples
  Build Module              $enable_module
  Module directory          $MODULEDIR
  CPPFLAGS                  $CPPFLAGS
  CFLAGS                    $CFLAGS
  DFB_CFLAGS                $DFB_CFLAGS
  
Misc options:
  IEEE floats:              $enable_ieee_floats
  Accuracy:                 $enable_accuracy

Building Music Providers:
  Timidity                  $timidity
  Wave                      $wave
  Ogg/Vorbis                $vorbis
  MAD                       $have_mad
  CD-DA                     $cdda
])