summaryrefslogtreecommitdiffstats
path: root/configure.in
blob: e4cfca36cf01fd77d8746257b37d464da65a79c1 (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
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(kipi-plugins-0.1.6, "3.5.10") 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)
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

KDE_ENABLE_HIDDEN_VISIBILITY

KDE_INIT_DOXYGEN([KEG Libraries API Reference], [Version $VERSION])

dnl =======================================================
dnl FILE: ./kipi-plugins/configure.in.in
dnl =======================================================

# ----------------------------------------------------------
#
# pkg-config check
#
# ----------------------------------------------------------

AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config])
AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config,[yes])

# ----------------------------------------------------------
#
# common header files path for kipi-plugins
#
# ----------------------------------------------------------

KIPI_PLUGINS_COMMON_INCLUDE="-I\$(top_srcdir)/kipi-plugins/common/include"
AC_SUBST(KIPI_PLUGINS_COMMON_INCLUDE)

KIPI_PLUGINS_COMMON_LDFLAGS="-L\$(top_builddir)/kipi-plugins/common/libkipiplugins"
AC_SUBST(KIPI_PLUGINS_COMMON_LDFLAGS)

# -----------------------------------------------------------------
#
# enable hidden visibility only if kde >= 3.3.2 and tdelibs has
# been compiled with visibility enabled
#
# -----------------------------------------------------------------

AC_LANG_PUSH(C++)
kipiplugins_save_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $all_includes"  
AC_MSG_CHECKING([if hidden visibility should be enabled])
AC_COMPILE_IFELSE(
 [
   #include <tdeversion.h>
   #include <kdemacros.h>
   int other_func( void )
   { 
      #if KDE_IS_VERSION(3,3,2)
      #else
        iam dying;
      #endif
      #ifdef __KDE_HAVE_GCC_VISIBILITY
      #else
        no, iam really dead;
      #endif      
      return 0;
   }
 ], 
 [ AC_MSG_RESULT([yes])
   kipiplugins_enable_hidden_visibility="yes" ],
 [ AC_MSG_RESULT([no]) ] 
)
CPPFLAGS=$kipiplugins_save_cppflags
AC_LANG_POP(C++)

if test "x$kipiplugins_enable_hidden_visibility" = "xyes"; then
   KDE_ENABLE_HIDDEN_VISIBILITY 
fi

# ----------------------------------------------------------
#
# General kipi-plugin tests
#
# ----------------------------------------------------------

AC_MSG_CHECKING([for libkipi in our sources])
if test -d $srcdir/libkipi; then
    have_libkipi=yes
    LIBKIPI_CFLAGS='-I$(top_builddir)/libkipi -I$(top_srcdir)/libkipi'
    LIBKIPI_LIBS='$(top_builddir)/libkipi/libkipi/libkipi.la'
    LIBKIPI_LIBS_DEP='$(LIBKIPI_LIBS)'
    AC_MSG_RESULT([found])
    AC_SUBST(LIBKIPI_CFLAGS)
    AC_SUBST(LIBKIPI_LIBS)
    AC_SUBST(LIBKIPI_LIBS_DEP)
    AC_MSG_RESULT([found])
else
    AC_MSG_RESULT([not found in sources])
    if test "$PKGCONFIGFOUND" = "yes" ; then
        # check for libkipi
        have_libkipi=no

	KDE_PKG_CHECK_MODULES(LIBKIPI, libkipi >= 0.1.5,
		have_libkipi=yes, have_libkipi=no)

	if test "x$have_libkipi" = "xno"; then
	   LIBKIPI_CFLAGS=""
	   LIBKIPI_LIBS=""
	fi
     else
        LIBKIPI_CFLAGS=""
	LIBKIPI_LIBS=""
     fi
     AC_SUBST(LIBKIPI_CFLAGS)
     AC_SUBST(LIBKIPI_LIBS)
fi

if test "x$have_libkipi" != "xyes"; then
     AC_MSG_ERROR([libkipi library is required by kipi-plugins.])
     DO_NOT_COMPILE="$DO_NOT_COMPILE kipi-plugins"
fi

# --------------------------------------------------------------------
#
# Check for libkexiv2
#
# --------------------------------------------------------------------

