delete obsolete entities, the associated docbooks have been removed with r454821...
[kdepim.git] / configure.in.in
blobace40310a10ae4c780519f0341cc7667e9c16556
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)
6 AC_CHECK_SETENV
7 AC_CHECK_UNSETENV
9 KDE_NEED_FLEX
11 if test "$x_includes" != "NONE"; then
12   AC_DEFINE(HAVE_X11_HEADERS,1,Define if you have X11 header files)
15 KDE_INIT_DOXYGEN([KDE PIM API Reference], [Version $VERSION])
17 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"
24 CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
26 # check for libbluetooth (Bluetooth library) because gnokii may require it
27 AC_DEFUN([KDE_CHECK_BLUETOOTH],
29   AC_CHECK_HEADERS(bluetooth/bluetooth.h)
30   LIB_BLUETOOTH=
31   AC_CHECK_LIB(bluetooth, hci_open_dev,
32        [ LIB_BLUETOOTH="-lbluetooth" ],
33        [],
34        [] )
35   AC_SUBST(LIB_BLUETOOTH)
39 # check for libgnokii (Nokia mobile phone library)
40 AC_DEFUN([KDE_CHECK_GNOKII],
42   KDE_CHECK_HEADERS(gnokii.h)
43   AC_REQUIRE([AC_HAVE_XPM])
44   AC_CHECK_LIB(gnokii, gn_cfg_read,
45        [ LIB_GNOKII="-lgnokii $LIB_BLUETOOTH" ],
46        [
47         AC_CHECK_LIB(gnokii, gn_cfg_get,
48         [ LIB_GNOKII="-lgnokii -lintl $LIB_BLUETOOTH" ],
49         [], $all_libraries -lintl -lXpm -lX11 $LIB_BLUETOOTH )
50        ],
51        $all_libraries -lXpm -lX11 $LIB_BLUETOOTH )
52   AC_SUBST(LIB_GNOKII)
55 AC_ARG_WITH(gnokii,
56   [AC_HELP_STRING(--with-gnokii,
57     [enable support for mobile phones through gnokii @<:@default=check@:>@])],
58   [], with_gnokii=check)
60 LIB_GNOKII=
61 if test "x$with_gnokii" != xno; then
62   # for kaddressbook/xxport/ and kmobile/devices/gnokii/
63   KDE_CHECK_BLUETOOTH
64   KDE_CHECK_GNOKII
66   if test "x$with_gnokii" != xcheck && test -z "$LIB_GNOKII"; then
67     AC_MSG_ERROR([--with-gnokii was given, but test for gnokii failed])
68   fi
71 dnl Checks for header files.
72 AC_CHECK_HEADERS(sys/cdefs.h) dnl for libkholidays/lunarphase.cpp
73 AC_CHECK_HEADERS(sys/ioctl.h) dnl for kandy/src/modem.cpp
74 AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h byteswap.h) dnl for at least kmail
76 dnl the below is copied from kdenetwork's configure as too many apps moved
77 dnl and noone can say which tests are needed and which are obsolete for kdepim ;(
79 AC_CHECK_HEADERS(fcntl.h unistd.h sysent.h strings.h paths.h)
81 dnl unused AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])
83 KDE_CHECK_LARGEFILE
85 AC_CHECK_USLEEP
87 dnl Checks for library functions.
88 AC_CHECK_FUNCS(socket fabsl strdup vsnprintf tzset)
89 AC_CHECK_GETDOMAINNAME
90 AC_CHECK_GETHOSTNAME
91 AC_C_BIGENDIAN
93 AC_CHECK_RES_INIT
95 dnl needed by libkmime
96 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
97         AC_TRY_COMPILE([
98                 #include <time.h>
99         ], [
100                 timezone = 1;
101         ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
102 if test $ac_cv_var_timezone = yes; then
103         AC_DEFINE(HAVE_TIMEZONE, 1, [define if you have a timezone variable])
106 dnl needed by libkmime
107 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,      
108         AC_TRY_COMPILE([
109                 #include <time.h>
110         ], [
111                 struct tm tm;
112                 tm.tm_gmtoff = 1;
113         ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
114 if test $ac_cv_struct_tm_gmtoff = yes; then
115         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
118 AC_LANG_PUSH(C++)
119 AC_CACHE_CHECK(for stl coping with namespace std, ac_cv_var_stlnamespace,
120         AC_TRY_COMPILE([
121                 #include <iterator>
122                 struct s : public std::iterator<std::forward_iterator_tag, int> {};
123         ], [
124         ], ac_cv_var_stlnamespace=yes, ac_cv_var_stlnamespace=no))
125 if test $ac_cv_var_stlnamespace = yes; then
126         AC_DEFINE(HAVE_STLNAMESPACE, 1, [Define if your version of stl is defined in namespace std])
127         AC_DEFINE(STD_NAMESPACE_PREFIX, [std::], [Namespace prefix the stl is defined in])
128 else
129         AC_DEFINE(STD_NAMESPACE_PREFIX, [], [Namespace prefix the stl is defined in])
132 AC_LANG_POP