File: configure.ac

package info (click to toggle)
sweep 0.9.3-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 6,328 kB
  • sloc: ansic: 36,275; sh: 9,980; makefile: 633; yacc: 288; sed: 16
file content (646 lines) | stat: -rw-r--r-- 18,423 bytes parent folder | download | duplicates (2)
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
dnl Process this file with autoconf to produce a configure script.

dnl Require minimum autoconf version
AC_PREREQ(2.50)

AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(sweep, 0.9.3)
AM_CONFIG_HEADER(config.h)

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AM_PROG_LIBTOOL

AC_CHECK_PROG(HAVE_GNOME_MOZ_REMOTE, 'gnome-moz-remote', yes, no)

AC_C_BIGENDIAN

AC_CHECK_FUNCS(strchr)
AC_CHECK_FUNCS(madvise)

ALL_LINGUAS="de el es_ES fr hu it ja pl ru en_AU"
AM_GNU_GETTEXT

dnl Overall configuration success flag
sweep_config_ok=yes

dnl Default audio handling to build in
sweep_config_driver=none

dnl
dnl  Configuration option for building of experimental code.
dnl

ac_enable_experimental=no
AC_ARG_ENABLE(experimental,
     [  --enable-experimental   enable building of experimental code ],
     [ ac_enable_experimental=yes ])

if test "x${ac_enable_experimental}" = xyes ; then
    AC_DEFINE([DEVEL_CODE], [], [Whether to build the develpment code.])
fi


dnl
dnl  Detect pthreads libraries
dnl

PTHREAD_LIBS=error
AC_CHECK_LIB(pthread, pthread_attr_init, PTHREAD_LIBS="-lpthread")
if test "x$PTHREAD_LIBS" = xerror; then
        AC_CHECK_LIB(pthreads, pthread_attr_init, PTHREAD_LIBS="-lpthreads")
fi
if test "x$PTHREAD_LIBS" = xerror; then
        AC_CHECK_LIB(c_r, pthread_attr_init, PTHREAD_LIBS="-lc_r")
fi
if test "x$PTHREAD_LIBS" = xerror; then
        AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
fi
AC_SUBST(PTHREAD_LIBS)



dnl
dnl  Detect Gthread, GLib and GTK+ libraries
dnl

PKG_CHECK_MODULES(GTK, gtk+-2.0 >=  2.4.0, HAVE_GTK="yes", sweep_config_ok="no")
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
if test "x$HAVE_GTK" != xyes ; then
    AC_CHECK_LIB(gtk-x11-2.0, gtk_init, HAVE_GTK="maybe", sweep_config_ok="no")
fi

PKG_CHECK_MODULES(GLIB, glib-2.0 >=  2.2.0, HAVE_GLIB="yes", sweep_config_ok="no")
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
if test "x$HAVE_GLIB" != xyes ; then
  AC_CHECK_LIB(glib-2.0, g_list_append, HAVE_GLIB="maybe", sweep_config_ok="no")
fi

PKG_CHECK_MODULES(GTHREADS, gthread-2.0 >=  2.2.0, HAVE_GTHREADS="yes", sweep_config_ok="no")
AC_SUBST(GTHREADS_CFLAGS)
AC_SUBST(GTHREADS_LIBS)
if test "x$HAVE_GTHREADS" != xyes ; then
  AC_CHECK_LIB(gthread-2.0, g_thread_init, HAVE_GTHREADS="maybe", sweep_config_ok="no")
fi

PKG_CHECK_MODULES(GMODULE, gmodule-2.0, HAVE_GMODULE="yes", sweep_config_ok="no")
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
if test "x$HAVE_GMODULE" != xyes ; then
  AC_CHECK_LIB(gmodule-2.0, g_module_open, HAVE_GMODULE="maybe", sweep_config_ok="no")
fi

dnl
dnl  Detect libsndfile 1.0
dnl

PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.0,
                  HAVE_LIBSNDFILE1="yes", HAVE_LIBSNDFILE1="no")

if test "x$HAVE_LIBSNDFILE1" = xyes ; then
  AC_DEFINE([HAVE_LIBSNDFILE1], [], [Define if we have libsndfile1.])
  AC_SUBST(SNDFILE_LIBS)