AC_MSG_CHECKING([for libkexiv2 in our sources])
if test -d $srcdir/libkexiv2; then
    have_libkexiv2=yes
    LIBKEXIV2_CFLAGS='-I$(top_srcdir)/libkexiv2'
    LIBKEXIV2_LIBS='$(top_builddir)/libkexiv2/libkexiv2/libkexiv2.la'
    LIBKEXIV2_LIBS_DEP='$(LIBKEXIV2_LIBS)'
    AC_MSG_RESULT([found])
    AC_SUBST(LIBKEXIV2_CFLAGS)
    AC_SUBST(LIBKEXIV2_LIBS)
    AC_SUBST(LIBKEXIV2_LIBS_DEP)
else
    AC_MSG_RESULT([not found in sources])
    if test "$PKGCONFIGFOUND" = "yes" ; then
        # check for libkexiv2
        have_libkexiv2=no

        KDE_PKG_CHECK_MODULES(LIBKEXIV2, libkexiv2 >= 0.1.5,
                have_libkexiv2=yes, have_libkexiv2=no)

        if test "x$have_libkexiv2" = "xno"; then
           LIBKEXIV2_CFLAGS=""
           LIBKEXIV2_LIBS=""
        fi
     else
        LIBKEXIV2_CFLAGS=""
        LIBKEXIV2_LIBS=""
     fi
     AC_SUBST(LIBKEXIV2_CFLAGS)
     AC_SUBST(LIBKEXIV2_LIBS)
fi

if test x$have_libkexiv2 != xyes; then
  AC_MSG_ERROR([libkexiv2 library is required by kipi-plugins.])
  DO_NOT_COMPILE="$DO_NOT_COMPILE kipi-plugins"
fi

# --------------------------------------------------------------------
#
# Check for libkdcraw
#
# --------------------------------------------------------------------

AC_MSG_CHECKING([for libkdcraw in our sources])
if test -d $srcdir/libkdcraw; then
    have_libkdcraw=yes
    LIBKDCRAW_CFLAGS='-I$(top_builddir)/libkdcraw -I$(top_srcdir)/libkdcraw'
    LIBKDCRAW_LIBS='$(top_builddir)/libkdcraw/libkdcraw/libkdcraw.la'
    LIBKDCRAW_LIBS_DEP='$(LIBKDCRAW_LIBS)'
    AC_MSG_RESULT([found])
    AC_SUBST(LIBKDCRAW_CFLAGS)
    AC_SUBST(LIBKDCRAW_LIBS)
    AC_SUBST(LIBKDCRAW_LIBS_DEP)
    AC_MSG_RESULT([found])
else
    AC_MSG_RESULT([not found in sources])
    if test "$PKGCONFIGFOUND" = "yes" ; then
        # check for libkdcraw
        have_libkdcraw=no

        KDE_PKG_CHECK_MODULES(LIBKDCRAW, libkdcraw >= 0.1.4,
                have_libkdcraw=yes, have_libkdcraw=no)

        if test "x$have_libkdcraw" = "xno"; then
           LIBKDCRAW_CFLAGS=""
           LIBKDCRAW_LIBS=""
        fi
     else
        LIBKDCRAW_CFLAGS=""
        LIBKDCRAW_LIBS=""
     fi
     AC_SUBST(LIBKDCRAW_CFLAGS)
     AC_SUBST(LIBKDCRAW_LIBS)
fi

if test x$have_libkdcraw != xyes; then
  AC_MSG_ERROR([libkdcraw library is required by kipi-plugins.])
  DO_NOT_COMPILE="$DO_NOT_COMPILE kipi-plugins"
fi

#------------------------------------------------------------------
#
# Ability to fine-tune what plugins to build
#
#------------------------------------------------------------------

