summaryrefslogtreecommitdiffstats
path: root/configure.in
blob: 155603f959315ff14fcbde4765f45733ed7635de (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
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
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
dnl =======================================================
dnl FILE: ./admin/configure.in.min
dnl =======================================================

dnl    This file is part of the KDE libraries/packages
dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
 
dnl    This file is free software; you can redistribute it and/or
dnl    modify it under the terms of the GNU Library General Public
dnl    License as published by the Free Software Foundation; either
dnl    version 2 of the License, or (at your option) any later version.
 
dnl    This library is distributed in the hope that it will be useful,
dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl    Library General Public License for more details.
 
dnl    You should have received a copy of the GNU Library General Public License
dnl    along with this library; see the file COPYING.LIB.  If not, write to
dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
dnl    Boston, MA 02110-1301, USA.

# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas

dnl Process this file with autoconf to produce a configure script.

AC_INIT(acinclude.m4) dnl a source file from your sub dir

dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)

dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH

dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM 
dnl Perform program name transformation
AC_ARG_PROGRAM

dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(k3b-1.0.5, "3.5.9") dnl searches for some needed programs

KDE_SET_PREFIX

dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done

dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL

dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS

KDE_USE_QT(3.2)
AC_PATH_KDE
dnl =======================================================
dnl FILE: configure.in.in
dnl =======================================================

#MIN_CONFIG(3.2)
#AM_KDE_MIN_VERSION(3.4)

AC_CHECK_HEADERS(byteswap.h)

dnl - check the byte order -
dnl this will define WORDS_BIGENDIAN or do nothing
AC_C_BIGENDIAN()

AC_ARG_WITH(
	external-libsamplerate,
	[  --with-external-libsamplerate   use the libsamplerate provided by the system (default=yes)],
	[external_sampletrate=$withval], 
	[external_sampletrate=yes]
)

LIBSAMPLERATE=""

if test x$external_sampletrate != xno; then

dnl === check for libsamplerate ==========
KDE_CHECK_HEADERS(samplerate.h, [
	KDE_CHECK_LIB(samplerate, src_new, [
		LIBSAMPLERATE="-lsamplerate"	
		AC_DEFINE(HAVE_LIBSAMPLERATE,1,[defined if you have libsamplerate library and header])
	])
])

fi

AC_SUBST(LIBSAMPLERATE)
AM_CONDITIONAL(compile_libsamplerate, [test -z "$LIBSAMPLERATE"])


ARTS_LIBS=""
if test "x$build_arts" = "xyes"; then
	dnl Find aRts
	KDE_CHECK_HEADERS(artsc/artsc.h,
		[arts_available=yes
	 	 ARTS_LIBS="-lartsc"],
		[arts_available=no]
	)
fi
AC_SUBST(ARTS_LIBS)
AM_CONDITIONAL(include_arts, [test -n "$ARTS_LIBS"])
if test "x$build_arts" = "xyes" -a "x$arts_available" = "xyes"; then
	AC_DEFINE(WITH_ARTS,1,[defined if arts support is compiled in])
fi

KDE_CHECK_THREADING

compile_k3bsetup=yes
AC_ARG_WITH(
	k3bsetup, 
	[  --with-k3bsetup[=ARG]     do compile K3bSetup2 KControl Module (default=yes)],
	[compile_k3bsetup=$withval]
)

if test x$compile_k3bsetup = xyes; then
        AC_DEFINE(HAVE_K3BSETUP,1,[defined if K3bSetup is compiled])
fi

AM_CONDITIONAL(with_k3bsetup1, [test x$compile_k3bsetup = xyes])


cdrecord_suid_root=yes
AC_ARG_WITH(
	cdrecord-suid-root, 
	AS_HELP_STRING(
		[--without-cdrecord-suid-root], 
		[enable or disable K3b's suid root check for cdrecord/cdrdao/wodim (default=enabled)]),
	[cdrecord_suid_root=$withval], 
	[cdrecord_suid_root=yes]
)
if test x$cdrecord_suid_root = xyes; then
	AC_DEFINE(CDRECORD_SUID_ROOT_CHECK,1,[defined if K3b should check cdrecord for suid root])
fi


# Extra SCSI support libs can go in CAM_LIB, and are linked into
# libk3bdevice. For Linux, nothing is needed. FreeBSD requires -lcam
# (which is in base, so no test is needed).
case "$host_os" in
freebsd* | dragonfly*)
	CAM_LIB="-lcam"
	;;
*)
	CAM_LIB=""
	;;
esac
AC_SUBST(CAM_LIB)



dnl ---------- TAGLIB CHECK ----------

AC_DEFUN([AC_HAVE_TAGLIB],
[
    AC_DEFINE(HAVE_TAGLIB, 1, [have TagLib])
    taglib_includes=[`$TAGLIB_CONFIG --cflags`]
    taglib_libs=[`$TAGLIB_CONFIG --libs`]
    have_taglib=true
])

AC_DEFUN([AC_NO_TAGLIB],
[
    taglib_includes=""
    taglib_libs=""
    have_taglib=false
])

AC_PATH_PROG(TAGLIB_CONFIG, taglib-config, [no], [$PATH:$prefix/bin])
if test "x$TAGLIB_CONFIG" = "xno" ; then
    AC_NO_TAGLIB
else
    AC_HAVE_TAGLIB
fi

AC_SUBST(taglib_includes)
AC_SUBST(taglib_libs)

dnl ---------- END TAGLIB CHECK ----------



dnl ----------- TUNEPIMP/MUSICBRAINZ CHECK -----------

AC_ARG_WITH(
	musicbrainz, 
	AS_HELP_STRING(
		[--without-musicbrainz], 
		[build K3b without Musicbrainz support (default=no)]),
	[ac_cv_use_musicbrainz=$withval], 
	[ac_cv_use_musicbrainz=yes]
)

