autogen.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/sh
  2. # Run this to generate all the initial makefiles, etc.
  3. test -n "$srcdir" || srcdir=`dirname "$0"`
  4. test -n "$srcdir" || srcdir=.
  5. olddir=`pwd`
  6. cd "$srcdir"
  7. # Clean up previous build files
  8. echo "Cleaning up previous build files..."
  9. make clean > /dev/null 2>&1
  10. rm -rf autom4te.cache
  11. rm -f aclocal.m4 ltmain.sh
  12. mkdir -p m4
  13. PKGCONFIG=`which pkg-config`
  14. if test -z "$PKGCONFIG"; then
  15. echo "pkg-config not found, please install pkg-config"
  16. exit 1
  17. fi
  18. pkg-config --print-errors glib-2.0
  19. if [ $? != 0 ]; then
  20. echo "You probably need to install libglib2.0-dev or glib2-devel"
  21. exit 1
  22. fi
  23. LIBTOOLIZE=`which libtoolize`
  24. if test -z $LIBTOOLIZE; then
  25. echo "libtoolize not found, please install libtool package"
  26. exit 1
  27. fi
  28. GTKDOCIZE=`which gtkdocize`
  29. if test -z $GTKDOCIZE; then
  30. echo "gtkdocize not found, please install gtk-doc-tools or gtk-doc package"
  31. exit 1
  32. else
  33. gtkdocize || exit $?
  34. fi
  35. INTLTOOLIZE=`which intltoolize`
  36. if test -z $INTLTOOLIZE; then
  37. echo "intltoolize not found, please install intltool package"
  38. exit 1
  39. else
  40. intltoolize --force --copy --automake || exit $?
  41. fi
  42. AUTORECONF=`which autoreconf`
  43. if test -z $AUTORECONF; then
  44. echo "autoreconf not found, please install autoconf package"
  45. exit 1
  46. else
  47. autoreconf --force --install --verbose || exit $?
  48. fi
  49. cd "$olddir"
  50. test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" --libdir=/usr/lib/x86_64-linux-gnu