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