opendx-4.4.4-szip.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -148,6 +148,12 @@ AC_ARG_WITH(netcdf,
  4. [with_netcdf=$withval],
  5. [with_netcdf='yes'])
  6. +# Enable szip.
  7. +AC_ARG_WITH(szlib,
  8. + [ --with-szlib Use szlib library for external szlib I/O (default is yes)],
  9. + [with_szlib=$withval],
  10. + [with_szlib='yes'])
  11. +
  12. # Enable 64-bit arenas, if supported
  13. AC_ARG_WITH(large-arenas,
  14. [ --with-large-arenas enable 64-bit arenas, when available (default is no)],
  15. @@ -790,6 +796,39 @@ fi
  16. #
  17. +# Check for szlib
  18. +#
  19. +have_szlib='no'
  20. +LIB_SZLIB=''
  21. +if test "$with_szlib" != 'no'
  22. +then
  23. + AS_MESSAGE([checking for szlib ......])
  24. + failed=0;
  25. + passed=0;
  26. + AC_CHECK_HEADERS(szlib.h, passed=`expr $passed + 1`,failed=`expr $failed + 1`)
  27. + AC_CHECK_LIB(sz, SZ_BufftoBuffCompress,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
  28. + AC_MSG_CHECKING(if szlib package is complete)
  29. + if test $passed -gt 0
  30. + then
  31. + if test $failed -gt 0
  32. + then
  33. + AC_MSG_RESULT(no -- some components failed test)
  34. + have_szlib='no (failed tests)'
  35. + else
  36. + LIB_SZLIB='-lsz'
  37. + LIBS="$LIB_SZLIB $LIBS"
  38. + FMT_LIBS="$FMT_LIBS libsz.a"
  39. + AC_DEFINE(HAVE_LIBSZIP, 1, [Define to 1 if you have the SZLIB libraries])
  40. + AC_MSG_RESULT(yes)
  41. + have_szlib='yes'
  42. + fi
  43. + else
  44. + AC_MSG_RESULT(no)
  45. + fi
  46. +fi
  47. +
  48. +
  49. +#
  50. # Check for IMAGEMAGICK
  51. #
  52. have_magick='no'