diff options
| author | Lars Magne Ingebrigtsen | 2010-09-13 16:58:48 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2010-09-13 16:58:48 +0200 |
| commit | c7a1fb9be8e736296bfb5520f1b74b2809e46e5f (patch) | |
| tree | f7e8c5b50749ac07f4443c88373d897e1f0c1f9d | |
| parent | 375a0f6552f49b1fb7f715650c93134a0ce5268c (diff) | |
| download | emacs-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-- | ChangeLog | 5 | ||||
| -rwxr-xr-x | configure | 47 | ||||
| -rw-r--r-- | configure.in | 8 |
3 files changed, 59 insertions, 1 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-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 | |||
| 1 | 2010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * configure.in: Check for libxml2. | 8 | * configure.in: Check for libxml2. |
| @@ -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; } | ||
| 11185 | if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : | ||
| 11186 | $as_echo_n "(cached) " >&6 | ||
| 11187 | else | ||
| 11188 | ac_check_lib_save_LIBS=$LIBS | ||
| 11189 | LIBS="-lxml2 $LIBS" | ||
| 11190 | cat 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 | ||
| 11197 | extern "C" | ||
| 11198 | #endif | ||
| 11199 | char htmlReadMemory (); | ||
| 11200 | int | ||
| 11201 | main () | ||
| 11202 | { | ||
| 11203 | return htmlReadMemory (); | ||
| 11204 | ; | ||
| 11205 | return 0; | ||
| 11206 | } | ||
| 11207 | _ACEOF | ||
| 11208 | if ac_fn_c_try_link "$LINENO"; then : | ||
| 11209 | ac_cv_lib_xml2_htmlReadMemory=yes | ||
| 11210 | else | ||
| 11211 | ac_cv_lib_xml2_htmlReadMemory=no | ||
| 11212 | fi | ||
| 11213 | rm -f core conftest.err conftest.$ac_objext \ | ||
| 11214 | conftest$ac_exeext conftest.$ac_ext | ||
| 11215 | LIBS=$ac_check_lib_save_LIBS | ||
| 11216 | fi | ||
| 11217 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 | ||
| 11218 | $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } | ||
| 11219 | if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : | ||
| 11220 | HAVE_LIBXML2=yes | ||
| 11221 | else | ||
| 11222 | HAVE_LIBXML2=no | ||
| 11223 | fi | ||
| 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 |
| 11187 | fi | 11234 | fi |
| 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 |
| 2546 | fi | 2552 | fi |
| 2547 | AC_SUBST(LIBXML2_LIBS) | 2553 | AC_SUBST(LIBXML2_LIBS) |