~ubuntu-branches/ubuntu/oneiric/nis/oneiric-proposed

« back to all changes in this revision

Viewing changes to ypbind-mt-1.19/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2005-11-16 23:42:06 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051116234206-p00omaw5ji5q0qhr
Tags: 3.15-3ubuntu1
Resynchronise with Debian.  (me)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
4
 
AM_CONFIG_HEADER(config.h)
5
 
AC_PREFIX_DEFAULT(/usr)
6
 
 
7
 
dnl Set of available languages.
8
 
ALL_LINGUAS="de"
9
 
 
10
 
AC_SUBST(PACKAGE)
11
 
AC_SUBST(VERSION)
12
 
 
13
 
AC_CANONICAL_HOST
14
 
 
15
 
 
16
 
dnl Checks for programs.
17
 
AC_PROG_CC
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"
21
 
AC_SUBST(WARNFLAGS)
22
 
AC_ISC_POSIX
23
 
AC_PROG_INSTALL
24
 
AC_PROG_MAKE_SET
25
 
AC_PROG_RANLIB
26
 
 
27
 
AM_WITH_DMALLOC
28
 
AM_WITH_EFENCE
29
 
 
30
 
dnl Check for SLP support for rpasswd/rpasswdd
31
 
AC_ARG_ENABLE([slp],
32
 
   AC_HELP_STRING([--disable-slp],[Disable SLP support]))
33
 
 
34
 
AC_CHECK_HEADERS([slp.h])
35
 
 
36
 
SLP_LIBS=""
37
 
if test "$enable_slp" \!= "no"
38
 
then
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
41
 
  then
42
 
    AC_DEFINE(USE_SLP, 1, [Enable SLP support])
43
 
  fi
44
 
fi
45
 
AC_SUBST(SLP_LIBS)
46
 
 
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)
51
 
 
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)
56
 
fi
57
 
 
58
 
dnl Checks for typedefs, structures, and compiler characteristics.
59
 
AC_C_CONST
60
 
 
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
65
 
   AC_MSG_RESULT(yes)
66
 
   AC_DEFINE(HAVE_SOCKLEN_T,1,[Define to 1 if <sys/socket.h> defines socklen_t.])
67
 
else
68
 
   AC_MSG_RESULT(no)
69
 
fi
70
 
 
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)
73
 
 
74
 
dnl Checks for library functions.
75
 
AC_CHECK_FUNCS(getline getdelim vsyslog res_gethostbyname _dns_gethostbyname)
76
 
 
77
 
dnl internationalization macros
78
 
AM_GNU_GETTEXT_VERSION
79
 
AM_GNU_GETTEXT([external])
80
 
 
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
83
 
USE_BROADCAST=0
84
 
 
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.
88
 
case "$host_os" in
89
 
  linux*libc1)
90
 
    dnl send a ping to all server at the same time:
91
 
    USE_BROADCAST=1
92
 
    AC_LIBOBJ(clnt_udp)
93
 
    echo "***"
94
 
    echo "***"
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."
99
 
    echo "***"
100
 
    echo "***"
101
 
    ;;
102
 
  linux*)
103
 
    dnl send a ping to all server at the same time:
104
 
    USE_BROADCAST=1
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))
109
 
        #else
110
 
        #error Library needs fixed clntudp_call
111
 
        #endif], CLNTUDPSRC=yes, CLNTUDPSRC=no)
112
 
        if test x"$CLNTUDPSRC" = x"yes"; then
113
 
           AC_MSG_RESULT(yes)
114
 
        else
115
 
           AC_MSG_RESULT(no)
116
 
           AC_LIBOBJ(clnt_udp)
117
 
        fi
118
 
    ;;
119
 
  solaris2.6 | solaris2.5.1 | solaris2.5)
120
 
    dnl Solaris 2 works without special hacking if it has the pthread library
121
 
    ;;
122
 
  *)
123
 
    echo "***"
124
 
    echo "***"
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."
130
 
    echo "***"
131
 
    echo "*** Thanks,"
132
 
    echo "***    Thorsten Kukuk"
133
 
    echo "***"
134
 
    echo "***"
135
 
    ;;
136
 
esac
137
 
 
138
 
AC_SUBST(USE_BROADCAST)
139
 
 
140
 
AC_OUTPUT(Makefile lib/Makefile src/Makefile man/Makefile m4/Makefile  \
141
 
           po/Makefile.in man/yp.conf.5 man/ypbind.8)