Add common code for buddy icon retrieving and remove the old one.
[kdenetwork.git] / configure.in.in
blobd888246d45c67acbb6fe140d777941f089340045
1 #MIN_CONFIG
2 KDE_ENABLE_HIDDEN_VISIBILITY
4 DO_NOT_COMPILE="$DO_NOT_COMPILE kopete"
6 dnl Checks for header files.
7 AC_CHECK_HEADERS(linux/tcp.h linux/if_ppp.h)
8 AC_CHECK_HEADERS(net/errno.h net/if_ppp.h)
9 AC_CHECK_HEADERS(asm/param.h)
10 AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h sys/cdefs.h sys/sockio.h)
11 AC_CHECK_HEADERS(fcntl.h unistd.h fnmatch.h sysent.h strings.h paths.h)
12 AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h byteswap.h)
13 AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])
16 AC_SYS_LARGEFILE
17 if test "$ac_cv_sys_file_offset_bits" != no; then
18   CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
21 if test "x$ac_cv_sys_large_files" != "xno"; then
22   CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
25 AC_CHECK_FUNCS(flock)
26 AC_CHECK_USLEEP
28 dnl Checks for library functions.
29 AC_CHECK_FUNCS(socket fabsl strdup vsnprintf tzset)
30 AC_CHECK_SETENV
31 AC_CHECK_UNSETENV
32 AC_CHECK_GETDOMAINNAME
33 AC_CHECK_GETHOSTNAME
34 AC_C_BIGENDIAN
36 AC_CHECK_FUNC(res_init)
37 if test "$ac_cv_func_res_init" = no; then
38   AC_CHECK_LIB(resolv, res_init, LIBRESOLV="-lresolv $LIBSOCKET", , $LIBSOCKET)
40 AC_SUBST(LIBRESOLV)
42 AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
43         AC_TRY_COMPILE([
44                 #include <time.h>
45         ], [
46                 timezone = 1;
47         ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
48 if test $ac_cv_var_timezone = yes; then
49         AC_DEFINE(HAVE_TIMEZONE, 1, [define if you have a timezone variable])
51 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,      
52         AC_TRY_COMPILE([
53                 #include <time.h>
54         ], [
55                 struct tm tm;
56                 tm.tm_gmtoff = 1;
57         ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
58 if test $ac_cv_struct_tm_gmtoff = yes; then
59         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
62 # check for SLP
63 dnl define the configure option that disables slp
64 AC_ARG_ENABLE(slp, [  --disable-slp     don't require libslp (Browsing in krfb and krdc not possible) ],  with_slp=$enableval, with_slp=yes)
65 if test "$with_slp" = "yes"; then
66 AC_MSG_CHECKING(for SLP support)
67 save_slptest_LIBS="$LIBS"
68 save_slptest_LDFLAGS="$LDFLAGS"
69 save_slptest_CPPFLAGS="$CPPFLAGS"
70 LDFLAGS="$all_libraries $LDFLAGS"
71 CPPFLAGS="$CPPFLAGS $all_includes"
72 LIBS="-lslp"
73 AC_TRY_LINK(    [
74                         #include <slp.h>
75                 ],[
76                         SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
77                 ],[
78                         AC_DEFINE(HAVE_SLP,1,[Define if SLP is available])
79                         LIB_SLP="-lslp"
80                         AC_MSG_RESULT(yes)
81                 ],[
82                         AC_MSG_RESULT(no)
83                         LIB_SLP=""
85 CPPFLAGS=$save_slptest_CPPFLAGS
86 LDFLAGS=$save_slptest_LDFLAGS
87 LIBS=$save_slptest_LIBS
89 AC_SUBST(LIB_SLP)
91 KDE_CHECK_THREADING
93 dnl For apps that NEED threads
94 if test -z "$LIBPTHREAD" && test -z "$USE_THREADS"; then
95   DO_NOT_COMPILE="$DO_NOT_COMPILE kdict krfb krdc"
97 CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
99 AH_VERBATIM(_osf_config_h,
101 #ifdef __osf__
102 /* From Tom Leitner */
103 #if __STDC__
104 #include <stdarg.h>
105 #include <stdlib.h>
106 #else
107 #include <varargs.h>
108 #endif
109 #ifndef __OSF_INCLUDED__
110 #define __OSF_INCLUDED__
111 #define MSG_NOSIGNAL 0
112 #ifndef AF_LOCAL
113 #define AF_LOCAL 1          /* is the same as AF_UNIX */
114 #endif
115 #ifndef herror
116 #define herror(a)   printf(a)
117 #endif
119 #include <sys/types.h>
120 #ifdef __cplusplus
121 extern "C" int sethostname (char *name, int name_len );
122 extern "C" int flock(int filedes, int operation );
123 #else
124 int sethostname (char *name, int name_len );
125 int flock(int filedes, int operation );
126 #endif
127 #endif
128 #endif