# Following macro sets up individual kipi-plugins. It generates AC_ARG_ENABLE.
# Third argument, plugin_dependencies is an optional space-separated list of dependencies.
# In case the plugin is enabled, it sets build_${dependency}=yes (for every dependency)
# KIPI_PLUGIN_PRE(plugin_directory, plugin_name[, plugin_depencencies])
AC_DEFUN([KIPI_PLUGIN_PRE], [
  AC_ARG_ENABLE([$1],
    AC_HELP_STRING([--disable-$1], [$2 kipi plugin.] m4_if([$3], [], [], [[ Requires $3.]]) [ [[enable]]]),
    [enable_$1="$enableval"],
    [enable_$1="check"],
  )
  if test "${enable_$1}" != "yes" -a "${enable_$1}" != "no"; then
    enable_$1="check"
  fi
  kipi_plug_deps_$1="$3"
  kipi_plug_name_$1="$2"
  if test "$enable_$1" != "no" -a -n "$3"; then
    for dep in $3; do
      eval build_${dep}="yes"   # we must use eval because we use shell variable inside variable name
    done
  fi
])

# Add entry for every new conditional dependency here
build_gphoto=no
build_libgpod=no
build_libkcal=no
build_tiff=no
build_xslt=no
build_opengl=no

# Please keep this list sorted and add all new plugins
KIPI_PLUGIN_PRE([acquireimages], [Acquire Images], [tiff])
KIPI_PLUGIN_PRE([batchprocessimages], [Batch Process Images])
KIPI_PLUGIN_PRE([calendar], [Calendar], [libkcal])
KIPI_PLUGIN_PRE([cdarchiving], [CD Archiving])
KIPI_PLUGIN_PRE([findimages], [Find Images])
KIPI_PLUGIN_PRE([flickrexport], [Flickr Exporter])
KIPI_PLUGIN_PRE([galleryexport], [Remote Gallery Export])
KIPI_PLUGIN_PRE([gpssync], [GPS Synchronization])
KIPI_PLUGIN_PRE([htmlexport], [HTML Gallery], [xslt])
#KIPI_PLUGIN_PRE([imagesgallery], [Images Gallery])      # ???
KIPI_PLUGIN_PRE([imageviewer], [Viewer], [opengl])
KIPI_PLUGIN_PRE([ipodexport], [iPod Export], [libgpod])
KIPI_PLUGIN_PRE([jpeglossless], [JPEG Lossless]) # Does it depend on tiff?
KIPI_PLUGIN_PRE([kameraklient], [Kamera Klient], [gphoto])
KIPI_PLUGIN_PRE([metadataedit], [Metadata Editor])
KIPI_PLUGIN_PRE([mpegencoder], [MPEG Encoder])
KIPI_PLUGIN_PRE([picasawebexport], [Picasaweb Exporter])
KIPI_PLUGIN_PRE([printwizard], [Print Wizard])
KIPI_PLUGIN_PRE([rawconverter], [RAW converter], [tiff])
KIPI_PLUGIN_PRE([sendimages], [Send Images])
KIPI_PLUGIN_PRE([simpleviewerexport], [Simple Viewer])
KIPI_PLUGIN_PRE([slideshow], [Slideshow], [opengl])
#KIPI_PLUGIN_PRE([sync], [Sync])   # ???
KIPI_PLUGIN_PRE([timeadjust], [Date & Time Adjust])
KIPI_PLUGIN_PRE([wallpaper], [Wallpaper])

#------------------------------------------------------------------
#
# Check for libtiff
#
#------------------------------------------------------------------

have_tiff=no

if test "x$build_tiff" != "xno"; then
  AC_CHECK_LIB(tiff, TIFFWriteScanline,
    have_tiff=yes,
    AC_MSG_WARN([TIFF library not found]),
    $all_libraries -ljpeg -lz -lm)

  if test "x$have_tiff" = "xyes"; then
    KDE_CHECK_HEADER(tiffio.h, have_tiff=yes, have_tiff=no)
  fi

  if test "x$have_tiff" != "xyes"; then
    AC_WARN([TIFF library not found, some plugins will not be compiled.])
  else
    LIB_TIFF="-ltiff"
    AC_SUBST(LIB_TIFF)
  fi
fi

#---------------------------------------------------------
#
# gphoto2 detection - KameraKlient plugin
#
#---------------------------------------------------------

have_gphoto=no

