summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure217
1 files changed, 145 insertions, 72 deletions
diff --git a/configure b/configure
index c7c0608c9..deaf3979e 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 432281 .
+# From configure.ac Revision.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for asterisk trunk.
#
@@ -687,9 +687,6 @@ PBX_RTLD_NOLOAD
PBX_GLOB_BRACE
PBX_GLOB_NOMAGIC
AST_RPATH
-AST_CLANG_BLOCKS
-AST_CLANG_BLOCKS_LIBS
-AST_NESTED_FUNCTIONS
AST_NATIVE_ARCH
AST_SHADOW_WARNINGS
AST_NO_STRICT_OVERFLOW
@@ -1140,6 +1137,10 @@ PBX_ALSA
ALSA_DIR
ALSA_INCLUDE
ALSA_LIB
+AST_C_COMPILER_FAMILY
+AST_CLANG_BLOCKS
+AST_CLANG_BLOCKS_LIBS
+AST_NESTED_FUNCTIONS
AST_CODE_COVERAGE
AST_DEVMODE_STRICT
AST_DEVMODE
@@ -8217,6 +8218,146 @@ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAII support" >&5
+$as_echo_n "checking for RAII support... " >&6; }
+ AST_C_COMPILER_FAMILY=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ int main() {
+ #if defined(__clang__)
+ choke
+ #endif
+ return 0;
+ }
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc -fnested-functions" >&5
+$as_echo_n "checking for gcc -fnested-functions... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+auto void foo(void); void foo(void) {}
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ AST_NESTED_FUNCTIONS=""
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+
+ AST_NESTED_FUNCTIONS="-fnested-functions"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ AST_C_COMPILER_FAMILY="gcc"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang -fblocks" >&5
+$as_echo_n "checking for clang -fblocks... " >&6; }
+ if test "`echo "int main(){return ^{return 42;}();}" | ${CC} -o /dev/null -fblocks -x c - 2>&1`" = ""; then
+ AST_CLANG_BLOCKS_LIBS=""
+ AST_CLANG_BLOCKS="-Wno-unknown-warning-option -fblocks"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ elif test "`echo "int main(){return ^{return 42;}();}" | ${CC} -o /dev/null -fblocks -x c -lBlocksRuntime - 2>&1`" = ""; then
+ AST_CLANG_BLOCKS_LIBS="-lBlocksRuntime"
+ AST_CLANG_BLOCKS="-fblocks"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ as_fn_error $? "BlocksRuntime is required for clang, please install libblocksruntime" "$LINENO" 5
+ fi
+
+
+ AST_C_COMPILER_FAMILY="clang"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "${AST_C_COMPILER_FAMILY}"; then
+ as_fn_error $? "Compiler ${CC} not supported. Mminimum required gcc-4.3 / llvm-gcc-4.3 / clang-3.3 + libblocksruntime-dev" "$LINENO" 5
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang strsep/strcmp optimization" >&5
+$as_echo_n "checking for clang strsep/strcmp optimization... " >&6; }
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -O1 -Werror=array-bounds"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <stdio.h>
+ #include <string.h>
+
+ /* fails with clang and -O1 */
+ void test_strsep_strcmp (void) {
+ char *haystackstr = "test1,test2";
+ char *outstr;
+ if (!strcmp(haystackstr, ",")) {
+ printf("fail\n");
+ }
+ if ((outstr = strsep(&haystackstr, ","))) {
+ printf("fail:%s\n", outstr);
+ }
+ }
+ int main(int argc, char *argv) {
+ test_strsep_strcmp();
+ return 0;
+ }
+
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+
+
+$as_echo "#define _HAVE_STRING_ARCH_strcmp 1" >>confdefs.h
+
+
+$as_echo "#define _HAVE_STRING_ARCH_strsep 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: prevent use of __string2_1bptr_p / strsep / strcmp from bits/string2.h" >&5
+$as_echo "prevent use of __string2_1bptr_p / strsep / strcmp from bits/string2.h" >&6; }
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$save_CFLAGS"
+
+
# AST_EXT_LIB_SETUP is used to tell configure to handle variables for
# various packages.
# $1 is the prefix for the variables in makeopts and autoconfig.h
@@ -17376,74 +17517,6 @@ $as_echo "no" >&6; }
fi
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- #if defined(__clang__)
- choke
- #endif
-
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc -fnested-functions" >&5
-$as_echo_n "checking for gcc -fnested-functions... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-auto void foo(void); void foo(void) {}
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- AST_NESTED_FUNCTIONS=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- AST_NESTED_FUNCTIONS=-fnested-functions
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang -fblocks" >&5
-$as_echo_n "checking for clang -fblocks... " >&6; }
- if test "`echo "int main(){return ^{return 42;}();}" | ${CC} -o /dev/null -fblocks -x c - 2>&1`" = ""; then
- AST_CLANG_BLOCKS_LIBS=""
- AST_CLANG_BLOCKS="-Wno-unknown-warning-option -fblocks"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- elif test "`echo "int main(){return ^{return 42;}();}" | ${CC} -o /dev/null -fblocks -x c -lBlocksRuntime - 2>&1`" = ""; then
- AST_CLANG_BLOCKS_LIBS="-lBlocksRuntime"
- AST_CLANG_BLOCKS="-fblocks"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- as_fn_error $? "\"BlocksRuntime is required for clang\"" "$LINENO" 5
- fi
-
-
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
# Check whether --enable-rpath was given.
if test "${enable_rpath+set}" = set; then :