diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 378 |
1 files changed, 329 insertions, 49 deletions
@@ -583,7 +583,7 @@ PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/tuberia.c" -ac_default_prefix="/usr" +ac_default_prefix=/usr # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -623,6 +623,15 @@ ac_includes_default="\ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +VALGRIND_FALSE +VALGRIND_TRUE +TUBERIATEST_FALSE +TUBERIATEST_TRUE +ITCTEST_FALSE +ITCTEST_TRUE +TESTS_FALSE +TESTS_TRUE +has_valgrind LIBOBJS EGREP GREP @@ -718,6 +727,10 @@ ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking +enable_valgrind +enable_tests +enable_itc_test +enable_tuberia_test ' ac_precious_vars='build_alias host_alias @@ -1348,6 +1361,10 @@ Optional Features: do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --disable-valgrind Disable the use of valgrind in tests + --disable-tests Disable all tests + --disable-itc-test Disable ITC test + --disable-tuberia-test Disable Tuberia test Some influential environment variables: CC C compiler command @@ -1477,6 +1494,52 @@ fi } # ac_fn_c_try_compile +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1674,52 +1737,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2142,6 +2159,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + am__api_version='1.16' @@ -4095,10 +4118,55 @@ unknown) ;; esac -AM_CFLAGS="-Wall -Werror" +AM_CFLAGS="-Wall -Wextra -Werror -pedantic" # Checks for libraries. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 +$as_echo_n "checking for pthread_self in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_self+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_self (); +int +main () +{ +return pthread_self (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_self=yes +else + ac_cv_lib_pthread_pthread_self=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } +if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPTHREAD 1 +_ACEOF + + LIBS="-lpthread $LIBS" + +fi + # Checks for header files. ac_ext=c @@ -4515,6 +4583,73 @@ done # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include <stdlib.h> +#else +char *malloc (); +#endif + +int +main () +{ +return ! malloc (0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes +else + ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : + +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h + +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h + + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + + +$as_echo "#define malloc rpl_malloc" >>confdefs.h + +fi + + for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" @@ -4527,7 +4662,114 @@ fi done -ac_config_files="$ac_config_files Makefile src/Makefile" +# Extract the first word of "valgrind", so it can be a program name with args. +set dummy valgrind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_has_valgrind+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$has_valgrind"; then + ac_cv_prog_has_valgrind="$has_valgrind" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_has_valgrind="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_has_valgrind" && ac_cv_prog_has_valgrind="no" +fi +fi +has_valgrind=$ac_cv_prog_has_valgrind +if test -n "$has_valgrind"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_valgrind" >&5 +$as_echo "$has_valgrind" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +# Check whether --enable-valgrind was given. +if test "${enable_valgrind+set}" = set; then : + enableval=$enable_valgrind; +else + enable_valgrind="yes" +fi + +# Check whether --enable-tests was given. +if test "${enable_tests+set}" = set; then : + enableval=$enable_tests; +else + enable_tests="yes" +fi + +# Check whether --enable-itc-test was given. +if test "${enable_itc_test+set}" = set; then : + enableval=$enable_itc_test; +else + enable_itc_test="yes" +fi + +# Check whether --enable-tuberia-test was given. +if test "${enable_tuberia_test+set}" = set; then : + enableval=$enable_tuberia_test; +else + enable_tuberia_test="yes" +fi + + +if test "x$has_valgrind" = xyes; then : + +else + enable_valgrind=no +fi + + if test x$enable_tests = xyes; then + TESTS_TRUE= + TESTS_FALSE='#' +else + TESTS_TRUE='#' + TESTS_FALSE= +fi + + if test x$enable_itc_test = xyes; then + ITCTEST_TRUE= + ITCTEST_FALSE='#' +else + ITCTEST_TRUE='#' + ITCTEST_FALSE= +fi + + if test x$enable_tuberia_test = xyes; then + TUBERIATEST_TRUE= + TUBERIATEST_FALSE='#' +else + TUBERIATEST_TRUE='#' + TUBERIATEST_FALSE= +fi + + if test x$enable_valgrind = xyes; then + VALGRIND_TRUE= + VALGRIND_FALSE='#' +else + VALGRIND_TRUE='#' + VALGRIND_FALSE= +fi + + +ac_config_files="$ac_config_files Makefile src/Makefile test/Makefile tuberia.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4662,6 +4904,22 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${TESTS_TRUE}" && test -z "${TESTS_FALSE}"; then + as_fn_error $? "conditional \"TESTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ITCTEST_TRUE}" && test -z "${ITCTEST_FALSE}"; then + as_fn_error $? "conditional \"ITCTEST\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${TUBERIATEST_TRUE}" && test -z "${TUBERIATEST_FALSE}"; then + as_fn_error $? "conditional \"TUBERIATEST\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${VALGRIND_TRUE}" && test -z "${VALGRIND_FALSE}"; then + as_fn_error $? "conditional \"VALGRIND\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -5258,6 +5516,8 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "tuberia.pc") CONFIG_FILES="$CONFIG_FILES tuberia.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -5987,3 +6247,23 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: has valgrind: $has_valgrind" >&5 +$as_echo "$as_me: has valgrind: $has_valgrind" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: enable valgrind: $enable_valgrind" >&5 +$as_echo "$as_me: enable valgrind: $enable_valgrind" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: enable tests: $enable_tests" >&5 +$as_echo "$as_me: enable tests: $enable_tests" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: enable itc tests: $enable_itc_test" >&5 +$as_echo "$as_me: enable itc tests: $enable_itc_test" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: enable tuberia tests: $enable_tuberia_test" >&5 +$as_echo "$as_me: enable tuberia tests: $enable_tuberia_test" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: prefix: $prefix" >&5 +$as_echo "$as_me: prefix: $prefix" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: exec_prefix: $execprefix" >&5 +$as_echo "$as_me: exec_prefix: $execprefix" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: libdir: $libdir" >&5 +$as_echo "$as_me: libdir: $libdir" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: includedir: $includedir" >&5 +$as_echo "$as_me: includedir: $includedir" >&6;} + |