configure: detect Solaris libc
authorSean McGovern <gseanmcg@gmail.com>
Sun, 8 Dec 2013 22:17:12 +0000 (17:17 -0500)
committerDiego Biurrun <diego@biurrun.de>
Mon, 9 Dec 2013 10:46:44 +0000 (11:46 +0100)
Add preprocessor flags for API availability as necessary.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
configure

index 32009a3..85d54a7 100755 (executable)
--- a/configure
+++ b/configure
@@ -3179,7 +3179,6 @@ case $target_os in
         SHFLAGS='-shared -Wl,-h,$$(@F)'
         enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
         network_extralibs="-lsocket -lnsl"
-        add_cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
         # When using suncc to build, the Solaris linker will mark
         # an executable with each instruction set encountered by
         # the Solaris assembler.  As our libraries contain their own
@@ -3409,6 +3408,9 @@ elif check_cpp_condition stddef.h "defined __KLIBC__"; then
     libc_type=klibc
 elif check_cpp_condition sys/cdefs.h "defined __BIONIC__"; then
     libc_type=bionic
+elif check_cpp_condition sys/brand.h "defined SOLARIS_BRAND_NAME"; then
+    libc_type=solaris
+    add_cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
 fi
 
 test -n "$libc_type" && enable $libc_type