1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(src/ypbind-mt.c)
3
AM_INIT_AUTOMAKE(ypbind-mt, 1.19.1)
4
AM_CONFIG_HEADER(config.h)
5
AC_PREFIX_DEFAULT(/usr)
7
dnl Set of available languages.
16
dnl Checks for programs.
18
dnl If we're using gcc, we want warning flags
19
test -n "$GCC" && WARNFLAGS="-Wall"
20
#test -n "$GCC" && WARNFLAGS="-W -Wall -Wbad-function-cast -Wcast-align -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Werror"
30
dnl Check for SLP support for rpasswd/rpasswdd
32
AC_HELP_STRING([--disable-slp],[Disable SLP support]))
34
AC_CHECK_HEADERS([slp.h])
37
if test "$enable_slp" \!= "no"
39
AC_CHECK_LIB(slp,SLPReg,SLP_LIBS="-lslp",SLP_LIBS="")
40
if test -n "$SLP_LIBS" -a x$ac_cv_header_slp_h != xno
42
AC_DEFINE(USE_SLP, 1, [Enable SLP support])
47
dnl Checks for libraries.
48
AC_CHECK_LIB(nsl, yp_get_default_domain)
49
AC_CHECK_LIB(socket, bind)
50
AC_CHECK_LIB(pthread, pthread_create)
52
dnl The difficult part: could we reconfigure NSS or must we use DNS ?
53
AC_CHECK_FUNCS(__nss_configure_lookup)
54
if eval "test \"`echo '$ac_cv_func___nss_configure_lookup'`\" != yes"; then
55
AC_CHECK_LIB(resolv, res_gethostbyname)
58
dnl Checks for typedefs, structures, and compiler characteristics.
61
AC_MSG_CHECKING([wether <sys/socket.h> defiens socklen_t])
62
AC_TRY_COMPILE([#include <sys/socket.h>], [socklen_t sock;],
63
SOCKLEN_T=yes, SOCKLEN_T=no)
64
if test x"$SOCKLEN_T" = x"yes"; then
66
AC_DEFINE(HAVE_SOCKLEN_T,1,[Define to 1 if <sys/socket.h> defines socklen_t.])
71
dnl Checks for header files.
72
AC_CHECK_HEADERS(paths.h sys/filio.h rpc/svc_soc.h rpc/clnt_soc.h nss.h)
74
dnl Checks for library functions.
75
AC_CHECK_FUNCS(getline getdelim vsyslog res_gethostbyname _dns_gethostbyname)
77
dnl internationalization macros
78
AM_GNU_GETTEXT_VERSION
79
AM_GNU_GETTEXT([external])
81
dnl By default, don't send a ping to all server at the same time
82
dnl It doesn't work in the moment
85
dnl glibc 2.0 needs our patched clnt_udp.c, glibc 2.1 not.
86
dnl The following check is stupid, since the glibc could be ported to
87
dnl other platforms in the future, but in the moment, it works.
90
dnl send a ping to all server at the same time:
95
echo "*** ypbind-mt is currently not well tested with Linux libc5."
96
echo "*** libc5 is not really threadsafe, and you need a working"
97
echo "*** pthread package for it. I'm using linuxthreads 0.7.1 for"
98
echo "*** development."
103
dnl send a ping to all server at the same time:
105
dnl Test, if we have glibc 2.0 or glibc 2.1
106
AC_MSG_CHECKING([wether we have glibc 2.1 or later])
107
AC_TRY_COMPILE([#include <features.h>], [#if defined(__GLIBC__) && \
108
(((__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)) || (__GLIBC__ > 2))
110
#error Library needs fixed clntudp_call
111
#endif], CLNTUDPSRC=yes, CLNTUDPSRC=no)
112
if test x"$CLNTUDPSRC" = x"yes"; then
119
solaris2.6 | solaris2.5.1 | solaris2.5)
120
dnl Solaris 2 works without special hacking if it has the pthread library
125
echo "*** ypbind-mt is currently not tested on this platform."
126
echo "*** I don't know if it will work. If it works, please send"
127
echo "*** an email to <kukuk@suse.de> and tell me"
128
echo "*** that this program will work on the platform"
129
echo "*** "$host_cpu-$host_vendor-$host_os", so that I could add it."
132
echo "*** Thorsten Kukuk"
138
AC_SUBST(USE_BROADCAST)
140
AC_OUTPUT(Makefile lib/Makefile src/Makefile man/Makefile m4/Makefile \
141
po/Makefile.in man/yp.conf.5 man/ypbind.8)