2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
9 if test ! -f $srcdir/configure.in; then
10 echo -n "**Error**: Directory \`$srcdir\' does not look like the"
11 echo " top-level $PKG_NAME directory"
16 version_date=`date +%Y%m%d`
18 echo "/* automatically created by autogen.sh */" > irssi-version.h.in
19 echo "#define IRSSI_VERSION \"@VERSION@\"" >> irssi-version.h.in
20 echo "#define IRSSI_VERSION_DATE \"$version_date\"" >> irssi-version.h.in
23 echo "Creating help files..."
26 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'`
27 cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/in/Makefile.am
29 files=`echo $files|sed 's/\.in//g'`
30 cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/Makefile.am
32 # .html -> .txt with lynx
33 echo "Documentation: html -> txt..."
34 lynx -dump -nolist docs/startup-HOWTO.html > docs/startup-HOWTO.txt
36 echo "Checking auto* tools..."
38 # *********** a bit modified GNOME's macros/autogen.sh **********
41 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
43 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
44 echo "Download the appropriate package for your distribution,"
45 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
49 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
50 (libtool --version) < /dev/null > /dev/null 2>&1 || {
52 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
53 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
54 echo "(or a newer version if it is available)"
59 (automake --version) < /dev/null > /dev/null 2>&1 || {
61 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
62 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
63 echo "(or a newer version if it is available)"
69 # if no automake, don't bother testing for aclocal
70 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
72 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
73 echo "installed doesn't appear recent enough."
74 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
75 echo "(or a newer version if it is available)"
79 if test "$DIE" -eq 1; then
85 am_opt=--include-deps;;
89 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
90 echo "Running libtoolize..."
93 aclocalinclude="$ACLOCAL_FLAGS"
94 echo "Running aclocal $aclocalinclude ..."
95 aclocal $aclocalinclude
96 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
97 echo "Running autoheader..."
100 echo "Running autoconf ..."
102 echo "Running automake $am_opt ..."
103 automake --add-missing --foreign $am_opt