blob: 8078da9bb406ea6466206f7e96ee0f60244d6f0a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 4e2e8dbf3f23ab7dca32286cc0f37bff6ac49e22 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:05:45 +0000
4Subject: [PATCH 04/11] configure: Check for additional features that uclibc
5 doesnt support
6
7This helps in supporting uclibc which does not have all features that
8glibc might have
9
10Upstream-Status: Denied [no desire for uclibc support]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 configure.ac | 18 ++++++++++++++++++
15 1 file changed, 18 insertions(+)
16
17Index: git/configure.ac
18===================================================================
19--- git.orig/configure.ac
20+++ git/configure.ac
21@@ -110,6 +110,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/
22
23 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
24
25+# check for few functions not implemented in uClibc
26+
27+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
28+
29+# check for %ms format support - assume always no if cross compiling
30+
31+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
32+
33+AC_LINK_IFELSE(
34+ [AC_LANG_PROGRAM([
35+ #include <stdio.h>
36+ ],[
37+ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
38+ int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
39+ return (rc==3)?0:1;])],
40+ [AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
41+ [AC_MSG_RESULT([no])])
42+
43 M4_DEFINES=
44
45 AC_CHECK_TOOL(OBJCOPY, objcopy)