diff --git a/configure.in b/configure.in index f9d6c75de0..9bb085a621 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.315 $) +AC_REVISION($Revision: 1.316 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.13) @@ -1424,9 +1424,18 @@ found_rt_iflist # # Check for some other useful functions that are not ever-present. # -AC_CHECK_FUNC(strsep, - [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"], - [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"]) + +# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC +# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77 +# reportedly defines strsep() without declaring it in when +# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and +# AC_CHECK_FUNC() incorrectly succeeds because it declares +# the function itself. +AC_MSG_CHECKING(for correctly declared strsep()) +AC_TRY_LINK([#include ], [char *sp; char *foo = strsep(&sp, ".");], + [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"], + [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"]) + AC_CHECK_FUNC(vsnprintf, [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"], [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"