autogen.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/sh
  2. # Copyright (c) 2007-2009 iMatix Corporation
  3. # Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
  4. #
  5. # This file is part of 0MQ.
  6. #
  7. # 0MQ is free software; you can redistribute it and/or modify it under
  8. # the terms of the GNU Lesser 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. # 0MQ 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 Lesser General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. # Script to generate all required files from fresh git checkout.
  20. # Debian and Ubuntu do not ship libtool anymore, but OSX does not ship libtoolize.
  21. command -v libtoolize >/dev/null 2>&1
  22. if [ $? -ne 0 ]; then
  23. command -v libtool >/dev/null 2>&1
  24. if [ $? -ne 0 ]; then
  25. echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2
  26. exit 1
  27. fi
  28. fi
  29. command -v autoreconf >/dev/null 2>&1
  30. if [ $? -ne 0 ]; then
  31. echo "autogen.sh: error: could not find autoreconf. autoconf and automake are required to run autogen.sh." 1>&2
  32. exit 1
  33. fi
  34. mkdir -p ./config
  35. if [ $? -ne 0 ]; then
  36. echo "autogen.sh: error: could not create directory: ./config." 1>&2
  37. exit 1
  38. fi
  39. autoreconf --install --force --verbose -I config
  40. if [ $? -ne 0 ]; then
  41. echo "autogen.sh: error: autoreconf exited with status $?" 1>&2
  42. exit 1
  43. fi