if test "x$build_gphoto" != "xno"; then
  AC_PATH_PROG(GPHOTO_CONFIG,gphoto2-config)
  AC_PATH_PROG(GPHOTO_PORT_CONFIG,gphoto2-port-config)
  if test -n "${GPHOTO_CONFIG}"; then
    GPHOTO_CFLAGS="`$GPHOTO_CONFIG --cflags`"
    AC_SUBST(GPHOTO_CFLAGS)
    LIB_GPHOTO="`$GPHOTO_CONFIG --libs` `$GPHOTO_PORT_CONFIG --libs`"
    AC_SUBST(LIB_GPHOTO)
    have_gphoto=yes
  else
    AC_MSG_WARN([gPhoto2 not found, some plugins will not be compiled.])
  fi
fi

#---------------------------------------------------------
#
# xslt detection - HTML export plugin
#
#---------------------------------------------------------

have_xslt=no

if test "x$build_xslt" != "xno"; then
  AC_PATH_PROG(XSLT_CONFIG,xslt-config)
  if test -n "${XSLT_CONFIG}"; then
    LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
    AC_SUBST(LIBXSLT_CFLAGS)
    LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
    AC_SUBST(LIBXSLT_LIBS)
    have_xslt=yes
  else
    AC_MSG_WARN([libxslt library not found, some plugins will not be compiled])
  fi
fi

#------------------------------------------------------------------
#
# Check for libgpod - ipod export plugin
#
#------------------------------------------------------------------

have_libgpod=no

if test "x$build_libgpod" != "xno"; then
    if test "$PKGCONFIGFOUND" = "yes" ; then

        KDE_PKG_CHECK_MODULES(LIBGPOD, libgpod-1.0 >= 0.4.2 gobject-2.0, have_libgpod=yes,have_libgpod=no)

        if test "x$have_libgpod" = "xyes"; then
            AC_DEFINE(HAVE_LIBGPOD, 1, [have libgpod])
            ac_cppflags_save=$CPPFLAGS
            ac_cflags_save=$CFLAGS
            ac_ldflags_save=$LDFLAGS

            CPPFLAGS="$CPPFLAGS $LIBGPOD_INCLUDES"
            CFLAGS="$CFLAGS $LIBGPOD_CFLAGS"
            LDFLAGS="$LDFLAGS $LIBGPOD_LIBS"
        else
            AC_MSG_WARN([libgpod is required for the iPod export plugin.])
        fi
    fi
fi

#------------------------------------------------------------------
#
# Check for libkcal - iCalendar support library
#
#------------------------------------------------------------------

have_libkcal=no

if test "x$build_libkcal" != "xno"; then
  KDE_CHECK_HEADERS(libkcal/calendarlocal.h, have_libkcal=yes, have_libkcal=no)
  if test "x$have_libkcal" != "xyes"; then
    AC_WARN([libkcal not found, some plugins will not be compiled.])
  else
    LIB_KCAL="-llibkcal"
    AC_SUBST(LIB_KCAL)
  fi
fi

# ----------------------------------------------------------
#
# Qt OpenGl check (fudged from Amarok) - Slideshow plugin
#
# ----------------------------------------------------------

have_opengl=no

if test "x$build_opengl" != "xno"; then
    AC_MSG_CHECKING(for Qt with OpenGL support)
    AC_CACHE_VAL(ac_cv_kde_qt_has_opengl,
    [
    AC_LANG_SAVE
    AC_LANG_CPLUSPLUS

    save_CXXFLAGS="$CXXFLAGS"
    save_LIBS="$LIBS"
    save_LDFLAGS="$LDFLAGS"

    CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
    LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
    LIBS="$LIBS $LIBQT $KDE_MT_LIBS"

    AC_TRY_LINK([
    #include <qgl.h>
    ],
    [
    (void)new QGLWidget((QWidget*)0, "qgl");
    ],
    ac_cv_kde_qt_has_opengl=yes,
    ac_cv_kde_qt_has_opengl=no)

    CXXFLAGS="$save_CXXFLAGS"
    LIBS="$save_LIBS"
    LDFLAGS="$save_LDFLAGS"
    AC_LANG_RESTORE
    ])
    AC_MSG_RESULT($ac_cv_kde_qt_has_opengl)

    if test x$ac_cv_kde_qt_has_opengl = xyes; then
       have_opengl="yes"
       GL_LIBS="-lGL"
    else
       have_opengl="no"
       GL_LIBS=""
    fi

    AC_SUBST(GL_LIBS)
fi

# ----------------------------------------------------------
#
# Second stage of kipi-plugin fine-tuning.
#
# ----------------------------------------------------------