have_mb=false
MUSICBRAINZ_LIBS=""
if test "$ac_cv_use_musicbrainz" = "yes"; then
  KDE_CHECK_HEADER(musicbrainz/mb_c.h,
  [
	KDE_CHECK_LIB(musicbrainz,mb_New,[
        	AC_DEFINE(HAVE_MUSICBRAINZ, 1, [have MusicBrainz])
        	MUSICBRAINZ_LIBS="-lmusicbrainz"
		have_mb=true
        ])
  ], [])
fi
AC_SUBST(MUSICBRAINZ_LIBS)

dnl --------- TUNEPIMP/MUSICBRAINZ CHECK END -----------


dnl --------- K3b debugging stuff (only for developers) ----

AC_ARG_WITH(
	k3b-debug, 
	AS_HELP_STRING(
		[--with-k3b-debug], 
		[Enable additional K3b debugging output and functionality (default=no)]),
	[use_k3b_debug=$withval], 
	[use_k3b_debug=no]
)
if test "$use_k3b_debug" = "yes"; then
	AC_DEFINE(K3B_DEBUG, "1", [K3b additional debugging support])
fi

dnl --------------------------------------------------------




dnl --------------- libiconv check -------------------------

AC_CHECK_HEADERS(iconv.h)

dnl --------------------------------------------------------


#AC_DEFINE(LIBK3B_VERSION, "0.11.98", [k3b library version])
#AC_SUBST(LIBK3B_VERSION, 0.11.98)
#AC_CONFIG_FILES([k3b/libk3b/libk3b.pc])

KDE_ENABLE_HIDDEN_VISIBILITY
dnl =======================================================
dnl FILE: ./libk3b/configure.in.in
dnl =======================================================

AC_CHECK_FUNCS(stat64)
AC_CHECK_HEADERS(sys/vfs.h)
AC_CHECK_HEADERS(sys/statvfs.h)
dnl =======================================================
dnl FILE: ./libk3b/plugin/libsamplerate/configure.in.in
dnl =======================================================

LIBS="-lm $all_libraries"

AC_CHECK_DECL(lrint,
          AC_DEFINE(HAVE_LRINT,1,[Define if lrint is supported]),
          AC_DEFINE(HAVE_LRINT,0,[Define if lrint is not supported]),
          [#include <math.h>]
)

AC_CHECK_DECL(lrintf,
          AC_DEFINE(HAVE_LRINTF,1,[Define if lrintf is supported]),
          AC_DEFINE(HAVE_LRINTF,0,[Define if lrintf is not supported]),
          [#include <math.h>]
)
dnl =======================================================
dnl FILE: ./libk3b/videodvd/configure.in.in
dnl =======================================================

AC_ARG_WITH(
	libdvdread, 
	AS_HELP_STRING(
		[--without-libdvdread], 
		[build K3b without libdvdread (Video DVD ripping) support (default=no)]),
	[ac_cv_use_libdvdread=$withval], 
	[ac_cv_use_libdvdread=yes]
)

have_libdvdread=no
if test "$ac_cv_use_libdvdread" = "yes"; then
	KDE_CHECK_HEADERS(dvdread/dvd_reader.h, 
	[
		AC_CHECK_LIB(dvdread,
			DVDOpen,
			[
        	           AC_DEFINE(HAVE_LIBDVDREAD,1,[Defined if you have libdvdread headers and libs installed.])
	        	   have_libdvdread=yes
			]
		)
	])
fi
AM_CONDITIONAL(include_videodvdrip, [test x$have_libdvdread = xyes])

#if test "$have_libdvdread" = "no"; then
#   AC_MSG_ERROR([Could not find libdvdread. Please install.])
#   DO_NOT_COMPILE="$DO_NOT_COMPILE k3b"
#fi
dnl =======================================================
dnl FILE: ./libk3bdevice/configure.in.in
dnl =======================================================

dnl FIXME: only make the linux header check on linux systems.

linux_scsi=no
AC_MSG_CHECKING(for linux scsi headers)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
	#include <linux/version.h>
	#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,50)
	typedef unsigned char u8;
	#endif
	#include <sys/types.h>
	#include <linux/../scsi/scsi.h> /* cope with silly includes */
	],
	[],
	[linux_scsi=yes])
AC_MSG_RESULT($linux_scsi)

case "$host_os" in
freebsd*|dragonfly*)
	# I'll be damned if lousy coding prevents us from running
	# this application.
	linux_scsi=yes
	;;
esac

if test "x$linux_scsi" = "xno" ; then
	DO_NOT_COMPILE="$DO_NOT_COMPILE k3b"
fi
AC_LANG_RESTORE

dnl - find the cam_* functions
AC_CHECK_FUNC(cam_close_device,
	[CAM_LIB=""],
	[AC_CHECK_LIB(cam, cam_close_device, [CAM_LIB=-lcam], [CAM_LIB=""])]
	)
AC_SUBST(CAM_LIB)



dnl === check for resmgr - begin ============
AC_ARG_WITH(
	resmgr, 
	AS_HELP_STRING([--without-resmgr], [build K3b without ResMgr support (default=no)]), 
	[ac_cv_use_resmgr=$withval], 
	[ac_cv_use_resmgr=yes]
)

if test "$ac_cv_use_resmgr" = "yes"; then
  RESMGR_LIB=""
  KDE_CHECK_HEADERS(resmgr.h, [
         KDE_CHECK_LIB(resmgr,rsm_open_device,[
                 RESMGR_LIB="-lresmgr"
                 AC_DEFINE(HAVE_RESMGR,1,[defined if you have resmgr libraries and headers])
         ])
  ])
  AC_SUBST(RESMGR_LIB)
