David Seifert
2017-Jan-15 09:37 UTC
[flac-dev] Updated CFLAGS patches and make test compilation conditional
Hi Erik, I've found a middleground for the problem of setting default CFLAGS. I've gone back to setting them if {C,CXX,CPP,LD}FLAGS are unset at the onset of the configure script (i.e., the user hasn't specified anything) and then proceed to set them to the defaults as before. This has been suggested before: https://lists.gnu.org/archive/html/autoconf/2006-04/msg00022.html In addition, I've added a small compile snippet to check whether _FORTIFY_SOURCE is defined, and if so, do not add it to CPPFLAGS. This is mainly due to the fact that Gentoo's GCC has _FORTIFY_SOURCE always enabled, which causes a ton of superfluous redefinition warnings when adding this flag to CPPFLAGS. Finally, I forgot to add one patch from our repo, namely that noinst_ is the wrong prefix for test programs. These should be prefixed with check_, which causes them only to be compiled when 'make check' is run, making the overall build faster. Regards David
David Seifert
2017-Jan-15 09:37 UTC
[flac-dev] [PATCH 1/2] Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence of building with more debug output information. AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays Gnome has also switched to it from its own custom solution. --- configure.ac | 52 ++++++++++++------ include/FLAC/assert.h | 2 +- m4/ax_check_enable_debug.m4 | 124 ++++++++++++++++++++++++++++++++++++++++++ src/libFLAC/cpu.c | 2 +- src/libFLAC/lpc.c | 4 +- src/libFLAC/stream_encoder.c | 10 ++-- src/plugin_common/Makefile.am | 6 -- src/plugin_common/charset.c | 4 +- src/plugin_xmms/http.c | 12 ++-- src/share/Makefile.am | 6 -- 10 files changed, 176 insertions(+), 46 deletions(-) create mode 100644 m4/ax_check_enable_debug.m4 diff --git a/configure.ac b/configure.ac index a3e0fadb..8576cae5 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,13 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign 1.10 -Wall tar-pax no-dist-gzip dist-xz subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AC_MSG_CHECKING([whether configure should try to set CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS]) +AS_IF([test "x${CFLAGS+set}" = "xset" || test "x${CXXFLAGS+set}" = "xset" || test "x${CPPFLAGS+set}" = "xset" || test "x${LDFLAGS+set}" = "xset"], + [enable_flags_setting=no], + [enable_flags_setting=yes] +) +AC_MSG_RESULT([${enable_flags_setting}]) +AX_CHECK_ENABLE_DEBUG user_cflags=$CFLAGS #Prefer whatever the current ISO standard is. @@ -206,14 +213,7 @@ AC_DEFINE(FLAC__ALIGN_MALLOC_DATA) AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries]) fi -AC_ARG_ENABLE(debug, -AC_HELP_STRING([--enable-debug], [Turn on debugging]), -[case "${enableval}" in - yes) debug=true ;; - no) debug=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; -esac],[debug=false]) -AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue) +AM_CONDITIONAL([DEBUG], [test "x${ax_enable_debug}" = "xyes" || test "x${ax_enable_debug}" = "xinfo"]) AC_ARG_ENABLE(sse, AC_HELP_STRING([--disable-sse], [Disable passing of -msse2 to the compiler]), @@ -390,14 +390,13 @@ AC_DEFINE(FLAC__HAS_NASM) AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler]) fi -if test "x$debug" = xtrue; then - CPPFLAGS="-DDEBUG $CPPFLAGS" - CFLAGS="-g $CFLAGS" -else - CPPFLAGS="-DNDEBUG $CPPFLAGS" - CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//') +dnl If debugging is disabled AND no CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS +dnl are provided, we can set defaults to our liking +AS_IF([test "x${ax_enable_debug}" = "xno" && test "x${enable_flags_setting}" = "xyes"], [ + AC_PROG_SED + CFLAGS=$(echo "$CFLAGS" | $SED 's/-O2//') CFLAGS="-O3 -funroll-loops $CFLAGS" -fi +]) XIPH_GCC_VERSION @@ -406,7 +405,28 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) - XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) + + dnl some distributions (such as Gentoo) have _FORTIFY_SOURCE always + dnl enabled. We test for this situation in order to prevent polluting + dnl the console with messages of macro redefinitions. + AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CFLAGS]) + AC_LINK_IFELSE([ + AC_LANG_SOURCE( + [[ + int main() { + #ifndef _FORTIFY_SOURCE + return 0; + #else + this_is_an_error; + #endif + } + ]] + )], [ + AC_MSG_RESULT([yes]) + XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) + ], [ + AC_MSG_RESULT([no]) + ]) AC_LANG_PUSH([C++]) XIPH_ADD_CXXFLAGS([-Weffc++]) diff --git a/include/FLAC/assert.h b/include/FLAC/assert.h index b546fd07..55b34777 100644 --- a/include/FLAC/assert.h +++ b/include/FLAC/assert.h @@ -34,7 +34,7 @@ #define FLAC__ASSERT_H /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */ -#ifdef DEBUG +#ifndef NDEBUG #include <assert.h> #define FLAC__ASSERT(x) assert(x) #define FLAC__ASSERT_DECLARATION(x) x diff --git a/m4/ax_check_enable_debug.m4 b/m4/ax_check_enable_debug.m4 new file mode 100644 index 00000000..f99d75fe --- /dev/null +++ b/m4/ax_check_enable_debug.m4 @@ -0,0 +1,124 @@ +# ==========================================================================+# http://www.gnu.org/software/autoconf-archive/ax_check_enable_debug.html +# ==========================================================================+# +# SYNOPSIS +# +# AX_CHECK_ENABLE_DEBUG([enable by default=yes/info/profile/no], [ENABLE DEBUG VARIABLES ...], [DISABLE DEBUG VARIABLES NDEBUG ...], [IS-RELEASE]) +# +# DESCRIPTION +# +# Check for the presence of an --enable-debug option to configure, with +# the specified default value used when the option is not present. Return +# the value in the variable $ax_enable_debug. +# +# Specifying 'yes' adds '-g -O0' to the compilation flags for all +# languages. Specifying 'info' adds '-g' to the compilation flags. +# Specifying 'profile' adds '-g -pg' to the compilation flags and '-pg' to +# the linking flags. Otherwise, nothing is added. +# +# Define the variables listed in the second argument if debug is enabled, +# defaulting to no variables. Defines the variables listed in the third +# argument if debug is disabled, defaulting to NDEBUG. All lists of +# variables should be space-separated. +# +# If debug is not enabled, ensure AC_PROG_* will not add debugging flags. +# Should be invoked prior to any AC_PROG_* compiler checks. +# +# IS-RELEASE can be used to change the default to 'no' when making a +# release. Set IS-RELEASE to 'yes' or 'no' as appropriate. By default, it +# uses the value of $ax_is_release, so if you are using the AX_IS_RELEASE +# macro, there is no need to pass this parameter. +# +# AX_IS_RELEASE([git-directory]) +# AX_CHECK_ENABLE_DEBUG() +# +# LICENSE +# +# Copyright (c) 2011 Rhys Ulerich <rhys.ulerich at gmail.com> +# Copyright (c) 2014, 2015 Philip Withnall <philip at tecnocode.co.uk> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +#serial 5 + +AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[ + AC_BEFORE([$0],[AC_PROG_CC])dnl + AC_BEFORE([$0],[AC_PROG_CXX])dnl + AC_BEFORE([$0],[AC_PROG_F77])dnl + AC_BEFORE([$0],[AC_PROG_FC])dnl + + AC_MSG_CHECKING(whether to enable debugging) + + ax_enable_debug_default=m4_tolower(m4_normalize(ifelse([$1],,[no],[$1]))) + ax_enable_debug_is_release=m4_tolower(m4_normalize(ifelse([$4],, + [$ax_is_release], + [$4]))) + + # If this is a release, override the default. + AS_IF([test "$ax_enable_debug_is_release" = "yes"], + [ax_enable_debug_default="no"]) + + m4_define(ax_enable_debug_vars,[m4_normalize(ifelse([$2],,,[$2]))]) + m4_define(ax_disable_debug_vars,[m4_normalize(ifelse([$3],,[NDEBUG],[$3]))]) + + AC_ARG_ENABLE(debug, + [AS_HELP_STRING([--enable-debug=]@<:@yes/info/profile/no@:>@,[compile with debugging])], + [],enable_debug=$ax_enable_debug_default) + + # empty mean debug yes + AS_IF([test "x$enable_debug" = "x"], + [enable_debug="yes"]) + + # case of debug + AS_CASE([$enable_debug], + [yes],[ + AC_MSG_RESULT(yes) + CFLAGS="${CFLAGS} -g -O0" + CXXFLAGS="${CXXFLAGS} -g -O0" + FFLAGS="${FFLAGS} -g -O0" + FCFLAGS="${FCFLAGS} -g -O0" + OBJCFLAGS="${OBJCFLAGS} -g -O0" + ], + [info],[ + AC_MSG_RESULT(info) + CFLAGS="${CFLAGS} -g" + CXXFLAGS="${CXXFLAGS} -g" + FFLAGS="${FFLAGS} -g" + FCFLAGS="${FCFLAGS} -g" + OBJCFLAGS="${OBJCFLAGS} -g" + ], + [profile],[ + AC_MSG_RESULT(profile) + CFLAGS="${CFLAGS} -g -pg" + CXXFLAGS="${CXXFLAGS} -g -pg" + FFLAGS="${FFLAGS} -g -pg" + FCFLAGS="${FCFLAGS} -g -pg" + OBJCFLAGS="${OBJCFLAGS} -g -pg" + LDFLAGS="${LDFLAGS} -pg" + ], + [ + AC_MSG_RESULT(no) + dnl Ensure AC_PROG_CC/CXX/F77/FC/OBJC will not enable debug flags + dnl by setting any unset environment flag variables + AS_IF([test "x${CFLAGS+set}" != "xset"], + [CFLAGS=""]) + AS_IF([test "x${CXXFLAGS+set}" != "xset"], + [CXXFLAGS=""]) + AS_IF([test "x${FFLAGS+set}" != "xset"], + [FFLAGS=""]) + AS_IF([test "x${FCFLAGS+set}" != "xset"], + [FCFLAGS=""]) + AS_IF([test "x${OBJCFLAGS+set}" != "xset"], + [OBJCFLAGS=""]) + ]) + + dnl Define various variables if debugging is disabled. + dnl assert.h is a NOP if NDEBUG is defined, so define it by default. + AS_IF([test "x$enable_debug" = "xyes"], + [m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is enabled])])], + [m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is disabled])])]) + ax_enable_debug=$enable_debug +]) diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c index 6629fb95..5f868090 100644 --- a/src/libFLAC/cpu.c +++ b/src/libFLAC/cpu.c @@ -47,7 +47,7 @@ # include <cpuid.h> /* for __get_cpuid() and __get_cpuid_max() */ #endif -#ifdef DEBUG +#ifndef NDEBUG #include <stdio.h> #define dfprintf fprintf diff --git a/src/libFLAC/lpc.c b/src/libFLAC/lpc.c index 53c3082e..a624c936 100644 --- a/src/libFLAC/lpc.c +++ b/src/libFLAC/lpc.c @@ -42,7 +42,7 @@ #include "private/bitmath.h" #include "private/lpc.h" #include "private/macros.h" -#if defined DEBUG || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE +#if !defined(NDEBUG) || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE #include <stdio.h> #endif @@ -234,7 +234,7 @@ int FLAC__lpc_quantize_coefficients(const FLAC__real lp_coeff[], uint32_t order, const int nshift = -(*shift); double error = 0.0; FLAC__int32 q; -#ifdef DEBUG +#ifndef NDEBUG fprintf(stderr,"FLAC__lpc_quantize_coefficients: negative shift=%d order=%u cmax=%f\n", *shift, order, cmax); #endif for(i = 0; i < order; i++) { diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index 9279c0a3..dcdc70f0 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -3452,7 +3452,7 @@ FLAC__bool process_subframe_( #endif rice_parameter++; /* to account for the signed->uint32_t conversion during rice coding */ if(rice_parameter >= rice_parameter_limit) { -#ifdef DEBUG_VERBOSE +#ifndef NDEBUG fprintf(stderr, "clipping rice_parameter (%u -> %u) @0\n", rice_parameter, rice_parameter_limit - 1); #endif rice_parameter = rice_parameter_limit - 1; @@ -3524,7 +3524,7 @@ FLAC__bool process_subframe_( rice_parameter = (lpc_residual_bits_per_sample > 0.0)? (uint32_t)(lpc_residual_bits_per_sample+0.5) : 0; /* 0.5 is for rounding */ rice_parameter++; /* to account for the signed->uint32_t conversion during rice coding */ if(rice_parameter >= rice_parameter_limit) { -#ifdef DEBUG_VERBOSE +#ifndef NDEBUG fprintf(stderr, "clipping rice_parameter (%u -> %u) @1\n", rice_parameter, rice_parameter_limit - 1); #endif rice_parameter = rice_parameter_limit - 1; @@ -4156,7 +4156,7 @@ FLAC__bool set_partitioned_rice_( min_rice_parameter = suggested_rice_parameter - rice_parameter_search_dist; max_rice_parameter = suggested_rice_parameter + rice_parameter_search_dist; if(max_rice_parameter >= rice_parameter_limit) { -#ifdef DEBUG_VERBOSE +#ifndef NDEBUG fprintf(stderr, "clipping rice_parameter (%u -> %u) @5\n", max_rice_parameter, rice_parameter_limit - 1); #endif max_rice_parameter = rice_parameter_limit - 1; @@ -4246,7 +4246,7 @@ FLAC__bool set_partitioned_rice_( } #endif if(rice_parameter >= rice_parameter_limit) { -#ifdef DEBUG_VERBOSE +#ifndef NDEBUG fprintf(stderr, "clipping rice_parameter (%u -> %u) @6\n", rice_parameter, rice_parameter_limit - 1); #endif rice_parameter = rice_parameter_limit - 1; @@ -4261,7 +4261,7 @@ FLAC__bool set_partitioned_rice_( min_rice_parameter = rice_parameter - rice_parameter_search_dist; max_rice_parameter = rice_parameter + rice_parameter_search_dist; if(max_rice_parameter >= rice_parameter_limit) { -#ifdef DEBUG_VERBOSE +#ifndef NDEBUG fprintf(stderr, "clipping rice_parameter (%u -> %u) @7\n", max_rice_parameter, rice_parameter_limit - 1); #endif max_rice_parameter = rice_parameter_limit - 1; diff --git a/src/plugin_common/Makefile.am b/src/plugin_common/Makefile.am index 6e9e3ed3..a528fb45 100644 --- a/src/plugin_common/Makefile.am +++ b/src/plugin_common/Makefile.am @@ -37,9 +37,3 @@ libplugin_common_la_SOURCES = \ EXTRA_DIST = \ Makefile.lite \ README - -debug: - $(MAKE) all CFLAGS="@DEBUG@" - -profile: - $(MAKE) all CFLAGS="@PROFILE@" diff --git a/src/plugin_common/charset.c b/src/plugin_common/charset.c index 5dded8a0..85e574bc 100644 --- a/src/plugin_common/charset.c +++ b/src/plugin_common/charset.c @@ -75,7 +75,7 @@ char* FLAC_plugin__charset_convert_string (const char *string, char *from, char if ((cd = iconv_open(to, from)) == (iconv_t)-1) { -#ifdef DEBUG +#ifndef NDEBUG fprintf(stderr, "convert_string(): Conversion not supported. Charsets: %s -> %s", from, to); #endif return strdup(string); @@ -115,7 +115,7 @@ retry: length = strlen(input); goto retry; default: -#ifdef DEBUG +#ifndef NDEBUG fprintf(stderr, "convert_string(): Conversion failed. Inputstring: %s; Error: %s", string, strerror(errno)); #endif break; diff --git a/src/plugin_xmms/http.c b/src/plugin_xmms/http.c index 05f7300e..161d1b3d 100644 --- a/src/plugin_xmms/http.c +++ b/src/plugin_xmms/http.c @@ -61,8 +61,6 @@ static gint icy_metaint = 0; extern InputPlugin flac_ip; -#undef DEBUG_UDP - /* Static udp channel functions */ static int udp_establish_listener (gint *sock); static int udp_check_for_data(gint sock); @@ -573,7 +571,7 @@ static int http_connect (gchar *url_, gboolean head, guint64 offset) if (!strncmp(line, "icy-metaint:", 12)) icy_metaint = atoi(line + 12); if (!strncmp(line, "x-audiocast-udpport:", 20)) { -#ifdef DEBUG_UDP +#ifndef NDEBUG fprintf (stderr, "Server wants udp messages on port %d\n", atoi (line + 20)); #endif /*udp_serverport = atoi (line + 20);*/ @@ -752,7 +750,7 @@ static int udp_establish_listener(int *sock) struct sockaddr_in sin; socklen_t sinlen = sizeof (struct sockaddr_in); -#ifdef DEBUG_UDP +#ifndef NDEBUG fprintf (stderr,"Establishing udp listener\n"); #endif @@ -791,7 +789,7 @@ static int udp_establish_listener(int *sock) return -1; } -#ifdef DEBUG_UDP +#ifndef NDEBUG fprintf (stderr,"Listening on local %s:%d\n", inet_ntoa(sin.sin_addr), g_ntohs(sin.sin_port)); #endif @@ -820,7 +818,7 @@ static int udp_check_for_data(int sock) return 0; } buf[len] = '\0'; -#ifdef DEBUG_UDP +#ifndef NDEBUG fprintf (stderr,"Received: [%s]\n", buf); #endif lines = g_strsplit(buf, "\n", 0); @@ -889,7 +887,7 @@ static int udp_check_for_data(int sock) g_log(NULL, G_LOG_LEVEL_WARNING, "udp_check_for_data(): Unable to send ack to server: %s", strerror(errno)); } -#ifdef DEBUG_UDP +#ifndef NDEBUG else fprintf(stderr,"Sent ack: %s", obuf); fprintf (stderr,"Remote: %s:%d\n", inet_ntoa(from.sin_addr), g_ntohs(from.sin_port)); diff --git a/src/share/Makefile.am b/src/share/Makefile.am index 82d0fc96..8e3984a1 100644 --- a/src/share/Makefile.am +++ b/src/share/Makefile.am @@ -92,9 +92,3 @@ replaygain_analysis_libreplaygain_analysis_la_SOURCES = replaygain_analysis/repl replaygain_synthesis_libreplaygain_synthesis_la_CFLAGS = -I $(top_srcdir)/src/share/replaygain_synthesis/include replaygain_synthesis_libreplaygain_synthesis_la_SOURCES = replaygain_synthesis/replaygain_synthesis.c - -debug: - $(MAKE) all CFLAGS="@DEBUG@" - -profile: - $(MAKE) all CFLAGS="@PROFILE@" -- 2.11.0
David Seifert
2017-Jan-15 09:37 UTC
[flac-dev] [PATCH 2/2] Only compile and run tests when running 'make check'
--- src/test_grabbag/cuesheet/Makefile.am | 2 +- src/test_grabbag/picture/Makefile.am | 2 +- src/test_libFLAC++/Makefile.am | 2 +- src/test_libFLAC/Makefile.am | 2 +- src/test_seeking/Makefile.am | 2 +- src/test_streams/Makefile.am | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test_grabbag/cuesheet/Makefile.am b/src/test_grabbag/cuesheet/Makefile.am index 96030407..59ae71f4 100644 --- a/src/test_grabbag/cuesheet/Makefile.am +++ b/src/test_grabbag/cuesheet/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = \ test_cuesheet.vcxproj.filters AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -noinst_PROGRAMS = test_cuesheet +check_PROGRAMS = test_cuesheet test_cuesheet_SOURCES = \ main.c test_cuesheet_LDADD = \ diff --git a/src/test_grabbag/picture/Makefile.am b/src/test_grabbag/picture/Makefile.am index b1a949e5..0ee04a41 100644 --- a/src/test_grabbag/picture/Makefile.am +++ b/src/test_grabbag/picture/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = \ test_picture.vcxproj.filters AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -noinst_PROGRAMS = test_picture +check_PROGRAMS = test_picture test_picture_SOURCES = \ main.c diff --git a/src/test_libFLAC++/Makefile.am b/src/test_libFLAC++/Makefile.am index fec7e81a..31830b29 100644 --- a/src/test_libFLAC++/Makefile.am +++ b/src/test_libFLAC++/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = \ test_libFLAC++.vcxproj.filters AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -noinst_PROGRAMS = test_libFLAC++ +check_PROGRAMS = test_libFLAC++ test_libFLAC___LDADD = \ $(top_builddir)/src/share/grabbag/libgrabbag.la \ $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ diff --git a/src/test_libFLAC/Makefile.am b/src/test_libFLAC/Makefile.am index ee3e1109..22e9453e 100644 --- a/src/test_libFLAC/Makefile.am +++ b/src/test_libFLAC/Makefile.am @@ -24,7 +24,7 @@ EXTRA_DIST = \ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src/libFLAC/include -noinst_PROGRAMS = test_libFLAC +check_PROGRAMS = test_libFLAC test_libFLAC_LDADD = \ $(top_builddir)/src/share/grabbag/libgrabbag.la \ diff --git a/src/test_seeking/Makefile.am b/src/test_seeking/Makefile.am index cb059ed6..b7dd852c 100644 --- a/src/test_seeking/Makefile.am +++ b/src/test_seeking/Makefile.am @@ -26,7 +26,7 @@ AM_CFLAGS = @OGG_CFLAGS@ AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -noinst_PROGRAMS = test_seeking +check_PROGRAMS = test_seeking test_seeking_LDADD = \ $(top_builddir)/src/libFLAC/libFLAC.la diff --git a/src/test_streams/Makefile.am b/src/test_streams/Makefile.am index c5f5df7f..fd66342c 100644 --- a/src/test_streams/Makefile.am +++ b/src/test_streams/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST = \ test_streams.vcxproj.filters AM_CPPFLAGS = -I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include -noinst_PROGRAMS = test_streams +check_PROGRAMS = test_streams test_streams_SOURCES = \ main.c -- 2.11.0
Erik de Castro Lopo
2017-Jan-17 08:40 UTC
[flac-dev] [PATCH 2/2] Only compile and run tests when running 'make check'
David Seifert wrote:> ---Applied. Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Erik de Castro Lopo
2017-Jan-19 09:51 UTC
[flac-dev] [PATCH 1/2] Do not override CFLAGS, as CFLAGS is a user flag.
David Seifert wrote:> * Furthermore, use NDEBUG globally to detect the presence > of building with more debug output information. > AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays > Gnome has also switched to it from its own custom solution.Applied. Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Seemingly Similar Threads
- [PATCH 1/4] Do not override CFLAGS, as CFLAGS is a user flag.
- Updated CFLAGS patches and make test compilation conditional
- Upstreaming Gentoo patches
- [PATCH] Clean up CFLAGS detecting code and add AX macro for _FORTIFY_SOURCE
- PATCH for rice_parameter calculation