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.

configure.in.in 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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 tdenetwork's configure as too many apps moved
  68. dnl and noone can say which tests are needed and which are obsolete for tdepim ;(
  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. dnl Check libical API version
  101. AC_LANG_SAVE
  102. AC_LANG_CPLUSPLUS
  103. cxx_flags_safe="$CXXFLAGS"
  104. cflags_safe="$CFLAGS"
  105. CXXFLAGS="$CXXFLAGS -I$ac_cv_sword_incdir"
  106. CFLAGS="$CFLAGS -I$ac_cv_sword_incdir"
  107. AC_MSG_CHECKING([for libical >= 0.46])
  108. AC_TRY_COMPILE([extern "C" {
  109. #include <libical/ical.h>
  110. #include <libical/icalparser.h>
  111. #include <libical/icalrestriction.h>
  112. }
  113. ],[icalattach *attach;
  114. attach = icalattach_new_from_data ( (const char *)"TEST", 0, 0 );],
  115. [AC_MSG_RESULT(yes)
  116. AC_DEFINE(USE_LIBICAL_0_46,1,[yes])],
  117. AC_MSG_RESULT(no))
  118. CXXFLAGS="$cxx_flags_safe"
  119. CFLAGS="$cflags_safe"
  120. AC_LANG_RESTORE
  121. AC_LANG_PUSH(C++)
  122. AC_CACHE_CHECK(for stl coping with namespace std, ac_cv_var_stlnamespace,
  123. AC_TRY_COMPILE([
  124. #include <iterator>
  125. struct s : public std::iterator<std::forward_iterator_tag, int> {};
  126. ], [
  127. ], ac_cv_var_stlnamespace=yes, ac_cv_var_stlnamespace=no))
  128. if test $ac_cv_var_stlnamespace = yes; then
  129. AC_DEFINE(HAVE_STLNAMESPACE, 1, [Define if your version of stl is defined in namespace std])
  130. AC_DEFINE(STD_NAMESPACE_PREFIX, [std::], [Namespace prefix the stl is defined in])
  131. else
  132. AC_DEFINE(STD_NAMESPACE_PREFIX, [], [Namespace prefix the stl is defined in])
  133. fi
  134. AC_LANG_POP
  135. dnl Say what we're doing
  136. AC_MSG_CHECKING(if egroupware resource is allowed)
  137. AC_ARG_ENABLE(caldav, [ --disable-egroupware disable egroupware support ], with_egroupware=$enableval, with_egroupware=yes)
  138. if test "$with_egroupware" = "yes"; then
  139. AC_MSG_RESULT([yes])
  140. AM_CONDITIONAL(include_egroupware_SUBDIR, test true = true)
  141. else
  142. AC_MSG_RESULT([no])
  143. AM_CONDITIONAL(include_egroupware_SUBDIR, test true = false)
  144. fi
  145. dnl Say what we're doing
  146. AC_MSG_CHECKING(if kolab resource is allowed)
  147. AC_ARG_ENABLE(caldav, [ --disable-kolab disable kolab support ], with_kolab=$enableval, with_kolab=yes)
  148. if test "$with_kolab" = "yes"; then
  149. AC_MSG_RESULT([yes])
  150. AM_CONDITIONAL(include_kolab_SUBDIR, test true = true)
  151. else
  152. AC_MSG_RESULT([no])
  153. AM_CONDITIONAL(include_kolab_SUBDIR, test true = false)
  154. fi
  155. dnl Say what we're doing
  156. AC_MSG_CHECKING(if slox resource is allowed)
  157. AC_ARG_ENABLE(caldav, [ --disable-slox disable slox support ], with_slox=$enableval, with_slox=yes)
  158. if test "$with_slox" = "yes"; then
  159. AC_MSG_RESULT([yes])
  160. AM_CONDITIONAL(include_slox_SUBDIR, test true = true)
  161. else
  162. AC_MSG_RESULT([no])
  163. AM_CONDITIONAL(include_slox_SUBDIR, test true = false)
  164. fi
  165. dnl Say what we're doing
  166. AC_MSG_CHECKING(if groupwise resource is allowed)
  167. AC_ARG_ENABLE(caldav, [ --disable-groupwise disable groupwise support ], with_groupwise=$enableval, with_groupwise=yes)
  168. if test "$with_groupwise" = "yes"; then
  169. AC_MSG_RESULT([yes])
  170. AM_CONDITIONAL(include_groupwise_SUBDIR, test true = true)
  171. else
  172. AC_MSG_RESULT([no])
  173. AM_CONDITIONAL(include_groupwise_SUBDIR, test true = false)
  174. fi
  175. dnl Say what we're doing
  176. AC_MSG_CHECKING(if featureplan resource is allowed)
  177. AC_ARG_ENABLE(featureplan, [ --disable-featureplan disable featureplan support ], with_featureplan=$enableval, with_featureplan=yes)
  178. if test "$with_featureplan" = "yes"; then
  179. AC_MSG_RESULT([yes])
  180. AM_CONDITIONAL(include_featureplan_SUBDIR, test true = true)
  181. else
  182. AC_MSG_RESULT([no])
  183. AM_CONDITIONAL(include_featureplan_SUBDIR, test true = false)
  184. fi
  185. dnl Say what we're doing
  186. AC_MSG_CHECKING(if groupdav resource is allowed)
  187. AC_ARG_ENABLE(groupdav, [ --disable-groupdav disable groupdav support ], with_groupdav=$enableval, with_groupdav=yes)
  188. if test "$with_groupdav" = "yes"; then
  189. AC_MSG_RESULT([yes])
  190. AM_CONDITIONAL(include_groupdav_SUBDIR, test true = true)
  191. else
  192. AC_MSG_RESULT([no])
  193. AM_CONDITIONAL(include_groupdav_SUBDIR, test true = false)
  194. fi
  195. dnl Say what we're doing
  196. AC_MSG_CHECKING(if birthdays resource is allowed)
  197. AC_ARG_ENABLE(birthdays, [ --disable-birthdays disable birthdays support ], with_birthdays=$enableval, with_birthdays=yes)
  198. if test "$with_birthdays" = "yes"; then
  199. AC_MSG_RESULT([yes])
  200. AM_CONDITIONAL(include_birthdays_SUBDIR, test true = true)
  201. else
  202. AC_MSG_RESULT([no])
  203. AM_CONDITIONAL(include_birthdays_SUBDIR, test true = false)
  204. fi
  205. dnl Say what we're doing
  206. AC_MSG_CHECKING(if newexchange resource is allowed)
  207. AC_ARG_ENABLE(newexchange, [ --disable-newexchange disable newexchange support ], with_newexchange=$enableval, with_newexchange=yes)
  208. if test "$with_newexchange" = "yes"; then
  209. AC_MSG_RESULT([yes])
  210. AM_CONDITIONAL(include_newexchange_SUBDIR, test true = true)
  211. else
  212. AC_MSG_RESULT([no])
  213. AM_CONDITIONAL(include_newexchange_SUBDIR, test true = false)
  214. fi
  215. dnl Say what we're doing
  216. AC_MSG_CHECKING(if scalix resource is allowed)
  217. AC_ARG_ENABLE(scalix, [ --disable-scalix disable scalix support ], with_scalix=$enableval, with_scalix=yes)
  218. if test "$with_scalix" = "yes"; then
  219. AC_MSG_RESULT([yes])
  220. AM_CONDITIONAL(include_scalix_SUBDIR, test true = true)
  221. else
  222. AC_MSG_RESULT([no])
  223. AM_CONDITIONAL(include_scalix_SUBDIR, test true = false)
  224. fi
  225. dnl Say what we're doing
  226. AC_MSG_CHECKING(if caldav resource is allowed)
  227. AC_ARG_ENABLE(caldav, [ --disable-caldav disable caldav support (caldav resources such as Google Calendar and Zimbra will not function) ], with_caldav=$enableval, with_caldav=yes)
  228. if test "$with_caldav" = "yes"; then
  229. AC_MSG_RESULT([yes])
  230. dnl Check caldav API version
  231. AC_LANG_SAVE
  232. AC_LANG_CPLUSPLUS
  233. cxx_flags_safe="$CXXFLAGS"
  234. cflags_safe="$CFLAGS"
  235. CXXFLAGS="$CXXFLAGS"
  236. CFLAGS="$CFLAGS"
  237. AC_MSG_CHECKING([for libcaldav])
  238. AC_TRY_COMPILE([extern "C" {
  239. #include <libcaldav/caldav.h>
  240. }
  241. ],[return 0;],
  242. [AC_MSG_RESULT(found)
  243. AM_CONDITIONAL(include_caldav_SUBDIR, test true = true)],
  244. [AC_MSG_RESULT(not found)
  245. AM_CONDITIONAL(include_caldav_SUBDIR, test true = false)])
  246. CXXFLAGS="$cxx_flags_safe"
  247. CFLAGS="$cflags_safe"
  248. AC_LANG_RESTORE
  249. else
  250. AC_MSG_RESULT([no])
  251. AM_CONDITIONAL(include_caldav_SUBDIR, test true = false)
  252. fi
  253. dnl Say what we're doing
  254. AC_MSG_CHECKING(if carddav resource is allowed)
  255. AC_ARG_ENABLE(carddav, [ --disable-carddav disable carddav support (carddav resources such as Google Contacts and Zimbra will not function) ], with_carddav=$enableval, with_carddav=yes)
  256. if test "$with_carddav" = "yes"; then
  257. AC_MSG_RESULT([yes])
  258. dnl Check carddav API version
  259. AC_LANG_SAVE
  260. AC_LANG_CPLUSPLUS
  261. cxx_flags_safe="$CXXFLAGS"
  262. cflags_safe="$CFLAGS"
  263. CXXFLAGS="$CXXFLAGS"
  264. CFLAGS="$CFLAGS"
  265. AC_MSG_CHECKING([for libcarddav])
  266. AC_TRY_COMPILE([extern "C" {
  267. #include <libcarddav/carddav.h>
  268. }
  269. ],[return 0;],
  270. [AC_MSG_RESULT(found)
  271. AM_CONDITIONAL(include_carddav_SUBDIR, test true = true)],
  272. [AC_MSG_RESULT(not found)
  273. AM_CONDITIONAL(include_carddav_SUBDIR, test true = false)])
  274. CXXFLAGS="$cxx_flags_safe"
  275. CFLAGS="$cflags_safe"
  276. AC_LANG_RESTORE
  277. else
  278. AC_MSG_RESULT([no])
  279. AM_CONDITIONAL(include_carddav_SUBDIR, test true = false)
  280. fi