fi
dnl === check for resmgr - end ============





# HAL check from tdebase/kioslave/media

AC_ARG_WITH(
	hal, 
	AS_HELP_STRING(
		[--without-hal], 
		[build K3b without HAL support (default=no)]),
	[ac_cv_use_hal=$withval], 
	[ac_cv_use_hal=yes]
)

if test "x$ac_cv_use_hal" = "xyes" ; then

########### Check for the HAL

  AC_MSG_CHECKING(for the HAL)

  hal_inc=NOTFOUND
  hal_lib=NOTFOUND
  hal=NOTFOUND

  search_incs="$kde_includes /usr/include /usr/include/hal /usr/local/include /usr/local/include/hal"
  AC_FIND_FILE(libhal.h libhal-storage.h, $search_incs, hal_incdir)

  if [test -r $hal_incdir/libhal.h] ; then
    HAL_INCS="-I$hal_incdir"
    hal_inc=FOUND
  fi

  if test -r $hal_incdir/libhal-storage.h ; then
    hal_storage_version=4
    grep LibHalVolume $hal_incdir/libhal-storage.h \
    > /dev/null 2>&1 && hal_storage_version=5
    if test $hal_storage_version = 4 ; then
      AC_DEFINE(HAL_0_4, , [HAL API version 0.4])
    fi
  fi

  search_libs="$kde_libraries /usr/lib64 /usr/lib /usr/local/lib /lib /lib64"
  AC_FIND_FILE(libhal.so, $search_libs, hal_libdir)

  if [test -r $hal_libdir/libhal.so] ; then
    HAL_LIBS="-L$hal_libdir -lhal"
    hal_lib=FOUND
  fi


  if [test $hal_inc = FOUND] && [test $hal_lib = FOUND] ; then
      AC_MSG_RESULT(headers $hal_incdir  libraries $hal_libdir)
  	hal=FOUND
  else
      AC_MSG_RESULT(searched but not found)
  fi

  AC_SUBST(HAL_INCS)
  AC_SUBST(HAL_LIBS)


########### Check for DBus

  AC_MSG_CHECKING(for DBus)

  dbus_inc=NOTFOUND
  dbus_lib=NOTFOUND
  dbus=NOTFOUND

  search_incs="$kde_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
  AC_FIND_FILE(dbus/dbus.h, $search_incs, dbus_incdir)

  search_incs_arch_deps="$kde_includes /usr/lib64/dbus-1.0/include /usr/lib/dbus-1.0/include /usr/local/lib/dbus-1.0/include"
  AC_FIND_FILE(dbus/dbus-arch-deps.h, $search_incs_arch_deps, dbus_incdir_arch_deps)

  if [test -r $dbus_incdir/dbus/dbus.h] && [test -r $dbus_incdir_arch_deps/dbus/dbus-arch-deps.h] ; then
    DBUS_INCS="-I$dbus_incdir -I$dbus_incdir_arch_deps"
    dbus_inc=FOUND
  fi

  search_libs="$kde_libraries /usr/lib64 /usr/lib /usr/local/lib /lib /lib64"
  AC_FIND_FILE(libdbus-1.so, $search_libs, dbus_libdir)

  if test -r $dbus_libdir/libdbus-1.so ; then
    DBUS_LIBS="-L$dbus_libdir -ldbus-1"
    dbus_lib=FOUND
  fi

  if [test $dbus_inc = FOUND] && [test $dbus_lib = FOUND] ; then
    AC_MSG_RESULT(headers $dbus_incdir $dbus_incdir_arch_deps  libraries $dbus_libdir)
    dbus=FOUND
  else
    AC_MSG_RESULT(searched but not found)
  fi

  AC_SUBST(DBUS_INCS)
  AC_SUBST(DBUS_LIBS)

########### Check for DBus-Qt bindings

  AC_MSG_CHECKING(for DBus-Qt bindings)

  dbusqt_inc=NOTFOUND
  dbusqt_lib=NOTFOUND
  dbusqt=NOTFOUND

  search_incs="$kde_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
  AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)

  if test -r $dbusqt_incdir/dbus/connection.h ; then
    have_qt_patch=0
    grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
    > /dev/null 2>&1 && have_qt_patch=1
    if test $have_qt_patch = 1 ; then
      DBUSQT_INCS="-I$dbusqt_incdir"
      dbusqt_inc=FOUND
    fi
  fi

  search_libs="$kde_libraries /usr/lib /usr/lib64 /usr/local/lib"
  AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)

  if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
    DBUSQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
    dbusqt_lib=FOUND
  fi

  if [test $dbusqt_inc = FOUND] && [test $dbusqt_lib = FOUND] ; then
    AC_MSG_RESULT(headers $dbusqt_incdir libraries $dbusqt_libdir)
    dbusqt=FOUND
  else
    AC_MSG_RESULT(searched but not found)
  fi

  AC_SUBST(DBUSQT_INCS)
  AC_SUBST(DBUSQT_LIBS)
fi

########### Check if media HAL backend sould be compiled

have_hal=no
HAL_DBUS_LIBS=""
if [test "x$hal" = "xFOUND"] && [test "x$dbus" = "xFOUND"] && [test "x$dbusqt" = "xFOUND"] && [ test $hal_storage_version = 5 ] ; then
  AC_DEFINE(HAVE_HAL, , [compile in HAL support])
  have_hal=yes
  HAL_DBUS_LIBS="$HAL_LIBS $DBUS_LIBS $DBUSQT_LIBS"
fi

AM_CONDITIONAL(include_HAL, [test x$have_hal = xyes])
AC_SUBST(HAL_DBUS_LIBS)