else
  sweep_config_ok="no"
  AC_CHECK_LIB(sndfile, sf_open, HAVE_LIBSNDFILE1="maybe")
fi

if test "x$HAVE_LIBSNDFILE1" = xmaybe ; then
  AC_CHECK_HEADERS(sndfile.h, HAVE_LIBSNDFILE1="ouch")
  if test "x$HAVE_LIBSNDFILE1" = xouch ; then
    AC_MSG_ERROR([
***
*** libsndfile-1.0.0 or greater seems to exist on your system, however
*** the pkg-config tool cannot find its build information.
***
*** Please set your PKG_CONFIG_PATH environment variable to include the
*** directory in which sndfile.pc was installed. For example, sndfile.pc
*** is installed in /usr/local/lib/pkgconfig by default; if that is the
*** case do:
***
***     export PKG_CONFIG_PATH="\$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
***
*** then run this ./configure again. If you configured libsndfile with a
*** different --prefix option, replace /usr/local above with that prefix.
***
])
  fi
fi

AC_CHECK_SIZEOF(off_t,1)


dnl
dnl Detect Ogg
dnl

HAVE_OGG=no
HAVE_VORBIS=no
HAVE_SPEEX=no

ac_enable_oggvorbis=yes
AC_ARG_ENABLE(oggvorbis,
     [  --disable-oggvorbis     disable Ogg Vorbis support],
     [ ac_enable_oggvorbis=no ], [ ac_enable_oggvorbis=yes ])

ac_enable_speex=yes
AC_ARG_ENABLE(speex,
     [  --disable-speex         disable Speex support],
     [ ac_enable_speex=no ], [ ac_enable_speex=yes ])

dnl Both Vorbis and Speex require Ogg, so check for it first either way
if test "x${ac_enable_oggvorbis}" != xno ||
   test "x${ac_enable_speex}" != xno ; then

  XIPH_PATH_OGG(HAVE_OGG="yes", HAVE_OGG="no")
  if test "x$HAVE_OGG" = xno ; then
    AC_CHECK_LIB(ogg, ogg_stream_init, HAVE_OGG="maybe")
  fi
  if test "x$HAVE_OGG" = xmaybe; then
    AC_CHECK_HEADER([ogg/ogg.h], HAVE_OGG="yes", HAVE_OGG="no")
  fi

  AC_SUBST(OGG_LIBS)
fi

dnl
dnl Detect Vorbis
dnl
dnl LIBS="$LIBS -lm -logg -lvorbis -lvorbisenc -lvorbisfile"