# Following macro checks if particular plugin should be enabled and for
# its dependencies. (have_$dependency must be either yes or no). Sets
# AM_CONDITIONAL accordingly. KIPI_PLUGIN_PRE must precede it.
# KIPI_PLUGIN_POST([plugin_directory])
AC_DEFUN([KIPI_PLUGIN_POST], [
  test="test $enable_$1 != no"
  if test $enable_$1 != no; then
    for dep in $kipi_plug_deps_$1; do
      test="${test} -a \$have_${dep} = yes"
      if eval test \$have_${dep} != "yes"; then   # we must use eval cos we use shell variable inside variable name
        AC_MSG_WARN([$dep could not be found, $kipi_plug_name_$1 ($1) plugin will not be built.])
      fi
    done
  fi
  if eval $test; then
    enabled_kipi_plugins="$enabled_kipi_plugins $1"
  else
    disabled_kipi_plugins="$disabled_kipi_plugins $1"
    if test $enable_$1 = yes; then
      AC_MSG_ERROR([Failing as hard-enabled plugin cannot be compiled.])
    fi
  fi
  AM_CONDITIONAL([compile_]m4_toupper($1), [eval $test])
])

enabled_kipi_plugins=""
disabled_kipi_plugins=""

# Please keep this list sorted and add all new plugins
KIPI_PLUGIN_POST([acquireimages])
KIPI_PLUGIN_POST([batchprocessimages])
KIPI_PLUGIN_POST([calendar])
KIPI_PLUGIN_POST([cdarchiving])
KIPI_PLUGIN_POST([findimages])
KIPI_PLUGIN_POST([flickrexport])
KIPI_PLUGIN_POST([galleryexport])
KIPI_PLUGIN_POST([gpssync])
KIPI_PLUGIN_POST([htmlexport])
#KIPI_PLUGIN_POST([imagesgallery])   # ???
KIPI_PLUGIN_POST([imageviewer])
KIPI_PLUGIN_POST([ipodexport])
KIPI_PLUGIN_POST([jpeglossless])
KIPI_PLUGIN_POST([kameraklient])
KIPI_PLUGIN_POST([metadataedit])
KIPI_PLUGIN_POST([mpegencoder])
KIPI_PLUGIN_POST([picasawebexport])
KIPI_PLUGIN_POST([printwizard])
KIPI_PLUGIN_POST([rawconverter])
KIPI_PLUGIN_POST([sendimages])
KIPI_PLUGIN_POST([simpleviewerexport])
KIPI_PLUGIN_POST([slideshow])
#KIPI_PLUGIN_POST([sync])   # ???
KIPI_PLUGIN_POST([timeadjust])
KIPI_PLUGIN_POST([wallpaper])
KDE_CREATE_SUBDIRSLIST
AM_CONDITIONAL(libkexiv2_SUBDIR_included, test "x$libkexiv2_SUBDIR_included" = xyes)
AM_CONDITIONAL(libkipi_SUBDIR_included, test "x$libkipi_SUBDIR_included" = xyes)
AM_CONDITIONAL(libkdcraw_SUBDIR_included, test "x$libkdcraw_SUBDIR_included" = xyes)
AM_CONDITIONAL(doc_SUBDIR_included, test "x$doc_SUBDIR_included" = xyes)
AM_CONDITIONAL(kipi_plugins_SUBDIR_included, test "x$kipi_plugins_SUBDIR_included" = xyes)
AM_CONDITIONAL(po_SUBDIR_included, test "x$po_SUBDIR_included" = xyes)
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/de_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/es_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/et_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/it_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/nl_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/pt_BR_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/ru_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ doc/sv_kipi-plugins/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/acquireimages/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/batchprocessimages/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/batchprocessimages/data/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/calendar/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/cdarchiving/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/cdarchiving/autorun/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/common/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/common/libkipiplugins/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/findimages/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/flickrexport/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/galleryexport/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/gpssync/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/helloworld/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/classic/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/cleanframes/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/frames/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/matrix/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/s0/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/simple/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/htmlexport/themes/snow/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/imageviewer/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/imageviewer/cursors/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/ipodexport/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/jpeglossless/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/jpeglossless/pics/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/kameraklient/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/metadataedit/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/mpegencoder/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/picasawebexport/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/printwizard/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/rawconverter/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/rawconverter/pics/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/rawconverter/profiles/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/sendimages/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/simpleviewerexport/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/slideshow/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/sync/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/timeadjust/Makefile ])
AC_CONFIG_FILES([ kipi-plugins/wallpaper/Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ po/ar/Makefile ])
AC_CONFIG_FILES([ po/be/Makefile ])
AC_CONFIG_FILES([ po/br/Makefile ])
AC_CONFIG_FILES([ po/ca/Makefile ])
AC_CONFIG_FILES([ po/cs/Makefile ])
AC_CONFIG_FILES([ po/cy/Makefile ])
AC_CONFIG_FILES([ po/da/Makefile ])
AC_CONFIG_FILES([ po/de/Makefile ])
AC_CONFIG_FILES([ po/el/Makefile ])
AC_CONFIG_FILES([ po/en_GB/Makefile ])
AC_CONFIG_FILES([ po/es/Makefile ])
AC_CONFIG_FILES([ po/et/Makefile ])
AC_CONFIG_FILES([ po/fi/Makefile ])
AC_CONFIG_FILES([ po/fr/Makefile ])
AC_CONFIG_FILES([ po/ga/Makefile ])
AC_CONFIG_FILES([ po/gl/Makefile ])
AC_CONFIG_FILES([ po/hu/Makefile ])
AC_CONFIG_FILES([ po/is/Makefile ])
AC_CONFIG_FILES([ po/it/Makefile ])
AC_CONFIG_FILES([ po/ja/Makefile ])
AC_CONFIG_FILES([ po/lt/Makefile ])
AC_CONFIG_FILES([ po/ms/Makefile ])
AC_CONFIG_FILES([ po/mt/Makefile ])
AC_CONFIG_FILES([ po/nb/Makefile ])
AC_CONFIG_FILES([ po/nds/Makefile ])
AC_CONFIG_FILES([ po/nl/Makefile ])
AC_CONFIG_FILES([ po/nn/Makefile ])
AC_CONFIG_FILES([ po/pa/Makefile ])
AC_CONFIG_FILES([ po/pl/Makefile ])
AC_CONFIG_FILES([ po/pt/Makefile ])
AC_CONFIG_FILES([ po/pt_BR/Makefile ])
AC_CONFIG_FILES([ po/ru/Makefile ])
AC_CONFIG_FILES([ po/rw/Makefile ])
AC_CONFIG_FILES([ po/sk/Makefile ])
AC_CONFIG_FILES([ po/sr/Makefile ])
AC_CONFIG_FILES([ po/sr@Latn/Makefile ])
AC_CONFIG_FILES([ po/sv/Makefile ])
AC_CONFIG_FILES([ po/ta/Makefile ])
AC_CONFIG_FILES([ po/th/Makefile ])
AC_CONFIG_FILES([ po/tr/Makefile ])
AC_CONFIG_FILES([ po/uk/Makefile ])
AC_CONFIG_FILES([ po/zh_CN/Makefile ])
AC_OUTPUT
dnl Put here things to be done at the very end - telling users
dnl about additional packages to install.