dnl =======================================================
dnl FILE: ./plugins/audiooutput/alsa/configure.in.in
dnl =======================================================

dnl --------- ALSA CHECK BEGIN -------------

AC_DEFUN([KDE_CHECK_ALSA],
[
  PKG_CHECK_MODULES([ALSA], [alsa >= 0.9], [have_alsa=yes], [have_alsa=no])
  AC_SUBST([ALSA_CFLAGS])
  AC_SUBST([ALSA_LIBS])
])

AC_ARG_WITH(alsa,
  [AS_HELP_STRING(--with-alsa,
    [enable support for ALSA output @<:@default=check@:>@])],
  [], with_alsa=check)

have_alsa=no
if test "x$with_alsa" != xno; then
  KDE_CHECK_ALSA

  if test "x$with_alsa" != xcheck && test "x$have_alsa" != xyes; then
    AC_MSG_FAILURE([--with-alsa was given, but test for ALSA failed])
  fi
fi

AM_CONDITIONAL(include_ALSA, [test "x$have_alsa" = "xyes"])

dnl --------- ALSA CHECK END ---------------
dnl =======================================================
dnl FILE: ./plugins/decoder/ffmpeg/configure.in.in
dnl =======================================================

dnl --------------- FFMPEG CHECK ---------------------------------

AC_ARG_WITH(
	ffmpeg, 
	AS_HELP_STRING(
		[--without-ffmpeg], 
		[build K3b without ffmpeg audio decoder support (default=no)]),
	[ac_cv_use_ffmpeg=$withval], 
	[ac_cv_use_ffmpeg=yes]
)

#
# The ffmpeg decoder plugin needs ffmpeg 0.4.9 or higher
#
have_ffmpeg=no
if test "$ac_cv_use_ffmpeg" = "yes"; then
	k3b_cxxflags_save="$CXXFLAGS"
	CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
	AC_MSG_CHECKING(for ffmpeg >= 0.4.9)
	AC_LANG_SAVE
	AC_LANG_CPLUSPLUS
	AC_COMPILE_IFELSE( 
		extern "C" {
		#include <libavformat/avformat.h>
		#include <libavcodec/avcodec.h>
		}

		int main() {
		  AVFormatContext* fc = 0;
		  AVPacket* p = 0;
		  av_register_all();
		  return av_read_frame( fc, p );
		},
	[ffmpeg_compiles=yes], [ffmpeg_compiles=no] )
	OLD_LIBS=$LIBS
	LIBS="-lavformat -lavcodec $LIBS"
	AC_LINK_IFELSE( 
		extern "C" {
		#include <libavformat/avformat.h>
		#include <libavcodec/avcodec.h>
		}

		int main() {
		  AVFormatContext* fc = 0;
		  AVPacket* p = 0;
		  av_register_all();
		  return av_read_frame( fc, p );
		},
	[ffmpeg_links=yes], [ffmpeg_links=no] )
	AC_LANG_RESTORE
	LIBS=$OLD_LIBS
	have_ffmpeg=$ffmpeg_links
	AC_MSG_RESULT($have_ffmpeg)
	CXXFLAGS=$k3b_cxxflags_save
fi
AM_CONDITIONAL(include_FFMPEG, [test x$have_ffmpeg = xyes])

dnl --------------- FFMPEG CHECK END ------------------------------

