2 # Run this to generate all the initial makefiles, etc.
6 test -z "$srcdir" && srcdir=.
10 if test ! -f $srcdir/configure.in; then
11 echo -n "**Error**: Directory \`$srcdir\' does not look like the"
12 echo " top-level $PKG_NAME directory"
17 version_date=`date +%Y%m%d`
19 echo "/* automatically created by autogen.sh */" > irssi-version.h.in
20 echo "#define IRSSI_VERSION \"@VERSION@\"" >> irssi-version.h.in
21 echo "#define IRSSI_VERSION_DATE \"$version_date\"" >> irssi-version.h.in
24 echo "Creating help files..."
27 files=`echo docs/help/in/*.in|sed -e 's,docs/help/in/Makefile.in ,,' -e 's,docs/help/in/,!,g' -e 's/\.in /.in ?/g'`
28 cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/in/Makefile.am
30 files=`echo $files|sed 's/\.in//g'`
31 cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/Makefile.am
33 # .html -> .txt with lynx
34 echo "Documentation: html -> txt..."
35 lynx -dump -nolist docs/startup-HOWTO.html > docs/startup-HOWTO.txt
37 echo "Checking auto* tools..."
39 # *********** a bit modified GNOME's macros/autogen.sh **********
42 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
44 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
45 echo "Download the appropriate package for your distribution,"
46 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
50 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
51 (libtool --version) < /dev/null > /dev/null 2>&1 || {
53 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
55 echo "(or a newer version if it is available)"
60 (automake --version) < /dev/null > /dev/null 2>&1 || {
62 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
63 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
64 echo "(or a newer version if it is available)"
70 # if no automake, don't bother testing for aclocal
71 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
73 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
74 echo "installed doesn't appear recent enough."
75 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
76 echo "(or a newer version if it is available)"
80 if test "$DIE" -eq 1; then
86 am_opt=--include-deps;;
90 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
91 echo "Running libtoolize..."
94 aclocalinclude="$ACLOCAL_FLAGS"
95 echo "Running aclocal $aclocalinclude ..."
96 aclocal $aclocalinclude
97 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
98 echo "Running autoheader..."
101 echo "Running autoconf ..."
103 echo "Running automake $am_opt ..."
104 automake --add-missing --foreign $am_opt