diff options
author | Steve Dickson <steved@redhat.com> | 2009-06-22 09:49:17 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-06-22 09:49:17 -0400 |
commit | 148503a575534a4050d709045a6c0dcddd565445 (patch) | |
tree | fedd1f44cf7c60aa62b2703babcba04c48a77bf2 /aclocal/libtirpc.m4 | |
parent | f91afa8eaee1d7ba390918d00d4f7d3f338d18d3 (diff) | |
download | nfs-utils-148503a575534a4050d709045a6c0dcddd565445.tar.gz nfs-utils-148503a575534a4050d709045a6c0dcddd565445.tar.xz nfs-utils-148503a575534a4050d709045a6c0dcddd565445.zip |
Make --enable-tirpc the default. If --enable-tirpc wasn't explicitly
specified, but TIRPC libs or headers aren't present then just throw a
warning and disable it. If it was explicitly specified, then throw an
error and exit if they aren't present.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'aclocal/libtirpc.m4')
-rw-r--r-- | aclocal/libtirpc.m4 | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4 index af4c7d3..9f0fde0 100644 --- a/aclocal/libtirpc.m4 +++ b/aclocal/libtirpc.m4 @@ -11,17 +11,29 @@ AC_DEFUN([AC_LIBTIRPC], [ dnl if --enable-tirpc was specifed, the following components dnl must be present, and we set up HAVE_ macros for them. - if test "$enable_tirpc" = yes; then + if test "$enable_tirpc" != "no"; then dnl look for the library; add to LIBS if found AC_CHECK_LIB([tirpc], [clnt_tli_create], , - [AC_MSG_ERROR([libtirpc not found.])]) + [if test "$enable_tirpc" = "yes"; then + AC_MSG_ERROR([libtirpc not found.]) + else + AC_MSG_WARN([libtirpc not found. TIRPC disabled!]) + enable_tirpc="no" + fi]) + fi + if test "$enable_tirpc" != "no"; then dnl also must have the headers installed where we expect dnl look for headers; add -I compiler option if found - AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h], , - [AC_MSG_ERROR([libtirpc headers not found.])]) - AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]) + AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h], + AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]), + [if test "$enable_tirpc" = "yes"; then + AC_MSG_ERROR([libtirpc headers not found.]) + else + AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!]) + enable_tirpc="no" + fi]) fi |