AC_ARG_ENABLE(
	ffmpeg-all-codecs, 
	AS_HELP_STRING(
		[--enable-ffmpeg-all-codecs], 
		[Build K3b's ffmeg decoder plugin with all audio codecs enabled (default=disabled)]),
	[AC_DEFINE(K3B_FFMPEG_ALL_CODECS, 1, [Defined if all ffmpeg codecs should be allowed])
	 enable_ffmpeg_all_codecs=yes], 
	[enable_ffmpeg_all_codecs=no]
)
dnl =======================================================
dnl FILE: ./plugins/decoder/flac/configure.in.in
dnl =======================================================

dnl === test for FLAC++ and FLAC - begin ====
AC_ARG_WITH(
	flac, 
	AS_HELP_STRING([--without-flac], [build K3b without FLAC support (default=no)]), 
	[ac_cv_use_flac=$withval], 
	[ac_cv_use_flac=yes]
)

have_flac=no
if test "$ac_cv_use_flac" = "yes"; then
  KDE_CHECK_HEADERS(FLAC++/decoder.h, [
     AC_CHECK_LIB(FLAC,FLAC__stream_decoder_process_single,
	        have_flac=yes,[],$all_libraries)])

    AC_MSG_CHECKING(for libFLAC newer than 1.1.1)
    AC_CACHE_VAL(k3b_flac_new,
    [
	AC_LANG_SAVE
	AC_LANG_CPLUSPLUS
	AC_TRY_COMPILE(
	[
		#include <FLAC++/metadata.h>
	], [
		FLAC::Metadata::VorbisComment* vc;
		vc->get_vendor_string().get_field();
	], k3b_flac_new=no, k3b_flac_new=yes )
	AC_LANG_RESTORE
    ])
    AC_MSG_RESULT($k3b_flac_new)
    if test $k3b_flac_new = yes; then
	AC_DEFINE(FLAC_NEWER_THAN_1_1_1, 
		1,
		[Define to 1 if your flac library's version is newer than or equal to 1.1.2]
	)
    fi
else
    have_flac=no
fi

AM_CONDITIONAL(include_FLAC, [test x$have_flac = xyes])
dnl === test for FLAC++ and FLAC - end ====
dnl =======================================================
dnl FILE: ./plugins/decoder/libsndfile/configure.in.in
dnl =======================================================

dnl === test for libsndfile - begin ===
dnl
dnl Don't use PKG_CHECK, since if there is no pkg-config installed,
dnl then there is no auto* magic for it either.
dnl
dnl Tests copied from tdebase/kioslave/thumbnail/
dnl
if test -z "$PKG_CONFIG"; then
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi

AC_ARG_WITH(
	sndfile, 
	AS_HELP_STRING([--without-sndfile], 
	[build K3b without libsndfile support (default=no)]), 
	[ac_cv_use_sndfile=$withval], 
	[ac_cv_use_sndfile=yes]
)

if test "$ac_cv_use_sndfile" = "yes"; then
  SNDFILE_CFLAGS=""
  SNDFILE_LIBS=""
  if test "$PKG_CONFIG" = "no" ; then
      ac_cv_sndfile=0
      echo "*** The pkg-config script could not be found. Make sure it is"
      echo "*** in your path, or set the PKG_CONFIG environment variable"
      echo "*** to the full path to pkg-config."
      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
      if !(`$PKG_CONFIG --exists sndfile`) ; then
          echo "*** sndfile is not installed."
          ac_cv_sndfile=0
      else
          if !(`$PKG_CONFIG --atleast-version="1.0.2" sndfile`) ; then
              echo "*** You need at least version 1.0.2 of sndfile."
              ac_cv_sndfile=0
          else
              ac_cv_sndfile=1
              SNDFILE_CFLAGS=`$PKG_CONFIG --cflags sndfile`
              SNDFILE_LIBS=`$PKG_CONFIG --libs sndfile`
          fi
      fi
  fi

  AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile},
  			[Set to 1 if you have libsndfile.])
  AC_SUBST(SNDFILE_CFLAGS)
  AC_SUBST(SNDFILE_LIBS)
fi

AM_CONDITIONAL(include_AIFF, [test x$ac_cv_sndfile = x1])
dnl === test for libsndfile - end ===
dnl =======================================================
dnl FILE: ./plugins/decoder/mp3/configure.in.in
dnl =======================================================

dnl === libmad MPEG decoder check - begin ===
AC_ARG_WITH(
	libmad, 
	AS_HELP_STRING([--without-libmad], [build K3b without libmad support (default=no)]), 
	[ac_cv_use_libmad=$withval], 
	[ac_cv_use_libmad=yes]
)

if test "$ac_cv_use_libmad" = "yes"; then
  MAD_LIB=""
  KDE_CHECK_HEADER(mad.h, [
	AC_CHECK_LIB(mad, mad_synth_frame, [
		MAD_LIB="-lmad"
		AC_DEFINE(HAVE_LIBMAD,1,[defined if you have libmad headers and libraries])],
		[],
		$all_libraries
	)
  ])
  AC_SUBST(MAD_LIB)

fi

AM_CONDITIONAL(include_MP3, [test -n "$MAD_LIB"])
dnl === libmad MPeg decoder check - end ===
dnl =======================================================
dnl FILE: ./plugins/decoder/musepack/configure.in.in
dnl =======================================================

dnl --------- MUSEPACK CHECK ---------------

AC_ARG_WITH(
	musepack, 
	AS_HELP_STRING(
		[--without-musepack], 
		[build K3b without Musepack audio support (default=no)]),
	[ac_cv_use_mpc=$withval], 
	[ac_cv_use_mpc=yes]
)

have_mpc=no
if test "$ac_cv_use_mpc" = "yes"; then

  dnl - search for both the new and the old naming -

  KDE_CHECK_HEADERS(mpcdec/mpcdec.h, [
  	AC_CHECK_LIB(mpcdec, mpc_decoder_setup, [
  		have_mpc=yes
		MPC_LIBS="-lmpcdec"
		AC_DEFINE(
			MPC_HEADER_FILE, 
			<mpcdec/mpcdec.h>, 
			[The header to include for MPC decoding.])
		],
		[], [], [])
  ])

  if test "$have_mpc" = "no"; then
    KDE_CHECK_HEADERS(mpc/mpcdec.h, [
        AC_CHECK_LIB(mpcdec, mpc_decoder_setup, [
                have_mpc=yes
                MPC_LIBS="-lmpcdec"
                AC_DEFINE(
                        MPC_HEADER_FILE,
                        <mpc/mpcdec.h>,
                        [The header to include for MPC decoding.])
                ],
                [], [], [])
    ])
  fi
	
  if test "$have_mpc" = "no"; then
    KDE_CHECK_HEADERS(musepack/musepack.h, [
    	  AC_CHECK_LIB(musepack, mpc_decoder_setup, [
  		  have_mpc=yes
		  MPC_LIBS="-lmusepack"
		  AC_DEFINE(
			  MPC_HEADER_FILE, 
			  <musepack/musepack.h>, 
			  [The header to include for MPC decoding.]
		  )
		  AC_DEFINE(
			  mpc_bool_t,
			  BOOL,
			  [backwards compatibility stuff]
		  )
  		  ], [], [])
    ])
  fi
fi
AC_SUBST(MPC_LIBS)

AM_CONDITIONAL(include_MPC, [test x$have_mpc = xyes])

dnl --------- MUSEPACK CHECK END -----------
dnl =======================================================
dnl FILE: ./plugins/decoder/ogg/configure.in.in
dnl =======================================================

dnl === Ogg Vorbis Test - Begin ===
AC_ARG_WITH(
	oggvorbis, 
	AS_HELP_STRING([--without-oggvorbis], [build K3b without OggVorbis support (default=no)]), 
	[ac_cv_use_oggvorbis=$withval], 
	[ac_cv_use_oggvorbis=yes]
)

if test "$ac_cv_use_oggvorbis" = "yes"; then

  AC_MSG_CHECKING(for ogg/vorbis headers)
  ogg_vorbis=no
  AC_TRY_COMPILE([
  		#include <vorbis/codec.h>
  		#include <vorbis/vorbisfile.h>
                ],[
                ],[
                ogg_vorbis=yes
                ])
  AC_MSG_RESULT($ogg_vorbis)
  if test x$ogg_vorbis = xyes; then
     dnl we need the ogg_vorbis_lib because otherwise we override LIBS !
     AC_CHECK_LIB(vorbisfile,ov_open,ogg_vorbis_lib=yes,
                  ogg_vorbis=no,[$all_libraries -lvorbisfile -lvorbis -logg])
  fi
  if test x$ogg_vorbis = xyes; then
	AC_DEFINE(OGG_VORBIS,1,[Define if you have ogg/vorbis installed])
  fi
fi

AM_CONDITIONAL(include_OGG, [test x$ogg_vorbis = xyes])
dnl === Ogg Vorbis Test - End ===
dnl =======================================================
dnl FILE: ./plugins/encoder/lame/configure.in.in
dnl =======================================================

dnl === test for LAME - begin ====
AC_ARG_WITH(
	lame, 
	AS_HELP_STRING([--without-lame], [build K3b without LAME support (default=no)]), 
	[ac_cv_use_lame=$withval], 
	[ac_cv_use_lame=yes]
)

have_lame=no
if test "$ac_cv_use_lame" = "yes"; then
  KDE_CHECK_HEADERS(lame/lame.h, [
  	AC_CHECK_LIB(mp3lame, lame_init, [
  		have_lame=yes
  		AC_DEFINE(HAVE_LAME,1,[defined if you have the lame header and lib])
  		], [], $all_libraries -lm)
  ])
fi

AM_CONDITIONAL(include_LAME, [test x$have_lame = xyes])
dnl === test for LAME - end ====
dnl =======================================================
dnl FILE: ./src/fastscale/configure.in.in
dnl =======================================================

#
# Imlib/Mosfet scaling
#
AM_PROG_AS

# MMX test duped from tdelibs/tdefx - it should be probably moved to admin/
dnl -----------------------------------------------------
dnl IA32 checks
dnl -----------------------------------------------------

gv_asm_defs=
case $host_cpu in
  i*86 )
  AC_MSG_CHECKING(for assembler support for IA32 extensions)
 
  dnl MMX check
  AC_TRY_COMPILE(, [ __asm__("pxor %mm0, %mm0") ],
  [
    echo $ECHO_N "MMX yes$ECHO_C"
    AC_DEFINE_UNQUOTED(HAVE_X86_MMX, 1, [Define to 1 if the assembler supports MMX instructions.])
    gv_asm_defs="$gv_asm_defs -DHAVE_X86_MMX"
  ], [ echo $ECHO_N "MMX no$ECHO_C" ])

  dnl SSE check
  AC_TRY_COMPILE(,[ __asm__("xorps %xmm0, %xmm0") ],
  [
    echo $ECHO_N ", SSE yes$ECHO_C"
    AC_DEFINE_UNQUOTED(HAVE_X86_SSE, 1, [Define to 1 if the assembler supports SSE instructions.])
    gv_asm_defs="$gv_asm_defs -DHAVE_X86_SSE"
  ], [ echo $ECHO_N ", SSE no$ECHO_C" ])

  dnl SSE2 check
  AC_TRY_COMPILE(, [ __asm__("xorpd %xmm0, %xmm0") ],
  [
    echo $ECHO_N ", SSE2 yes$ECHO_C"
    AC_DEFINE_UNQUOTED(HAVE_X86_SSE2, 1, [Define to 1 if the assembler supports SSE2 instructions.])
    gv_asm_defs="$gv_asm_defs -DHAVE_X86_SSE2"
  ], [ echo $ECHO_N ", SSE2 no$ECHO_C" ])
 
  dnl 3DNOW check
  AC_TRY_COMPILE(, [ __asm__("femms") ],
  [
    echo $ECHO_N ", 3DNOW yes$ECHO_C"
    AC_DEFINE_UNQUOTED(HAVE_X86_3DNOW, 1, [Define to 1 if the assembler supports 3DNOW instructions.])
    gv_asm_defs="$gv_asm_defs -DHAVE_X86_3DNOW"
  ], [ echo $ECHO_N ", 3DNOW no$ECHO_C" ])
  echo
  ;;
  powerpc )
  AC_MSG_CHECKING(for assembler support for AltiVec instructions)
  dnl AltiVec check
  AC_TRY_COMPILE(, [ __asm__("mtspr 256, %0\n\t" "vand %%v0, %%v0, %%v0" : : "r"(-1) ) ],
  [
    echo $ECHO_N " yes$ECHO_C"
    AC_DEFINE_UNQUOTED(HAVE_PPC_ALTIVEC, 1, [Define to 1 if the assembler supports AltiVec instructions.])
    gv_asm_defs="$gv_asm_defs -DHAVE_PPC_ALTIVEC"
  ], [ echo $ECHO_N ", AltiVec no$ECHO_C" ])
  echo
  ;;
