libetpan - fdik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.2 KiB

11 years ago
9 years ago
11 years ago
11 years ago
  1. #!/bin/sh
  2. # Run this to generate all the initial makefiles, etc.
  3. srcdir=`dirname $0`
  4. # name of the current package
  5. PKG_NAME=`basename \`(cd $srcdir; pwd)\``
  6. # default configure options
  7. conf_flags="--enable-debug"
  8. DIE=0
  9. libtool=0
  10. gettext=0
  11. run_automake=0
  12. libtoolize=libtoolize
  13. if which glibtoolize >/dev/null 2>&1 ; then
  14. libtoolize=glibtoolize
  15. fi
  16. missing() {
  17. echo
  18. echo "**Error**: You must have \`$1' installed to compile $PKG_NAME."
  19. echo "Download the appropriate package for your distribution,"
  20. echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
  21. DIE=1
  22. }
  23. (aclocal --version) < /dev/null > /dev/null 2>&1 || missing aclocal
  24. (autoconf --version) < /dev/null > /dev/null 2>&1 || missing autoconf
  25. grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && gettext=1
  26. grep "^AC_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null && libtool=1
  27. grep "^AM_INIT_AUTOMAKE" $srcdir/configure.ac >/dev/null && run_automake=1
  28. if test "$gettext" -eq 1; then
  29. grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
  30. (gettextize --version) < /dev/null > /dev/null 2>&1 || missing gettext
  31. fi
  32. if test "$libtool" -eq 1; then
  33. ($libtoolize --version) < /dev/null > /dev/null 2>&1 || missing libtool
  34. fi
  35. if test "$DIE" -eq 1; then
  36. exit 1
  37. fi
  38. if test -z "$*"; then
  39. echo "**Warning**: I am going to run \`configure' with default arguments."
  40. echo "If you wish to pass any others to it, please specify them on the"
  41. echo \`$0\'" command line."
  42. echo
  43. else
  44. unset conf_flags
  45. fi
  46. if test "$gettext" -eq 1; then
  47. echo "Running gettextize... Ignore non-fatal messages."
  48. echo "no" | gettextize --force --copy
  49. fi
  50. if test "$libtool" -eq 1; then
  51. echo "Running libtoolize..."
  52. $libtoolize --force --copy
  53. fi
  54. echo "Running aclocal..."
  55. aclocal -I m4
  56. echo "Running autoheader..."
  57. autoheader
  58. echo "Running autoconf ..."
  59. autoconf
  60. if test "$run_automake" -eq 1; then
  61. echo "Running automake..."
  62. automake --add-missing --foreign --force --copy
  63. fi
  64. if test x$NOCONFIGURE = x; then
  65. echo Running $srcdir/configure $conf_flags "$@" ...
  66. $srcdir/configure $conf_flags "$@" \
  67. && echo Now type \`make\' to compile $PKG_NAME
  68. else
  69. echo Skipping configure process.
  70. fi
  71. #if which jade >/dev/null; then
  72. # echo "Generate documentation ..."
  73. # (cd doc && make doc)
  74. #fi