AC_PATH_PROG(PYTHON, python)
if test ! -z "$PYTHON"; then
#
- # OK, we found Python; is it Python 2.x?
+ # OK, we found Python; is it Python 2.5 or later?
# Note: we don't use named components for sys.version_info to get
# the major version number, as named components for version_info
# were apparently introduced in Python 2.7.
#
- AC_MSG_CHECKING([whether $PYTHON is Python 2])
- python_major_version=`$PYTHON -c 'import sys; print sys.version_info[[0]]'`
- if test "$python_major_version" = 2; then
- AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([whether $PYTHON is Python 2.5 or later])
+ python_major_version=`$PYTHON -c 'import sys; print (sys.version_info[[0]])'`
+ python_minor_version=`$PYTHON -c 'import sys; print (sys.version_info[[1]])'`
+ if test "$python_major_version" -eq 2 -a "$python_minor_version" -lt 5 ; then
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Building with Python $python_major_version.$python_minor_version may not work])
else
- #
- # It's not 2.x.
- #
- AC_MSG_RESULT([no])
-
- #
- # Try looking for python2; if we find it, we assume it's
- # Python 2
- #
- AC_PATH_PROG(PYTHON, python2)
+ AC_MSG_RESULT(yes)
fi
fi
#
PKG_PROG_PKG_CONFIG
-#
-# Let the user specify an OS X release to use as a deplayment target;
-# if they specify that we should have a deployment target but don't
-# specify the deployment target, pick the OS version on which the build
-# is being done. This also causes the build to be done against an SDK
-# rather than against the headers and libraries in /usr/include and /usr/lib.
-#
-# Check for an OS X deployment target early, so that as many tests using
-# the compiler are done using the flags that we'll be using when building.
-#
-case "$host_os" in
-darwin*)
+AC_ARG_ENABLE(osx-deploy-target,
+ AC_HELP_STRING( [--enable-osx-deploy-target],
+ [choose an OS X deployment target @<:@default=major release on which you're building@:>@]),
+[
#
- # Get the OS X major version number.
- # (We quote the command so that we can use autoconf's M4
- # quoting characters, [ and ], in the sed expression.)
+ # Is this OS X?
#
- [os_version=`sw_vers -productVersion | sed 's/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9]*/\1.\2/'`]
-
- AC_ARG_ENABLE(osx-deploy-target,
- AC_HELP_STRING( [--enable-osx-deploy-target],
- [choose an OS X deployment target @<:@default=none@:>@]),
- [
+ case "$host_os" in
+ darwin*)
+ #
+ # Yes.
+ #
+ # Let the user specify an OS X release to use as a
+ # deplayment target; if they specify that we should
+ # have a deployment target but don't specify the
+ # deployment target, then, if we have SDKs available,
+ # pick the OS version on which the build is being done.
+ # This also causes the build to be done against an SDK
+ # rather than against the headers and libraries in
+ # /usr/include and /usr/lib.
+ #
+ # Check for an OS X deployment target early, so that
+ # as many tests using the compiler are done using the
+ # flags that we'll be using when building.
+ #
if test $enableval = no
then
+ #
+ # The user explicitly said
+ # --disable-osx-deploy-target, so don't build
+ # against an SDK.
+ #
deploy_target=
elif test $enableval = yes
then
- deploy_target=$os_version
- else
- deploy_target="$enableval"
- fi
- ],[
- deploy_target=
- ])
- AC_MSG_CHECKING([what deployment target to use])
- if test -z "$deploy_target"
- then
- AC_MSG_RESULT(none)
- OSX_DEPLOY_TARGET=
- else
- AC_MSG_RESULT($deploy_target)
-
- case $deploy_target in
-
- 10.0|10.1|10.2)
#
- # I'm not sure this would even work.
+ # The user said --enable-osx-deploy-target, but
+ # didn't say what version to target; target the
+ # major version number of the version of OS X on
+ # which we're running.
#
- AC_ERROR([$deploy_target not supported as a deployment target])
- ;;
-
- 10.3)
+ # (We quote the command so that we can use
+ # autoconf's M4 quoting characters, [ and ], in
+ # the sed expression.)
#
- # XXX - never tested.
- #
- SDKPATH="/Developer/SDKs/MacOSX10.3.9.sdk"
- ;;
+ [deploy_target=`sw_vers -productVersion | sed 's/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9]*/\1.\2/'`]
+ else
+ deploy_target="$enableval"
+ fi
+ ;;
- *)
- #
- # XXX - for 10.4, do we need 10.4u? We're
- # not currently doing fat builds (we'd need
- # fat versions of the support libraries for
- # that to be useful), but, if we do, we'd
- # need to use 10.4u.
- #
- for i in /Developer/SDKs \
- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
- /Library/Developer/CommandLineTools/SDKs
- do
- if test -d "$i"/"MacOSX$deploy_target.sdk"
- then
- SDKPATH="$i"/"MacOSX$deploy_target.sdk"
- break
- fi
- done
- if test -z "$SDKPATH"
+ *)
+ #
+ # No. Fail, because whatever the user intended for us to
+ # do, we can't do it.
+ #
+ AC_MSG_ERROR([--enable-osx-deploy-target specified on an OS other than OS X])
+ ;;
+ esac
+],[
+ #
+ # Is this OS X?
+ #
+ case "$host_os" in
+ darwin*)
+ #
+ # Yes.
+ #
+ # If we have SDKs available, default to targeting the major
+ # version number of the version of OS X on which we're
+ # running.
+ #
+ # (We quote the command so that we can use autoconf's
+ # M4 quoting characters, [ and ], in the sed expression.)
+ #
+ for i in /Developer/SDKs \
+ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
+ /Library/Developer/CommandLineTools/SDKs
+ do
+ if test -d "$i"
then
- AC_MSG_ERROR([couldn't find the SDK for OS X $deploy_target])
+ [deploy_target=`sw_vers -productVersion | sed 's/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9]*/\1.\2/'`]
+ break
fi
- ;;
- esac
+ done
+ ;;
+ *)
#
- # Add a -mmacosx-version-min flag to force tests that
- # use the compiler, as well as the build itself, not to,
- # for example, use compiler or linker features not supported
- # by the minimum targeted version of the OS.
+ # No. There's nothing to do.
#
- # Add an -isysroot flag to use the SDK.
+ ;;
+ esac
+])
+
+if test ! -z "$deploy_target"
+then
+ AC_MSG_CHECKING([whether we can build for OS X $deploy_target])
+ case $deploy_target in
+
+ 10.0|10.1|10.2)
+ #
+ # I'm not sure this would even work.
#
- CFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CFLAGS"
- CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CXXFLAGS"
- LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $LDFLAGS"
+ AC_MSG_RESULT(no)
+ AC_ERROR([We don't support building for OS X $deploy_target])
+ ;;
+ 10.3)
#
- # Add a -sdkroot flag to use with osx-app.sh.
+ # XXX - never tested.
#
- OSX_APP_FLAGS="-sdkroot $SDKPATH"
+ AC_MSG_RESULT(yes)
+ SDKPATH="/Developer/SDKs/MacOSX10.3.9.sdk"
+ ;;
+ *)
#
- # XXX - do we need this to build the Wireshark wrapper?
- # XXX - is this still necessary with the -mmacosx-version-min
- # flag being set?
+ # XXX - for 10.4, do we need 10.4u? We're
+ # not currently doing fat builds (we'd need
+ # fat versions of the support libraries for
+ # that to be useful), but, if we do, we'd
+ # need to use 10.4u.
#
- OSX_DEPLOY_TARGET="MACOSX_DEPLOYMENT_TARGET=$deploy_target"
+ for i in /Developer/SDKs \
+ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
+ /Library/Developer/CommandLineTools/SDKs
+ do
+ if test -d "$i"/"MacOSX$deploy_target.sdk"
+ then
+ SDKPATH="$i"/"MacOSX$deploy_target.sdk"
+ break
+ fi
+ done
+ if test -z "$SDKPATH"
+ then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([We couldn't find the SDK for OS X $deploy_target])
+ fi
+ AC_MSG_RESULT(yes)
+ ;;
+ esac
- case $deploy_target in
+ #
+ # Add a -mmacosx-version-min flag to force tests that
+ # use the compiler, as well as the build itself, not to,
+ # for example, use compiler or linker features not supported
+ # by the minimum targeted version of the OS.
+ #
+ # Add an -isysroot flag to use the SDK.
+ #
+ CFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CFLAGS"
+ CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $CXXFLAGS"
+ LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $LDFLAGS"
- 10.4|10.5)
- #
- # Only 32-bit builds are supported. 10.5
- # (and 10.4?) had a bug that causes some BPF
- # functions not to work with 64-bit userland
- # code, so capturing won't work.
- #
- CFLAGS="-arch i386 $CFLAGS"
- CXXFLAGS="-arch i386 $CXXFLAGS"
- LDFLAGS="-arch i386 $LDFLAGS"
- ;;
- esac
- fi
-esac
+ #
+ # Add a -sdkroot flag to use with osx-app.sh.
+ #
+ OSX_APP_FLAGS="-sdkroot $SDKPATH"
+
+ #
+ # XXX - do we need this to build the Wireshark wrapper?
+ # XXX - is this still necessary with the -mmacosx-version-min
+ # flag being set?
+ #
+ OSX_DEPLOY_TARGET="MACOSX_DEPLOYMENT_TARGET=$deploy_target"
+
+ #
+ # In the installer package XML file, give the deployment target
+ # as the minimum version.
+ #
+ OSX_MIN_VERSION="$deploy_target"
+
+ case $deploy_target in
+
+ 10.4|10.5)
+ #
+ # Only 32-bit builds are supported. 10.5
+ # (and 10.4?) had a bug that causes some BPF
+ # functions not to work with 64-bit userland
+ # code, so capturing won't work.
+ #
+ CFLAGS="-m32 $CFLAGS"
+ CXXFLAGS="-m32 $CXXFLAGS"
+ LDFLAGS="-m32 $LDFLAGS"
+ ;;
+ esac
+else
+ #
+ # Is this OS X?
+ #
+ case "$host_os" in
+ darwin*)
+ #
+ # Yes.
+ #
+ # In the installer package XML file, give the current OS
+ # version, minor version and all, as the minimum version.
+ # We can't guarantee that the resulting binary will work
+ # on older OS versions, not even older minor versions
+ # (original release or earlier software updates).
+ #
+ OSX_MIN_VERSION=`sw_vers -productVersion`
+ ;;
+ esac
+fi
+AC_SUBST(OSX_MIN_VERSION)
#
# Try to arrange for large file support.
AC_ARG_WITH([qt],
AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@],
[use Qt @<:@default=no@:>@]),
- with_qt="$withval", with_qt="no")
+ with_qt="$withval", with_qt="unspecified")
AC_ARG_WITH([gtk2],
AC_HELP_STRING( [--with-gtk2=@<:@yes/no@:>@],
- [use GTK+ 2.0 @<:@default=yes@:>@]),
- with_gtk2="$withval", with_gtk2="yes")
+ [use GTK+ 2.0 @<:@default=no@:>@]),
+ with_gtk2="$withval", with_gtk2="unspecified")
AC_ARG_WITH([gtk3],
AC_HELP_STRING( [--with-gtk3=@<:@yes/no@:>@],
- [use GTK+ 3.0 instead of 2.0 @<:@default=no@:>@]),
- with_gtk3="$withval", with_gtk3="no")
+ [use GTK+ 3.0 instead of 2.0 @<:@default=yes@:>@]),
+ with_gtk3="$withval", with_gtk3="unspecified")
# GnuTLS
# Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to
# libraries in the rpath, rather than having a script tweak
# DYLD_LIBRARY_PATH.
#
- LDFLAGS="-Wl,-search_paths_first -Wl,-rpath,@executable_path/../lib -Wl,-rpath,/usr/local/lib $LDFLAGS"
+ LDFLAGS="-Wl,-search_paths_first -Wl,-rpath,@executable_path/../lib -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/usr/local/lib $LDFLAGS"
AC_MSG_RESULT([Apple linker - added -Wl,-single_module and -Wl,-search_paths_first, and rpaths])
;;
cygwin*)
AC_SUBST(APPLICATIONSERVICES_FRAMEWORKS)
AC_SUBST(SYSTEMCONFIGURATION_FRAMEWORKS)
AC_SUBST(COREFOUNDATION_FRAMEWORKS)
-AC_SUBST(OSX_APP_FLAGS)
+
+#
+# On Solaris, check whether we have getexecname().
+#
+case "$host_os" in
+solaris*)
+ AC_CHECK_FUNC(getexecname)
+ ;;
+esac
dnl Look in /usr/local for header files and libraries ?
dnl XXX FIXME don't include /usr/local if it is already in the system
have_qt=no
have_gtk=no
if test "x$enable_wireshark" = "xyes"; then
+ if test "x$with_gtk2" = "xunspecified" -a \
+ "x$with_gtk3" = "xunspecified" -a \
+ "x$with_qt" = "xunspecified"; then
+ #
+ # No GUI toolkit was explicitly specified; pick GTK+ 3.
+ #
+ with_gtk3=yes
+ fi
if test "x$with_qt" = "xyes"; then
#
- # Make sure we have a C++ compiler.
+ # Qt was specified; Make sure we have a C++ compiler.
#
if test -z "$CXX"; then
AC_MSG_ERROR(Need a working C++ compiler to build Wireshark with Qt)
fi
- AM_PATH_QT($QT_MIN_VERSION,
+ #
+ # Now make sure we have Qt and, if so, add the flags
+ # for it to CFLAGS and CXXFLAGS.
+ #
+ AC_WIRESHARK_QT_CHECK($QT_MIN_VERSION,
[
CFLAGS="$CFLAGS $Qt_CFLAGS"
CXXFLAGS="$CXXFLAGS $Qt_CFLAGS"
- have_qt=yes
- ]
- , [AC_MSG_ERROR([Qt is not available])])
+ have_qt=yes
+ GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-qt"
+ OSX_APP_FLAGS="$OSX_APP_FLAGS -qt"
+ ],
+ [AC_MSG_ERROR([Qt is not available])])
#
# XXX - greasy hack to make ui/gtk/recent.c
CPPFLAGS="-DQT_GUI_LIB"
fi
- if test "x$with_gtk3" = "xyes" -a "x$with_gtk2" = "xyes" ; then
- # If the user gave us --with-gtk3, use gtk3 rather than gtk2
- with_gtk2="no"
- fi
-
if test "x$with_gtk3" = "xyes"; then
+ #
+ # GTK+ 3 was specified; make sure they didn't also
+ # specify GTK+ 2, as we don't support building both
+ # GTK+ 2 and GTK+ 3 versions at the same time.
+ #
+ if test "x$with_gtk2" = "xyes"; then
+ AC_MSG_ERROR([Both GTK+ 2 and GTK+ 3 were specified; choose one but not both])
+ fi
+
+ #
+ # Make sure we have GTK+ 3.
+ #
AM_PATH_GTK_3_0(3.0.0,
[
CFLAGS="$CFLAGS $GTK_CFLAGS"
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
have_gtk=yes
- ], have_gtk=no)
- fi
-
- if test "x$with_gtk2" = "xyes"; then
+ GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk3"
+ ],
+ [AC_MSG_ERROR([GTK+ 3 is not available])])
+ elif test "x$with_gtk2" = "xyes"; then
+ #
+ # GTK+ 3 wasn't specified, and GTK+ 2 was specified;
+ # make sure we have GTK+ 2.
+ #
AM_PATH_GTK_2_0($GTK2_MIN_VERSION,
[
CFLAGS="$CFLAGS $GTK_CFLAGS"
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
have_gtk=yes
- ], have_gtk=no)
+ GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk2"
+ ],
+ [AC_MSG_ERROR([GTK+ 2 is not available])])
fi
fi
+AC_SUBST(GUI_CONFIGURE_FLAGS)
GLIB_MIN_VERSION=2.16.0
AC_SUBST(GLIB_MIN_VERSION)
fi
#
-# If we have <dlfcn.h>, check whether we can use dladdr to find a
-# filename (hopefully, a full pathname, but no guarantees) for
-# the executable.
+# If we have <dlfcn.h>, check whether we have dladdr.
#
if test "$ac_cv_header_dlfcn_h" = "yes"
then
- AC_MSG_CHECKING(whether dladdr can be used to find the pathname of an executable)
+ #
+ # Use GLib compiler flags and linker flags; GLib's gmodule
+ # stuff uses the dl APIs if available, so it might know
+ # what flags are needed.
+ #
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
- AC_TRY_RUN([
-#define _GNU_SOURCE /* required on Linux, sigh */
-#include <dlfcn.h>
-
-int
-main(void)
-{
- Dl_info info;
-
- if (!dladdr((void *)main, &info))
- return 1; /* failure */
- return 0; /* assume success */
-}
-], ac_cv_dladdr_finds_executable_path=yes, ac_cv_dladdr_finds_executable_path=no,
- [echo $ac_n "cross compiling; assumed OK... $ac_c"
- ac_cv_dladdr_finds_executable_path=yes])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- if test x$ac_cv_dladdr_finds_executable_path = xyes
+ AC_CHECK_FUNCS(dladdr)
+ if test x$ac_cv_func_dladdr = xno
then
- AC_DEFINE(DLADDR_FINDS_EXECUTABLE_PATH, 1, [Define if dladdr can be used to find the path of the executable])
+ #
+ # OK, try it with -ldl, in case you need that to get
+ # dladdr(). For some reason, on Linux, that's not
+ # part of the GLib flags; perhaps GLib itself is
+ # linked with libdl, so that you can link with
+ # Glib and it'll pull libdl in itself.
+ #
+ LIBS="$LIBS -ldl"
+ AC_CHECK_FUNCS(dladdr)
fi
- AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
fi
#
AC_SUBST(wireshark_man)
AM_CONDITIONAL(HAVE_Qt, test "$have_qt" = "yes")
AM_CONDITIONAL(HAVE_GTK, test "$have_gtk" = "yes")
+AC_SUBST(OSX_APP_FLAGS)
# Enable/disable tshark
dnl Checks for header files.
dnl Some of these may not be needed: http://hacks.owlfolio.org/header-survey/
-AC_CHECK_HEADERS(direct.h dirent.h fcntl.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
+AC_CHECK_HEADERS(direct.h dirent.h fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h stdarg.h stddef.h unistd.h)
AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h)
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
asn1/acse/Makefile
asn1/ansi_map/Makefile
asn1/ansi_tcap/Makefile
+ asn1/atn-cm/Makefile
+ asn1/atn-cpdlc/Makefile
+ asn1/atn-ulcs/Makefile
asn1/c1222/Makefile
asn1/camel/Makefile
asn1/cdt/Makefile
packaging/macosx/Info.plist
packaging/macosx/Makefile
packaging/macosx/osx-dmg.sh
+ packaging/macosx/Wireshark_package.pmdoc/index.xml
packaging/nsis/Makefile
packaging/rpm/Makefile
packaging/rpm/SPECS/Makefile