esac

GV_ASM_DEFS="$gv_asm_defs"
AC_SUBST(GV_ASM_DEFS)
KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ k3bsetup/Makefile ])
AC_CONFIG_FILES([ kfile-plugins/Makefile ])
AC_CONFIG_FILES([ kfile-plugins/k3bproject/Makefile ])
AC_CONFIG_FILES([ kioslaves/Makefile ])
AC_CONFIG_FILES([ kioslaves/videodvd/Makefile ])
AC_CONFIG_FILES([ libk3b/Makefile ])
AC_CONFIG_FILES([ libk3b/cddb/Makefile ])
AC_CONFIG_FILES([ libk3b/core/Makefile ])
AC_CONFIG_FILES([ libk3b/jobs/Makefile ])
AC_CONFIG_FILES([ libk3b/plugin/Makefile ])
AC_CONFIG_FILES([ libk3b/plugin/libsamplerate/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/audiocd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/datacd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/datadvd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/mixedcd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/movixcd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/movixdvd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/videocd/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/videocd/cdi/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/videocd/extra/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/videocd/mpeginfo/Makefile ])
AC_CONFIG_FILES([ libk3b/projects/videodvd/Makefile ])
AC_CONFIG_FILES([ libk3b/scripts/Makefile ])
AC_CONFIG_FILES([ libk3b/tools/Makefile ])
AC_CONFIG_FILES([ libk3b/tools/libisofs/Makefile ])
AC_CONFIG_FILES([ libk3b/videodvd/Makefile ])
AC_CONFIG_FILES([ libk3bdevice/Makefile ])
AC_CONFIG_FILES([ plugins/Makefile ])
AC_CONFIG_FILES([ plugins/audiooutput/Makefile ])
AC_CONFIG_FILES([ plugins/audiooutput/alsa/Makefile ])
AC_CONFIG_FILES([ plugins/audiooutput/arts/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/ffmpeg/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/flac/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/libsndfile/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/mp3/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/musepack/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/ogg/Makefile ])
AC_CONFIG_FILES([ plugins/decoder/wave/Makefile ])
AC_CONFIG_FILES([ plugins/encoder/Makefile ])
AC_CONFIG_FILES([ plugins/encoder/external/Makefile ])
AC_CONFIG_FILES([ plugins/encoder/lame/Makefile ])
AC_CONFIG_FILES([ plugins/encoder/ogg/Makefile ])
AC_CONFIG_FILES([ plugins/encoder/sox/Makefile ])
AC_CONFIG_FILES([ plugins/project/Makefile ])
AC_CONFIG_FILES([ plugins/project/audiometainforenamer/Makefile ])
AC_CONFIG_FILES([ plugins/project/audioprojectcddb/Makefile ])
AC_CONFIG_FILES([ src/Makefile ])
AC_CONFIG_FILES([ src/fastscale/Makefile ])
AC_CONFIG_FILES([ src/icons/Makefile ])
AC_CONFIG_FILES([ src/icons/actions/Makefile ])
AC_CONFIG_FILES([ src/konqi/Makefile ])
AC_CONFIG_FILES([ src/mimetypes/Makefile ])
AC_CONFIG_FILES([ src/misc/Makefile ])
AC_CONFIG_FILES([ src/option/Makefile ])
AC_CONFIG_FILES([ src/pics/Makefile ])
AC_CONFIG_FILES([ src/pics/73lab/Makefile ])
AC_CONFIG_FILES([ src/pics/RobsTheme/Makefile ])
AC_CONFIG_FILES([ src/pics/crystal/Makefile ])
AC_CONFIG_FILES([ src/pics/quant/Makefile ])
AC_CONFIG_FILES([ src/projects/Makefile ])
AC_CONFIG_FILES([ src/projects/kostore/Makefile ])
AC_CONFIG_FILES([ src/rip/Makefile ])
AC_CONFIG_FILES([ src/rip/videodvd/Makefile ])
AC_CONFIG_FILES([ src/sounds/Makefile ])
AC_OUTPUT
echo ""

