summaryrefslogtreecommitdiffstats
path: root/libkexiv2/configure.in.in
blob: 1e7bb26e189966f4555913cb18bd15f7d89ba331 (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
AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config])
AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config,[yes])

#------------------------------------------------------------------
# Check for Exiv2 library
#------------------------------------------------------------------

have_exiv2='no'
if test "$PKGCONFIGFOUND" = "yes" ; then
 KDE_PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.12, have_exiv2=yes,have_exiv2=no)
else
 AC_MSG_WARN([pkg-config not found. You have to install pkg-config first. libkexiv2 depends on it.])
fi

if test "x$have_exiv2" != "xyes"; then
  AC_MSG_WARN([Exiv2 library not found, libkexiv2 will not be compiled.])
  DO_NOT_COMPILE="libkexiv2 $DO_NOT_COMPILE"
fi

AC_OUTPUT([ libkexiv2/libkexiv2.pc ])

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

AC_LANG_PUSH(C++)
libkexiv2_kdemacros_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $all_includes"  
AC_MSG_CHECKING([if kdemacros.h is usable])
AC_COMPILE_IFELSE(
 [
   #include <kdemacros.h>
   #include <string>
   int other_func( void ) KDE_EXPORT;
   int other_func( void )
   { 
      std::string s("KDE_EXPORT");
      return 0;
   }
 ], 
 [ AC_MSG_RESULT([yes])
   AC_DEFINE(KDEMACROS_USABLE, 1, [kdemacros.h usable]) ], 
 [ AC_MSG_RESULT([no]) ] 
)
CPPFLAGS=$libkexiv2_kdemacros_cppflags
AC_LANG_POP(C++)