Skip to content

Commit

Permalink
Merge pull request networkupstools#2287 from jimklimov/libgd-m4
Browse files Browse the repository at this point in the history
m4/nut_check_libgd.m4: fall back to checking with explicit -lpng …
  • Loading branch information
jimklimov authored Jan 29, 2024
2 parents 1f9ed56 + 99e68f0 commit be1b79a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion m4/nut_check_libgd.m4
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,17 @@ if test -z "${nut_have_libgd_seen}"; then
AC_MSG_CHECKING([with gdlib.pc Libs.private])
LDFLAGS="$LDFLAGS $_LIBS_PRIVATE"
unset ac_cv_search_gdImagePng
AC_SEARCH_LIBS(gdImagePng, gd, [], [nut_have_libgd=no])
AC_SEARCH_LIBS(gdImagePng, gd, [nut_have_libgd=yes], [nut_have_libgd=no])
])
unset _LIBS_PRIVATE
dnl At least mingw 32-bit builds of the DLL seem to not
dnl tell the linker how to get from GD to PNG lib
AS_IF([test x"$nut_have_libgd" = xno], [
AC_MSG_CHECKING([with explicit -lpng in the loop])
LDFLAGS="$LDFLAGS -lgd"
unset ac_cv_search_gdImagePng
AC_SEARCH_LIBS(gdImagePng, png png16, [nut_have_libgd=yes], [nut_have_libgd=no])
])
])
])
Expand Down

0 comments on commit be1b79a

Please sign in to comment.