Fix installation for silc-client and silc-toolkit packages
[silc.git] / apps / irssi / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 PKG_NAME="SILC Client"
5
6 srcdir=`dirname $0`
7 test -z "$srcdir" && srcdir=.
8
9 if test ! -f $srcdir/irssi.cvs -a -f $srcdir/configure; then
10   echo
11   echo "Use ./configure instead"
12   echo
13   echo "This script should only be run if you got sources from SVN."
14   echo "If you really want to do this, say:"
15   echo "  touch irssi.cvs"
16   exit 0
17 fi
18
19 if test ! -f $srcdir/configure.in; then
20     echo -n "**Error**: Directory \`$srcdir\' does not look like the"
21     echo " top-level $PKG_NAME directory"
22     exit 1
23 fi
24
25 # create help files
26 echo "Creating help files..."
27 perl syntax.pl
28
29 #$srcdir/update-changelog.sh $srcdir
30
31 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'`
32 cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/in/Makefile.am
33
34 files=`echo $files|sed 's/\.in//g'`
35 cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/Makefile.am
36
37 if test x$NOCONFIGURE = x && test -z "$*"; then
38   echo "**Warning**: I am going to run \`configure' with no arguments."
39   echo "If you wish to pass any to it, please specify them on the"
40   echo \`$0\'" command line."
41   echo
42 fi
43
44 rm -f aclocal.m4
45 echo "Running autoreconf ..."
46 autoreconf -i || exit 1
47
48 conf_flags="--enable-maintainer-mode"
49
50 if test x$NOCONFIGURE = x; then
51   echo Running $srcdir/configure $conf_flags "$@" ...
52   $srcdir/configure $conf_flags "$@" \
53   && echo Now type \`make\' to compile $PKG_NAME || exit 1
54 else
55   echo Skipping configure process.
56 fi
57
58 # make sure perl hashes have correct length
59 find src/perl -name *.c -o -name *.xs | xargs grep -n hv_store | perl -ne 'if (/"(\w+)",\s*(\d+)/) { print unless $2 == length $1 }'