[librsvg: 3/9] configure: Replace remaining "if" statements with AS_IF
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 3/9] configure: Replace remaining "if" statements with AS_IF
- Date: Mon, 13 Sep 2021 22:42:21 +0000 (UTC)
commit c962119431d0c2e820d640fbfefdd56847ecf6ae
Author: Ismael Luceno <ismael iodev co uk>
Date: Sat Sep 11 17:47:29 2021 +0200
configure: Replace remaining "if" statements with AS_IF
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/586>
configure.ac | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1b2bf549..1650cad5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,21 +168,21 @@ AC_ARG_ENABLE([pixbuf-loader],
AC_MSG_RESULT([$enable_pixbuf_loader])
gdk_pixbuf_moduledir=
-if test "$enable_pixbuf_loader" = "yes"; then
+AS_IF([test "x$enable_pixbuf_loader" = "xyes"], [
PKG_CHECK_MODULES([GDK_PIXBUF],[gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED])
AC_PATH_PROGS([GDK_PIXBUF_QUERYLOADERS],[gdk-pixbuf-query-loaders gdk-pixbuf-query-loaders-64
gdk-pixbuf-query-loaders-32],[none])
- if test "x$GDK_PIXBUF_QUERYLOADERS" = "xnone"; then
+ AS_IF([test "x$GDK_PIXBUF_QUERYLOADERS" = "xnone"], [
AC_MSG_ERROR([gdk-pixbuf-query-loaders not found in path])
- fi
+ ])
# First try the standalone gdk-pixbuf
gdk_pixbuf_binary_version="`$PKG_CONFIG --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0`"
gdk_pixbuf_binarydir="`$PKG_CONFIG --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0`"
gdk_pixbuf_moduledir=`$PKG_CONFIG --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0`
gdk_pixbuf_cache_file=`$PKG_CONFIG --variable gdk_pixbuf_cache_file gdk-pixbuf-2.0`
-fi
+])
AC_SUBST([gdk_pixbuf_binary_version])
AC_SUBST([gdk_pixbuf_binarydir])
@@ -202,16 +202,16 @@ AC_ARG_ENABLE([Bsymbolic],
[enable_Bsymbolic=no],[enable_Bsymbolic=auto])
BSYMBOLIC_LDFLAG=
-if test "$enable_Bsymbolic" != "no"; then
+AS_IF([test "x$enable_Bsymbolic" != "xno"], [
CC_CHECK_LDFLAGS(["-Wl,-Bsymbolic-functions"],
[BSYMBOLIC_LDFLAG="-Wl,-Bsymbolic-functions"],
- [if test "$enable_Bsymbolic" = "auto"; then
+ [AS_IF([test "x$enable_Bsymbolic" = "xauto"], [
AC_MSG_WARN([-Bsymbolic not supported by ld; disabling])
enable_Bsymbolic=no
- else
+ ], [
AC_MSG_ERROR([-Bsymbolic requested but not supported by ld. Use --disable-Bsymbolic to disable])
- fi])
-fi
+ ])])
+])
AC_SUBST([BSYMBOLIC_LDFLAG])
@@ -240,22 +240,22 @@ AC_ARG_ENABLE(debug,
])
AC_MSG_CHECKING(whether to build Rust code with debugging information)
-if test "x$debug_release" = "xyes" ; then
+AS_IF([test "x$debug_release" = "xyes"], [
AC_MSG_RESULT(yes)
RUST_TARGET_SUBDIR=debug
-else
+], [
AC_MSG_RESULT(no)
RUST_TARGET_SUBDIR=release
-fi
+])
AM_CONDITIONAL([DEBUG_RELEASE], [test "x$debug_release" = "xyes"])
AC_ARG_VAR(RUST_TARGET, [Set rust target (default=$host)])
: ${RUST_TARGET:=$host}
-AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
-if test "x$cross_compiling" = "xyes" ; then
+AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" = xyes])
+AS_IF([test "x$cross_compiling" = "xyes"], [
RUST_TARGET_SUBDIR="$RUST_TARGET/$RUST_TARGET_SUBDIR"
-fi
+])
AC_SUBST([RUST_TARGET_SUBDIR])
dnl ===========================================================================
@@ -274,15 +274,14 @@ dnl ===========================================================================
m4_copy([AC_DEFUN],[glib_DEFUN])
glib_DEFUN([GLIB_LC_MESSAGES],
[AC_CHECK_HEADERS([locale.h])
- if test $ac_cv_header_locale_h = yes; then
+ AS_IF([test "x$ac_cv_header_locale_h" = xyes], [
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
+ AS_IF([test "x$am_cv_val_LC_MESSAGES" = xyes], [
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
- fi
- fi])
+ ])])])
GLIB_LC_MESSAGES
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]