From: Lemures Lemniscati Date: Mon, 28 Jun 2021 09:14:39 +0000 (+0900) Subject: Avoid cases where `$with_libgd = yes` in spite of `$use_gd != Yes` X-Git-Tag: 2.48.0~26^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30abf353b5049e3e2d2e352072f182ab01adf8b2;p=graphviz Avoid cases where `$with_libgd = yes` in spite of `$use_gd != Yes` Such cases would have occurred when the first `test "x$use_gd" = "x"` [1] is true and then the third `test "x$use_gd" = "x"` [2] is false. [1]: Just before `PKG_CHECK_MODULES([GDLIB], [gdlib >= 2.0.33],[` [2]: Just before `# see if we can use the external gd lib` --- diff --git a/configure.ac b/configure.ac index fbace81a3..ffa21bc74 100644 --- a/configure.ac +++ b/configure.ac @@ -2409,7 +2409,6 @@ if test "x$use_gd" = "x"; then AC_CHECK_HEADER(gd.h,,[ AC_MSG_WARN(Optional GD library not available - no gd.h) use_gd="No (gd headers not found)" - with_libgd="no" ]) if test "x$use_gd" = "x"; then AC_CHECK_LIB(gd,main,[ @@ -2418,7 +2417,6 @@ if test "x$use_gd" = "x"; then ],[ AC_MSG_WARN(Optional GD library not available) use_gd="No (library not found)" - with_libgd="no" ]) fi LDFLAGS=$save_LDFLAGS @@ -2427,6 +2425,9 @@ if test "x$use_gd" = "x"; then AC_SUBST([GDLIB_CFLAGS]) AC_SUBST([GDLIB_LIBS]) fi +if test "x$use_gd" != "xYes"; then + with_libgd="no" +fi AM_CONDITIONAL(WITH_LIBGD, [test "x$with_libgd" = "xyes"]) dnl -----------------------------------