Lines Matching +full:- +full:- +full:build +full:- +full:and +full:- +full:test
1 # -*- Autoconf -*-
8 # Redistribution and use in source and binary forms, with or without
11 # notice, this list of conditions and the following disclaimer.
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41 … m4_esyscmd([third_party/nlbuild-autotools/repo/scripts/mkversion -b `cat .default-version` .]),
42 [openthread-devel@googlegroups.com],
46 # Tell the rest of the build system the absolute path where the
47 # nlbuild-autotools repository is rooted at.
49 AC_SUBST(nlbuild_autotools_stem,[third_party/nlbuild-autotools/repo])
53 # OPENTHREAD interface current, revision, and age versions.
74 # Tell autoconf where to find auxilliary build tools (e.g. config.guess,
75 # install-sh, missing, etc.)
77 AC_CONFIG_AUX_DIR([third_party/nlbuild-autotools/repo/third_party/autoconf])
82 AC_CONFIG_MACRO_DIRS([third_party/nlbuild-autotools/repo/third_party/autoconf/m4 third_party/nlbuil…
88 AC_CONFIG_HEADERS([include/openthread-config-generic.h])
91 # Figure out what the canonical build and host tuples are.
107 # a native GNU package, that we want "silent" build rules, and that we want
109 # together at the top-level directory.
111 # Disable silent build rules by either passing --disable-silent-rules to
114 AM_INIT_AUTOMAKE([1.14 foreign silent-rules subdir-objects tar-pax])
117 # Silent build rules requires at least automake-1.11. Employ
133 # Host-os-specific checks
148 AM_CONDITIONAL([OPENTHREAD_TARGET_DARWIN], [test "${OPENTHREAD_TARGET}" = "darwin"])
149 AM_CONDITIONAL([OPENTHREAD_TARGET_LINUX], [test "${OPENTHREAD_TARGET}" = "linux"])
152 # Checks for build host programs
157 # you should try to fix your build environment instead.
158 AC_ARG_ENABLE(no-executables-hack,
159 [AS_HELP_STRING([--enable-no-executables-hack],
162 if test "${enable_no_executables_hack}" = "yes"
170 # Passing -Werror to GCC-based or -compatible compilers breaks some
172 # http://lists.gnu.org/archive/html/autoconf-patches/2008-09/msg00014.html).
174 # If -Werror has been passed transform it into -Wno-error. We'll
181 # These should be checked BEFORE we check for and, implicitly,
214 # Check for and initialize libtool
226 # -Wall CC, CXX
229 PROSPECTIVE_CFLAGS="-Wall -Wextra -Wshadow -Wundef -Wcast-align -Werror -Wno-error=undef -std=c99 -…
230 …IVE_CXXFLAGS="-Wall -Wextra -Wshadow -Wundef -Wcast-align -Werror -Wno-error=undef -std=c++11 -Wno…
235 if test "x${GCC}" = "xyes"; then
237 [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
246 if test "${nl_cv_clang}" = "yes"; then
247 PROSPECTIVE_CFLAGS="${PROSPECTIVE_CFLAGS} -Wconversion -Wno-gnu-zero-variadic-macro-arguments"
248 PROSPECTIVE_CXXFLAGS="${PROSPECTIVE_CXXFLAGS} -Wconversion"
257 -Wno-*)
258 flags_to_check="${flags_to_check} -W${option##-Wno-}"
259 warning_flag_backup="${warning_flag_backup} ${option##-Wno-}";;
269 … final_flags=$(echo $ECHO_N $final_flags | $SED "s|-W${positive_option}|-Wno-${positive_option}|g")
276 if test "${nl_cv_clang}" = "yes"; then
288 if test "${nl_cv_clang}" = "yes"; then
302 # Disable building shared libraries by default (can be enabled with --enable-shared)
309 AC_MSG_NOTICE([checking whether to build debug instances])
315 AM_CONDITIONAL([OPENTHREAD_BUILD_DEBUG], [test "${nl_cv_build_debug}" = "yes"])
318 # Code coverage and compiler optimization
325 AM_CONDITIONAL([OPENTHREAD_BUILD_COVERAGE], [test "${nl_cv_build_coverage}" = "yes"])
329 AM_CONDITIONAL([OPENTHREAD_BUILD_COVERAGE_REPORTS], [test "${nl_cv_build_coverage_reports}" = "yes"…
335 AM_CONDITIONAL([OPENTHREAD_BUILD_OPTIMIZED], [test "${nl_cv_build_optimized}" = "yes"])
339 AC_MSG_CHECKING([whether to build fuzz targets])
340 AC_ARG_ENABLE(fuzz-targets,
341 [AS_HELP_STRING([--enable-fuzz-targets],[Enable building of fuzz targets @<:@default=no@:>@.])],
350 AC_MSG_ERROR([Invalid value ${enableval} for --enable-fuzz-targets])
358 AM_CONDITIONAL([OPENTHREAD_ENABLE_FUZZ_TARGETS], [test "${enable_fuzz_targets}" = "yes"])
360 if test "${enable_fuzz_targets}" = "no" ; then
361 PROSPECTIVE_CXXFLAGS="-fno-rtti"
367 AC_MSG_CHECKING([whether to build with Address Sanitizer support])
368 AC_ARG_ENABLE(address-sanitizer,
369 …[AS_HELP_STRING([--enable-address-sanitizer],[Enable Address Sanitizer support @<:@default=no@:>@.…
378 AC_MSG_ERROR([Invalid value ${enableval} for --enable-address-sanitizer])
386 AM_CONDITIONAL([OPENTHREAD_WITH_ADDRESS_SANITIZER], [test "${enable_address_sanitizer}" = "yes"])
388 if test "${enable_address_sanitizer}" = "yes" ; then
390 PROSPECTIVE_CFLAGS="-fsanitize=address"
391 PROSPECTIVE_CXXFLAGS="-fsanitize=address"
401 AC_MSG_NOTICE([checking whether to build tests])
405 AM_CONDITIONAL([OPENTHREAD_BUILD_TESTS], [test "${nl_cv_build_tests}" = "yes"])
411 AC_ARG_ENABLE(builtin-mbedtls,
412 [AS_HELP_STRING([--enable-builtin-mbedtls],[Enable builtin mbedtls @<:@default=yes@:>@.])],
421 AC_MSG_ERROR([Invalid value ${enable_builtin_mbedtls} for --enable-builtin-mbedtls])
427 if test "$enable_builtin_mbedtls" = "yes" -a ! "${MBEDTLS_CPPFLAGS}"; then
428 MBEDTLS_CPPFLAGS="-I\${abs_top_srcdir}/third_party/mbedtls"
429 MBEDTLS_CPPFLAGS="${MBEDTLS_CPPFLAGS} -I\${abs_top_srcdir}/third_party/mbedtls/repo/include"
430 MBEDTLS_CPPFLAGS="${MBEDTLS_CPPFLAGS} -DMBEDTLS_CONFIG_FILE=\\\"mbedtls-config.h\\\""
433 if test "$enable_builtin_mbedtls" = "yes"; then
434 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=1"
436 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0"
441 AM_CONDITIONAL([OPENTHREAD_ENABLE_BUILTIN_MBEDTLS], [test "${enable_builtin_mbedtls}" = "yes"])
447 AC_MSG_CHECKING([whether to build POSIX applicaton in daemon mode])
448 AC_ARG_ENABLE(posix-daemon,
449 …[AS_HELP_STRING([--enable-posix-daemon], [Build POSIX application in daemon mode@<:@default=no@:>@…
458 AC_MSG_ERROR([Invalid value ${enable_posix} for --enable-posix-daemon])
464 if test "$enable_posix_daemon" = "yes"; then
465 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE=1"
467 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE=0"
471 AM_CONDITIONAL([OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE], [test "${enable_posix_daemon}" = "yes"])
477 AC_MSG_CHECKING([whether to build FTD library])
479 [AS_HELP_STRING([--enable-ftd], [Build FTD library @<:@default=no@:>@.])],
488 AC_MSG_ERROR([Invalid value ${enable_ftd} for --enable-ftd])
495 AM_CONDITIONAL([OPENTHREAD_ENABLE_FTD], [test "${enable_ftd}" = "yes"])
501 AC_MSG_CHECKING([whether to build MTD library])
503 [AS_HELP_STRING([--enable-mtd], [Build MTD library @<:@default=no@:>@.])],
512 AC_MSG_ERROR([Invalid value ${enable_mtd} for --enable-mtd])
519 AM_CONDITIONAL([OPENTHREAD_ENABLE_MTD], [test "${enable_mtd}" = "yes"])
525 AC_MSG_CHECKING([whether to build radio-only library])
526 AC_ARG_ENABLE(radio-only,
527 [AS_HELP_STRING([--enable-radio-only], [Build radio-only library @<:@default=no@:>@.])],
536 AC_MSG_ERROR([Invalid value ${enable_radio_only} for --enable-radio-only])
543 AM_CONDITIONAL([OPENTHREAD_ENABLE_RADIO_ONLY], [test "${enable_radio_only}" = "yes"])
549 AC_MSG_CHECKING([whether to build radio-cli library])
550 AC_ARG_ENABLE(radio-cli,
551 [AS_HELP_STRING([--enable-radio-cli], [Build radio-cli library @<:@default=no@:>@.])],
560 AC_MSG_ERROR([Invalid value ${enable_radio_cli} for --enable-radio-cli])
567 AM_CONDITIONAL([OPENTHREAD_ENABLE_RADIO_CLI], [test "${enable_radio_cli}" = "yes"])
570 # whether to build executables
573 AC_MSG_CHECKING([whether to build executables])
575 [AS_HELP_STRING([--enable-executable], [Build executables @<:@default=yes@:>@.])],
584 AC_MSG_ERROR([Invalid value ${enable_executable} for --enable-executable])
591 AM_CONDITIONAL([OPENTHREAD_ENABLE_EXECUTABLE], [test "${enable_executable}" = "yes"])
597 AC_MSG_CHECKING([whether to build CLI library])
599 [AS_HELP_STRING([--enable-cli], [Build CLI library @<:@default=no@:>@.])],
608 AC_MSG_ERROR([Invalid value ${enable_cli} for --enable-cli])
615 AM_CONDITIONAL([OPENTHREAD_ENABLE_CLI], [test "${enable_cli}" = "yes"])
621 AC_MSG_CHECKING([whether to build NCP library])
623 [AS_HELP_STRING([--enable-ncp], [Build NCP library @<:@default=no@:>@.])],
632 AC_MSG_ERROR([Invalid value ${enable_ncp} for --enable-ncp])
639 AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP], [test "${enable_ncp}" = "yes"])
642 # Readline - readline library to use for POSIX CLI
647 …[AS_HELP_STRING([--with-readline],[Specify the readline library (no|readline|edit) @<:@default=no@…
656 if test "${OPENTHREAD_TARGET}" = darwin && brew --prefix readline > /dev/null; then
657 LDFLAGS="-L$(brew --prefix readline)/lib ${LDFLAGS}"
658 CPPFLAGS="-I$(brew --prefix readline)/include ${CPPFLAGS}"
659 PKG_CONFIG_PATH="$(brew --prefix)/lib/pkgconfig:$PKG_CONFIG_PATH"
667 AC_MSG_ERROR([unexpected --with-readline=${with_readline}])
672 # Vendor Extension - Specify a C++ source file which will be built as part of OpenThread core libra…
676 [vendor-extension],
677 …[AS_HELP_STRING([--with-vendor-extension=<VENDOR_EXT.CPP>],[Specify a C++ source file built as par…
679 if test "${withval}" = "no"
681 elif test '!' -f "${withval}"
682 then AC_MSG_ERROR([Can't open ${withval} for --with-vendor-extension])
695 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_ENABLE_VENDOR_EXTENSION=${OPENTHREAD_ENABLE_VENDOR_EXTENSION}"
697 AC_MSG_RESULT(${OPENTHREAD_VENDOR_EXTENSION_SOURCE-no})
699 AM_CONDITIONAL([OPENTHREAD_ENABLE_VENDOR_EXTENSION], [test "${OPENTHREAD_ENABLE_VENDOR_EXTENSION}" …
702 # NCP Vendor Hook Source - Specify a C++ file that implements the NCP vendor hook.
706 [ncp-vendor-hook-source],
707 …[AS_HELP_STRING([--with-ncp-vendor-hook-source=<VENDOR_HOOK.CPP>],[Specify a C++ file that impleme…
709 if test "${withval}" = "no"
711 elif test '!' -f "${withval}"
712 then AC_MSG_ERROR([Can't open ${withval} for --with-ncp-vendor-hook-source])
715 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_ENABLE_NCP_VENDOR_HOOK=1"
727 AC_MSG_RESULT(${OPENTHREAD_NCP_VENDOR_HOOK_SOURCE-no})
729 AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_VENDOR_HOOK], [test "${OPENTHREAD_ENABLE_NCP_VENDOR_HOOK}" = …
736 [ncp-spinel-encrypter-libs],
737 …[AS_HELP_STRING([--with-ncp-spinel-encrypter-libs=<LIBSPINEL_ENCRYPTER.A>],[Specify library files …
739 if test "${withval}" = "no"
751 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER=${OPENTHREAD_ENABLE_NCP_SPINEL_ENCRY…
753 AC_MSG_RESULT(${OPENTHREAD_NCP_SPINEL_ENCRYPTER_LIBS-no})
755 AM_CONDITIONAL([OPENTHREAD_ENABLE_NCP_SPINEL_ENCRYPTER], [test "${OPENTHREAD_ENABLE_NCP_SPINEL_ENCR…
761 AC_ARG_ENABLE(linker-map,
762 [AS_HELP_STRING([--enable-linker-map],[Enable linker map output @<:@default=no@:>@.])],
771 AC_MSG_ERROR([Invalid value ${enable_linker_map} for --enable-linker-map])
779 AM_CONDITIONAL([OPENTHREAD_ENABLE_LINKER_MAP], [test "${enable_linker_map}" = "yes"])
786 [custom-linker-file],
787 …[AS_HELP_STRING([--with-custom-linker-file=<linkerfile.ld>],[Specify custom linker file (absolute …
797 AM_CONDITIONAL([OPENTHREAD_ENABLE_CUSTOM_LINKER_FILE], [test "${with_custom_linker_file}" = "yes"])
803 AC_MSG_CHECKING([whether to build examples])
806 [AS_HELP_STRING([--with-examples=TARGET],
807 [Build example applications for one of: simulation, cc2538 @<:@default=no@:>@.
809 and any third_party libraries needed to support the examples.])],
818 AC_MSG_ERROR([Invalid value given for --with-examples: ${with_examples}])
824 AM_CONDITIONAL([OPENTHREAD_ENABLE_EXAMPLES], [test ${with_examples} != "no"])
826 AM_CONDITIONAL([OPENTHREAD_EXAMPLES_SIMULATION],[test "${with_examples}" = "simulation"])
827 AM_CONDITIONAL([OPENTHREAD_EXAMPLES_CC2538], [test "${with_examples}" = "cc2538"])
829 …D_EXAMPLES_SIMULATION], CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_EXAMPLES_SIMULATION=1", CPPFLAGS="${CPP…
844 AC_MSG_CHECKING([whether to build platform libraries])
847 [AS_HELP_STRING([--with-platform=TARGET],
848 …[Build OpenThread platform libraries for one of: cc2538, posix, simulation @<:@default=simulation@…
856 AC_MSG_ERROR([Invalid value given for --with-platform: ${with_platform}])
860 # If both --with-platform and --with-examples are specified, make sure the targets match.
868 …AC_MSG_ERROR([Invalid value given for --with-platform: The targets for --with-examples and --with-…
874 # If --with-platform is NOT specified, but --with-examples is, automatically build the
875 # corresponding platform libraries. (Essentially, --with-examples implies --with-platform).
879 AM_CONDITIONAL([OPENTHREAD_ENABLE_PLATFORM], [test ${with_platform} != "no"])
883 AM_CONDITIONAL([OPENTHREAD_PLATFORM_CC2538], [test "${with_platform}" = "cc2538"])
884 AM_CONDITIONAL([OPENTHREAD_PLATFORM_POSIX], [test "${with_platform}" = "posix"])
885 AM_CONDITIONAL([OPENTHREAD_PLATFORM_SIMULATION],[test "${with_platform}" = "simulation"])
887 …PENTHREAD_PLATFORM_POSIX], CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_PLATFORM_POSIX=1", CPPFLAGS="${CPPFL…
902 AC_MSG_CHECKING([whether to build tools])
904 [AS_HELP_STRING([--disable-tools],[Disable building of tools @<:@default=no@:>@.])],
913 AC_MSG_ERROR([Invalid value ${enableval} for --enable-tools])
920 AM_CONDITIONAL([OPENTHREAD_BUILD_TOOLS], [test "${build_tools}" = "yes"])
927 # or not, with 'auto' as the default and establish a default support
932 AM_CONDITIONAL(OPENTHREAD_BUILD_DOCS, [test "${nl_cv_build_docs}" = "yes"])
934 AM_CONDITIONAL(OPENTHREAD_POSIX, [test "${with_platform}" = "posix" -o "${with_examples}" = "simula…
936 AM_CONDITIONAL([OPENTHREAD_ENABLE_SPINEL_RCP], [test OPENTHREAD_PLATFORM_POSIX || test OPENTHREAD_E…
939 # Checks for libraries and packages.
955 CFLAGS="${CFLAGS} -Wno-error=address"
964 # Check for types and structures
979 if test "${ac_no_link}" != "yes"; then
987 # Add any code coverage CPPFLAGS and LDFLAGS
993 CPPFLAGS="${CPPFLAGS} -DOPENTHREAD_CONFIG_FILE='\"openthread-config-generic.h\"'"
995 # user passed in, now that we're clear of an -Werror issues by
996 # transforming -Wno-error back to -Werror.
1001 # Identify the various makefiles and auto-generated files for the package
1030 tools/harness-automation/Makefile
1031 tools/harness-thci/Makefile
1032 tools/spi-hdlc-adapter/Makefile
1036 tests/scripts/thread-cert/Makefile
1042 # Generate the auto-generated files for the package
1053 ---------------------
1057 Build system : ${build}
1062 Build shared libraries : ${enable_shared}
1063 Build static libraries : ${enable_static}
1064 Build debug libraries : ${nl_cv_build_debug}
1065 Build optimized libraries : ${nl_cv_build_optimized}
1066 Build coverage libraries : ${nl_cv_build_coverage}
1067 Build coverage reports : ${nl_cv_build_coverage_reports}
1069 Lcov : ${LCOV:--}
1070 Genhtml : ${GENHTML:--}
1071 Build tests : ${nl_cv_build_tests}
1072 Build fuzz targets : ${enable_fuzz_targets}
1073 Build tools : ${build_tools}
1077 Doxygen : ${DOXYGEN:--}
1078 GraphViz dot : ${DOT:--}
1088 C Preprocessor flags : ${CPPFLAGS:--}
1089 C Compile flags : ${CFLAGS:--}
1090 C++ Compile flags : ${CXXFLAGS:--}
1091 Assembler flags : ${CCASFLAGS:--}
1092 Link flags : ${LDFLAGS:--}