echo ""
echo "-- Kipi-Plugins configure results -------------------"

# mandatory dependencies

if test "x$have_libkipi" != "xyes"; then
  echo "-- libkipi found.................. NO"
  echo ""
  echo "Kipi-Plugins needs libkipi >= 0.1.5. You need to install libkipi first"
  echo "libkipi website is at http://www.kipi-plugins.org"
  echo ""
  all_tests=bad
else
  echo "-- libkipi found.................. YES"
fi

if test "x$have_libkexiv2" != "xyes"; then
  echo "-- libkexiv2 library found........ NO"
  echo ""
  echo "Kipi-Plugins needs libkexiv2 library >= 0.1.5. You need to install libkexiv2 first"
  echo "libkexiv2 website is at http://www.kipi-plugins.org"
  echo ""
  all_tests=bad
else
  echo "-- libkexiv2 library found........ YES"
fi

if test "x$have_libkdcraw" != "xyes"; then
  echo "-- libkdcraw library found........ NO"
  echo ""
  echo "Kipi-Plugins needs libkdcraw library >= 0.1.4. You need to install libkdcraw first"
  echo "libkdcraw website is at http://www.kipi-plugins.org"
  echo ""
  all_tests=bad
else
  echo "-- libkdcraw library found........ YES"
fi

