vcpkg/ports/elfutils/configure.ac.patch

50 lines
1.9 KiB
Diff
Raw Normal View History

diff --git a/src/Makefile.am b/src/Makefile.am
index e462e7d7a..7f68d0348 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,8 +41,8 @@ CLEANFILES += make-debug-archive
if BUILD_STATIC
libasm = ../libasm/libasm.a
-libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
-libelf = ../libelf/libelf.a -lz
+libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) -ldl -lpthread
+libelf = ../libelf/libelf.a $(zip_LIBS)
else
libasm = ../libasm/libasm.so
libdw = ../libdw/libdw.so
diff --git a/configure.ac b/configure.ac
index 5a2dc373e..b1928831e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -383,7 +383,7 @@ AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes)
dnl zlib is mandatory.
save_LIBS="$LIBS"
LIBS=
-eu_ZIPLIB(zlib,ZLIB,z,gzdirect,gzip)
+eu_ZIPLIB(zlib,ZLIB,[z zlib zlibd],gzdirect,gzip)
AS_IF([test "x$with_zlib" = xno], [AC_MSG_ERROR([zlib not found but is required])])
LIBS="$save_LIBS"
@@ -391,13 +391,13 @@ dnl Test for bzlib and xz/lzma, gives BZLIB/LZMALIB .am
dnl conditional and config.h USE_BZLIB/USE_LZMALIB/USE_ZSTD #define.
save_LIBS="$LIBS"
LIBS=
-eu_ZIPLIB(bzlib,BZLIB,bz2,BZ2_bzdopen,bzip2)
+eu_ZIPLIB(bzlib,BZLIB,[bz2 bz2d],BZ2_bzdopen,bzip2)
# We need this since bzip2 doesn't have a pkgconfig file.
BZ2_LIB="$LIBS"
AC_SUBST([BZ2_LIB])
-eu_ZIPLIB(lzma,LZMA,lzma,lzma_auto_decoder,[LZMA (xz)])
+eu_ZIPLIB(lzma,LZMA,[lzma lzmad],lzma_auto_decoder,[LZMA (xz)])
AS_IF([test "x$with_lzma" = xyes], [LIBLZMA="liblzma"], [LIBLZMA=""])
AC_SUBST([LIBLZMA])
-eu_ZIPLIB(zstd,ZSTD,zstd,ZSTD_decompress,[ZSTD (zst)])
+eu_ZIPLIB(zstd,ZSTD,[zstd zstdd zstd_static zstd_staticd],ZSTD_decompress,[ZSTD (zst)])
AS_IF([test "x$with_zstd" = xyes], [LIBZSTD="libzstd"], [LIBLZSTD=""])
AC_SUBST([LIBZSTD])
-zip_LIBS="$LIBS"
+zip_LIBS="$LIBS $ac_cv_search_lzma_auto_decoder $ac_cv_search_BZ2_bzdopen $ac_cv_search_gzdirect $ac_cv_search_ZSTD_decompress"
LIBS="$save_LIBS"
AC_SUBST([zip_LIBS])