1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- cifs-utils-6.3.orig/configure.ac 2014-01-09 17:19:53.000000000 +0100
+++ cifs-utils-6.3/configure.ac 2014-05-06 13:52:11.790306753 +0200
@@ -87,13 +87,25 @@ AC_CHECK_TYPES([ptrdiff_t, ssize_t, uint
# 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([alarm atexit endpwent getmntent getpass gettimeofday inet_ntop malloc memset realloc realpath setenv strchr strcmp strdup strerror strncasecmp strndup strnlen strpbrk strrchr strstr strtol strtoul tolower uname], , [AC_MSG_ERROR([necessary functions(s) not found])])
+
+AC_CHECK_FUNCS([getopt_long], , [AC_MSG_ERROR([getopt_long function not found])])
+AC_MSG_CHECKING([if getopt_long is GNU specific])
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include <features.h>
+#ifndef __GLIBC__
+#error No GNU extension
+#endif
+ ]],[[;]])
+ ],[
+ AC_DEFINE(HAVE_GNU_GETOPT_LONG, 1, [Whether getopt_long has GNU extensions])
+ AC_MSG_RESULT([yes])
+ ],[
+ AC_LIBOBJ([gnu_getopt])
+ AC_MSG_RESULT([no])
+])
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [
|