echo "K3b - Include libdvdread (Video DVD ripping) support:"
if test "$have_libdvdread" = "yes"; then
	echo "K3b -                                        yes"
else
	echo "K3b -                                        no"
	if test "$ac_cv_use_libdvdread" = "yes"; then
		echo "K3b -     You are missing the libdvdread library."
	fi
fi
echo ""

if test -n "$RESMGR_LIB"; then
	echo "K3b - Resmgr support:                        yes"
else
	echo "K3b - Resmgr support:                         no"
fi

echo ""


if test x$have_hal = xyes; then
	echo "K3b - Compile HAL support                    yes"
else
	echo "K3b - Compile HAL support                     no"
if test "x$ac_cv_use_hal" = "xyes" ; then
	echo "K3b -     You are missing the HAL >= 0.5 headers and libraries"
	echo "K3b -     or the DBus Qt bindings."
fi
fi
echo ""

if test "x$have_alsa" = xyes; then
	echo "K3b - Audioplayer available (alsa)           yes"
else
	echo "K3b - Audioplayer available (alsa)            no"
fi
echo ""

echo "K3b - FFMpeg decoder plugin (decodes wma and others):"
if test  x$have_ffmpeg = xyes; then
        echo "K3b -                                        yes"
	if test x$enable_ffmpeg_all_codecs = xyes; then
		echo "K3b -     WARNING: You enabled all codecs in the ffmpeg decoder plugin."
		echo "K3b -              Be aware that most are not tested and track lengths"
		echo "K3b -              will be wrong in many cases."
	fi
else
        echo "K3b -                                         no"
if test "$ac_cv_use_ffmpeg" = "yes"; then
	if test "$ffmpeg_compiles" = "yes"; then
		echo "K3b -     You are missing the ffmpeg libraries."
		echo "K3b -     Make sure ffmpeg has been configured as a"
		echo "K3b -     shared library (which is not the default)."
	else
		echo "K3b -     You are missing the ffmpeg headers and libraries"
		echo "K3b -     version 0.4.9 or higher."
	fi
	echo "K3b -     The ffmpeg audio decoding plugin (decodes wma and"
	echo "K3b -     others) won't be compiled."
fi
fi
echo ""

if test x$have_flac = xyes; then
	echo "K3b - FLAC support:                          yes"
