summaryrefslogtreecommitdiffstats
path: root/configure.in.in
blob: fc9ade39d8efbf24d2a69362b127606fddd05345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#MIN_CONFIG
KDE_ENABLE_HIDDEN_VISIBILITY
KDE_INIT_DOXYGEN([KDE Network API Reference], [Version $VERSION])


dnl Checks for header files.
AC_CHECK_HEADERS(linux/tcp.h linux/if_ppp.h)
AC_CHECK_HEADERS(net/errno.h net/if_ppp.h)
AC_CHECK_HEADERS(asm/param.h)
AC_CHECK_HEADERS(sys/file.h sys/stat.h sys/time.h sys/cdefs.h sys/sockio.h)
AC_CHECK_HEADERS(fcntl.h unistd.h fnmatch.h sysent.h strings.h paths.h)
AC_CHECK_HEADERS(utmp.h re_comp.h getopt.h byteswap.h)
AC_CHECK_HEADER([resolv.h],,,[#include <netinet/in.h>])


AC_SYS_LARGEFILE
if test "$ac_cv_sys_file_offset_bits" != no; then
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
fi

if test "x$ac_cv_sys_large_files" != "xno"; then
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
fi

AC_CHECK_FUNCS(flock)
AC_CHECK_USLEEP

dnl Checks for library functions.
AC_CHECK_FUNCS(socket fabsl strdup vsnprintf tzset)
AC_CHECK_SETENV
AC_CHECK_UNSETENV
AC_CHECK_GETDOMAINNAME
AC_CHECK_GETHOSTNAME
AC_C_BIGENDIAN

AC_CHECK_FUNC(res_init)
if test "$ac_cv_func_res_init" = no; then
  AC_CHECK_LIB(resolv, res_init, LIBRESOLV="-lresolv $LIBSOCKET", , $LIBSOCKET)
fi
AC_SUBST(LIBRESOLV)

AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
	AC_TRY_COMPILE([
		#include <time.h>
	], [
		timezone = 1;
	], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
	AC_DEFINE(HAVE_TIMEZONE, 1, [define if you have a timezone variable])
fi
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,	
	AC_TRY_COMPILE([
		#include <time.h>
	], [
		struct tm tm;
		tm.tm_gmtoff = 1;
	], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
if test $ac_cv_struct_tm_gmtoff = yes; then
	AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
fi

# check for SLP
dnl define the configure option that disables slp
AC_ARG_ENABLE(slp, [  --disable-slp     don't require libslp (Browsing in krfb and krdc not possible) ],  with_slp=$enableval, with_slp=yes)
if test "$with_slp" = "yes"; then
AC_MSG_CHECKING(for SLP support)
save_slptest_LIBS="$LIBS"
save_slptest_LDFLAGS="$LDFLAGS"
save_slptest_CPPFLAGS="$CPPFLAGS"
LDFLAGS="$all_libraries $LDFLAGS"
CPPFLAGS="$CPPFLAGS $all_includes"
LIBS="-lslp"
AC_TRY_LINK(	[
			#include <slp.h>
		],[
			SLPOpen(0, SLP_FALSE, (SLPHandle*) 0);
		],[
			AC_DEFINE(HAVE_SLP,1,[Define if SLP is available])
                        LIB_SLP="-lslp"
			AC_MSG_RESULT(yes)
		],[
			AC_MSG_RESULT(no)
                        LIB_SLP=""
])
CPPFLAGS=$save_slptest_CPPFLAGS
LDFLAGS=$save_slptest_LDFLAGS
LIBS=$save_slptest_LIBS
fi
AC_SUBST(LIB_SLP)

KDE_CHECK_THREADING

dnl For apps that NEED threads
if test -z "$LIBPTHREAD" && test -z "$USE_THREADS"; then
  DO_NOT_COMPILE="$DO_NOT_COMPILE kdict krfb krdc"
fi
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

AH_VERBATIM(_osf_config_h,
[
#ifdef __osf__
/* From Tom Leitner */
#if __STDC__
#include <stdarg.h>
#include <stdlib.h>
#else
#include <varargs.h>
#endif
#ifndef __OSF_INCLUDED__
#define __OSF_INCLUDED__
#define MSG_NOSIGNAL 0
#ifndef AF_LOCAL
#define AF_LOCAL 1          /* is the same as AF_UNIX */
#endif
#ifndef herror
#define herror(a)   printf(a)
#endif

#include <sys/types.h>
#ifdef __cplusplus
extern "C" int sethostname (char *name, int name_len );
extern "C" int flock(int filedes, int operation );
#else
int sethostname (char *name, int name_len );
int flock(int filedes, int operation );
#endif
#endif
#endif
])