root / trunk / autogen.sh @ 1863
History | View | Annotate | Download (2.4 KB)
| 1 | 
                  #!/bin/sh  | 
              
|---|---|
| 2 | 
                  libtoolize --automake  | 
              
| 3 | 
                  gtkdocize  | 
              
| 4 | 
                  aclocal \  | 
              
| 5 | 
                  && autoheader \  | 
              
| 6 | 
                  && automake --add-missing\  | 
              
| 7 | 
                  && autoconf \  | 
              
| 8 | 
                  || exit 1  | 
              
| 9 | 
                   | 
              
| 10 | 
                  cd plugins/par2/par2cmdline  | 
              
| 11 | 
                  libtoolize --automake && aclocal && autoheader && autoconf && automake --add-missing || ( cd ../../.. && exit 1 )  | 
              
| 12 | 
                  cd ../../..  | 
              
| 13 | 
                   | 
              
| 14 | 
                  # Set the version information in the PHP module  | 
              
| 15 | 
                  NUM=`grep "AC_DEFINE(MAJOR_VERSION" client/web/module/config.m4 -c`  | 
              
| 16 | 
                  if test $NUM > 0 ; then  | 
              
| 17 | 
                  cat client/web/module/config.m4 | grep -v -E "AC_DEFINE.*VERSION" > tmp  | 
              
| 18 | 
                  unlink client/web/module/config.m4  | 
              
| 19 | 
                  mv tmp client/web/module/config.m4  | 
              
| 20 | 
                  fi  | 
              
| 21 | 
                  cat configure.in | grep VERSION >> client/web/module/config.m4  | 
              
| 22 | 
                   | 
              
| 23 | 
                  cd client/web/module  | 
              
| 24 | 
                  phpize  | 
              
| 25 | 
                  # Perform a dirty hack to the PHP module Makefile so that  | 
              
| 26 | 
                  # the commands 'make dist' and 'make check' won't fail  | 
              
| 27 | 
                  chmod 600 Makefile.global  | 
              
| 28 | 
                  echo "distdir:" >> Makefile.global  | 
              
| 29 | 
                  echo "check:" >> Makefile.global  | 
              
| 30 | 
                   | 
              
| 31 | 
                  # Another dirty hack so that the PHP knows the version information  | 
              
| 32 | 
                  VERSION=`cat ../../../configure | grep -A2 "PACKAGE='nntpgrab'" | grep VERSION | sed s/\ VERSION=\'// | sed s/\'//`  | 
              
| 33 | 
                  echo "#define VERSION \"$VERSION\"" >> config.h.in  | 
              
| 34 | 
                  cd ../../..  | 
              
| 35 | 
                   | 
              
| 36 | 
                  # I18n stuff  | 
              
| 37 | 
                  CONFIGURE="configure.in"  | 
              
| 38 | 
                  PKG_NAME="NNTPGrab"  | 
              
| 39 | 
                  if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
                 | 
              
| 40 | 
                  if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then  | 
              
| 41 | 
                  GETTEXTIZE=""  | 
              
| 42 | 
                  else  | 
              
| 43 | 
                  if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then  | 
              
| 44 | 
                  GETTEXTIZE="glib-gettextize"  | 
              
| 45 | 
                  else  | 
              
| 46 | 
                  GETTEXTIZE="gettextize"  | 
              
| 47 | 
                  fi  | 
              
| 48 | 
                   | 
              
| 49 | 
                  $GETTEXTIZE --version < /dev/null > /dev/null 2>&1  | 
              
| 50 | 
                  if test $? -ne 0; then  | 
              
| 51 | 
                  echo  | 
              
| 52 | 
                  echo "**Error**: You must have \`$GETTEXTIZE' installed" \  | 
              
| 53 | 
                  "to compile $PKG_NAME."  | 
              
| 54 | 
                  DIE=1  | 
              
| 55 | 
                  fi  | 
              
| 56 | 
                  fi  | 
              
| 57 | 
                  fi  | 
              
| 58 | 
                  (grep "^AC_PROG_INTLTOOL" "$CONFIGURE" >/dev/null) && {
                 | 
              
| 59 | 
                  (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
                 | 
              
| 60 | 
                  echo  | 
              
| 61 | 
                  echo "**Error**: You must have \`intltoolize' installed" \  | 
              
| 62 | 
                  "to compile $PKG_NAME."  | 
              
| 63 | 
                  DIE=1  | 
              
| 64 | 
                  }  | 
              
| 65 | 
                  }  | 
              
| 66 | 
                   | 
              
| 67 | 
                  if test "$GETTEXTIZE"; then  | 
              
| 68 | 
                  echo "Creating $dr/aclocal.m4 ..."  | 
              
| 69 | 
                  test -r aclocal.m4 || touch aclocal.m4  | 
              
| 70 | 
                  echo "Running $GETTEXTIZE... Ignore non-fatal messages."  | 
              
| 71 | 
                  echo "no" | $GETTEXTIZE --force --copy  | 
              
| 72 | 
                  echo "Making aclocal.m4 writable ..."  | 
              
| 73 | 
                  test -r aclocal.m4 && chmod u+w aclocal.m4  | 
              
| 74 | 
                  fi  | 
              
| 75 | 
                  if grep "^AC_PROG_INTLTOOL" $CONFIGURE >/dev/null; then  | 
              
| 76 | 
                  echo "Running intltoolize..."  | 
              
| 77 | 
                  intltoolize --copy --force --automake  | 
              
| 78 | 
                  fi  | 
              
| 79 | 
                   | 
              
| 80 | 
                  if [ -z "$1" ] ; then  | 
              
| 81 | 
                  echo NNTPGrab source code is ready for compilation. To continue, use:  | 
              
| 82 | 
                  echo "./configure"  | 
              
| 83 | 
                  echo "make"  | 
              
| 84 | 
                  else  | 
              
| 85 | 
                  ./configure $*  | 
              
| 86 | 
                  make  | 
              
| 87 | 
                  fi  | 
              
| 88 | 
                   | 
              
NNTPGrab