# optional dependencies

if test "x$build_gphoto" != "xno"; then
  if test "x$have_gphoto" != "xyes"; then
    echo "-- gphoto2 found.................. NO"
    echo ""
    echo "KameraKlient plugin needs gPhoto2. This plugin will not be compiled!"
    echo "To complile this plugins, please install gPhoto2, e.g. from"
    echo "http://www.gphoto.org/download.html"
    echo ""
    all_tests=bad
  else
    echo "-- gphoto2 found.................. YES"
  fi
else
  echo "-- gphoto2................. NOT NEEDED"
fi

if test "x$build_tiff" != "xno"; then
  if test "x$have_tiff" != "xyes"; then
    echo "-- libtiff found.................. NO"
    echo ""
    echo "AcquireImages/JpegLossless/RawConverter plugins needs libtiff. These plugins will not be compiled!"
    echo "To complile these plugins, please install libtiff development package."
    echo "libtiff website is at http://www.remotesensing.org/libtiff"
    echo ""
    all_tests=bad
  else
    echo "-- libtiff library found.......... YES"
  fi
else
  echo "-- libtiff library......... NOT NEEDED"
fi

if test "x$build_libkcal" != "xno"; then
  if test "x$have_libkcal" != "xyes"; then
    echo "-- libkcal found.................. NO"
    echo ""
    echo "Calendar plugin needs libkcal. This plugin will not be compiled!"
    echo "To complile this plugin, please install libkcal development package."
    echo "libkcal is part of kde-pim package, http://pim.kde.org"
    echo ""
    all_tests=bad
  else
    echo "-- libkcal found.................. YES"
  fi
else
  echo "-- libkcal................. NOT NEEDED"
fi

if test "x$build_opengl" != "xno"; then
  if test "x$have_opengl" != "xyes"; then
    echo "-- OpenGL found................... NO"
    echo ""
    echo "SlideShow plugin needs OpenGL support. This plugin will not be compiled!"
    echo "To complile this plugin, please install OpenGL support."
    echo ""
    all_tests=bad
  else
    echo "-- OpenGL found................... YES"
  fi
else
  echo "-- OpenGL.................. NOT NEEDED"
fi

if test "x$build_xslt" != "xno"; then
  if test "x$have_xslt" != "xyes"; then
    echo "-- libxslt found.................. NO"
    echo ""
    echo "HtmlExport plugin needs XSLT library. This plugin will not be compiled!"
    echo "To complile this plugin, please install libxslt development package."
    echo "libxslt website is at http://xmlsoft.org/XSLT"
    echo ""
    all_tests=bad
  else
    echo "-- libxslt found.................. YES"
  fi
else
  echo "-- libxslt library......... NOT NEEDED"
fi

if test "x$build_libgpod" != "xno"; then
  if test "x$have_libgpod" != "xyes"; then
    echo "-- libgpod found.................. NO"
    echo ""
    echo "iPodExport plugin needs the libgpod library, version 0.4.2 or greater. This plugin will not be compiled!"
    echo "To complile this plugin, please install libgpod development package."
    echo "libgpod website is at http://gtkpod.org/libgpod.html"
    echo ""
    all_tests=bad
  else
    echo "-- libgpod found.................. YES"
  fi
else
  echo "-- libgpod library......... NOT NEEDED"
fi

echo ""

if test -n "$enabled_kipi_plugins"; then
  echo "-- Enabled kipi plugins:"
  for plugin in $enabled_kipi_plugins; do
    eval echo "+ \$kipi_plug_name_$plugin \($plugin\)"
  done
  echo ""
fi
if test -n "$disabled_kipi_plugins"; then
  echo "-- Disabled kipi plugins:"
  for plugin in $disabled_kipi_plugins; do
    eval echo -n "- \$kipi_plug_name_$plugin \($plugin\)"
    if eval test x\$enable_$plugin != xno; then
      eval echo \" - dependencies: \$kipi_plug_deps_$plugin\"
    else
      echo ""   # add newline
    fi
  done
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