diff --git a/configure b/configure index 956f9235d..34a8f86e7 100755 --- a/configure +++ b/configure @@ -18702,7 +18702,9 @@ if test x_$enable_static_exe = x_yes; then staticexe="-static" if test "$on_mingw" = yes; then staticexe="-all-static" - LIBS="$LIBS -lgdi32 -lz" + if test "`uname`" = "Linux"; then + LIBS="$LIBS -lgdi32 -lz" + fi fi fi diff --git a/configure.ac b/configure.ac index 9b103e92a..b935b82ed 100644 --- a/configure.ac +++ b/configure.ac @@ -448,7 +448,10 @@ if test x_$enable_static_exe = x_yes; then staticexe="-static" if test "$on_mingw" = yes; then staticexe="-all-static" - LIBS="$LIBS -lgdi32 -lz" + # for static crosscompile, include gdi32 and zlib here. + if test "`uname`" = "Linux"; then + LIBS="$LIBS -lgdi32 -lz" + fi fi fi