blob: 0d637557315b8ea3a23d10647e1f207a587b7a43 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From bb6f1d8a000b337280541afde7cccdcfe03cdeb1 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 06/36] 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
17diff --git a/configure.ac b/configure.ac
18index f51533c..0239fd0 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -112,6 +112,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
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)
46--
471.8.3.1
48