autogen.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env bash
  2. # DT PS Tree
  3. #
  4. # Douglas Thrift
  5. #
  6. # configure.ac
  7. # Copyright 2010 Douglas Thrift
  8. #
  9. # Licensed under the Apache License, Version 2.0 (the "License");
  10. # you may not use this file except in compliance with the License.
  11. # You may obtain a copy of the License at
  12. #
  13. # http://www.apache.org/licenses/LICENSE-2.0
  14. #
  15. # Unless required by applicable law or agreed to in writing, software
  16. # distributed under the License is distributed on an "AS IS" BASIS,
  17. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. # See the License for the specific language governing permissions and
  19. # limitations under the License.
  20. set -e
  21. shopt -s extglob
  22. cd `dirname $0`
  23. ac_m4s=(check_gnu_make.m4)
  24. ac_dir=`aclocal --print-ac-dir`
  25. for ac_m4 in ${ac_m4s[@]}; do
  26. if [[ $ac_dir/$ac_m4 -nt $ac_m4 ]]; then
  27. install -m 644 $ac_dir/$ac_m4 .
  28. rm -fv aclocal.m4
  29. fi
  30. done
  31. aclocal
  32. for ac_m4 in ${ac_m4s[@]}; do
  33. if ! grep -qs "^# ${ac_m4//./\\.}$" aclocal.m4; then
  34. echo -e "# $ac_m4\n$(<$ac_m4)" >> aclocal.m4
  35. fi
  36. done
  37. automake -acf || true
  38. autoconf