| 1 | #!/bin/sh |
|---|
| 2 | # Run this to generate all the initial makefiles, etc. |
|---|
| 3 | |
|---|
| 4 | srcdir=`dirname $0` |
|---|
| 5 | PKG_NAME="christine" |
|---|
| 6 | |
|---|
| 7 | DIE=0 |
|---|
| 8 | |
|---|
| 9 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 10 | echo |
|---|
| 11 | echo "**Error**: You must have \`autoconf' installed to." |
|---|
| 12 | echo "Download the appropriate package for your distribution," |
|---|
| 13 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 14 | DIE=1 |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { |
|---|
| 18 | (libtool --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 19 | echo |
|---|
| 20 | echo "**Error**: You must have \`libtool' installed." |
|---|
| 21 | echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" |
|---|
| 22 | echo "(or a newer version if it is available)" |
|---|
| 23 | DIE=1 |
|---|
| 24 | } |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && { |
|---|
| 28 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ |
|---|
| 29 | (gettext --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 30 | echo |
|---|
| 31 | echo "**Error**: You must have \`gettext' installed." |
|---|
| 32 | echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" |
|---|
| 33 | echo "(or a newer version if it is available)" |
|---|
| 34 | DIE=1 |
|---|
| 35 | } |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | grep "^AM_GNOME_GETTEXT" $srcdir/configure.ac >/dev/null && { |
|---|
| 39 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ |
|---|
| 40 | (gettext --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 41 | echo |
|---|
| 42 | echo "**Error**: You must have \`gettext' installed." |
|---|
| 43 | echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" |
|---|
| 44 | echo "(or a newer version if it is available)" |
|---|
| 45 | DIE=1 |
|---|
| 46 | } |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | (automake --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 50 | echo |
|---|
| 51 | echo "**Error**: You must have \`automake' installed." |
|---|
| 52 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.9.tar.gz" |
|---|
| 53 | echo "(or a newer version if it is available)" |
|---|
| 54 | DIE=1 |
|---|
| 55 | NO_AUTOMAKE=yes |
|---|
| 56 | } |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | # if no automake, don't bother testing for aclocal |
|---|
| 60 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || |
|---|
| 61 | { |
|---|
| 62 | echo |
|---|
| 63 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" |
|---|
| 64 | echo "installed doesn't appear recent enough." |
|---|
| 65 | echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.9.tar.gz" |
|---|
| 66 | echo "(or a newer version if it is available)" |
|---|
| 67 | DIE=1 |
|---|
| 68 | } |
|---|
| 69 | |
|---|
| 70 | if test "$DIE" -eq 1; then |
|---|
| 71 | exit 1 |
|---|
| 72 | fi |
|---|
| 73 | |
|---|
| 74 | case $CC in |
|---|
| 75 | xlc ) |
|---|
| 76 | am_opt=--include-deps;; |
|---|
| 77 | esac |
|---|
| 78 | echo "gettextize -f --copy --intl" |
|---|
| 79 | gettextize -f --copy --no-changelog |
|---|
| 80 | if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then |
|---|
| 81 | echo "Running libtoolize..." |
|---|
| 82 | libtoolize --force --copy |
|---|
| 83 | fi |
|---|
| 84 | echo "intltoolize" |
|---|
| 85 | intltoolize --force --copy --automake |
|---|
| 86 | echo "Running aclocal --install ..." |
|---|
| 87 | if ! [ -d m4 ]; then |
|---|
| 88 | mkdir m4 |
|---|
| 89 | fi |
|---|
| 90 | aclocal -I m4 |
|---|
| 91 | if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then |
|---|
| 92 | echo "Running autoheader..." |
|---|
| 93 | autoheader |
|---|
| 94 | fi |
|---|
| 95 | echo "Running automake --gnu -c -f -a $am_opt ..." |
|---|
| 96 | automake --add-missing --copy --gnu |
|---|
| 97 | echo "Running autoconf ..." |
|---|
| 98 | autoconf |
|---|
| 99 | |
|---|
| 100 | #conf_flags="--enable-maintainer-mode --enable-compile-warnings" |
|---|
| 101 | #--enable-iso-c |
|---|
| 102 | |
|---|
| 103 | ./configure $* |
|---|