[Digikam-devel] extragear/graphics/digikam

Renchi Raju renchi at pooh.tam.uiuc.edu
Fri Jun 17 11:40:37 BST 2005


SVN commit 426444 by pahlibar:

fix for kdemacros.h not being usable in kde < 3.3.2 and
kde version specific check not usable, because of mandriva's
version change. Gilles, can you check if this works on
your system
CCMAIL: digikam-devel at kde.org


 M  +30 -0     configure.in.in  
 M  +3 -3      digikam/digikam_export.h  


--- trunk/extragear/graphics/digikam/configure.in.in #426443:426444
@@ -4,6 +4,36 @@
 
 KDE_ENABLE_HIDDEN_VISIBILITY
 
+# -----------------------------------------------------------------
+# check if kdemacros.h is usable. kde < 3.3.2 had a bug in it
+# -----------------------------------------------------------------
+
+AC_LANG_PUSH(C++)
+libkexif_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=$libkexif_kdemacros_cppflags
+AC_LANG_POP(C++)
+
+# -----------------------------------------------------------------
+# pkg config check
+# -----------------------------------------------------------------
+
 AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config])
 AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config,[yes])
 
--- trunk/extragear/graphics/digikam/digikam/digikam_export.h #426443:426444
@@ -21,12 +21,12 @@
 #ifndef _DIGIKAM_EXPORT_H
 #define _DIGIKAM_EXPORT_H
 
-#include <kdeversion.h>
 
-#ifdef __KDE_HAVE_GCC_VISIBILITY
-
+#ifdef KDEMACROS_USABLE
 #include <kdemacros.h>
+#endif
 
+#ifdef KDE_EXPORT
 #define DIGIKAM_EXPORT KDE_EXPORT
 #define DIGIKAMIMAGEPLUGINS_EXPORT KDE_EXPORT
 #define DIGIKAMIMAGEEDITOR_EXPORT KDE_EXPORT



More information about the Digikam-devel mailing list