]> granicus.if.org Git - graphviz/commitdiff
Avoid cases where `$with_libgd = yes` in spite of `$use_gd != Yes`
authorLemures Lemniscati <lemures.lemniscati@gmail.com>
Mon, 28 Jun 2021 09:14:39 +0000 (18:14 +0900)
committerLemures Lemniscati <lemures.lemniscati@gmail.com>
Tue, 29 Jun 2021 09:03:27 +0000 (18:03 +0900)
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`

configure.ac

index fbace81a35033cea3dc8a6c9e2c8d02998f9b8c6..ffa21bc747a1e36bad7a5d24bca4d3d3251dfc97 100644 (file)
@@ -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 -----------------------------------