X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=01163cde0ebd6864e19c5f1de7ff9ca5bd1c32d4;hb=65489c1ada6a362a492b7929c1a567a80266f202;hp=c32112dc43df782abe9d52f1f44d53ffc16008ad;hpb=ba1c29dc2227dc0d4c47e189ce0682ee63a862a7;p=libsigrok.git diff --git a/configure.ac b/configure.ac index c32112dc..01163cde 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,6 @@ AH_BOTTOM([#endif /* SR_CONFIG_H */]) # Checks for programs. AC_PROG_CC -AC_PROG_CPP AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LN_S @@ -74,7 +73,7 @@ SR_PKG_CHECK_SUMMARY([sr_pkglibs_summary]) # These are used to derive the compiler flags and for the "Requires.private" # field in the generated libsigrok.pc file. SR_VAR_OPT_PKG([SR_PKGLIBS], [sr_deps_avail]) -SR_PKGLIBS_CHECK= +SR_PKGLIBS_TESTS= SR_PKGLIBS_CXX= SR_PKGLIBS_PYTHON= @@ -102,15 +101,15 @@ SR_ARG_OPT_PKG([libgpib], [LIBGPIB], [NEED_GPIB], ###################### # The Check unit testing framework is optional. Disable if not found. -SR_PKG_CHECK([check], [SR_PKGLIBS_CHECK], [check >= 0.9.4]) +SR_PKG_CHECK([check], [SR_PKGLIBS_TESTS], [check >= 0.9.4]) AM_CONDITIONAL([HAVE_CHECK], [test "x$sr_have_check" = xyes]) AC_LANG([C]) -# Enable the C11 standard if possible, and enforce the use +# Enable the C99 standard if possible, and enforce the use # of SR_API to explicitly mark all public API functions. SR_EXTRA_CFLAGS= -SR_CHECK_COMPILE_FLAGS([SR_EXTRA_CFLAGS], [C11], [-std=gnu11 -std=c11]) +SR_CHECK_COMPILE_FLAGS([SR_EXTRA_CFLAGS], [C99], [-std=c99 -c99 -AC99 -qlanglvl=extc99]) SR_CHECK_COMPILE_FLAGS([SR_EXTRA_CFLAGS], [visibility], [-fvisibility=hidden]) SR_ARG_ENABLE_WARNINGS([SR_WFLAGS], [-Wall], [-Wall -Wextra -Wmissing-prototypes]) @@ -258,7 +257,7 @@ AC_ARG_ENABLE([java], sr_cxx_missing= # Check if the C++ compiler supports the C++11 standard. -AX_CXX_COMPILE_STDCXX_11(, [optional]) +AX_CXX_COMPILE_STDCXX_11([noext], [optional]) AS_IF([test "x$HAVE_CXX11" != x1], [SR_APPEND([sr_cxx_missing], [', '], ['C++11'])]) @@ -396,7 +395,7 @@ AC_SUBST([SR_PKGLIBS]) # Retrieve the compile and link flags for all modules combined. # Also, bail out at this point if any module dependency is not met. PKG_CHECK_MODULES([LIBSIGROK], [glib-2.0 >= 2.32.0 $SR_PKGLIBS]) -PKG_CHECK_MODULES([CHECK], [$SR_PKGLIBS_CHECK glib-2.0 $SR_PKGLIBS]) +PKG_CHECK_MODULES([TESTS], [$SR_PKGLIBS_TESTS glib-2.0 $SR_PKGLIBS]) # SR_PKGLIBS_CXX may be empty, so only invoke these checks when # the C++ bindings are enabled.