summaryrefslogtreecommitdiff
path: root/package/cifs-utils/patches/patch-configure_ac
blob: ac583577652e2185a1985abb01a68acf27f40960 (plain)
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.1.orig/configure.ac	2013-07-02 21:13:33.000000000 +0200
+++ cifs-utils-6.1/configure.ac	2013-10-28 07:33:27.000000000 +0100
@@ -90,13 +90,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, [