mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-24 21:33:51 +03:00
autotools: Abort if external libraries couldn't be found
This makes the configuration process more robust and deterministic. Before, we would silently disable options.
This commit is contained in:
parent
599ceaffad
commit
f070acc564
25
configure.ac
25
configure.ac
@ -751,6 +751,10 @@ if test "$with_modules" != "no" ; then
|
||||
AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])])])
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
if test "$WITH_MODULES" = "0"; then
|
||||
AC_MSG_ERROR([dlopen or equivalent not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(WITH_MODULES)
|
||||
@ -789,6 +793,10 @@ else
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$WITH_THREADS" = "0"; then
|
||||
AC_MSG_ERROR([libpthread not found])
|
||||
fi
|
||||
|
||||
case $host_os in
|
||||
*linux*)
|
||||
if test "${GCC}" = "yes" ; then
|
||||
@ -896,6 +904,10 @@ if test "$with_zlib" != "no" && test "$with_zlib" != ""; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
if test "$WITH_ZLIB" = "0"; then
|
||||
AC_MSG_ERROR([zlib not found])
|
||||
fi
|
||||
|
||||
XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${Z_CFLAGS}"
|
||||
XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${Z_LIBS}"
|
||||
fi
|
||||
@ -946,6 +958,10 @@ if test "$with_lzma" != "no" && test "$with_lzma" != ""; then
|
||||
LIBS=$_libs
|
||||
fi
|
||||
|
||||
if test "$WITH_LZMA" = "0"; then
|
||||
AC_MSG_ERROR([liblzma not found])
|
||||
fi
|
||||
|
||||
XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${LZMA_CFLAGS}"
|
||||
XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${LZMA_LIBS}"
|
||||
fi
|
||||
@ -985,6 +1001,11 @@ else
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
if test "$WITH_ICONV" = "0"; then
|
||||
AC_MSG_ERROR([libiconv not found])
|
||||
fi
|
||||
|
||||
if test "$WITH_ICONV" = "1" && test "$ICONV_DIR" != ""; then
|
||||
ICONV_CFLAGS="-I$ICONV_DIR/include"
|
||||
ICONV_LIBS="-L$ICONV_DIR/lib $ICONV_LIBS"
|
||||
@ -1046,6 +1067,10 @@ if test "$with_icu" != "no" && test "$with_icu" != "" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$WITH_ICU" = "0"; then
|
||||
AC_MSG_ERROR([ICU not found])
|
||||
fi
|
||||
|
||||
XML_PRIVATE_CFLAGS="${XML_PRIVATE_CFLAGS} ${ICU_CFLAGS}"
|
||||
XML_PRIVATE_LIBS="${XML_PRIVATE_LIBS} ${ICU_LIBS}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user