From 9df23dddc2bc2260337021a8e7501a5ec46fdabc Mon Sep 17 00:00:00 2001 From: James Zern Date: Sat, 3 Jul 2021 15:37:48 -0700 Subject: [PATCH] configure: move lib flag checks before binaries this ensures the defaults are set properly before testing conditions for enabling certain binaries. previously anim_diff would need --enable-libwebpdemux to be explicitly added though it defaults to enabled. Bug: webp:501 Change-Id: Ifac68eac7096b39e98d0025e07a37b0be3d32c0a --- configure.ac | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/configure.ac b/configure.ac index 35d37483..ce7522e2 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,39 @@ AC_ARG_ENABLE([everything], SET_IF_UNSET([enable_libwebpextras], [$enableval]) SET_IF_UNSET([enable_libwebpmux], [$enableval])]) +dnl === Check whether libwebpmux should be built +AC_MSG_CHECKING(whether libwebpmux is to be built) +AC_ARG_ENABLE([libwebpmux], + AS_HELP_STRING([--enable-libwebpmux], + [Build libwebpmux @<:@default=no@:>@])) +AC_MSG_RESULT(${enable_libwebpmux-no}) +AM_CONDITIONAL([BUILD_MUX], [test "$enable_libwebpmux" = "yes"]) + +dnl === Check whether libwebpdemux should be built +AC_MSG_CHECKING(whether libwebpdemux is to be built) +AC_ARG_ENABLE([libwebpdemux], + AS_HELP_STRING([--disable-libwebpdemux], + [Disable libwebpdemux @<:@default=no@:>@]), + [], [enable_libwebpdemux=yes]) +AC_MSG_RESULT(${enable_libwebpdemux-no}) +AM_CONDITIONAL([BUILD_DEMUX], [test "$enable_libwebpdemux" = "yes"]) + +dnl === Check whether decoder library should be built. +AC_MSG_CHECKING(whether decoder library is to be built) +AC_ARG_ENABLE([libwebpdecoder], + AS_HELP_STRING([--enable-libwebpdecoder], + [Build libwebpdecoder @<:@default=no@:>@])) +AC_MSG_RESULT(${enable_libwebpdecoder-no}) +AM_CONDITIONAL([BUILD_LIBWEBPDECODER], [test "$enable_libwebpdecoder" = "yes"]) + +dnl === Check whether libwebpextras should be built +AC_MSG_CHECKING(whether libwebpextras is to be built) +AC_ARG_ENABLE([libwebpextras], + AS_HELP_STRING([--enable-libwebpextras], + [Build libwebpextras @<:@default=no@:>@])) +AC_MSG_RESULT(${enable_libwebpextras-no}) +AM_CONDITIONAL([BUILD_EXTRAS], [test "$enable_libwebpextras" = "yes"]) + dnl === If --enable-asserts is not defined, define NDEBUG AC_MSG_CHECKING(whether asserts are enabled) @@ -692,39 +725,6 @@ else AC_MSG_RESULT([no]) fi -dnl === Check whether libwebpmux should be built -AC_MSG_CHECKING(whether libwebpmux is to be built) -AC_ARG_ENABLE([libwebpmux], - AS_HELP_STRING([--enable-libwebpmux], - [Build libwebpmux @<:@default=no@:>@])) -AC_MSG_RESULT(${enable_libwebpmux-no}) -AM_CONDITIONAL([BUILD_MUX], [test "$enable_libwebpmux" = "yes"]) - -dnl === Check whether libwebpdemux should be built -AC_MSG_CHECKING(whether libwebpdemux is to be built) -AC_ARG_ENABLE([libwebpdemux], - AS_HELP_STRING([--disable-libwebpdemux], - [Disable libwebpdemux @<:@default=no@:>@]), - [], [enable_libwebpdemux=yes]) -AC_MSG_RESULT(${enable_libwebpdemux-no}) -AM_CONDITIONAL([BUILD_DEMUX], [test "$enable_libwebpdemux" = "yes"]) - -dnl === Check whether decoder library should be built. -AC_MSG_CHECKING(whether decoder library is to be built) -AC_ARG_ENABLE([libwebpdecoder], - AS_HELP_STRING([--enable-libwebpdecoder], - [Build libwebpdecoder @<:@default=no@:>@])) -AC_MSG_RESULT(${enable_libwebpdecoder-no}) -AM_CONDITIONAL([BUILD_LIBWEBPDECODER], [test "$enable_libwebpdecoder" = "yes"]) - -dnl === Check whether libwebpextras should be built -AC_MSG_CHECKING(whether libwebpextras is to be built) -AC_ARG_ENABLE([libwebpextras], - AS_HELP_STRING([--enable-libwebpextras], - [Build libwebpextras @<:@default=no@:>@])) -AC_MSG_RESULT(${enable_libwebpextras-no}) -AM_CONDITIONAL([BUILD_EXTRAS], [test "$enable_libwebpextras" = "yes"]) - dnl ========================= AC_CONFIG_MACRO_DIR([m4])