summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2009-11-25 21:27:21 -0800
committerRuss Allbery <rra@stanford.edu>2009-11-25 21:27:21 -0800
commit23da37ecfa39e8eede5677a56c25b0daa5d1a254 (patch)
tree5fb14604f2e221eb048383c6c15350796eef4f21 /m4
parenteff5f56d73159ab07ce0e4812dbaae0248930457 (diff)
Update to rra-c-util 2.1 and C TAP Harness 1.1
Update to rra-c-util 2.1: * Revert separation of die into a separate object file. * Fall back on manual library probing if krb5-config doesn't work. * Don't try to use a non-executable krb5-config for GSS-API probes. * Suppress error output from krb5-config GSS-API probes. * Prefer KRB5_CONFIG over a path constructed from --with-gssapi. * Fix network test suite failures when IPv6 is available but disabled. Update to C TAP Harness 1.1: * Summarize results at the end of test execution.
Diffstat (limited to 'm4')
-rw-r--r--m4/gssapi.m434
-rw-r--r--m4/inet-ntoa.m42
-rw-r--r--m4/lib-depends.m44
-rw-r--r--m4/lib-pathname.m436
-rw-r--r--m4/snprintf.m42
-rw-r--r--m4/socket.m44
-rw-r--r--m4/vamacros.m44
7 files changed, 54 insertions, 32 deletions
diff --git a/m4/gssapi.m4 b/m4/gssapi.m4
index 4f44897..4b08569 100644
--- a/m4/gssapi.m4
+++ b/m4/gssapi.m4
@@ -1,4 +1,4 @@
-dnl gssapi.m4 -- Find the compiler and linker flags for GSS-API.
+dnl Find the compiler and linker flags for GSS-API.
dnl
dnl Finds the compiler and linker flags for linking with GSS-API libraries.
dnl Provides the --with-gssapi, --with-gssapi-include, and --with-gssapi-lib
@@ -104,12 +104,16 @@ AC_DEFUN([_RRA_LIB_GSSAPI_MANUAL],
RRA_LIB_GSSAPI_RESTORE])
dnl Sanity-check the results of krb5-config and be sure we can really link a
-dnl GSS-API program.
+dnl GSS-API program. If not, fall back on the manual check.
AC_DEFUN([_RRA_LIB_GSSAPI_CHECK],
[RRA_LIB_GSSAPI_SWITCH
- AC_CHECK_FUNC([gss_import_name], ,
- [AC_MSG_FAILURE([krb5-config results fail for GSS-API])])
- RRA_LIB_GSSAPI_RESTORE])
+ AC_CHECK_FUNC([gss_import_name],
+ [RRA_LIB_GSSAPI_RESTORE],
+ [RRA_LIB_GSSAPI_RESTORE
+ GSSAPI_CPPFLAGS=
+ GSSAPI_LIBS=
+ _RRA_LIB_GSSAPI_PATHS
+ _RRA_LIB_GSSAPI_MANUAL])])
dnl The main macro.
AC_DEFUN([RRA_LIB_GSSAPI],
@@ -125,17 +129,17 @@ AC_DEFUN([RRA_LIB_GSSAPI],
AC_SUBST([GSSAPI_LIBS])
AC_ARG_WITH([gssapi],
- [AC_HELP_STRING([--with-gssapi=DIR],
+ [AS_HELP_STRING([--with-gssapi=DIR],
[Location of GSS-API headers and libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_gssapi_root="$withval"])])
AC_ARG_WITH([gssapi-include],
- [AC_HELP_STRING([--with-gssapi-include=DIR],
+ [AS_HELP_STRING([--with-gssapi-include=DIR],
[Location of GSS-API headers])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_gssapi_includedir="$withval"])])
AC_ARG_WITH([gssapi-lib],
- [AC_HELP_STRING([--with-gssapi-lib=DIR],
+ [AS_HELP_STRING([--with-gssapi-lib=DIR],
[Location of GSS-API libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_gssapi_libdir="$withval"])])
@@ -144,21 +148,21 @@ AC_DEFUN([RRA_LIB_GSSAPI],
[_RRA_LIB_GSSAPI_PATHS
_RRA_LIB_GSSAPI_REDUCED],
[AC_ARG_VAR([KRB5_CONFIG], [Path to krb5-config])
- AS_IF([test x"$rra_gssapi_root" != x],
+ AS_IF([test x"$rra_gssapi_root" != x && test -z "$KRB5_CONFIG"],
[AS_IF([test -x "${rra_gssapi_root}/bin/krb5-config"],
[KRB5_CONFIG="${rra_gssapi_root}/bin/krb5-config"])],
[AC_PATH_PROG([KRB5_CONFIG], [krb5-config])])
- AS_IF([test x"$KRB5_CONFIG" != x],
+ AS_IF([test x"$KRB5_CONFIG" != x && test -x "$KRB5_CONFIG"],
[AC_CACHE_CHECK([for gssapi support in krb5-config],
[rra_cv_lib_gssapi_config],
- [AS_IF(["$KRB5_CONFIG" | grep gssapi > /dev/null 2>&1],
+ [AS_IF(["$KRB5_CONFIG" 2>&1 | grep gssapi >/dev/null 2>&1],
[rra_cv_lib_gssapi_config=yes],
[rra_cv_lib_gssapi_config=no])])
AS_IF([test "$rra_cv_lib_gssapi_config" = yes],
- [GSSAPI_CPPFLAGS=`"$KRB5_CONFIG" --cflags gssapi`
- GSSAPI_LIBS=`"$KRB5_CONFIG" --libs gssapi`],
- [GSSAPI_CPPFLAGS=`"$KRB5_CONFIG" --cflags`
- GSSAPI_LIBS=`"$KRB5_CONFIG" --libs`])
+ [GSSAPI_CPPFLAGS=`"$KRB5_CONFIG" --cflags gssapi 2>/dev/null`
+ GSSAPI_LIBS=`"$KRB5_CONFIG" --libs gssapi 2>/dev/null`],
+ [GSSAPI_CPPFLAGS=`"$KRB5_CONFIG" --cflags 2>/dev/null`
+ GSSAPI_LIBS=`"$KRB5_CONFIG" --libs 2>/dev/null`])
GSSAPI_CPPFLAGS=`echo "$GSSAPI_CPPFLAGS" \
| sed 's%-I/usr/include ?%%'`
_RRA_LIB_GSSAPI_CHECK],
diff --git a/m4/inet-ntoa.m4 b/m4/inet-ntoa.m4
index 6045bd7..d2e75a6 100644
--- a/m4/inet-ntoa.m4
+++ b/m4/inet-ntoa.m4
@@ -38,7 +38,7 @@ AC_DEFUN([RRA_FUNC_INET_NTOA],
[rra_cv_func_inet_ntoa_works=yes],
[rra_cv_func_inet_ntoa_works=no],
[rra_cv_func_inet_ntoa_works=no])])
- AS_IF([test "$rra_cv_func_inet_ntoa_works" = yes],
+ AS_IF([test x"$rra_cv_func_inet_ntoa_works" = xyes],
[AC_DEFINE([HAVE_INET_NTOA], 1,
[Define if your system has a working inet_ntoa function.])],
[AC_LIBOBJ([inet_ntoa])])])
diff --git a/m4/lib-depends.m4 b/m4/lib-depends.m4
index 1d7e769..039e245 100644
--- a/m4/lib-depends.m4
+++ b/m4/lib-depends.m4
@@ -1,4 +1,4 @@
-dnl lib-depends.m4 -- Provides option to change library probes.
+dnl Provides option to change library probes.
dnl
dnl This file provides RRA_ENABLE_REDUCED_DEPENDS, which adds the configure
dnl option --enable-reduced-depends to request that library probes assume
@@ -18,6 +18,6 @@ dnl See LICENSE for licensing terms.
AC_DEFUN([RRA_ENABLE_REDUCED_DEPENDS],
[rra_reduced_depends=false
AC_ARG_ENABLE([reduced-depends],
- [AC_HELP_STRING([--enable-reduced-depends],
+ [AS_HELP_STRING([--enable-reduced-depends],
[Try to minimize shared library dependencies])],
[AS_IF([test x"$enableval" = xyes], [rra_reduced_depends=true])])])
diff --git a/m4/lib-pathname.m4 b/m4/lib-pathname.m4
index beea771..fc326a0 100644
--- a/m4/lib-pathname.m4
+++ b/m4/lib-pathname.m4
@@ -1,14 +1,19 @@
-dnl lib-pathname.m4 -- Determine the library path name.
+dnl Determine the library path name.
dnl
dnl Red Hat systems and some other Linux systems use lib64 and lib32 rather
dnl than just lib in some circumstances. This file provides an Autoconf
-dnl macro, RRA_SET_LDFLAGS, which given a variable and a prefix, adds
-dnl -Lprefix/lib, -Lprefix/lib32, or -Lprefix/lib64 to the variable depending
-dnl on which directories exist and the size of a long in the compilation
-dnl environment.
+dnl macro, RRA_SET_LDFLAGS, which given a variable, a prefix, and an optional
+dnl suffix, adds -Lprefix/lib, -Lprefix/lib32, or -Lprefix/lib64 to the
+dnl variable depending on which directories exist and the size of a long in
+dnl the compilation environment. If a suffix is given, a slash and that
+dnl suffix will be appended, to allow for adding a subdirectory of the library
+dnl directory.
+dnl
+dnl This file also provides the Autoconf macro RRA_SET_LIBDIR, which sets the
+dnl libdir variable to PREFIX/lib{,32,64} as appropriate.
dnl
dnl Written by Russ Allbery <rra@stanford.edu>
-dnl Copyright 2008 Board of Trustees, Leland Stanford Jr. University
+dnl Copyright 2008, 2009 Board of Trustees, Leland Stanford Jr. University
dnl
dnl See LICENSE for licensing terms.
@@ -29,9 +34,22 @@ AC_DEFUN([_RRA_LIB_ARCH_NAME],
[AS_IF([test "$ac_cv_sizeof_long" -eq 8 && test -d /usr/lib64],
[rra_lib_arch_name=lib64])])])
-dnl The public interface. Set VARIABLE to PREFIX/lib{,32,64} as appropriate.
+dnl Set VARIABLE to -LPREFIX/lib{,32,64} or -LPREFIX/lib{,32,64}/SUFFIX as
+dnl appropriate.
AC_DEFUN([RRA_SET_LDFLAGS],
[AC_REQUIRE([_RRA_LIB_ARCH_NAME])
AS_IF([test -d "$2/$rra_lib_arch_name"],
- [$1="-L$2/$rra_lib_arch_name"],
- [$1="-L$2/lib"])])
+ [AS_IF([test x"$3" = x],
+ [$1="[$]$1 -L$2/${rra_lib_arch_name}"],
+ [$1="[$]$1 -L$2/${rra_lib_arch_name}/$3"])],
+ [AS_IF([test x"$3" = x],
+ [$1="[$]$1 -L$2/lib"],
+ [$1="[$]$1 -L$2/lib/$3"])])
+ $1=`echo "[$]$1" | sed -e 's/^ *//'`])
+
+dnl Set libdir to PREFIX/lib{,32,64} as appropriate.
+AC_DEFUN([RRA_SET_LIBDIR],
+[AC_REQUIRE([_RRA_LIB_ARCH_NAME])
+ AS_IF([test -d "$1/$rra_lib_arch_name"],
+ [libdir="$1/${rra_lib_arch_name}"],
+ [libdir="$1/lib"])])
diff --git a/m4/snprintf.m4 b/m4/snprintf.m4
index 1fe8198..d933f55 100644
--- a/m4/snprintf.m4
+++ b/m4/snprintf.m4
@@ -49,7 +49,7 @@ AC_DEFUN([RRA_FUNC_SNPRINTF],
[rra_cv_func_snprintf_works=yes],
[rra_cv_func_snprintf_works=no],
[rra_cv_func_snprintf_works=no])])
- AS_IF([test "$rra_cv_func_snprintf_works" = yes],
+ AS_IF([test x"$rra_cv_func_snprintf_works" = xyes],
[AC_DEFINE([HAVE_SNPRINTF], 1,
[Define if your system has a working snprintf function.])],
[AC_LIBOBJ([snprintf])])])
diff --git a/m4/socket.m4 b/m4/socket.m4
index 60b262a..ed50694 100644
--- a/m4/socket.m4
+++ b/m4/socket.m4
@@ -101,6 +101,6 @@ AC_DEFUN([RRA_MACRO_SA_LEN],
[AC_LINK_IFELSE([AC_LANG_SOURCE([_RRA_MACRO_SA_LEN_SOURCE])],
[rra_cv_sa_len_macro=yes],
[rra_cv_sa_len_macro=no])])
- AS_IF([test "$rra_cv_sa_len_macro" = yes],
+ AS_IF([test x"$rra_cv_sa_len_macro" = xyes],
[AC_DEFINE([HAVE_SA_LEN], 1,
- [Define if <sys/socket.h> defines the SA_LEN macro])])])
+ [Define if <sys/socket.h> defines the SA_LEN macro.])])])
diff --git a/m4/vamacros.m4 b/m4/vamacros.m4
index 5348d31..855bb40 100644
--- a/m4/vamacros.m4
+++ b/m4/vamacros.m4
@@ -36,7 +36,7 @@ AC_DEFUN([RRA_C_C99_VAMACROS],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_RRA_C_C99_VAMACROS_SOURCE])],
[rra_cv_c_c99_vamacros=yes],
[rra_cv_c_c99_vamacros=no])])
- AS_IF([test $rra_cv_c_c99_vamacros = yes],
+ AS_IF([test x"$rra_cv_c_c99_vamacros" = xyes],
[AC_DEFINE([HAVE_C99_VAMACROS], 1,
[Define if the compiler supports C99 variadic macros.])])])
@@ -57,6 +57,6 @@ AC_DEFUN([RRA_C_GNU_VAMACROS],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_RRA_C_GNU_VAMACROS_SOURCE])],
[rra_cv_c_gnu_vamacros=yes],
[rra_cv_c_gnu_vamacros=no])])
- AS_IF([test $rra_cv_c_gnu_vamacros = yes],
+ AS_IF([test x"$rra_cv_c_gnu_vamacros" = xyes],
[AC_DEFINE([HAVE_GNU_VAMACROS], 1,
[Define if the compiler supports GNU-style variadic macros.])])])