if test "x$HAVE_OGG" = xyes && test "x${ac_enable_oggvorbis}" != xno ; then

  XIPH_PATH_VORBIS(HAVE_VORBIS="yes", HAVE_VORBIS="no")

  dnl Fall back to explicit checks if this fails
  if test "x$HAVE_VORBIS" = xno ; then
    AC_MSG_RESULT([
*** Trying explicit detection of Ogg Vorbis libraries and headers ...])
    AC_CHECK_LIB(vorbis, vorbis_info_init, HAVE_VORBIS="maybe", ,
                 [-lm -logg])
    AC_CHECK_LIB(vorbisenc, vorbis_encode_init, HAVE_VORBISENC="maybe", ,
                 [-lm -logg -lvorbis])
    AC_CHECK_LIB(vorbisfile, ov_open, HAVE_VORBISFILE="maybe", ,
                 [-lm -logg -lvorbis])
    AC_CHECK_HEADERS([vorbis/codec.h vorbis/vorbisfile.h vorbis/vorbisenc.h],
                     HAVE_VORBIS_HEADERS="yes", HAVE_VORBIS_HEADERS="no")

    if test "x$HAVE_VORBIS" = xmaybe && test "x$HAVE_VORBISENC" = xmaybe &&
       test "x$HAVE_VORBISFILE" = xmaybe &&
       test "x$HAVE_VORBIS_HEADERS" = xyes ; then

       VORBIS_LIBS="-lvorbis -lm"
       VORBISFILE_LIBS="-lvorbisfile"
       VORBISENC_LIBS="-lvorbisenc"
       VORBIS_CFLAGS=""

       dnl HAVE_VORBIS="maybe"
       HAVE_VORBIS="yes"
    else
       HAVE_VORBIS="no"
    fi
  fi

  AC_SUBST(VORBIS_LIBS)
  AC_SUBST(VORBISENC_LIBS)
  AC_SUBST(VORBISFILE_LIBS)

  if test "x$HAVE_VORBIS" = xyes ; then
    AC_DEFINE([HAVE_OGGVORBIS], [], [Define if we have Ogg Vorbis.])

    dnl Test out ov_read_float
    AC_MSG_CHECKING([for deprecated ov_read_float() interface])

    ac_save_CFLAGS="$CFLAGS"
    ac_save_LIBS="$LIBS"
    CFLAGS="$CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
    LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS $VORBISFILE_LIBS"

    AC_TRY_COMPILE([#include <vorbis/codec.h>
                    #include <vorbis/vorbisfile.h> ],
                   [OggVorbis_File * vf; float ** pcm; int b;
                    ov_read_float (vf, &pcm, &b);],
		   [ AC_DEFINE([OV_READ_FLOAT_THREE_ARGS], [], [Define if ov_read_float takes 3 arguments.])
		     AC_MSG_RESULT(yes) ],
                   [ AC_MSG_RESULT(no) ])

    CFLAGS="$ac_save_CFLAGS"
    LIBS="$ac_save_LIBS"

  else
    sweep_config_ok="no"
  fi

else
  HAVE_VORBIS=disabled
fi

dnl
dnl Detect speex
dnl
dnl LIBS="$LIBS -lm -logg -lspeex"

if test "x$HAVE_OGG" = xyes && test "x${ac_enable_speex}" != xno ; then

  XIPH_PATH_SPEEX(HAVE_SPEEX="yes", HAVE_SPEEX="no")

  dnl Fall back to explicit checks if this fails
  if test "x$HAVE_SPEEX" = xno ; then
    AC_CHECK_LIB(speex, speex_encoder_init, HAVE_SPEEX="maybe", , [-lm -logg])
    if test "x$HAVE_SPEEX" = xmaybe; then
      AC_CHECK_HEADER(speex.h, HAVE_SPEEX="yes",
        [AC_CHECK_HEADER([speex/speex.h], HAVE_SPEEX="yes", HAVE_SPEEX="no")]
      )
    fi
  fi

  if test "x$HAVE_SPEEX" = xyes ; then
    AC_CHECK_HEADER([speex/speex.h],
                    AC_DEFINE(HAVE_SPEEX_SUBDIR, [1], [Define to 1 if speex headers are eg. <speex/speex.h>])
    )

    AC_DEFINE([HAVE_SPEEX], [], [Define if we have speex.])
    SPEEX_LIBS="-lspeex -lm"
    AC_SUBST(SPEEX_LIBS)
  fi

else
  HAVE_SPEEX=disabled
fi


dnl
dnl Detect libmad
dnl

HAVE_MAD=no

ac_enable_mad=yes
AC_ARG_ENABLE(mad,
     [  --disable-mad           disable libmad (MPEG audio loading) support],
     [ ac_enable_mad=no ], [ ac_enable_mad=yes ])

if test "x${ac_enable_mad}" != xno ; then
  AC_CHECK_LIB(mad, mad_decoder_init, HAVE_MAD="maybe")

  if test "x$HAVE_MAD" = xmaybe ; then
    AC_CHECK_HEADER(mad.h, HAVE_MAD="yes", HAVE_MAD="no")
  fi
  if test "x$HAVE_MAD" = xyes ; then
    AC_DEFINE([HAVE_MAD], [], [Define if we have mad.])
    MAD_LIBS="-lmad"
    AC_SUBST(MAD_LIBS)
  fi

else
  HAVE_MAD=disabled
fi

dnl
dnl Detect secret rabbit code
dnl

HAVE_LIBSAMPLERATE=no

ac_enable_src=yes
AC_ARG_ENABLE(src,
     [  --disable-src            enable secret rabbit code (libsamplerate)],
     [ ac_enable_src=no ], [ ac_enable_src=yes])

if test "x${ac_enable_src}" != xno ; then
  PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.9,
                    HAVE_LIBSAMPLERATE="yes", HAVE_LIBSAMPLERATE="no")

  if test "x$HAVE_LIBSAMPLERATE" = xyes ; then
    AC_DEFINE([HAVE_LIBSAMPLERATE], [], [Define if we have libsamplerate.])
    AC_SUBST(SAMPLERATE_LIBS)
  fi
