aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt85
-rw-r--r--cmake/modules/FindGLIB.cmake112
-rw-r--r--cmake/modules/FindGLIB2.cmake127
-rw-r--r--cmake/modules/FindLEX.cmake20
-rw-r--r--cmake/modules/FindPCAP.cmake (renamed from cmake/modules/FindPcap.cmake)0
-rw-r--r--cmake/modules/FindYACC.cmake20
-rw-r--r--cmake/modules/LICENSE.txt344
-rw-r--r--cmakeconfig.h.in309
8 files changed, 995 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7416465f29..c1a14ec5cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,19 +21,19 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-PROJECT(dumpcap C)
+project(wireshark C)
-SET(dumpcap_LIBS wiretap)
+set(dumpcap_LIBS wiretap)
-SET(CMAKE_VERBOSE_MAKEFILE ON)
-SET(BUILD_SHARED_LIBS ON)
-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+set(CMAKE_VERBOSE_MAKEFILE ON)
+set(BUILD_SHARED_LIBS ON)
+set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
-SET(PLATFORM_SRC
+set(dumpcap_PLATFORM_SRC
capture-pcap-util-unix.c
)
-SET(dumpcap_FILES
+set(dumpcap_FILES
capture_opts.c
capture_loop.c
capture-pcap-util.c
@@ -47,28 +47,69 @@ SET(dumpcap_FILES
tempfile.c
version_info.c
- ${PLATFORM_SRC}
+ ${dumpcap_PLATFORM_SRC}
)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/wiretap)
+include_directories(${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/wiretap)
-ADD_DEFINITIONS(-DHAVE_CONFIG_H -D_U_=\"__attribute__\(\(unused\)\)\")
+add_definitions(-DHAVE_CONFIG_H -D_U_=\"__attribute__\(\(unused\)\)\")
-LINK_DIRECTORIES(wiretap)
+link_directories(wiretap)
-ADD_EXECUTABLE(dumpcap ${dumpcap_FILES})
+add_executable(dumpcap ${dumpcap_FILES})
-FIND_PACKAGE(GTK2)
-INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIR})
-SET(dumpcap_LIBS ${dumpcap_LIBS} ${GTK2_LIBRARIES})
+option(BUILD_WITH_GLIB2 "Build using gtk2/glib2 instead of gtk/glib" ON)
+option(BUILD_WIRESHARK "Build the GUI version of Wireshark" OFF)
+option(ENABLE_STATIC "Build a static version of Wireshark" ON)
-FIND_PACKAGE(ZLIB)
-INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
-SET(dumpcap_LIBS ${dumpcap_LIBS} ${ZLIB_LIBRARIES})
+if (BUILD_WITH_GLIB2)
+ if (BUILD_WIRESHARK)
+ find_package(GTK2)
+ if (GTK2_FOUND)
+ message(GTK2_FOUND)
+ include_directories(${GTK2_INCLUDE_DIR})
+ set(dumpcap_LIBS ${dumpcap_LIBS} ${GTK2_LIBRARIES})
+ endif (GTK2_FOUND)
+ else (BUILD_WIRESHARK)
+ find_package(GLIB2)
+ if (GLIB2_FOUND)
+ message(GLIB2_FOUND)
+ include_directories(${GLIB2_INCLUDE_DIR})
+ set(dumpcap_LIBS ${dumpcap_LIBS} ${GLIB2_LIBRARIES})
+ endif (GLIB2_FOUND)
+ endif (BUILD_WIRESHARK)
+else (BUILD_WITH_GLIB2)
+ if (BUILD_WIRESHARK)
+ find_package(GTK)
+ if (GTK_FOUND)
+ message(GTK_FOUND)
+ include_directories(${GTK_INCLUDE_DIR})
+ set(dumpcap_LIBS ${dumpcap_LIBS} ${GTK_LIBRARIES})
+ endif (GTK_FOUND)
+ else (BUILD_WIRESHARK)
+ find_package(GLIB REQUIRED)
+ if (GLIB_FOUND)
+ message(GLIB_FOUND)
+ include_directories(${GLIB_INCLUDE_DIR})
+ set(dumpcap_LIBS ${dumpcap_LIBS} ${GLIB_LIBRARIES})
+ endif (GLIB_FOUND)
+ endif (BUILD_WIRESHARK)
+endif (BUILD_WITH_GLIB2)
-FIND_PACKAGE(Pcap)
-INCLUDE_DIRECTORIES(${PCAP_INCLUDE_DIR})
-SET(dumpcap_LIBS ${dumpcap_LIBS} ${PCAP_LIBRARIES})
+set(PACKAGELIST ZLIB PCAP)
-TARGET_LINK_LIBRARIES(dumpcap ${dumpcap_LIBS})
+foreach(PACKAGE ${PACKAGELIST})
+ find_package(${PACKAGE})
+ message(${PACKAGE}_FOUND)
+ if (${PACKAGE}_FOUND)
+ include_directories(${${PACKAGE}_INCLUDE_DIR})
+ set(dumpcap_LIBS ${dumpcap_LIBS} ${${PACKAGE}_LIBRARIES})
+ endif (${PACKAGE}_FOUND)
+endforeach(PACKAGE)
+
+configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
+
+target_link_libraries(dumpcap ${dumpcap_LIBS})
diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake
new file mode 100644
index 0000000000..05ddfc560a
--- /dev/null
+++ b/cmake/modules/FindGLIB.cmake
@@ -0,0 +1,112 @@
+# - try to find GLIB and gmodule
+# GLIB_INCLUDE_DIR - Directories to include to use GLIB
+# GLIB_LIBRARIES - Files to link against to use GLIB
+# GLIB_FOUND - GLIB was found
+# GLIB_gmodule_LIBRARIES
+# GLIB_gthread_LIBRARIES
+
+
+# don't even bother under WIN32
+IF(UNIX)
+
+ # Some Linux distributions (e.g. Red Hat) have glibconfig.h
+ # and glib.h in different directories, so we need to look
+ # for both.
+ # - Atanas Georgiev <atanas@cs.columbia.edu>
+
+ FIND_PATH( GLIB_glibconfig_INCLUDE_PATH glibconfig.h
+ /usr/include
+ /usr/local/include
+ /usr/openwin/share/include
+ /usr/local/include/glib12
+ /usr/lib/glib/include
+ /usr/local/lib/glib/include
+ /opt/gnome/include
+ /opt/gnome/lib/glib/include
+ )
+
+ FIND_PATH( GLIB_glib_INCLUDE_PATH glib.h
+ /usr/include
+ /usr/local/include
+ /usr/openwin/share/include
+ /usr/local/include/glib12
+ /usr/lib/glib/include
+ /usr/include/glib-1.2
+ /usr/local/include/glib-1.2
+ /opt/gnome/include
+ /opt/gnome/include/glib-1.2
+ )
+
+ #
+ # The 12 suffix is thanks to the FreeBSD ports collection
+ #
+
+ FIND_LIBRARY( GLIB_gtk_LIBRARIES
+ NAMES gtk gtk12
+ PATHS /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY( GLIB_gmodule_LIBRARIES
+ NAMES gmodule gmodule12
+ PATHS /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY( GLIB_glib_LIBRARIES
+ NAMES glib glib12
+ PATHS /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY( GLIB_gthread_LIBRARIES
+ NAMES gthread gthread12
+ PATHS /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ IF(GLIB_glibconfig_INCLUDE_PATH)
+ IF(GLIB_glib_INCLUDE_PATH)
+ IF(GLIB_glib_LIBRARIES)
+
+ # Assume that if gtk and glib were found, the other
+ # supporting libraries have also been found.
+
+ SET( GLIB_FOUND "YES" )
+ SET( GLIB_INCLUDE_DIR ${GLIB_glibconfig_INCLUDE_PATH}
+ ${GLIB_glib_INCLUDE_PATH} )
+ SET( GLIB_LIBRARIES ${GLIB_glib_LIBRARIES} )
+
+ IF(GLIB_gmodule_LIBRARIES)
+ SET(GLIB_LIBRARIES ${GLIB_LIBRARIES} ${GLIB_gmodule_LIBRARIES})
+ ENDIF(GLIB_gmodule_LIBRARIES)
+ IF(GLIB_gthread_LIBRARIES)
+ SET(GLIB_LIBRARIES ${GLIB_LIBRARIES} ${GLIB_gthread_LIBRARIES})
+ ENDIF(GLIB_gthread_LIBRARIES)
+
+ ENDIF(GLIB_glib_LIBRARIES)
+ ENDIF(GLIB_glib_INCLUDE_PATH)
+ ENDIF(GLIB_glibconfig_INCLUDE_PATH)
+
+ MARK_AS_ADVANCED(
+ GLIB_glib_INCLUDE_PATH
+ GLIB_glib_LIBRARIES
+ GLIB_glibconfig_INCLUDE_PATH
+ GLIB_gmodule_LIBRARIES
+ GLIB_gthread_LIBRARIES
+ )
+
+ENDIF(UNIX)
+
diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake
new file mode 100644
index 0000000000..1dda572c62
--- /dev/null
+++ b/cmake/modules/FindGLIB2.cmake
@@ -0,0 +1,127 @@
+#
+# try to find GLIB2 (and glib) and GLIBGLArea
+#
+#
+# Jan Woetzel 06/2004: added /opt/gnome/include/gtk-1.2 path and $ENV{GLIB2_HOME}
+# Andreas Schneider 08/2006: added pkgconfig, added lib64 include dirs
+# Joerg Mayer 2006-08-31: rename GLIB to GLIB2
+
+
+# GLIB2_INCLUDE_DIR - Directories to include to use GLIB
+# GLIB2_LIBRARIES - Files to link against to use GLIB
+# GLIB2_FOUND - If false, don't try to use GLIB
+
+
+# don't even bother under WIN32
+IF(UNIX)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ INCLUDE(UsePkgConfig)
+
+ # Some Linux distributions (e.g. Red Hat) have glibconfig.h
+ # and glib.h in different directories, so we need to look
+ # for both.
+ # - Atanas Georgiev <atanas@cs.columbia.edu>
+ PKGCONFIG(glib-2.0 _GLIB2IncDir _GLIB2inkDir _GLIB2LinkFlags _GLIB2Cflags)
+ PKGCONFIG(gmodule-2.0 _GMODULE2IncDir _GMODULE2inkDir _GMODULE2LinkFlags _GMODULE2Cflags)
+ SET(GDIR /opt/gnome/lib/glib-2.0/include)
+
+ FIND_PATH(GLIB2_glibconfig_INCLUDE_PATH glibconfig.h
+ ${_GLIB2IncDir}
+ /opt/gnome/lib64/glib-2.0/include
+ /opt/gnome/lib/glib-2.0/include
+ /usr/lib64/glib-2.0/include
+ /usr/lib/glib-2.0/include
+ )
+
+ FIND_PATH(GLIB2_glib_INCLUDE_PATH glib.h
+ ${_GLIB2IncDir}
+ /opt/gnome/include/glib-2.0
+ /usr/include/glib-2.0
+ )
+
+ FIND_LIBRARY( GLIB2_gmodule_LIBRARY
+ NAMES gmodule-2.0
+ PATHS ${_GMODULE2inkDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY( GLIB2_glib_LIBRARY
+ NAMES glib-2.0
+ PATHS ${_GLIB2inkDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY( GLIB2_gthread_LIBRARY
+ NAMES gthread-2.0
+ PATHS /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY( GLIB2_gobject_LIBRARY
+ NAMES gobject-2.0
+ PATHS
+ /opt/gnome/lib
+ )
+
+ IF(GLIB2_glibconfig_INCLUDE_PATH)
+ IF(GLIB2_glib_INCLUDE_PATH)
+ IF(GLIB2_glib_LIBRARY)
+
+ SET( GLIB2_FOUND TRUE )
+ SET( GLIB2_INCLUDE_DIR
+ ${GLIB2_glibconfig_INCLUDE_PATH}
+ ${GLIB2_glib_INCLUDE_PATH})
+ SET( GLIB2_LIBRARIES ${GLIB2_glib_LIBRARY} )
+
+ IF(GLIB2_gmodule_LIBRARY)
+ SET(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${GLIB2_gmodule_LIBRARY})
+ ENDIF(GLIB2_gmodule_LIBRARY)
+ IF(GLIB2_gthread_LIBRARY)
+ SET(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${GLIB2_gthread_LIBRARY})
+ ENDIF(GLIB2_gthread_LIBRARY)
+
+ ELSE(GLIB2_glib_LIBRARY)
+ MESSAGE("Can not find glib lib")
+ ENDIF(GLIB2_glib_LIBRARY)
+ ELSE(GLIB2_glib_INCLUDE_PATH)
+ MESSAGE("Can not find glib includes")
+ ENDIF(GLIB2_glib_INCLUDE_PATH)
+ ELSE(GLIB2_glibconfig_INCLUDE_PATH)
+ MESSAGE("Can not find glibconfig")
+ ENDIF(GLIB2_glibconfig_INCLUDE_PATH)
+
+ if (GLIB2_FOUND)
+ if (NOT GLIB2_FIND_QUIETLY)
+ message(STATUS "Found GLIB: ${GLIB2_LIBRARIES}")
+ endif (NOT GLIB2_FIND_QUIETLY)
+ else (GLIB2_FOUND)
+ if (GLIB2_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find GLIB")
+ endif (GLIB2_FIND_REQUIRED)
+ endif (GLIB2_FOUND)
+
+
+ MARK_AS_ADVANCED(
+ GLIB2_glib_INCLUDE_PATH
+ GLIB2_glib_LIBRARY
+ GLIB2_glibconfig_INCLUDE_PATH
+ GLIB2_gmodule_LIBRARY
+ GLIB2_gthread_LIBRARY
+ )
+
+ELSE(UNIX)
+ # MESSAGE("FindGLIB2 is working on UNIX/LINUX, only!")
+ENDIF(UNIX)
+
diff --git a/cmake/modules/FindLEX.cmake b/cmake/modules/FindLEX.cmake
new file mode 100644
index 0000000000..31033f23ca
--- /dev/null
+++ b/cmake/modules/FindLEX.cmake
@@ -0,0 +1,20 @@
+# - Find unix commands from cygwin
+# This module looks for some usual Unix commands.
+#
+
+INCLUDE(FindCygwin)
+
+FIND_PROGRAM(LEX
+ NAMES
+ lex
+ flex
+ PATH
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ LEX
+)
diff --git a/cmake/modules/FindPcap.cmake b/cmake/modules/FindPCAP.cmake
index 8eb537d9c7..8eb537d9c7 100644
--- a/cmake/modules/FindPcap.cmake
+++ b/cmake/modules/FindPCAP.cmake
diff --git a/cmake/modules/FindYACC.cmake b/cmake/modules/FindYACC.cmake
new file mode 100644
index 0000000000..31499224fc
--- /dev/null
+++ b/cmake/modules/FindYACC.cmake
@@ -0,0 +1,20 @@
+# - Find unix commands from cygwin
+# This module looks for some usual Unix commands.
+#
+
+INCLUDE(FindCygwin)
+
+FIND_PROGRAM(YACC
+ NAMES
+ yacc
+ bison
+ PATH
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+MARK_AS_ADVANCED(
+ YACC
+)
diff --git a/cmake/modules/LICENSE.txt b/cmake/modules/LICENSE.txt
new file mode 100644
index 0000000000..6e1f008ffd
--- /dev/null
+++ b/cmake/modules/LICENSE.txt
@@ -0,0 +1,344 @@
+All files in this directory are dual licensed by the licenses
+included below, unless the individual license of a file says
+otherwise.
+
+ $Id$
+
+###################################################################
+#
+# Copyright (c) 2004 Jan Woetzel
+# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+###################################################################
+#
+# Copyright (c) 2004 Jan Woetzel
+# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# * Neither the name of the <ORGANIZATION> nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+IF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
+ # in cache already
+ SET(GTK2_FOUND TRUE)
+ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
+ IF(UNIX)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ INCLUDE(UsePkgConfig)
+
+ PKGCONFIG(gtk+-2.0 _GTK22IncDir _GTK22LinkDir _GTK22LinkFlags _GTK22Cflags)
+
+ FIND_PATH(GTK2_GTK_INCLUDE_PATH gtk/gtk.h
+ $ENV{GTK2_HOME}
+ ${_GTK22IncDir}
+ /usr/include/gtk-2.0
+ /usr/local/include/gtk-2.0
+ /opt/gnome/include/gtk-2.0
+ )
+
+ # Some Linux distributions (e.g. Red Hat) have glibconfig.h
+ # and glib.h in different directories, so we need to look
+ # for both.
+ # - Atanas Georgiev <atanas@cs.columbia.edu>
+ PKGCONFIG(glib-2.0 _GLIB2IncDir _GLIB2inkDir _GLIB2LinkFlags _GLIB2Cflags)
+ PKGCONFIG(gmodule-2.0 _GMODULE2IncDir _GMODULE2inkDir _GMODULE2LinkFlags _GMODULE2Cflags)
+ SET(GDIR /opt/gnome/lib/glib-2.0/include)
+ FIND_PATH(GTK2_GLIBCONFIG_INCLUDE_PATH glibconfig.h
+ ${_GLIB2IncDir}
+ /opt/gnome/lib64/glib-2.0/include
+ /opt/gnome/lib/glib-2.0/include
+ /usr/lib64/glib-2.0/include
+ /usr/lib/glib-2.0/include
+ )
+ #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
+
+ FIND_PATH(GTK2_GLIB_INCLUDE_PATH glib.h
+ ${_GLIB2IncDir}
+ /opt/gnome/include/glib-2.0
+ /usr/include/glib-2.0
+ )
+ #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
+
+ FIND_PATH(GTK2_GTKGL_INCLUDE_PATH gtkgl/gtkglarea.h
+ ${_GLIB2IncDir}
+ /usr/include
+ /usr/local/include
+ /usr/openwin/share/include
+ /opt/gnome/include
+ )
+
+ PKGCONFIG(pango _PANGOIncDir _PANGOinkDir _PANGOLinkFlags _PANGOCflags)
+
+ FIND_PATH(GTK2_PANGO_INCLUDE_PATH pango/pango.h
+ ${_PANGOIncDir}
+ /opt/gnome/include/pango-1.0
+ /usr/include/pango-1.0
+ )
+
+ PKGCONFIG(gdk-2.0 _GDK2IncDir _GDK2inkDir _GDK2LinkFlags _GDK2Cflags)
+
+ FIND_PATH(GTK2_GDKCONFIG_INCLUDE_PATH gdkconfig.h
+ ${_GDK2IncDir}
+ /opt/gnome/lib/gtk-2.0/include
+ /opt/gnome/lib64/gtk-2.0/include
+ /usr/lib/gtk-2.0/include
+ /usr/lib64/gtk-2.0/include
+ )
+
+ PKGCONFIG(cairo _CAIROIncDir _CAIROinkDir _CAIROLinkFlags _CAIROCflags)
+
+ FIND_PATH(GTK2_CAIRO_INCLUDE_PATH cairo.h
+ ${_CAIROIncDir}
+ /opt/gnome/include/cairo
+ /usr/include
+ /usr/include/cairo
+ )
+ #MESSAGE(STATUS "DEBUG: GTK2_CAIRO_INCLUDE_PATH = ${GTK2_CAIRO_INCLUDE_PATH}")
+
+ PKGCONFIG(atk _ATKIncDir _ATKinkDir _ATKLinkFlags _ATKCflags)
+
+ FIND_PATH(GTK2_ATK_INCLUDE_PATH atk/atk.h
+ ${_ATKIncDir}
+ /opt/gnome/include/atk-1.0
+ /usr/include/atk-1.0
+ )
+ #MESSAGE(STATUS "DEBUG: GTK2_ATK_INCLUDE_PATH = ${GTK2_ATK_INCLUDE_PATH}")
+
+ FIND_LIBRARY(GTK2_GTKGL_LIBRARY
+ NAMES
+ gtkgl
+ PATHS
+ ${_GTK22IncDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY(GTK2_GTK_LIBRARY
+ NAMES
+ gtk-x11-2.0
+ PATHS
+ ${_GTK22LinkDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY(GTK2_GDK_LIBRARY
+ NAMES
+ gdk-x11-2.0
+ PATHS
+ ${_GDK2LinkDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY(GTK2_GMODULE_LIBRARY
+ NAMES
+ gmodule-2.0
+ PATHS
+ ${_GMODULE2inkDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY(GTK2_GLIB_LIBRARY
+ NAMES
+ glib-2.0
+ PATHS
+ ${_GLIB2inkDir}
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY(GTK2_Xi_LIBRARY
+ NAMES
+ Xi
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ FIND_LIBRARY(GTK2_GTHREAD_LIBRARY
+ NAMES
+ gthread-2.0
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+
+ FIND_LIBRARY(GTK2_GOBJECT_LIBRARY
+ NAMES
+ gobject-2.0
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /usr/openwin/lib
+ /usr/X11R6/lib
+ /opt/gnome/lib
+ )
+
+ IF(GTK2_GTK_INCLUDE_PATH)
+ IF(GTK2_GLIBCONFIG_INCLUDE_PATH)
+ IF(GTK2_GLIB_INCLUDE_PATH)
+ IF(GTK2_GTK_LIBRARY)
+ IF(GTK2_GLIB_LIBRARY)
+ IF(GTK2_PANGO_INCLUDE_PATH)
+ IF(GTK2_ATK_INCLUDE_PATH)
+ IF(GTK2_CAIRO_INCLUDE_PATH)
+ # Assume that if gtk and glib were found, the other
+ # supporting libraries have also been found.
+
+ SET(GTK2_FOUND TRUE)
+
+ SET(GTK2_INCLUDE_DIRS
+ ${GTK2_GTK_INCLUDE_PATH}
+ ${GTK2_GLIBCONFIG_INCLUDE_PATH}
+ ${GTK2_GLIB_INCLUDE_PATH}
+ ${GTK2_PANGO_INCLUDE_PATH}
+ ${GTK2_GDKCONFIG_INCLUDE_PATH}
+ ${GTK2_ATK_INCLUDE_PATH}
+ ${GTK2_CAIRO_INCLUDE_PATH}
+ CACHE INTERNAL "The include directories for GTK2"
+ )
+
+ SET(GTK2_LIBRARIES
+ ${GTK2_GTK_LIBRARY}
+ ${GTK2_GDK_LIBRARY}
+ ${GTK2_GLIB_LIBRARY}
+ )
+ #${GTK2_GOBJECT_LIBRARY})
+
+ IF(GTK2_GMODULE_LIBRARY)
+ SET(GTK2_LIBRARIES
+ ${GTK2_LIBRARIES}
+ ${GTK2_GMODULE_LIBRARY}
+ )
+ ENDIF(GTK2_GMODULE_LIBRARY)
+
+ IF(GTK2_GTHREAD_LIBRARY)
+ SET(GTK2_LIBRARIES
+ ${GTK2_LIBRARIES}
+ ${GTK2_GTHREAD_LIBRARY}
+ )
+ SET(GTK2_LIBRARIES ${GTK2_LIBRARIES} CACHE INTERNAL "The libraries for GTK2"
+ ENDIF(GTK2_GTHREAD_LIBRARY)
+ ELSE(GTK2_CAIRO_INCLUDE_PATH)
+ MESSAGE(STATUS "Can not find cairo")
+ ENDIF(GTK2_CAIRO_INCLUDE_PATH)
+ ELSE(GTK2_ATK_INCLUDE_PATH)
+ MESSAGE(STATUS "Can not find atk")
+ ENDIF(GTK2_ATK_INCLUDE_PATH)
+ ELSE(GTK2_PANGO_INCLUDE_PATH)
+ MESSAGE(STATUS "Can not find pango includes")
+ ENDIF(GTK2_PANGO_INCLUDE_PATH)
+ ELSE(GTK2_GLIB_LIBRARY)
+ MESSAGE(STATUS "Can not find glib lib")
+ ENDIF(GTK2_GLIB_LIBRARY)
+ ELSE(GTK2_GTK_LIBRARY)
+ MESSAGE(STATUS "Can not find gtk lib")
+ ENDIF(GTK2_GTK_LIBRARY)
+ ELSE(GTK2_GLIB_INCLUDE_PATH)
+ MESSAGE(STATUS "Can not find glib includes")
+ ENDIF(GTK2_GLIB_INCLUDE_PATH)
+ ELSE(GTK2_GLIBCONFIG_INCLUDE_PATH)
+ MESSAGE(STATUS "Can not find glibconfig")
+ ENDIF(GTK2_GLIBCONFIG_INCLUDE_PATH)
+ ELSE (GTK2_GTK_INCLUDE_PATH)
+ MESSAGE(STATUS "Can not find gtk includes")
+ ENDIF (GTK2_GTK_INCLUDE_PATH)
+
+ IF (GTK2_FOUND)
+ IF (NOT GTK2_FIND_QUIETLY)
+ MESSAGE(STATUS "Found GTK2: ${GTK2_LIBRARIES}")
+ ENDIF (NOT GTK2_FIND_QUIETLY)
+ ELSE (GTK2_FOUND)
+ IF (GTK2_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Could NOT find GTK2")
+ ENDIF (GTK2_FIND_REQUIRED)
+ ENDIF (GTK2_FOUND)
+
+ MARK_AS_ADVANCED(
+ GTK2_GDK_LIBRARY
+ GTK2_GLIB_INCLUDE_PATH
+ GTK2_GLIB_LIBRARY
+ GTK2_GLIBCONFIG_INCLUDE_PATH
+ GTK2_GMODULE_LIBRARY
+ GTK2_GTHREAD_LIBRARY
+ GTK2_Xi_LIBRARY
+ GTK2_GTK_INCLUDE_PATH
+ GTK2_GTK_LIBRARY
+ GTK2_GTKGL_INCLUDE_PATH
+ GTK2_GTKGL_LIBRARY
+ GTK2_ATK_INCLUDE_PATH
+ GTK2_GDKCONFIG_INCLUDE_PATH
+ #GTK2_GOBJECT_LIBRARY
+ GTK2_PANGO_INCLUDE_PATH
+ )
+ ENDIF(UNIX)
+ENDIF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
+
+# vim:et ts=2 sw=2 comments=\:\#
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
new file mode 100644
index 0000000000..577d7f2901
--- /dev/null
+++ b/cmakeconfig.h.in
@@ -0,0 +1,309 @@
+/* cmakeconfig.h.in */
+
+/* Directory for data */
+#cmakedefine DATAFILE_DIR
+
+/* Link plugins statically into Wireshark */
+#cmakedefine ENABLE_STATIC
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#cmakedefine HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#cmakedefine HAVE_ARPA_NAMESER_H
+
+/* Define to 1 if you have the <direct.h> header file. */
+#cmakedefine HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#cmakedefine HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#cmakedefine HAVE_FCNTL_H
+
+/* Define to 1 if you have the `gethostbyname2' function. */
+#cmakedefine HAVE_GETHOSTBYNAME2
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#cmakedefine HAVE_GETPROTOBYNUMBER
+
+/* Define to use GNU ADNS library */
+#cmakedefine HAVE_GNU_ADNS
+
+/* Define to use heimdal kerberos */
+#cmakedefine HAVE_HEIMDAL_KERBEROS
+
+/* Define if you have the iconv() function. */
+#cmakedefine HAVE_ICONV
+
+/* Define if inet_ntop() prototype exists */
+#cmakedefine HAVE_INET_NTOP_PROTO
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `issetugid' function. */
+#cmakedefine HAVE_ISSETUGID
+
+/* Define to use kerberos */
+#cmakedefine HAVE_KERBEROS
+
+/* Define if krb5.h defines KEYTYPE_ARCFOUR_56 */
+#cmakedefine HAVE_KEYTYPE_ARCFOUR_56
+
+/* Define to 1 if you have the <lauxlib.h> header file. */
+#cmakedefine HAVE_LAUXLIB_H
+
+/* Define to use libgcrypt */
+#cmakedefine HAVE_LIBGCRYPT
+
+/* Define to use gnutls library */
+#cmakedefine HAVE_LIBGNUTLS
+
+/* Define to use libpcap library */
+#cmakedefine HAVE_LIBPCAP
+
+/* Define to use libpcre library */
+#cmakedefine HAVE_LIBPCRE
+
+/* Define to use libportaudio library */
+#cmakedefine HAVE_LIBPORTAUDIO
+
+/* Define to use libz library */
+#cmakedefine HAVE_LIBZ
+
+/* Define to 1 if you have the <lua5.1/lauxlib.h> header file. */
+#cmakedefine HAVE_LUA5_1_LAUXLIB_H
+
+/* Define to 1 if you have the <lua5.1/lualib.h> header file. */
+#cmakedefine HAVE_LUA5_1_LUALIB_H
+
+/* Define to 1 if you have the <lua5.1/lua.h> header file. */
+#cmakedefine HAVE_LUA5_1_LUA_H
+
+/* Define to 1 if you have the <lualib.h> header file. */
+#cmakedefine HAVE_LUALIB_H
+
+/* Define to use Lua 5.1 */
+#cmakedefine HAVE_LUA_5_1
+
+/* Define to 1 if you have the <lua.h> header file. */
+#cmakedefine HAVE_LUA_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H
+
+/* Define to use MIT kerberos */
+#cmakedefine HAVE_MIT_KERBEROS
+
+/* Define to 1 if you have the `mmap' function. */
+#cmakedefine HAVE_MMAP
+
+/* Define to 1 if you have the `mprotect' function. */
+#cmakedefine HAVE_MPROTECT
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#cmakedefine HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#cmakedefine HAVE_NETINET_IN_H
+
+/* Define to enable support for Net-SNMP */
+#cmakedefine HAVE_NET_SNMP
+
+/* Define to 1 if you have the <net-snmp/library/default_store.h> header file.
+ */
+#cmakedefine HAVE_NET_SNMP_LIBRARY_DEFAULT_STORE_H
+
+/* Define to 1 if you have the <net-snmp/net-snmp-config.h> header file. */
+#cmakedefine HAVE_NET_SNMP_NET_SNMP_CONFIG_H
+
+/* Define to 1 if you have OS X frameworks */
+#cmakedefine HAVE_OS_X_FRAMEWORKS
+
+/* Define to 1 if you have the `pcap_breakloop' function. */
+#cmakedefine HAVE_PCAP_BREAKLOOP
+
+/* Define to 1 if you have the `pcap_datalink_name_to_val' function. */
+#cmakedefine HAVE_PCAP_DATALINK_NAME_TO_VAL
+
+/* Define to 1 if you have the `pcap_datalink_val_to_name' function. */
+#cmakedefine HAVE_PCAP_DATALINK_VAL_TO_NAME
+
+/* Define to 1 if you have the `pcap_findalldevs' function and a pcap.h that
+ declares pcap_if_t. */
+#cmakedefine HAVE_PCAP_FINDALLDEVS
+
+/* Define to 1 if you have the `pcap_freecode' function. */
+#cmakedefine HAVE_PCAP_FREECODE
+
+/* Define to 1 if you have the `pcap_get_selectable_fd' function. */
+#cmakedefine HAVE_PCAP_GET_SELECTABLE_FD
+
+/* Define to 1 if you have the `pcap_lib_version' function. */
+#cmakedefine HAVE_PCAP_LIB_VERSION
+
+/* Define to 1 if you have the `pcap_list_datalinks' function. */
+#cmakedefine HAVE_PCAP_LIST_DATALINKS
+
+/* Define to 1 if you have the `pcap_open_dead' function. */
+#cmakedefine HAVE_PCAP_OPEN_DEAD
+
+/* Define to 1 if you have the `pcap_set_datalink' function. */
+#cmakedefine HAVE_PCAP_SET_DATALINK
+
+/* Define if libpcap version is known */
+#cmakedefine HAVE_PCAP_VERSION
+
+/* Define if plugins are enabled */
+#cmakedefine HAVE_PLUGINS
+
+/* Define to 1 if you have the <portaudio.h> header file. */
+#cmakedefine HAVE_PORTAUDIO_H
+
+/* Define if sa_len field exists in struct sockaddr */
+#cmakedefine HAVE_SA_LEN
+
+/* Define to 1 if some SNMP support is to be used */
+#cmakedefine HAVE_SOME_SNMP
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#cmakedefine HAVE_STDARG_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#cmakedefine HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H
+
+/* Define to 1 if you have the `sysconf' function. */
+#cmakedefine HAVE_SYSCONF
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#cmakedefine HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#cmakedefine HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#cmakedefine HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#cmakedefine HAVE_SYS_SOCKIO_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#cmakedefine HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#cmakedefine HAVE_SYS_WAIT_H
+
+/* Define to enable support for UCD-SNMP */
+#cmakedefine HAVE_UCD_SNMP
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H
+
+/* HTML viewer, e.g. mozilla */
+#cmakedefine HTML_VIEWER
+
+/* Define as const if the declaration of iconv() needs const. */
+#cmakedefine ICONV_CONST
+
+/* Define if <inttypes.h> defines PRI[doxu]64 macros */
+#cmakedefine INTTYPES_H_DEFINES_FORMATS
+
+/* Define if getopt.h needs to be included */
+#cmakedefine NEED_GETOPT_H
+
+/* Define if g_ascii_strtoull.h needs to be included */
+#cmakedefine NEED_G_ASCII_STRTOULL_H
+
+/* Define if inet/aton.h needs to be included */
+#cmakedefine NEED_INET_ATON_H
+
+/* Define if inet/v6defs.h needs to be included */
+#cmakedefine NEED_INET_V6DEFS_H
+
+/* Define if strerror.h needs to be included */
+#cmakedefine NEED_STRERROR_H
+
+/* Define if strptime.h needs to be included */
+#cmakedefine NEED_STRPTIME_H
+
+/* Name of package */
+#cmakedefine PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#cmakedefine PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#cmakedefine PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#cmakedefine PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#cmakedefine PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#cmakedefine PACKAGE_VERSION
+
+/* Plugin installation directory */
+#cmakedefine PLUGIN_DIR
+
+/* Define if we are using version of of the Portaudio library API */
+#cmakedefine PORTAUDIO_API_1
+
+/* Format for printing 64-bit unsigned hexadecimal numbers (upper-case) */
+#cmakedefine PRIX64
+
+/* Format for printing 64-bit signed decimal numbers */
+#cmakedefine PRId64
+
+/* Format for printing 64-bit unsigned octal numbers */
+#cmakedefine PRIo64
+
+/* Format for printing 64-bit unsigned decimal numbers */
+#cmakedefine PRIu64
+
+/* Format for printing 64-bit unsigned hexadecimal numbers (lower-case) */
+#cmakedefine PRIx64
+
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine STDC_HEADERS
+
+/* Version number of package */
+#cmakedefine VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#cmakedefine WORDS_BIGENDIAN
+
+/* Define as the string to precede external variable declarations in
+ dynamically-linked libraries */
+#cmakedefine WS_VAR_IMPORT
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#cmakedefine YYTEXT_POINTER