h5hlcc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #! /bin/sh
  2. ##
  3. # Copyright by The HDF Group.
  4. # Copyright by the Board of Trustees of the University of Illinois.
  5. # All rights reserved.
  6. #
  7. # This file is part of HDF5. The full HDF5 copyright notice, including
  8. # terms governing use, modification, and redistribution, is contained in
  9. # the COPYING file, which can be found at the root of the source code
  10. # distribution tree, or in https://www.hdfgroup.org/licenses.
  11. # If you do not have access to either file, you may request a copy from
  12. # help@hdfgroup.org.
  13. ##
  14. prg=$0
  15. if [ ! -e "$prg" ]; then
  16. case $prg in
  17. (*/*) exit 1;;
  18. (*) prg=$(command -v -- "$prg") || exit;;
  19. esac
  20. fi
  21. dir=$(
  22. cd -P -- "$(dirname -- "$prg")/.." && pwd -P
  23. ) || exit
  24. prg=$dir/$(basename -- "$prg") || exit
  25. printf '%s\n' "$prg"
  26. printf 'dir is %s\n' "$dir"
  27. # Show the configuration summary of the library recorded in the
  28. # libhdf5.settings file reside in the lib directory.
  29. showconfigure()
  30. {
  31. cat $dir/lib/libhdf5.settings
  32. status=$?
  33. }
  34. export PKG_CONFIG_PATH=$dir/lib/pkgconfig
  35. for arg in $@ ; do
  36. case "$arg" in
  37. -showconfig)
  38. showconfigure
  39. exit $status
  40. ;;
  41. *)
  42. /usr/bin/cc $@ `pkg-config --define-variable=prefix=$dir --cflags --libs hdf5_hl`
  43. status=$?
  44. exit $status
  45. ;;
  46. esac
  47. done