3 # Run this to generate all the initial makefiles.
5 # $Id: autogen.sh,v 1.26 2003/06/22 22:50:40 jmayer Exp $
11 # Check for python. There's no "--version" option!
12 python -c "print 'Checking for python.'"
16 You must have Python in order to compile $PROJECT.
17 Download the appropriate package for your distribution/OS,
18 or get the source tarball at http://www.python.org/
24 ACVER=`autoconf --version | grep '^autoconf' | sed 's/.*)//'`
26 0* | 1\.* | 2\.[0-9] | 2\.[0-9][a-z]* | \
27 2\.1[0-2] | 2\.1[0-2][a-z]* )
30 You must have autoconf 2.13 or later installed to compile $PROJECT.
31 Download the appropriate package for your distribution/OS,
32 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/
39 AMVER=`automake --version | grep '^automake' | sed 's/.*)//'`
41 0* | 1\.[0-3] | 1\.[0-3][a-z]* )
45 You must have automake 1.4 or later installed to compile $PROJECT.
46 Download the appropriate package for your distribution/OS,
47 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/
55 # Apple's Developer Tools have a "libtool" that has nothing to do with
56 # the GNU libtool; they call the latter "glibtool". They also call
57 # libtoolize "glibtoolize".
59 # Check for "glibtool" first.
61 LTVER=`glibtool --version 2>/dev/null | grep ' libtool)' | \
62 sed 's/.*) \([0-9][0-9.]*\) .*/\1/'`
65 LTVER=`libtool --version | grep ' libtool)' | \
66 sed 's/.*) \([0-9][0-9.]*\) .*/\1/' `
69 LIBTOOLIZE=glibtoolize
72 0* | 1\.[0-2] | 1\.[0-2][a-z]* | \
73 1\.3\.[0-2] | 1\.3\.[0-2][a-z]* )
77 You must have libtool 1.3.3 or later installed to compile $PROJECT.
78 Download the appropriate package for your distribution/OS,
79 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
88 # We do NOT want libtoolize overwriting our versions of config.guess and
89 # config.sub, so move them away and then move them back.
90 # We don't omit "--force", as we want libtoolize to install other files
93 mv config.guess config.guess.save-libtool
94 mv config.sub config.sub.save-libtool
95 LTARGS=" --copy --force"
96 echo $LIBTOOLIZE $LTARGS
97 $LIBTOOLIZE $LTARGS || exit 1
98 rm -f config.guess config.sub
99 mv config.guess.save-libtool config.guess
100 mv config.sub.save-libtool config.sub
102 if glib-config --version >/dev/null 2>&1 ; then
103 rm -f aclocal-missing/glib.m4
105 cp aclocal-fallback/glib.m4 aclocal-missing/
107 if gtk-config --version >/dev/null 2>&1 ; then
108 rm -f aclocal-missing/gtk.m4
110 cp aclocal-fallback/gtk.m4 aclocal-missing/
112 if pkg-config glib-2.0 >/dev/null 2>&1 ; then
113 rm -f aclocal-missing/glib-2.0.m4
115 cp aclocal-fallback/glib-2.0.m4 aclocal-missing/
117 if pkg-config gtk+-2.0 >/dev/null 2>&1 ; then
118 rm -f aclocal-missing/gtk-2.0.m4
120 cp aclocal-fallback/gtk-2.0.m4 aclocal-missing/
123 for dir in . epan wiretap ; do
127 if [ "$dir" = "." ] ; then
132 aclocal_flags=`$topdir/aclocal-flags`
133 aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags";
134 echo aclocal $aclocalinclude
135 aclocal $aclocalinclude || exit 1
138 echo automake --add-missing --gnu $am_opt
139 automake --add-missing --gnu $am_opt || exit 1
145 #./configure "$@" || exit 1
148 echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."