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 # installation 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]* | 2.6[0123]* )
65 You must have autoconf 2.64 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.11 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.* | 2.2 )
114 You must have libtool 2.2.2 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 LTARGS=" --copy --force"
139 echo $LIBTOOLIZE $LTARGS
140 $LIBTOOLIZE $LTARGS || exit 1
141 aclocal_flags="-I m4"
142 aclocalinclude="$ACLOCAL_FLAGS $aclocal_flags";
143 echo $ACLOCAL $aclocalinclude
144 $ACLOCAL $aclocalinclude || exit 1
146 $AUTOHEADER || exit 1
147 echo $AUTOMAKE --add-missing --gnu $am_opt
148 $AUTOMAKE --add-missing --gnu $am_opt || exit 1
152 if [ `uname -s` = Darwin ] ; then
154 echo "To configure Wireshark on {Mac} OS X/macOS, you will need to type:"
155 echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
156 echo "before you can run configure."
160 echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."