|
523 | 523 |
|
524 | 524 | CFLAGS="$SAVECFLAGS" |
525 | 525 |
|
| 526 | +### |
| 527 | +# Libxml2 control block. |
| 528 | +### |
| 529 | + |
| 530 | +AC_MSG_CHECKING([whether to search for and use external libxml2]) |
| 531 | +AC_ARG_ENABLE([libxml2], |
| 532 | + [AS_HELP_STRING([--disable-libxml2], |
| 533 | + [disable detection and use of libxml2 in favor of the bundled ezxml interpreter])]) |
| 534 | +test "x$enable_libxml2" = xno || enable_libxml2=yes |
| 535 | +AC_MSG_RESULT([$enable_libxml2]) |
| 536 | + |
| 537 | +have_libxml2=no |
| 538 | +if test "x$enable_libxml2" = xyes; then |
| 539 | + # We can optionally use libxml2 for DAP4, if available |
| 540 | + AC_CHECK_LIB([xml2],[xmlReadMemory],[have_libxml2=yes],[have_libxml2=no]) |
| 541 | + if test "x$have_libxml2" = "xyes" ; then |
| 542 | + AC_SEARCH_LIBS([xmlReadMemory],[xml2 xml2.dll cygxml2.dll], [],[]) |
| 543 | + fi |
| 544 | + if test "x$have_libxml2" = xyes; then |
| 545 | + XML2FLAGS=`xml2-config --cflags` |
| 546 | + AC_SUBST([XML2FLAGS],${XML2FLAGS}) |
| 547 | + AC_DEFINE([HAVE_LIBXML2], [1], [if true, use libxml2]) |
| 548 | + fi |
| 549 | +fi |
| 550 | + |
| 551 | +if test "x$enable_libxml2" = xyes; then |
| 552 | +XMLPARSER="libxml2" |
| 553 | +else |
| 554 | +XMLPARSER="tinyxml2 (bundled)" |
| 555 | +fi |
| 556 | + |
| 557 | +# Need a condition and subst for this |
| 558 | +AM_CONDITIONAL(ENABLE_LIBXML2, [test "x$enable_libxml2" = xyes]) |
| 559 | +AC_SUBST([XMLPARSER],[${XMLPARSER}]) |
| 560 | + |
| 561 | +### |
| 562 | +# End Libxml2 block |
| 563 | +### |
| 564 | + |
526 | 565 | # --enable-dap => enable-dap4 |
527 | 566 | enable_dap4=$enable_dap |
528 | 567 | AC_MSG_CHECKING([whether dap remote testing should be enabled]) |
@@ -1094,51 +1133,21 @@ AC_CHECK_FUNCS([strlcat snprintf strcasecmp fileno \ |
1094 | 1133 | AC_CHECK_FUNCS([clock_gettime]) |
1095 | 1134 | AC_CHECK_TYPES([struct timespec]) |
1096 | 1135 |
|
1097 | | -# disable dap4 if netcdf-4 is disabled |
1098 | | -#if test "x$enable_netcdf_4" = "xno" ; then |
| 1136 | +# disable dap4 if hdf5 is disabled |
1099 | 1137 | if test "x$enable_hdf5" = "xno" ; then |
1100 | 1138 | AC_MSG_WARN([netcdf-4 not enabled; disabling DAP4]) |
1101 | 1139 | enable_dap4=no |
1102 | 1140 | fi |
1103 | 1141 |
|
1104 | | -if test "x$enable_dap4" = xyes; then |
1105 | | - AC_DEFINE([ENABLE_DAP4], [1], [if true, build DAP4 Client]) |
| 1142 | +if test "x$ISOSX" = xyes && "x$have_libxml2" = xno ; then |
| 1143 | + AC_MSG_ERROR([Error: OSX requires libxml2 => --disable-dap4.]) |
| 1144 | + enable_dap4=no |
1106 | 1145 | fi |
1107 | 1146 |
|
1108 | | -### |
1109 | | -# Libxml2 control block. |
1110 | | -### |
1111 | | - |
1112 | | -AC_MSG_CHECKING([whether to search for and use external libxml2]) |
1113 | | -AC_ARG_ENABLE([libxml2], |
1114 | | - [AS_HELP_STRING([--disable-libxml2], |
1115 | | - [disable detection and use of libxml2 in favor of the bundled ezxml interpreter])]) |
1116 | | -test "x$disable_libxml2" = xyes && enable_libxml2=no |
1117 | | -AC_MSG_RESULT($enable_libxml2) |
1118 | | - |
1119 | | -AC_SUBST([XMLPARSER],"ezxml") |
1120 | | -if test "x$enable_libxml2" = xyes; then |
1121 | | -# We can optionally use libxml2 for DAP4, if available |
1122 | | - AC_CHECK_LIB([xml2],[xmlReadMemory],[have_libxml2=yes],[have_libxml2=no]) |
1123 | | - if test "x$have_libxml2" = "xyes" ; then |
1124 | | - AC_SEARCH_LIBS([xmlReadMemory],[xml2 xml2.dll cygxml2.dll], [],[]) |
1125 | | - AC_SUBST([XMLPARSER],"libxml2") |
1126 | | - fi |
1127 | | - if test "x$have_libxml2" = xyes; then |
1128 | | - XML2FLAGS=`xml2-config --cflags` |
1129 | | - AC_SUBST([XML2FLAGS],${XML2FLAGS}) |
1130 | | - AC_DEFINE([HAVE_LIBXML2], [1], [if true, use libxml2]) |
1131 | | - fi |
1132 | | - |
| 1147 | +if test "x$enable_dap4" = xyes; then |
| 1148 | + AC_DEFINE([ENABLE_DAP4], [1], [if true, build DAP4 Client]) |
1133 | 1149 | fi |
1134 | 1150 |
|
1135 | | - # Need a condition for this |
1136 | | - AM_CONDITIONAL(HAVE_LIBXML2, [test "x$have_libxml2" = xyes]) |
1137 | | - |
1138 | | -### |
1139 | | -# End Libxml2 block |
1140 | | -### |
1141 | | - |
1142 | 1151 | # check for useful, but not essential, memio support |
1143 | 1152 | AC_CHECK_FUNCS([memmove getpagesize sysconf]) |
1144 | 1153 |
|
@@ -1257,7 +1266,7 @@ AC_FUNC_ALLOCA |
1257 | 1266 | AC_CHECK_DECLS([isnan, isinf, isfinite],,,[#include <math.h>]) |
1258 | 1267 | AC_STRUCT_ST_BLKSIZE |
1259 | 1268 | UD_CHECK_IEEE |
1260 | | -AC_CHECK_TYPES([size_t, ssize_t, schar, uchar, longlong, ushort, uint, int64, uint64, size64_t, ssize64_t, _off64_t, uint64_t]) |
| 1269 | +AC_CHECK_TYPES([size_t, ssize_t, schar, uchar, longlong, ushort, uint, int64, uint64, size64_t, ssize64_t, _off64_t, uint64_t, ptrdiff_t]) |
1261 | 1270 | AC_TYPE_OFF_T |
1262 | 1271 | AC_TYPE_UINTPTR_T |
1263 | 1272 | AC_C_CHAR_UNSIGNED |
|
0 commit comments