3 # Run this to generate all the initial makefiles.
5 # Copyright 2014 The Wireshark Authors
7 # Wireshark - Network traffic analyzer
8 # By Gerald Combs <gerald@wireshark.org>
9 # Copyright 1998 Gerald Combs
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 # If you are going to use the non-default name for automake becase your OS
29 # installaion has multiple versions, you need to call both aclocal and automake
30 # with that version number, as they come from the same package.
33 ACLOCAL=aclocal$AM_VERSION
35 AUTOMAKE=automake$AM_VERSION
39 # Check for python. Python did not support --version before version 2.5.
40 # Until we require a version > 2.5, we should use -V.
41 PYVER=`exec python -V 2>&1 | sed 's/Python *//'`
42 # If "python" isn't found, try "python3"
43 if test "$PYVER" = "exec: python: not found"
45 PYVER=`exec python3 -V 2>&1 | sed 's/Python *//'`
53 You must have Python in order to compile $PROJECT.
54 Download the appropriate package for your distribution/OS,
55 or get the source tarball at http://www.python.org/
60 ACVER=`$AUTOCONF --version | grep '^autoconf' | sed 's/.*) *//'`
62 '' | 0.* | 1.* | 2.[0-5]* )
65 You must have autoconf 2.60 or later installed to compile $PROJECT.
66 Download the appropriate package for your distribution/OS,
67 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/
74 AMVER=`$AUTOMAKE --version | grep '^automake' | sed 's/.*) *//'`
83 You must have automake 1.9 or later installed to compile $PROJECT.
84 Download the appropriate package for your distribution/OS,
85 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/automake/
93 # Apple's Developer Tools have a "libtool" that has nothing to do with
94 # the GNU libtool; they call the latter "glibtool". They also call
95 # libtoolize "glibtoolize".
97 # Check for "glibtool" first.
99 LTVER=`glibtool --version 2>/dev/null | grep ' libtool)' | \
100 sed 's/.*libtool) \([0-9][0-9.]*\)[^ ]* .*/\1/'`
103 LTVER=`libtool --version | grep ' libtool)' | \
104 sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/' `
105 LIBTOOLIZE=libtoolize
107 LIBTOOLIZE=glibtoolize
110 '' | 0.* | 1.[0-3]* )
114 You must have libtool 1.4 or later installed to compile $PROJECT.
115 Download the appropriate package for your distribution/OS,
116 or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
123 # XXX - is there some minimum version for which we should be checking?
125 PCVER=`pkg-config --version`
126 if test -z "$PCVER"; then
129 You must have pkg-config installed to compile $PROJECT.
130 Download the appropriate package for your distribution/OS,
131 or get the source tarball at http://pkgconfig.freedesktop.org/releases/
138 aclocal_flags=`./aclocal-flags`
139 aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags";
140 echo $ACLOCAL $aclocalinclude
141 $ACLOCAL $aclocalinclude || exit 1
143 # We do NOT want libtoolize overwriting our versions of config.guess and
144 # config.sub, so move them away and then move them back.
145 # We don't omit "--force", as we want libtoolize to install other files
148 mv config.guess config.guess.save-libtool
149 mv config.sub config.sub.save-libtool
150 LTARGS=" --copy --force"
151 echo $LIBTOOLIZE $LTARGS
152 $LIBTOOLIZE $LTARGS || exit 1
153 rm -f config.guess config.sub
154 mv config.guess.save-libtool config.guess
155 mv config.sub.save-libtool config.sub
157 $AUTOHEADER || exit 1
158 echo $AUTOMAKE --add-missing --gnu $am_opt
159 $AUTOMAKE --add-missing --gnu $am_opt || exit 1
163 if [ `uname -s` = Darwin ] ; then
165 echo "To configure Wireshark on OS X, you will need to type:"
166 echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
167 echo "before you can run configure."
171 echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."