1999-07-27 04:43:22 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Run this to generate all the initial makefiles.
|
|
|
|
#
|
2003-06-22 22:50:40 +00:00
|
|
|
# $Id: autogen.sh,v 1.26 2003/06/22 22:50:40 jmayer Exp $
|
1999-07-27 04:43:22 +00:00
|
|
|
|
2000-07-22 20:00:29 +00:00
|
|
|
DIE=true
|
1999-07-27 04:43:22 +00:00
|
|
|
PROJECT="Ethereal"
|
|
|
|
|
2000-10-14 04:09:04 +00:00
|
|
|
|
|
|
|
# Check for python. There's no "--version" option!
|
|
|
|
python -c "print 'Checking for python.'"
|
|
|
|
if [ $? != 0 ] ; then
|
|
|
|
cat >&2 <<_EOF_
|
|
|
|
|
2000-11-22 04:03:22 +00:00
|
|
|
You must have Python in order to compile $PROJECT.
|
2000-10-14 04:09:04 +00:00
|
|
|
Download the appropriate package for your distribution/OS,
|
|
|
|
or get the source tarball at http://www.python.org/
|
|
|
|
_EOF_
|
|
|
|
DIE="exit 1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2003-01-22 00:19:00 +00:00
|
|
|
ACVER=`autoconf --version | grep '^autoconf' | sed 's/.*)//'`
|
|
|
|
case "$ACVER" in
|
2000-07-22 20:00:29 +00:00
|
|
|
0* | 1\.* | 2\.[0-9] | 2\.[0-9][a-z]* | \
|
|
|
|
2\.1[0-2] | 2\.1[0-2][a-z]* )
|
|
|
|
cat >&2 <<_EOF_
|
|
|
|
|
|
|
|
You must have autoconf 2.13 or later installed to compile $PROJECT.
|
|
|
|
Download the appropriate package for your distribution/OS,
|
|
|
|
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/
|
|
|
|
_EOF_
|
|
|
|
DIE="exit 1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2003-01-22 00:19:00 +00:00
|
|
|
AMVER=`automake --version | grep '^automake' | sed 's/.*)//'`
|
|
|
|
case "$AMVER" in
|
2000-07-22 20:00:29 +00:00
|
|
|
0* | 1\.[0-3] | 1\.[0-3][a-z]* )
|
|
|
|
|
|
|
|
cat >&2 <<_EOF_
|
|
|
|
|
|
|
|
You must have automake 1.4 or later installed to compile $PROJECT.
|
|
|
|
Download the appropriate package for your distribution/OS,
|
|
|
|
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/
|
|
|
|
_EOF_
|
|
|
|
DIE="exit 1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2003-06-19 00:28:14 +00:00
|
|
|
#
|
|
|
|
# Apple's Developer Tools have a "libtool" that has nothing to do with
|
|
|
|
# the GNU libtool; they call the latter "glibtool". They also call
|
|
|
|
# libtoolize "glibtoolize".
|
|
|
|
#
|
|
|
|
# Check for "glibtool" first.
|
|
|
|
#
|
2003-06-22 22:50:40 +00:00
|
|
|
LTVER=`glibtool --version 2>/dev/null | grep ' libtool)' | \
|
|
|
|
sed 's/.*) \([0-9][0-9.]*\) .*/\1/'`
|
2003-06-19 00:28:14 +00:00
|
|
|
if test -z "$LTVER"
|
|
|
|
then
|
|
|
|
LTVER=`libtool --version | grep ' libtool)' | \
|
|
|
|
sed 's/.*) \([0-9][0-9.]*\) .*/\1/' `
|
|
|
|
LIBTOOLIZE=libtoolize
|
|
|
|
else
|
|
|
|
LIBTOOLIZE=glibtoolize
|
|
|
|
fi
|
2003-01-22 00:19:00 +00:00
|
|
|
case "$LTVER" in
|
2000-07-22 20:00:29 +00:00
|
|
|
0* | 1\.[0-2] | 1\.[0-2][a-z]* | \
|
|
|
|
1\.3\.[0-2] | 1\.3\.[0-2][a-z]* )
|
|
|
|
|
|
|
|
cat >&2 <<_EOF_
|
|
|
|
|
|
|
|
You must have libtool 1.3.3 or later installed to compile $PROJECT.
|
|
|
|
Download the appropriate package for your distribution/OS,
|
|
|
|
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
|
|
|
|
_EOF_
|
|
|
|
DIE="exit 1"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
$DIE
|
1999-07-27 04:43:22 +00:00
|
|
|
|
2001-12-09 21:05:54 +00:00
|
|
|
#
|
|
|
|
# We do NOT want libtoolize overwriting our versions of config.guess and
|
|
|
|
# config.sub, so move them away and then move them back.
|
|
|
|
# We don't omit "--force", as we want libtoolize to install other files
|
|
|
|
# without whining.
|
|
|
|
#
|
|
|
|
mv config.guess config.guess.save-libtool
|
|
|
|
mv config.sub config.sub.save-libtool
|
2003-06-22 22:23:33 +00:00
|
|
|
LTARGS=" --copy --force"
|
|
|
|
echo $LIBTOOLIZE $LTARGS
|
|
|
|
$LIBTOOLIZE $LTARGS || exit 1
|
2001-12-09 21:05:54 +00:00
|
|
|
rm -f config.guess config.sub
|
|
|
|
mv config.guess.save-libtool config.guess
|
|
|
|
mv config.sub.save-libtool config.sub
|
2000-02-11 03:17:58 +00:00
|
|
|
|
2002-08-27 23:00:04 +00:00
|
|
|
if glib-config --version >/dev/null 2>&1 ; then
|
2002-08-28 12:25:54 +00:00
|
|
|
rm -f aclocal-missing/glib.m4
|
2002-08-27 23:00:04 +00:00
|
|
|
else
|
|
|
|
cp aclocal-fallback/glib.m4 aclocal-missing/
|
|
|
|
fi
|
|
|
|
if gtk-config --version >/dev/null 2>&1 ; then
|
2002-08-28 12:25:54 +00:00
|
|
|
rm -f aclocal-missing/gtk.m4
|
2002-08-27 23:00:04 +00:00
|
|
|
else
|
|
|
|
cp aclocal-fallback/gtk.m4 aclocal-missing/
|
|
|
|
fi
|
|
|
|
if pkg-config glib-2.0 >/dev/null 2>&1 ; then
|
2002-08-28 12:25:54 +00:00
|
|
|
rm -f aclocal-missing/glib-2.0.m4
|
2002-08-27 23:00:04 +00:00
|
|
|
else
|
|
|
|
cp aclocal-fallback/glib-2.0.m4 aclocal-missing/
|
|
|
|
fi
|
|
|
|
if pkg-config gtk+-2.0 >/dev/null 2>&1 ; then
|
2002-08-28 12:25:54 +00:00
|
|
|
rm -f aclocal-missing/gtk-2.0.m4
|
2002-08-27 23:00:04 +00:00
|
|
|
else
|
|
|
|
cp aclocal-fallback/gtk-2.0.m4 aclocal-missing/
|
|
|
|
fi
|
|
|
|
|
Give libethereal its own configuration file, and have that configuration
file, rather than the top-level Ethereal configuration file, check for
"inet_aton()", "inet_pton()", and "inet_ntop()". Then make its
Makefile.am include the appropriate object files if necessary.
Otherwise, they don't get built and put into libethereal, and therefore
attempts to link with anything in libethereal that uses them fail on
platforms that lack ethem, causing the build to fail.
That means a bunch of things need to be fixed to cope with libethereal
having its own "config.h" file; this means removing the include of
"config.h" from some libethereal header files. Move the definitions of
the path names used only by "resolv.c" to "resolv.c" from "resolv.h" (so
"resolv.h" doesn't need "config.h", define HAVE_PLUGINS in the configure
script (so we don't have to include it in "plugins.h" to check whether
HAVE_DLFCN_H is defined).
Unfortunately, stuff outside libethereal needs to know PLUGIN_DIR; for
now, define that in the top-level configuration file, and have Ethereal
and Tethereal pass it as an argument to "epan_init()" - that should be
cleaned up at some point.
Remove from the top-level configure script checks for things used only
in libethereal.
svn path=/trunk/; revision=2498
2000-10-16 23:18:05 +00:00
|
|
|
for dir in . epan wiretap ; do
|
2000-07-22 20:00:29 +00:00
|
|
|
echo processing $dir
|
|
|
|
(
|
|
|
|
cd $dir
|
2002-08-23 21:12:32 +00:00
|
|
|
if [ "$dir" = "." ] ; then
|
|
|
|
topdir=.
|
|
|
|
else
|
|
|
|
topdir=..
|
|
|
|
fi
|
2003-01-22 00:19:00 +00:00
|
|
|
aclocal_flags=`$topdir/aclocal-flags`
|
|
|
|
aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags";
|
2000-07-22 20:00:29 +00:00
|
|
|
echo aclocal $aclocalinclude
|
2002-09-27 02:55:00 +00:00
|
|
|
aclocal $aclocalinclude || exit 1
|
2000-07-22 20:00:29 +00:00
|
|
|
echo autoheader
|
|
|
|
autoheader || exit 1
|
|
|
|
echo automake --add-missing --gnu $am_opt
|
|
|
|
automake --add-missing --gnu $am_opt || exit 1
|
|
|
|
echo autoconf
|
|
|
|
autoconf || exit 1
|
|
|
|
) || exit 1
|
1999-07-27 04:43:22 +00:00
|
|
|
done
|
|
|
|
|
2003-01-22 00:19:00 +00:00
|
|
|
#./configure "$@" || exit 1
|
1999-07-27 04:43:22 +00:00
|
|
|
|
|
|
|
echo
|
2003-01-22 00:19:00 +00:00
|
|
|
echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."
|