TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
4.0KB

  1. #MIN_CONFIG(3.3)
  2. AC_HEADER_DIRENT
  3. AC_HEADER_STDC
  4. AC_CHECK_HEADERS(fcntl.h sys/sysctl.h sys/param.h sys/time.h sys/types.h unistd.h values.h sys/limits.h err.h sys/cdefs.h)
  5. AC_CHECK_SETENV
  6. AC_CHECK_UNSETENV
  7. KDE_NEED_FLEX
  8. if test "$x_includes" != "NONE"; then
  9. AC_DEFINE(HAVE_X11_HEADERS,1,Define if you have X11 header files)
  10. fi
  11. AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, [LIBXTST=-lXtst],, -lX11)
  12. AC_SUBST(LIBXTST)
  13. if test "$LIBXTST" != ""; then
  14. AC_CHECK_HEADER([X11/extensions/XTest.h],
  15. [AC_DEFINE(HAVE_XTEST, 1, [Define if you have X11 Xtest header files])])
  16. fi
  17. KDE_INIT_DOXYGEN([KDE PIM API Reference], [Version $VERSION])
  18. KDE_CHECK_THREADING
  19. dnl For apps that NEED threads
  20. if test -z "$LIBPTHREAD" && test -z "$USE_THREADS"; then
  21. DO_NOT_COMPILE="$DO_NOT_COMPILE knode"
  22. fi
  23. CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
  24. # check for libbluetooth (Bluetooth library) because gnokii may require it
  25. AC_DEFUN([KDE_CHECK_BLUETOOTH],
  26. [
  27. AC_CHECK_HEADERS(bluetooth/bluetooth.h)
  28. LIB_BLUETOOTH=
  29. AC_CHECK_LIB(bluetooth, hci_open_dev,
  30. [ LIB_BLUETOOTH="-lbluetooth" ],
  31. [],
  32. [] )
  33. AC_SUBST(LIB_BLUETOOTH)
  34. ])
  35. # check for libgnokii (Nokia mobile phone library)
  36. AC_DEFUN([KDE_CHECK_GNOKII],
  37. [
  38. KDE_CHECK_HEADERS(gnokii.h)
  39. AC_REQUIRE([AC_HAVE_XPM])
  40. AC_CHECK_LIB(gnokii, gn_cfg_read,
  41. [ LIB_GNOKII="-lgnokii $LIB_BLUETOOTH" ],
  42. [
  43. AC_CHECK_LIB(gnokii, gn_cfg_get,
  44. [ LIB_GNOKII="-lgnokii -lintl $LIB_BLUETOOTH" ],
  45. [], $all_libraries -lintl -lXpm -lX11 $LIB_BLUETOOTH )
  46. ],
  47. $all_libraries -lXpm -lX11 $LIB_BLUETOOTH )
  48. AC_SUBST(LIB_GNOKII)
  49. ])
  50. AC_ARG_WITH(gnokii,
  51. [AC_HELP_STRING(--with-gnokii,
  52. [enable support for mobile phones through gnokii @<:@default=check@:>@])],
  53. [], with_gnokii=check)
  54. LIB_GNOKII=
  55. if test "x$with_gnokii" != xno; then
  56. # for kaddressbook/xxport/ and kmobile/devices/gnokii/
  57. KDE_CHECK_BLUETOOTH
  58. KDE_CHECK_GNOKII
  59. if test "x$with_gnokii" != xcheck && test -z "$LIB_GNOKII"; then
  60. AC_MSG_ERROR([--with-gnokii was given, but test for gnokii failed])
  61. fi
  62. fi
  63. dnl Checks for header files.
  64. AC_CHECK_HEADERS(sys/cdefs.h) dnl for libkholidays/lunarphase.cpp
  65. AC_CHECK_HEADERS(sys/ioctl.h) dnl for kandy/src/modem.cpp
  66. AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h byteswap.h) dnl for at least kmail
  67. dnl the below is copied from kdenetwork's configure as too many apps moved
  68. dnl and noone can say which tests are needed and which are obsolete for kdepim ;(
  69. AC_CHECK_HEADERS(fcntl.h unistd.h sysent.h strings.h paths.h)
  70. dnl unused AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])
  71. KDE_CHECK_LARGEFILE
  72. AC_CHECK_USLEEP
  73. dnl Checks for library functions.
  74. AC_CHECK_FUNCS(socket fabsl strdup vsnprintf tzset)
  75. AC_CHECK_GETDOMAINNAME
  76. AC_CHECK_GETHOSTNAME
  77. AC_C_BIGENDIAN
  78. AC_CHECK_RES_INIT
  79. dnl needed by libkmime
  80. AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
  81. AC_TRY_COMPILE([
  82. #include <time.h>
  83. ], [
  84. timezone = 1;
  85. ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
  86. if test $ac_cv_var_timezone = yes; then
  87. AC_DEFINE(HAVE_TIMEZONE, 1, [define if you have a timezone variable])
  88. fi
  89. dnl needed by libkmime
  90. AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
  91. AC_TRY_COMPILE([
  92. #include <time.h>
  93. ], [
  94. struct tm tm;
  95. tm.tm_gmtoff = 1;
  96. ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
  97. if test $ac_cv_struct_tm_gmtoff = yes; then
  98. AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
  99. fi
  100. AC_LANG_PUSH(C++)
  101. AC_CACHE_CHECK(for stl coping with namespace std, ac_cv_var_stlnamespace,
  102. AC_TRY_COMPILE([
  103. #include <iterator>
  104. struct s : public std::iterator<std::forward_iterator_tag, int> {};
  105. ], [
  106. ], ac_cv_var_stlnamespace=yes, ac_cv_var_stlnamespace=no))
  107. if test $ac_cv_var_stlnamespace = yes; then
  108. AC_DEFINE(HAVE_STLNAMESPACE, 1, [Define if your version of stl is defined in namespace std])
  109. AC_DEFINE(STD_NAMESPACE_PREFIX, [std::], [Namespace prefix the stl is defined in])
  110. else
  111. AC_DEFINE(STD_NAMESPACE_PREFIX, [], [Namespace prefix the stl is defined in])
  112. fi
  113. AC_LANG_POP