else
	echo "K3b - FLAC support:                           no"
if test "$ac_cv_use_flac" = "yes"; then
	if test "$have_flac" = "no"; then
		echo "K3b -     You are missing the FLAC++ headers and libraries."
		echo "K3b -     The FLAC decoding plugin won't be compiled."
	fi
fi
fi
echo ""

if $av_cv_sndfile; then
	echo "K3b - libsndfile audio decoding support:     yes"
else
	echo "K3b - libsndfile audio decoding support:      no"
if test "$ac_cv_use_sndfile" = "yes"; then
	echo "K3b -     You are missing the libsndfile headers and libraries."
	echo "K3b -     The libsndfile audio decoding plugin won't be compiled."
fi
fi
echo ""

if test -n "$MAD_LIB"; then
	echo "K3b - Mp3 decoding support (libmad):         yes"
else
	echo "K3b - Mp3 decoding support (libmad):          no"
if test "$ac_cv_use_libmad" = "yes"; then
	echo "K3b -     You are missing the libmad headers and libraries."
	echo "K3b -     The Mp3 decoding plugin won't be compiled."
fi
fi
echo ""

if test x$have_mpc = xyes; then
	echo "K3b - Musepack support:                      yes"
else
	echo "K3b - Musepack support:                       no"
if test "$ac_cv_use_mpc" = "yes"; then
	echo "K3b -     You are missing the Musepack headers and libraries >= 1.1."
	echo "K3b -     The Musepack audio decoding plugin won't be compiled."
fi
fi

echo ""

if test x$ogg_vorbis = xyes; then
	echo "K3b - Ogg Vorbis support:                    yes"
else
	echo "K3b - Ogg Vorbis support:                     no"
if test "$ac_cv_use_oggvorbis" = "yes"; then
	echo "K3b -     You are missing the Ogg-Vorbis headers and libraries."
	echo "K3b -     The Ogg Vorbis decoding and encoding plugins won't be compiled."
fi
fi
echo ""

if test x$have_lame = xyes; then
	echo "K3b - Lame Mp3 encoder plugin:               yes"
else
	echo "K3b - Lame Mp3 encoder plugin                 no"
if test "$ac_cv_use_lame" = "yes"; then
	echo "K3b -     You are missing the Lame headers and libraries."
	echo "K3b -     The Lame Mp3 encoding plugin won't be compiled."
fi
fi
echo ""

if test "$use_k3b_debug" = "yes"; then
	echo 	""
	echo	"K3b - K3B DEBUGGING ENABLED! THIS ENABLES ADDITIONAL DEBUGGING OUTPUT"
	echo	"K3b - AND FUNCTIONALITY WHICH IS ONLY INTENDED FOR K3B DEVELOPERS!"
	echo	"K3b - THIS MAY EVEN SLOW DOWN K3B IN SOME PLACES!"
	echo 	""
fi

if test "$cdrecord_suid_root" != "yes"; then
	echo    ""
	echo    "K3b - Suid root test for cdrecord, cdrdao, and wodim deactivated"
	echo    "K3b - This is NOT recommended although it might work out fine ;)"
	echo    ""
fi

if $have_taglib; then
	echo "K3b - Audio meta data reading with Taglib:   yes"
else
	echo "K3b - Audio meta data reading with Taglib:    no"
	echo "K3b -     You are missing the Taglib headers and libraries."
	echo "K3b -     The mp3 and flac decoder plugins will fall back to"
	echo "K3b -     using KMetaFileInfo."
fi

echo ""

echo "K3b - Audio resampling:"
if test -n "$LIBSAMPLERATE"; then
	echo "K3b -                    using installed version"
else
        echo "K3b -             using version bundled with K3b"
fi

echo ""

if test x$arts_available = xyes; then
	echo "K3b - Audioplayer available (aRts)           yes"
else
	echo "K3b - Audioplayer available (aRts)            no"
fi

echo ""

if test x$compile_k3bsetup = xyes; then
	echo "K3b - Compile K3bSetup 2:                    yes"
else
	echo "K3b - Compile K3bSetup 2:                     no"
fi

echo ""

if $have_mb; then
	echo "K3b - Tag guessing using MusicBrainz         yes"
else
	echo "K3b - Tag guessing using MusicBrainz          no"
if test "$ac_cv_use_musicbrainz" = "yes"; then
	echo "K3b -     You are missing the musicbrainz headers and libraries."
	echo "K3b -     K3b will be compiled without support for tag guessing."
fi
fi
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
  # And if so, warn when they don't match
  if test "$kde_libs_prefix" != "$given_prefix"; then
    # And if kde doesn't know about the prefix yet
    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
    if test $? -ne 0; then
      echo ""
      echo "Warning: you chose to install this package in $given_prefix,"
      echo "but KDE was found in $kde_libs_prefix."
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
      echo "that TDEDIRS contains it, e.g. export TDEDIRS=$given_prefix:$kde_libs_prefix"
      echo "Then restart KDE."
      echo ""
    fi
  fi
fi

if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
  echo ""
  echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
  echo "was not included. Therefore, GCC symbol visibility support remains disabled."
  echo ""
  echo "For better performance, consider including the Qt visibility supporting patch"
  echo "located at:"
  echo ""
  echo "http://bugs.kde.org/show_bug.cgi?id=109386"
  echo ""
  echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
  echo "everything will continue to work just fine without it."
  echo ""
fi

if test "$all_tests" = "bad"; then
  if test ! "$cache_file" = "/dev/null"; then
    echo ""
    echo "Please remove the file $cache_file after changing your setup"
    echo "so that configure will find the changes next time."
    echo ""
  fi
else
  echo ""
  echo "Good - your configure finished. Start make now"
  echo ""
fi