summaryrefslogtreecommitdiffstats
path: root/lib/bind/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bind/configure.in')
-rw-r--r--lib/bind/configure.in217
1 files changed, 203 insertions, 14 deletions
diff --git a/lib/bind/configure.in b/lib/bind/configure.in
index 6e98c5c..9b9b53b 100644
--- a/lib/bind/configure.in
+++ b/lib/bind/configure.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-AC_REVISION($Revision: 1.90.18.34.10.2 $)
+AC_REVISION($Revision: 1.90.18.43 $)
AC_INIT(resolv/herror.c)
AC_PREREQ(2.13)
@@ -169,7 +169,7 @@ AC_PROG_CC
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h)
+AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h memory.h)
AC_C_CONST
AC_C_INLINE
@@ -461,6 +461,7 @@ AC_SUBST(WANT_THREADS_OBJS)
AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE))
AC_CHECK_FUNC(memchr, AC_DEFINE(HAVE_MEMCHR))
+AC_CHECK_FUNC(strtoul, , AC_DEFINE(NEED_STRTOUL))
AC_CHECK_FUNC(if_nametoindex,
[USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
@@ -490,6 +491,16 @@ AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
[NEED_STRERROR="#define NEED_STRERROR 1"])
AC_SUBST(NEED_STRERROR)
+if test -n "$NEED_STRERROR"
+then
+ AC_MSG_CHECKING([for extern char * sys_errlist[]])
+ AC_TRY_LINK([ extern int sys_nerr; extern char *sys_errlist[]; ],
+ [ const char *p = sys_errlist[0]; ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_SYSERROR_LIST),
+ AC_MSG_RESULT(no))
+fi
+
#
# flockfile is usually provided by pthreads, but we may want to use it
# even if compiled with --disable-threads.
@@ -666,6 +677,14 @@ AC_SUBST(PURIFY)
#
# GNU libtool support
#
+case $host in
+sunos*)
+ # Just set the maximum command line length for sunos as it otherwise
+ # takes a exceptionally long time to work it out. Required for libtool.
+ lt_cv_sys_max_cmd_len=4096;
+ ;;
+esac
+
AC_ARG_WITH(libtool,
[ --with-libtool use GNU libtool (following indented options supported)],
use_libtool="$withval", use_libtool="no")
@@ -976,6 +995,8 @@ AC_SUBST(ISC_PLATFORM_NEEDATON)
#
case "$host" in
*-dec-osf*)
+ # Tru64 broke send() by defining it to send_OBSOLETE
+ AC_DEFINE(REENABLE_SEND)
# Turn on 4.4BSD style sa_len support.
AC_DEFINE(_SOCKADDR_LEN)
;;
@@ -1050,6 +1071,7 @@ case "$host" in
*-qnx*) PORT_DIR="port/qnx";;
*-rhapsody*) PORT_DIR="port/rhapsody";;
*-sunos4*)
+ AC_DEFINE(NEED_SUN4PROTOS)
PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
PORT_DIR="port/sunos";;
*-solaris2.[[01234]])
@@ -1246,6 +1268,38 @@ found_rt_iflist
AC_CHECK_FUNC(strsep,
[ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
[ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
+
+
+AC_MSG_CHECKING(for char *sprintf)
+AC_TRY_COMPILE([
+#include <stdio.h>
+],
+[ char buf[2]; return(*sprintf(buf,"x"));],
+AC_DEFINE(SPRINTF_CHAR)
+AC_MSG_RESULT(yes)
+,
+AC_MSG_RESULT(no)
+)
+
+AC_MSG_CHECKING(for char *vsprintf)
+case $host in
+*sunos4*) # not decared in any header file.
+AC_DEFINE(VSPRINTF_CHAR)
+AC_MSG_RESULT(yes)
+;;
+*)
+AC_TRY_COMPILE([
+#include <stdio.h>
+],
+[ char buf[2]; return(*vsprintf(buf,"x"));],
+AC_DEFINE(VSPRINTF_CHAR)
+AC_MSG_RESULT(yes)
+,
+AC_MSG_RESULT(no)
+)
+;;
+esac
+
AC_CHECK_FUNC(vsnprintf,
[ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
@@ -1256,12 +1310,7 @@ AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
-AC_CHECK_FUNC(strerror,
- [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
- [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
-AC_SUBST(USE_SYSERROR_LIST)
-#
# Determine the printf format characters to use when printing
# values of type isc_int64_t. We make the assumption that platforms
# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
@@ -1865,19 +1914,37 @@ AC_SUBST(SETGRENT_VOID)
case $host in
ia64-hp-hpux11.*)
+NGR_R_CONST="#define NGR_R_CONST"
;;
+*-hp-hpux11.*)
+#
+# HPUX doesn't have a prototype for getnetgrent_r().
+#
+NGR_R_CONST="#define NGR_R_CONST"
+NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
+NGR_R_BAD="#define NGR_R_BAD (0)"
+NGR_R_COPY="#define NGR_R_COPY buf, buflen"
+NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
+NGR_R_OK="#define NGR_R_OK 1"
+NGR_R_RETURN="#define NGR_R_RETURN int"
+;;
+
*)
AC_CHECK_FUNC(getnetgrent_r,
AC_TRY_COMPILE(
[
#undef __USE_MISC
#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
#include <netdb.h>
+#include <unistd.h>
int getnetgrent_r(char **m, char **u, char **d, char *b, int l) {}
]
,
[return (0);],
[
+NGR_R_CONST="#define NGR_R_CONST"
NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf, buflen"
@@ -1890,12 +1957,16 @@ AC_TRY_COMPILE(
[
#undef __USE_MISC
#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
#include <netdb.h>
+#include <unistd.h>
int getnetgrent_r(char **m, char **u, char **d, char *b, size_t l) {}
]
,
[return (0);],
[
+NGR_R_CONST="#define NGR_R_CONST"
NGR_R_ARGS="#define NGR_R_ARGS char *buf, size_t buflen"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf, buflen"
@@ -1908,12 +1979,16 @@ AC_TRY_COMPILE(
[
#undef __USE_MISC
#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
#include <netdb.h>
-extern int getnetgrent_r( char **, char **, char **, void **);
+#include <unistd.h>
+extern int getnetgrent_r(char **, char **, char **, void **);
]
,
[return (0);],
[
+NGR_R_CONST="#define NGR_R_CONST"
NGR_R_ARGS="#define NGR_R_ARGS void **buf"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf"
@@ -1923,10 +1998,35 @@ NGR_R_RETURN="#define NGR_R_RETURN int"
NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
]
,
+AC_TRY_COMPILE(
+[
+#undef __USE_MISC
+#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
+#include <netdb.h>
+#include <unistd.h>
+extern int getnetgrent_r(const char **, const char **, const char **, void *);
+]
+,
+[return (0);],
+[
+NGR_R_CONST="#define NGR_R_CONST const"
+NGR_R_ARGS="#define NGR_R_ARGS void *buf"
+NGR_R_BAD="#define NGR_R_BAD (0)"
+NGR_R_COPY="#define NGR_R_COPY buf"
+NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
+NGR_R_OK="#define NGR_R_OK 1"
+NGR_R_RETURN="#define NGR_R_RETURN int"
+NGR_R_PRIVATE="#define NGR_R_PRIVATE 2"
+]
+,
+)
)
)
)
,
+NGR_R_CONST="#define NGR_R_CONST"
NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf, buflen"
@@ -1935,6 +2035,7 @@ NGR_R_OK="#define NGR_R_OK 1"
NGR_R_RETURN="#define NGR_R_RETURN int"
)
esac
+AC_SUBST(NGR_R_CONST)
AC_SUBST(NGR_R_ARGS)
AC_SUBST(NGR_R_BAD)
AC_SUBST(NGR_R_COPY)
@@ -1948,7 +2049,10 @@ AC_TRY_COMPILE(
[
#undef __USE_MISC
#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
#include <netdb.h>
+#include <unistd.h>
void endnetgrent_r(void **ptr);
]
,
@@ -1957,44 +2061,128 @@ void endnetgrent_r(void **ptr);
[
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */"
NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
-NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
+NGR_R_END_ARGS="#define NGR_R_END_ARGS NGR_R_ARGS"
+]
+,
+AC_TRY_COMPILE(
+[
+#undef __USE_MISC
+#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
+#include <netdb.h>
+#include <unistd.h>
+void endnetgrent_r(void *ptr);
+]
+,
+[return (0);]
+,
+[
+NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */"
+NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
+NGR_R_END_ARGS="#define NGR_R_END_ARGS void *buf"
]
,
[
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
-NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
+NGR_R_END_ARGS="#define NGR_R_END_ARGS NGR_R_ARGS"
]
)
+)
,
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
-NGR_R_ENT_ARGS="#undef NGR_R_ENT_ARGS /*empty*/"
+NGR_R_END_ARGS="#undef NGR_R_END_ARGS /*empty*/"
AC_DEFINE(NEED_ENDNETGRENT_R)
)
AC_SUBST(NGR_R_END_RESULT)
AC_SUBST(NGR_R_END_RETURN)
-AC_SUBST(NGR_R_ENT_ARGS)
+AC_SUBST(NGR_R_END_ARGS)
AC_CHECK_FUNC(setnetgrent_r,
[
case "$host" in
*bsdi*)
+ #
+ # No prototype
+ #
NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
+ NGR_R_SET_ARGS="#define NGR_R_SET_ARGS NGR_R_ARGS"
+ NGR_R_SET_CONST="#define NGR_R_SET_CONST"
;;
-*)
+*hpux*)
+ #
+ # No prototype
+ #
NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
+ NGR_R_SET_ARGS="#undef NGR_R_SET_ARGS /* empty */"
+ NGR_R_SET_CONST="#define NGR_R_SET_CONST"
;;
+*)
+AC_TRY_COMPILE(
+[
+#undef __USE_MISC
+#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
+#include <netdb.h>
+#include <unistd.h>
+void setnetgrent_r(void **ptr);
+]
+,
+[return (0);]
+,
+[
+NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /* empty */"
+NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
+NGR_R_SET_ARGS="#define NGR_R_SET_ARGS void **buf"
+NGR_R_SET_CONST="#define NGR_R_SET_CONST"
+]
+,
+AC_TRY_COMPILE(
+[
+#undef __USE_MISC
+#define __USE_MISC
+#undef _REEENTRANT
+#define _REEENTRANT
+#include <netdb.h>
+#include <unistd.h>
+extern int setnetgrent_r(char *, void **);
+]
+,
+[return (0);]
+,
+[
+NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
+NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
+NGR_R_SET_ARGS="#define NGR_R_SET_ARGS void **buf"
+NGR_R_SET_CONST="#define NGR_R_SET_CONST"
+]
+,
+[
+NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
+NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
+NGR_R_SET_ARGS="#undef NGR_R_SET_ARGS"
+NGR_R_SET_CONST="#define NGR_R_SET_CONST const"
+]
+))
+;;
esac
]
,
NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
+NGR_R_SET_ARGS="#undef NGR_R_SET_ARGS"
+NGR_R_SET_CONST="#define NGR_R_SET_CONST const"
)
+
AC_SUBST(NGR_R_SET_RESULT)
AC_SUBST(NGR_R_SET_RETURN)
+AC_SUBST(NGR_R_SET_ARGS)
+AC_SUBST(NGR_R_SET_CONST)
AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
@@ -2590,7 +2778,7 @@ case "$host" in
*-solaris2.9)
hack_shutup_in6addr_init_macros=yes
;;
- *-solaris2.1[0-9])
+ *-solaris2.1[[0-9]])
hack_shutup_in6addr_init_macros=yes
;;
esac
@@ -2675,6 +2863,7 @@ AC_OUTPUT(
port/Makefile
${PORT_DIR}/Makefile
${PORT_INCLUDE}/Makefile
+ include/isc/platform.h
)
# Tell Emacs to edit this file in shell mode.
OpenPOWER on IntegriCloud