autogen.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. AUTORECONF=`which autoreconf`
  3. if test -z $AUTORECONF; then
  4. echo "*** No autoreconf found, please install it ***"
  5. exit 1
  6. fi
  7. if !"${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
  8. echo "*** No pkg-config found, please install it ***"
  9. # warn without exiting, since pkg-config is only needed
  10. # by configure, not autogen.sh
  11. fi
  12. LIBTOOLIZE=`which libtoolize || which glibtoolize`
  13. if test -z $LIBTOOLIZE; then
  14. LIBTOOLIZE=`which glibtoolize`
  15. if test -z $LIBTOOLIZE; then
  16. echo "*** No libtool found, please install it ***"
  17. exit 1
  18. fi
  19. fi
  20. # Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565663
  21. mkdir -p m4
  22. HOOKS_DIR=".git/hooks"
  23. # install pre-commit hook for doing clean commits
  24. if [ -d "$HOOKS_DIR" ];
  25. then
  26. pushd ${HOOKS_DIR}
  27. if test ! \( -x pre-commit -a -L pre-commit \);
  28. then
  29. echo "Creating symbolic link for pre-commit hook..."
  30. rm -f pre-commit
  31. ln -s pre-commit.sample pre-commit
  32. fi
  33. popd
  34. fi
  35. autoreconf --force --install --verbose -Wall -I m4