autogen.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/sh
  2. ##
  3. ## This file is part of the libsigrok project.
  4. ##
  5. ## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
  6. ##
  7. ## This program is free software: you can redistribute it and/or modify
  8. ## it under the terms of the GNU General Public License as published by
  9. ## the Free Software Foundation, either version 3 of the License, or
  10. ## (at your option) any later version.
  11. ##
  12. ## This program is distributed in the hope that it will be useful,
  13. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ## GNU General Public License for more details.
  16. ##
  17. ## You should have received a copy of the GNU General Public License
  18. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. ##
  20. OS=`uname`
  21. LIBTOOLIZE=libtoolize
  22. ACLOCAL_DIR=
  23. if [ "x$OS" = "xDarwin" ]; then
  24. LIBTOOLIZE=glibtoolize
  25. if [ -d /sw/share/aclocal ]; then
  26. # fink installs aclocal macros here
  27. ACLOCAL_DIR="-I /sw/share/aclocal"
  28. elif [ -d /opt/local/share/aclocal ]; then
  29. # Macports installs aclocal macros here
  30. ACLOCAL_DIR="-I /opt/local/share/aclocal"
  31. elif [ -d /usr/local/share/aclocal ]; then
  32. # Homebrew installs aclocal macros here
  33. ACLOCAL_DIR="-I /usr/local/share/aclocal"
  34. elif [ -d /usr/share/aclocal ]; then
  35. # Xcode installs aclocal macros here
  36. ACLOCAL_DIR="-I /usr/share/aclocal"
  37. fi
  38. elif [ "x$OS" = "xMINGW32_NT-5.1" ]; then
  39. # Windows XP
  40. ACLOCAL_DIR="-I /usr/local/share/aclocal"
  41. elif [ "x$OS" = "xMINGW32_NT-6.0" ]; then
  42. # Windows Vista
  43. ACLOCAL_DIR="-I /usr/local/share/aclocal"
  44. elif [ "x$OS" = "xMINGW32_NT-6.1" ]; then
  45. # Windows 7
  46. ACLOCAL_DIR="-I /usr/local/share/aclocal"
  47. fi
  48. echo "Generating build system..."
  49. ${LIBTOOLIZE} --install --copy --quiet || exit 1
  50. aclocal ${ACLOCAL_DIR} || exit 1
  51. autoheader || exit 1
  52. automake --add-missing --copy || exit 1
  53. autoconf || exit 1