else
  HAVE_LIBSAMPLERATE=disabled
fi


dnl
dnl Test for ALSA -- requires explicit enabling
dnl


ac_enable_alsa=yes
AC_ARG_ENABLE(alsa,
     [  --disable-alsa           Disable ALSA, and enable use of OSS],
     [ ac_enable_alsa=no ])

if test "x${ac_enable_alsa}" != xno ; then

  PKG_CHECK_MODULES(ALSA, alsa >= 1.0.0,
                  HAVE_ALSA="yes", sweep_config_ok="no")
  AC_SUBST(ALSA_CFLAGS)
  AC_SUBST(ALSA_LIBS)
  AC_DEFINE([DRIVER_ALSA], [], [Define if we have and want alsa.]) 
  if test "x$HAVE_ALSA" != xyes ; then
    AC_CHECK_LIB(asound, snd_seq_open, HAVE_ALSA="maybe", sweep_config_ok="no")
  fi	
  sweep_config_driver="ALSA"
fi

dnl Test for OSS
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
if test "x${ac_cv_header_sys_soundcard_h}" = xyes || \
  test "x${ac_cv_header_machine_soundcard_h}" = xyes; then
  if test "x$ac_enable_alsa" = xno ; then
    AC_DEFINE([DRIVER_OSS], [], [Define if we have and want OSS.])

    dnl Check for NetBSD's OSS compatability layer
    AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBS="$LIBS -lossaudio")

    sweep_config_driver="OSS"
  fi
fi

dnl Test for Solaris audio
case $host in
*-*-solaris*)
AC_CHECK_HEADERS(sys/audioio.h)
if test "x${ac_cv_header_sys_audioio_h}" = xyes; then
    AC_DEFINE([DRIVER_SOLARIS_AUDIO], [], [Define if we have and want the solaris audio driver.])
    sweep_config_driver="Solaris"
fi
;;
esac


dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = xNONE; then
  AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], "${ac_default_prefix}/${DATADIRNAME}/locale", [Define the PACKAGE_LOCALE_DIR.])
else
  AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], "${prefix}/${DATADIRNAME}/locale")
fi

 if test "x${datadir}" = 'x${prefix}/share'; then
   if test "x${prefix}" = xNONE; then
     PACKAGE_DATA_DIR='"${ac_default_prefix}/share/${PACKAGE}"'
   else
     PACKAGE_DATA_DIR='"${prefix}/share/${PACKAGE}"'
   fi
 else
   PACKAGE_DATA_DIR='"${datadir}/${PACKAGE}"'
 fi
AC_SUBST(PACKAGE_DATA_DIR)

dnl Set PACKAGE_PLUGIN_DIR in Makefiles and config.h.
PACKAGE_PLUGIN_DIR=$libdir/sweep
AC_SUBST(PACKAGE_PLUGIN_DIR)
if test "x${prefix}" = xNONE; then
  sweep_plugin_dir="${ac_default_prefix}/lib/${PACKAGE}"
else
  sweep_plugin_dir="${prefix}/lib/${PACKAGE}"
fi
AC_DEFINE_UNQUOTED([PACKAGE_PLUGIN_DIR], "$sweep_plugin_dir", [Define the PACKAGE_PLUGIN_DIR.])

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED([PACKAGE_SOURCE_DIR], "${packagesrcdir}", [Define the PACKAGE_SOURCE_DIR.])


AC_ARG_ENABLE(gcc-werror,
	AC_HELP_STRING([--enable-gcc-werror], [enable -Werror in all Makefiles]))

