Project

General

Profile

check_broken_libxml.patch

change to configure to check for broken libxml - Christoph Junghans, 03/09/2010 11:56 AM

View differences:

configure.ac
753 753
   AC_CHECK_HEADERS([libxml/parser.h],AC_CHECK_LIB(xml2,main))
754 754
   if test "$ac_cv_lib_xml2_main" = "yes"; then
755 755
     INCLUDES="$INCLUDES -I/usr/include/libxml2"
756
     PKG_XML2="libxml-2.0"
757
     AC_SUBST(PKG_XML2)
758
     if test "$enable_all_static" = "yes"; then
759
       LDFLAGS_RET=$LDFLAGS
760
       LDFLAGS="-static $LDFLAGS"
761
       LIBS_RET="$LIBS"
762
       LIBS="$LIBS -lz"
763
       AC_MSG_CHECKING(for broken libxml2)
764
       AC_TRY_RUN([
765
#include <libxml/parser.h>
766
main() {
767
  xmlInitParser();
768
  return 0;
769
}],
770
       AC_MSG_RESULT([no]),[AC_MSG_RESULT([yes])
771
       AC_MSG_ERROR([Your libxml2 is broken for static linking, recompile it without threads or build gromacs without libxml])],[-lz])
772
       LDFLAGS=$LDFLAGS_RET
773
       LIBS="$LIBS_RET"
774
     fi
756 775
   fi
757
   PKG_XML2="libxml-2.0"
758
   AC_SUBST(PKG_XML2)
759 776
# restore CPPFLAGS
760 777
   CPPFLAGS="$ac_save_CPPFLAGS"
761 778
fi