diff --git a/Makefile.am b/Makefile.am index 12caad495..ba51d91b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Makefile.am, the source file for Makefile.in (and hence Makefile), is # -# Copyright (c) 2018 Cosmin Truta +# Copyright (c) 2018-2023 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # # This code is released under the libpng license. @@ -12,7 +12,7 @@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ ACLOCAL_AMFLAGS = -I scripts # test programs - run on make check, make distcheck -if ENABLE_PNG_TESTS +if ENABLE_TESTS check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp if HAVE_CLOCK_GETTIME check_PROGRAMS += timepng @@ -22,7 +22,7 @@ check_PROGRAMS= endif # Utilities - installed -if ENABLE_PNG_TOOLS +if ENABLE_TOOLS bin_PROGRAMS= pngfix png-fix-itxt else bin_PROGRAMS= @@ -38,7 +38,7 @@ endif # always wrong and always very confusing. BUILT_SOURCES = pnglibconf.h -if ENABLE_PNG_TESTS +if ENABLE_TESTS pngtest_SOURCES = pngtest.c pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la @@ -61,7 +61,7 @@ pngcp_SOURCES = contrib/tools/pngcp.c pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la endif -if ENABLE_PNG_TOOLS +if ENABLE_TOOLS pngfix_SOURCES = contrib/tools/pngfix.c pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la @@ -70,7 +70,7 @@ endif # Generally these are single line shell scripts to run a test with a particular # set of parameters: -if ENABLE_PNG_TESTS +if ENABLE_TESTS TESTS =\ tests/pngtest-all\ tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\ diff --git a/configure.ac b/configure.ac index 4d450e569..051d7933f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # configure.ac -# Copyright (c) 2018-2022 Cosmin Truta +# Copyright (c) 2018-2023 Cosmin Truta # Copyright (c) 2004-2016 Glenn Randers-Pehrson # This code is released under the libpng license. @@ -89,21 +89,23 @@ fi DFNCPP="$CPP" AC_SUBST(DFNCPP) -AC_ARG_ENABLE([png-tests], - AS_HELP_STRING([--enable-png-tests], - [enable building of the test programs. This is done by default - use] - [--disable-png-tests to change this.])) +AC_ARG_ENABLE([tests], + AS_HELP_STRING([--disable-tests], + [do not build the test programs (default is to build)]), + [enable_tests="$enableval"], + [enable_tests=yes]) -AM_CONDITIONAL([ENABLE_PNG_TESTS], - [test "$enable_png_tests" != "no"]) +AM_CONDITIONAL([ENABLE_TESTS], + [test "$enable_tests" != "no"]) -AC_ARG_ENABLE([png-tools], - AS_HELP_STRING([--enable-png-tools], - [enable building of the tool programs. This is done by default - use] - [--disable-png-tools to change this.])) +AC_ARG_ENABLE([tools], + AS_HELP_STRING([--disable-tools], + [do not build the auxiliary tools (default is to build)]), + [enable_tools="$enableval"], + [enable_tools=yes]) -AM_CONDITIONAL([ENABLE_PNG_TOOLS], - [test "$enable_png_tools" != "no"]) +AM_CONDITIONAL([ENABLE_TOOLS], + [test "$enable_tools" != "no"]) # -Werror cannot be passed to GCC in CFLAGS because configure will fail # (it checks the compiler with a program that generates a warning).