dnl Use -Wall if we have gcc.
dnl changequote(,)dnl
if test "x$ac_cv_prog_gcc" = xyes ; then
  CFLAGS="$CFLAGS -Wall"

  if test x$enable_gcc_werror = "xyes" ; then
    CFLAGS="$CFLAGS -Werror"
	fi

fi
dnl changequote([,])dnl

dnl - Modified from www.nagios.org who modified it from www.erlang.org 

dnl   Check how to export functions from the sweep executable, needed
dnl   when dynamically loaded drivers are loaded (so that they can find
dnl   sweep functions).
dnl   OS'es with ELF executables using the GNU linker (Linux and recent *BSD ,
dnl   in rare cases Solaris) typically need '-Wl,-export-dynamic' (i.e. pass
dnl   -export-dynamic to the linker - also known as -rdynamic and some other
dnl   variants); some sysVr4 system(s) instead need(s) '-Wl,-Bexport'.
dnl   AIX 4.x (perhaps only for x>=2) wants -Wl,-bexpall,-brtl and doesn't
dnl   reliably return an error for others, thus we separate it out.
dnl   Otherwise we assume that if the linker accepts the flag, it is needed.
      
       AC_MSG_CHECKING(for extra flags needed to export symbols)
       case $host_os in
               aix4*|aix5*)
                       EXPORT_DYNAMIC_FLAGS="-Wl,-bexpall,-brtl"
               ;;
               bsdi*)
                       EXPORT_DYNAMIC_FLAGS="-rdynamic"
               ;;
               *)
                       save_ldflags="$LDFLAGS"
                       LDFLAGS=-Wl,-export-dynamic
                       AC_TRY_LINK(,,[EXPORT_DYNAMIC_FLAGS="-Wl,-export-dynamic"], [
                               LDFLAGS=-Wl,-Bexport
                               AC_TRY_LINK(,,[EXPORT_DYNAMIC_FLAGS="- Wl,-Bexport"],
                                       AC_MSG_RESULT(none))])
                       LDFLAGS="$save_ldflags"
               ;;
       esac
       AC_SUBST(EXPORT_DYNAMIC_FLAGS)
       test "x$EXPORT_DYNAMIC_FLAGS" != x && AC_MSG_RESULT([$EXPORT_DYNAMIC_FLAGS])



dnl
dnl  Configuration tests complete -- provide summary of results.
dnl

if test $sweep_config_ok = no ; then

AC_MSG_RESULT([
**************************************************************

*** Sweep $VERSION: Automatic configuration FAILED.

*** The file config.log has full details.

*** The following required libraries are missing or
*** misconfigured on your system:
])

if test "x$HAVE_GLIB" != xyes || test "x$HAVE_GTHREADS" != xyes || test "x$HAVE_GMODULE" != xyes; then
  AC_MSG_RESULT([
*** GLib version 2.2.x or greater, available from  http://www.gtk.org/
])
fi

if test "x$HAVE_GLIB" = xmaybe || test "x$HAVE_GTHREADS" = xmaybe || test "x$HAVE_GMODULE" = xmaybe; then
  AC_MSG_RESULT([
      Development files missing: The libglib-2.0 binary seems
      to be installed, but the pkg-config tool cannot find its build
      information.
])
fi

if test "x$HAVE_GTK" != xyes ; then
  AC_MSG_RESULT([
*** GTK+ version 2.2.x or greater, available from  http://www.gtk.org/
])
fi
if test "x$HAVE_GTK" = xmaybe ; then
  AC_MSG_RESULT([
      Development files missing: The libgtk binary seems
      to be installed, but the pkg-config tool cannot find its build
      information..
])
fi

if test "x$HAVE_LIBSNDFILE1" != xyes ; then
  AC_MSG_RESULT([
*** libsndfile version 1.0.0 or greater, available from
*** http://www.mega-nerd.com/libsndfile/
])
fi
if test "x$HAVE_LIBSNDFILE1" = xmaybe ; then
    AC_MSG_RESULT([
      Development files missing: libsndfile-1.0.0 or greater
      seems to exist on your system, however the header files
      are missing and the pkg-config tool cannot find its build
      information.
])
fi

