aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-09-13 16:58:48 +0200
committerLars Magne Ingebrigtsen2010-09-13 16:58:48 +0200
commitc7a1fb9be8e736296bfb5520f1b74b2809e46e5f (patch)
treef7e8c5b50749ac07f4443c88373d897e1f0c1f9d
parent375a0f6552f49b1fb7f715650c93134a0ce5268c (diff)
downloademacs-c7a1fb9be8e736296bfb5520f1b74b2809e46e5f.tar.gz
emacs-c7a1fb9be8e736296bfb5520f1b74b2809e46e5f.zip
* configure.in (HAVE_LIBXML2): Check that the libxml2 we found can
be used. This fixes a conf problem on Mac OS X.
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure47
-rw-r--r--configure.in8
3 files changed, 59 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 66fa0f859aa..a8879b330c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12010-09-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * configure.in (HAVE_LIBXML2): Check that the libxml2 we found can
4 be used. This fixes a conf problem on Mac OS X.
5
12010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 62010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * configure.in: Check for libxml2. 8 * configure.in: Check for libxml2.
diff --git a/configure b/configure
index 4d501a994e5..867450c285f 100755
--- a/configure
+++ b/configure
@@ -11180,9 +11180,56 @@ $as_echo "no" >&6; }
11180 fi 11180 fi
11181 11181
11182 if test "${HAVE_LIBXML2}" = "yes"; then 11182 if test "${HAVE_LIBXML2}" = "yes"; then
11183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
11184$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
11185if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
11186 $as_echo_n "(cached) " >&6
11187else
11188 ac_check_lib_save_LIBS=$LIBS
11189LIBS="-lxml2 $LIBS"
11190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11191/* end confdefs.h. */
11192
11193/* Override any GCC internal prototype to avoid an error.
11194 Use char because int might match the return type of a GCC
11195 builtin and then its argument prototype would still apply. */
11196#ifdef __cplusplus
11197extern "C"
11198#endif
11199char htmlReadMemory ();
11200int
11201main ()
11202{
11203return htmlReadMemory ();
11204 ;
11205 return 0;
11206}
11207_ACEOF
11208if ac_fn_c_try_link "$LINENO"; then :
11209 ac_cv_lib_xml2_htmlReadMemory=yes
11210else
11211 ac_cv_lib_xml2_htmlReadMemory=no
11212fi
11213rm -f core conftest.err conftest.$ac_objext \
11214 conftest$ac_exeext conftest.$ac_ext
11215LIBS=$ac_check_lib_save_LIBS
11216fi
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
11218$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
11219if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
11220 HAVE_LIBXML2=yes
11221else
11222 HAVE_LIBXML2=no
11223fi
11224
11225 if test "${HAVE_LIBXML2}" = "yes"; then
11183 11226
11184$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h 11227$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
11185 11228
11229 else
11230 LIBXML2_LIBS=""
11231 LIBXML2_CFLAGS=""
11232 fi
11186 fi 11233 fi
11187fi 11234fi
11188 11235
diff --git a/configure.in b/configure.in
index 03e4e1a2a00..30aea80a856 100644
--- a/configure.in
+++ b/configure.in
@@ -2541,7 +2541,13 @@ if test "${with_xml2}" != "no"; then
2541 ### I'm not sure what the version number should be, so I just guessed. 2541 ### I'm not sure what the version number should be, so I just guessed.
2542 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no) 2542 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
2543 if test "${HAVE_LIBXML2}" = "yes"; then 2543 if test "${HAVE_LIBXML2}" = "yes"; then
2544 AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).]) 2544 AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
2545 if test "${HAVE_LIBXML2}" = "yes"; then
2546 AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).])
2547 else
2548 LIBXML2_LIBS=""
2549 LIBXML2_CFLAGS=""
2550 fi
2545 fi 2551 fi
2546fi 2552fi
2547AC_SUBST(LIBXML2_LIBS) 2553AC_SUBST(LIBXML2_LIBS)