sec_vt_header: dissect call_id
[wireshark-wip.git] / autogen.sh
blobcbeb84af9abe73ef48c4bc181712d81ad152f1a3
1 #!/bin/sh
3 # Run this to generate all the initial makefiles.
5 # $Id$
7 DIE=true
8 PROJECT="Wireshark"
10 # If you are going to use the non-default name for automake becase your OS
11 # installaion has multiple versions, you need to call both aclocal and automake
12 # with that version number, as they come from the same package.
13 #AM_VERSION='-1.8'
15 ACLOCAL=aclocal$AM_VERSION
16 AUTOHEADER=autoheader
17 AUTOMAKE=automake$AM_VERSION
18 AUTOCONF=autoconf
20 # Check for python. Python did not support --version before version 2.5.
21 # Until we require a version > 2.5, we should use -V.
22 PYVER=`python -V 2>&1 | sed 's/Python *//'`
23 case "$PYVER" in
24 2*|3*)
27 cat >&2 <<_EOF_
29 You must have Python in order to compile $PROJECT.
30 Download the appropriate package for your distribution/OS,
31 or get the source tarball at http://www.python.org/
32 _EOF_
33 DIE="exit 1"
34 esac
37 ACVER=`$AUTOCONF --version | grep '^autoconf' | sed 's/.*) *//'`
38 case "$ACVER" in
39 '' | 0.* | 1.* | 2.[0-5]* )
40 cat >&2 <<_EOF_
42 You must have autoconf 2.60 or later installed to compile $PROJECT.
43 Download the appropriate package for your distribution/OS,
44 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/
45 _EOF_
46 DIE="exit 1"
48 esac
51 AMVER=`$AUTOMAKE --version | grep '^automake' | sed 's/.*) *//'`
52 case "$AMVER" in
53 1.9* | 1.[1][0-9]*)
58 cat >&2 <<_EOF_
60 You must have automake 1.9 or later installed to compile $PROJECT.
61 Download the appropriate package for your distribution/OS,
62 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/
63 _EOF_
64 DIE="exit 1"
66 esac
70 # Apple's Developer Tools have a "libtool" that has nothing to do with
71 # the GNU libtool; they call the latter "glibtool". They also call
72 # libtoolize "glibtoolize".
74 # Check for "glibtool" first.
76 LTVER=`glibtool --version 2>/dev/null | grep ' libtool)' | \
77 sed 's/.*libtool) \([0-9][0-9.]*\)[^ ]* .*/\1/'`
78 if test -z "$LTVER"
79 then
80 LTVER=`libtool --version | grep ' libtool)' | \
81 sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/' `
82 LIBTOOLIZE=libtoolize
83 else
84 LIBTOOLIZE=glibtoolize
86 case "$LTVER" in
87 '' | 0.* | 1.[0-3]* )
89 cat >&2 <<_EOF_
91 You must have libtool 1.4 or later installed to compile $PROJECT.
92 Download the appropriate package for your distribution/OS,
93 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
94 _EOF_
95 DIE="exit 1"
97 esac
99 $DIE
101 aclocal_flags=`./aclocal-flags`
102 aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags";
103 echo $ACLOCAL $aclocalinclude
104 $ACLOCAL $aclocalinclude || exit 1
106 # We do NOT want libtoolize overwriting our versions of config.guess and
107 # config.sub, so move them away and then move them back.
108 # We don't omit "--force", as we want libtoolize to install other files
109 # without whining.
111 mv config.guess config.guess.save-libtool
112 mv config.sub config.sub.save-libtool
113 LTARGS=" --copy --force"
114 echo $LIBTOOLIZE $LTARGS
115 $LIBTOOLIZE $LTARGS || exit 1
116 rm -f config.guess config.sub
117 mv config.guess.save-libtool config.guess
118 mv config.sub.save-libtool config.sub
119 echo $AUTOHEADER
120 $AUTOHEADER || exit 1
121 echo $AUTOMAKE --add-missing --gnu $am_opt
122 $AUTOMAKE --add-missing --gnu $am_opt || exit 1
123 echo $AUTOCONF
124 $AUTOCONF || exit 1
126 if [ `uname -s` = Darwin ] ; then
127 echo
128 echo "To configure Wireshark on OS X, you will need to type:"
129 echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
130 echo "before you can run configure."
133 echo
134 echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."