if test "x$HAVE_ALSA" = xmaybe ; then
    AC_MSG_RESULT([
      Development files missing: alsa-lib 1.0.0 or greater seems to exist
      on your system, however the pkg-config tool cannot find the
      build information.
])
fi

if test "x$HAVE_ALSA" != xyes ; then
  AC_MSG_RESULT([
*** alsa-lib version 1.0.0 or greater, available from
*** http://alsa-project.org/
])
fi

if test "x$HAVE_VORBIS" = xmaybe ; then
    AC_MSG_RESULT([
      Development files missing: The libogg, libvorbis, libvorbisenc and
      libvorbisfile library binaries seem to be installed, but building of
      a test program failed.
])
fi

if test "x$HAVE_VORBIS" != xyes ; then
    AC_MSG_RESULT([
*** Ogg Vorbis libraries, available from  http://www.xiph.org/ogg/vorbis/
])
fi

if test "x$HAVE_VORBIS" != xyes ; then
    AC_MSG_RESULT([
*** Or, to build a version of Sweep without Ogg Vorbis support, do:
***
***         ./configure --disable-oggvorbis
])
fi

if test "x$HAVE_GLIB" = xmaybe || test "x$HAVE_GTK" = xmaybe ||
   test "x$HAVE_LIBSNDFILE1" = xmaybe || test "x$HAVE_TDB" = xmaybe ||
   test "x$HAVE_GTHREADS" = xmaybe || test "x$HAVE_GMODULE" = xmaybe ||
   test "x$HAVE_ALSA" = xmaybe ||
   test "x$HAVE_OGG" = xmaybe || test "x$HAVE_VORBIS" = xmaybe ; then
  AC_MSG_RESULT([
*** HOW TO FIX "development files missing": you have probably
*** installed the library package from your distribution. You
*** must also install the library's "development" package.
])
fi

AC_MSG_RESULT([
*** If you install the required libraries from source, you
*** need to inform the dynamic linker of their location. If
*** you install them in a system-wide directory such as
*** /usr/local (the default), you must ensure that
*** /usr/local/lib is listed in /etc/ld.so.conf, then run
*** ldconfig to update the dynamic linking system.
*** Alternatively, you can set your LD_LIBRARY_PATH environment
*** variable to include the library installation directory.
])


AC_MSG_RESULT([
**************************************************************
])

AC_MSG_ERROR([
***
*** After fixing the above problems, you must run ./configure again.
***
])

else

AC_OUTPUT([
Makefile
sweep.spec
m4/Makefile
include/Makefile
include/sweep/Makefile
src/Makefile
src/tdb/Makefile
plugins/Makefile
plugins/echo/Makefile
plugins/normalise/Makefile
plugins/fade/Makefile
plugins/reverse/Makefile
plugins/ladspa/Makefile
plugins/byenergy/Makefile
plugins/example/Makefile
doc/Makefile
intl/Makefile
po/Makefile.in
doc/sweep.1
])

AC_MSG_RESULT([
  ************************************************************
 * Sweep $VERSION:  Automatic configuration OK.
**
**  Configuration summary:
**
**     Experimental code: ....... ${ac_enable_experimental}
**     Audio device handling: ... $sweep_config_driver
**     PCM: libsndfile .......... $HAVE_LIBSNDFILE1
**     Ogg Vorbis support: ...... $HAVE_VORBIS
**     MPEG (MP3) loading: ...... $HAVE_MAD
**     Speex support: ........... $HAVE_SPEEX
**     Secret Rabbit Code: ...... $HAVE_LIBSAMPLERATE
**     Translations: ............ $ALL_LINGUAS
**
**  Installation directories:
**
**     Program: ................. ${prefix}/bin
**     Plugins: ................. $sweep_plugin_dir
**
**************************************************************
**
**  Type 'make' to compile Sweep.
**
**  Type 'make install' to install Sweep. Plugins will not be
**  accessible until you have done this.
**  
**  Have fun with Scrubby!
 *
  ************************************************************
])

fi