[Kde-imaging] extragear/libs
Renchi Raju
renchi at pooh.tam.uiuc.edu
Fri Jun 10 17:59:08 CEST 2005
SVN commit 424052 by pahlibar:
write a configure test for checking if it actually compiles
with kdemacros.h . depending on that include/exclude kdemacros.h
CCMAIL:kde-imaging at kde.org
M +21 -5 libkexif/configure.in.in
M +1 -3 libkexif/libkexif_export.h
M +22 -5 libkipi/configure.in.in
M +1 -3 libkipi/libkipi/libkipi_export.h
--- trunk/extragear/libs/libkexif/configure.in.in #424051:424052
@@ -86,8 +86,24 @@
AC_OUTPUT([ libkexif/libkexif.pc ])
-KDE_CHECK_HEADER(kdemacros.h, have_kdemacros=yes, have_kdemacros=no)
-if test "x$have_kdemacros" = "xyes"; then
- AC_MSG_NOTICE([kdemacros.h found])
- AC_DEFINE(HAVE_KDEMACROS, 1, [Defined if kdemacros.h is found])
-fi
+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++)
--- trunk/extragear/libs/libkexif/libkexif_export.h #424051:424052
@@ -21,11 +21,9 @@
#ifndef _LIBKEXIF_EXPORT_H
#define _LIBKEXIF_EXPORT_H
-#ifdef __KDE_HAVE_GCC_VISIBILITY
-#ifdef HAVE_KDEMACROS
+#ifdef KDEMACROS_USABLE
#include <kdemacros.h>
#endif
-#endif
#ifdef KDE_EXPORT
#define LIBKEXIF_EXPORT KDE_EXPORT
--- trunk/extragear/libs/libkipi/configure.in.in #424051:424052
@@ -1,8 +1,25 @@
AC_OUTPUT([ libkipi/libkipi.pc ])
KDE_ENABLE_HIDDEN_VISIBILITY
-KDE_CHECK_HEADER(kdemacros.h, have_kdemacros=yes, have_kdemacros=no)
-if test "x$have_kdemacros" = "xyes"; then
- AC_MSG_NOTICE([kdemacros.h found])
- AC_DEFINE(HAVE_KDEMACROS, 1, [Defined if kdemacros.h is found])
-fi
+
+AC_LANG_PUSH(C++)
+libkipi_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=$libkipi_kdemacros_cppflags
+AC_LANG_POP(C++)
--- trunk/extragear/libs/libkipi/libkipi/libkipi_export.h #424051:424052
@@ -21,11 +21,9 @@
#ifndef _LIBKIPI_EXPORT_H
#define _LIBKIPI_EXPORT_H
-#ifdef __KDE_HAVE_GCC_VISIBILITY
-#ifdef HAVE_KDEMACROS
+#ifdef KDEMACROS_USABLE
#include <kdemacros.h>
#endif
-#endif
#ifdef KDE_EXPORT
#define LIBKIPI_EXPORT KDE_EXPORT
More information about the Kde-imaging
mailing list