summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2011-08-25 16:37:33 -0400
committerJeff Layton <jlayton@samba.org>2011-08-25 16:37:33 -0400
commitfa80f0150ad1803a2705c6a153cf5b64cc18a2d6 (patch)
tree338899118c8cfb4ab05f149079e637bb8fed8c8d /configure.ac
parentaba2fc157c6d45063623615ab25ee24d44c149e5 (diff)
downloadcifs-utils-fa80f0150ad1803a2705c6a153cf5b64cc18a2d6.tar.gz
cifs-utils-fa80f0150ad1803a2705c6a153cf5b64cc18a2d6.tar.bz2
cifs-utils-fa80f0150ad1803a2705c6a153cf5b64cc18a2d6.zip
autoconf: work around broken wbclient.h file
Some versions of wbclient.h have function declarations with bool type args, but they don't include stdbool.h themselves. Make sure that we can deal with that by telling the autoconf test to include stdbool.h explicitly. In order to do that properly we need to move some of the standard header and type tests up in the file. Signed-off-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac59
1 files changed, 32 insertions, 27 deletions
diff --git a/configure.ac b/configure.ac
index 2541f39..2607fb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,33 @@ AC_PROG_CC
AC_PROG_SED
AC_GNU_SOURCE
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_TYPE_UID_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_CHECK_TYPES([ptrdiff_t, ssize_t, uint32_t, uint8_t])
+
+# Checks for library functions.
+AC_FUNC_GETMNTENT
+AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_FUNC_STRNLEN
+
+# check for required functions
+AC_CHECK_FUNCS([alarm atexit endpwent getmntent getpass gettimeofday inet_ntop memset realpath setenv strchr strcmp strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul tolower uname], , [AC_MSG_ERROR([necessary functions(s) not found])])
+
+AC_CHECK_FUNCS(clock_gettime, [], [
+ AC_CHECK_LIB(rt, clock_gettime, [
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
+ AC_DEFINE(HAVE_CLOCK_GETTIME,1,
+ [Whether the clock_gettime func is there])
+ LIBS="$LIBS -lrt"
+ ])
+ ])
+
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h inttypes.h limits.h mntent.h netdb.h stddef.h stdint.h stdbool.h stdlib.h stdio.h errno.h string.h strings.h sys/mount.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h], , [AC_MSG_ERROR([necessary header(s) not found])])
@@ -108,6 +135,11 @@ if test $enable_cifsacl != "no"; then
AC_MSG_WARN([wbclient.h not found, consider installing libwbclient-devel. Disabling getcifsacl.])
enable_cifsacl="no"
fi
+ ],
+ [AC_INCLUDES_DEFAULT]
+ [#ifdef HAVE_STDBOOL_H
+ #include <stdbool.h>
+ #endif
])
fi
if test $enable_cifsupcall != "no"; then
@@ -124,33 +156,6 @@ if test $enable_cifscreds = "yes"; then
AC_CHECK_HEADERS([keyutils.h], , [AC_MSG_ERROR([keyutils.h not found, consider installing keyutils-libs-devel.])])
fi
-# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STDBOOL
-AC_TYPE_UID_T
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_CHECK_TYPES([ptrdiff_t, ssize_t, uint32_t, uint8_t])
-
-# Checks for library functions.
-AC_FUNC_GETMNTENT
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
-AC_FUNC_STRNLEN
-
-# check for required functions
-AC_CHECK_FUNCS([alarm atexit endpwent getmntent getpass gettimeofday inet_ntop memset realpath setenv strchr strcmp strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul tolower uname], , [AC_MSG_ERROR([necessary functions(s) not found])])
-
-AC_CHECK_FUNCS(clock_gettime, [], [
- AC_CHECK_LIB(rt, clock_gettime, [
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
- AC_DEFINE(HAVE_CLOCK_GETTIME,1,
- [Whether the clock_gettime func is there])
- LIBS="$LIBS -lrt"
- ])
- ])
-
# ugly, but I'm not sure how to check for functions in a library that's not in $LIBS
cu_saved_libs=$LIBS