aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt57
-rw-r--r--cmake/modules/FindCAP.cmake32
-rw-r--r--cmake/modules/FindGEOIP.cmake32
-rw-r--r--cmake/modules/FindKERBEROS.cmake38
-rw-r--r--cmake/modules/FindM.cmake32
-rw-r--r--cmake/modules/FindMATH.cmake32
-rw-r--r--epan/wspython/CMakeLists.txt32
7 files changed, 211 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c66bba4f9..6e1d94a9c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,26 +73,26 @@ option(BUILD_capinfos "Build capinfos" ON)
option(BUILD_randpkt "Build randpkt" ON)
option(BUILD_dftest "Build dftest" ON)
-
option(ENABLE_EXTRA_GCC_CHECKS "Do additional -W checks in GCC" OFF)
option(ENABLE_AIRPCAP "Enable Airpcap support" ON)
# todo
option(ENABLE_STATIC "Build a static version of Wireshark" OFF)
-option(ENABLE_CARES "Build with c_ares support" OFF)
option(ENABLE_ADNS "Build with adns support" ON)
option(ENABLE_PCRE "Build with pcre support" ON)
option(ENABLE_PORTAUDIO "Build with portaudio support" ON)
option(ENABLE_Z "Build with zlib compression support" ON)
-option(ENABLE_LUA "Build with lua dissector support" ON)
+option(ENABLE_LUA "Build with lua dissector support" OFF)
option(ENABLE_SMI "Build with smi snmp support" ON)
-# todo
option(ENABLE_GNUTLS "Build with GNU TLS support" ON)
option(ENABLE_GCRYPT "Build with GNU crypto support" ON)
-option(ENABLE_KRB5 "Build with MIT Kerberos 5 support" ON)
-option(ENABLE_GEOIP "Build with GeoIP support" ON)
-option(ENABLE_PYTHON "Build with python dissector support" ON)
+# todo Mostly hardcoded
+option(ENABLE_KERBEROS "Build with Kerberos support" ON)
+# Untested
+option(ENABLE_GEOIP "Build with GeoIP support" OFF)
option(ENABLE_CAP "Build with posix capabilities support" OFF)
+option(ENABLE_CARES "Build with c_ares support" OFF)
+option(ENABLE_PYTHON "Build with python dissector support" OFF)
if(ENABLE_EXTRA_GCC_CHECKS)
@@ -117,7 +117,7 @@ else()
endif()
#The minimum package list
-set(PACKAGELIST GLIB2 PCAP MATH LEX YACC Perl SH PythonInterp HtmlViewer ${PACKAGELIST})
+set(PACKAGELIST GLIB2 PCAP M LEX YACC Perl SH PythonInterp HtmlViewer ${PACKAGELIST})
#Build the gui ?
if(BUILD_wireshark)
@@ -144,6 +144,11 @@ if(ENABLE_PCRE)
set(PACKAGELIST PCRE ${PACKAGELIST})
endif()
+# Kerberos
+if(ENABLE_KERBEROS)
+ set(PACKAGELIST KERBEROS ${PACKAGELIST})
+endif()
+
# Portable audio
if(ENABLE_PORTAUDIO)
set(PACKAGELIST PORTAUDIO ${PACKAGELIST})
@@ -169,6 +174,16 @@ if(ENABLE_LUA)
set(PACKAGELIST LUA ${PACKAGELIST})
endif()
+# GeoIP address resolving
+if(ENABLE_GEOIP)
+ set(PACKAGELIST GEOIP ${PACKAGELIST})
+endif()
+
+# Capabilities
+if(ENABLE_CAP)
+ set(PACKAGELIST CAP ${PACKAGELIST})
+endif()
+
set(PROGLIST text2pcap mergecap capinfos editcap dumpcap)
#Let's loop the package list
@@ -183,11 +198,27 @@ foreach(PACKAGE ${PACKAGELIST})
endif()
endforeach()
+if(ENABLE_PYTHON)
+ find_package(FindPythonLibs)
+ message(PYTHONLIBS_FOUND)
+ if (PYTHONLIBS_FOUND)
+ set(HAVE_LIBPYTHON "1")
+ include_directories(PYTHON_INCLUDE_PATH)
+ message(STATUS "${PACKAGE} includes: ${PYTHON_INCLUDE_PATH}")
+ message(STATUS "${PACKAGE} libs: ${PYTHON_LIBRARIES}")
+ endif()
+endif()
if(HAVE_LIBLUA)
set(HAVE_LUA_H 1)
set(HAVE_LUA_5_1 1)
endif()
+if(HAVE_LIBKERBEROS)
+ set(HAVE_KERBEROS 1)
+ # HAVE_HEIMDAL_KERBEROS
+ set(HAVE_MIT_KERBEROS 1)
+ set(HAVE_KEYTYPE_ARCFOUR_56 1)
+endif()
if(HAVE_LIBCARES)
set(HAVE_C_ARES 1)
elseif(HAVE_LIBADNS)
@@ -372,19 +403,21 @@ set(LIBEPAN_LIBS
# $(plugin_ldadd)
${PCRE_LIBRARIES}
${GLIB2_LIBRARIES}
- ${MATH_LIBRARIES}
${PCAP_LIBRARIES}
# @SOCKET_LIBS@
# @NSL_LIBS@
${CARES_LIBRARIES}
${ADNS_LIBRARIES}
-# @KRB5_LIBS@
+ ${KERBEROS_LIBRARIES}
# @FRAMEWORKS@
${LUA_LIBRARIES}
+ ${PYTHON_LIBRARIES}
+ ${GEOIP_LIBRARIES}
${GCRYPT_LIBRARIES}
${GNUTLS_LIBRARIES}
${SMI_LIBRARIES}
${Z_LIBRARIES}
+ ${M_LIBRARIES}
)
if(BUILD_wireshark)
@@ -467,7 +500,7 @@ if(BUILD_randpkt)
wiretap
wsutil
${GLIB2_LIBRARIES}
- ${MATH_LIBRARIES}
+ ${M_LIBRARIES}
${PCAP_LIBRARIES}
# @SOCKET_LIBS@
# @NSL_LIBS@
@@ -488,7 +521,7 @@ if(BUILD_text2pcap)
wiretap
wsutil
${GLIB2_LIBRARIES}
- ${MATH_LIBRARIES}
+ ${M_LIBRARIES}
${Z_LIBRARIES}
)
set(text2pcap_FILES
diff --git a/cmake/modules/FindCAP.cmake b/cmake/modules/FindCAP.cmake
new file mode 100644
index 0000000000..04e20d6df1
--- /dev/null
+++ b/cmake/modules/FindCAP.cmake
@@ -0,0 +1,32 @@
+# - Find capabilities
+# Find the native CAP includes and library
+#
+# CAP_INCLUDE_DIRS - where to find cap.h, etc.
+# CAP_LIBRARIES - List of libraries when using cap.
+# CAP_FOUND - True if cap found.
+
+
+IF (CAP_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(CAP_FIND_QUIETLY TRUE)
+ENDIF (CAP_INCLUDE_DIRS)
+
+FIND_PATH(CAP_INCLUDE_DIR cap.h)
+
+SET(CAP_NAMES cap)
+FIND_LIBRARY(CAP_LIBRARY NAMES ${CAP_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set CAP_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAP DEFAULT_MSG CAP_LIBRARY CAP_INCLUDE_DIR)
+
+IF(CAP_FOUND)
+ SET( CAP_LIBRARIES ${CAP_LIBRARY} )
+ SET( CAP_INCLUDE_DIRS ${CAP_INCLUDE_DIR} )
+ELSE(CAP_FOUND)
+ SET( CAP_LIBRARIES )
+ SET( CAP_INCLUDE_DIRS )
+ENDIF(CAP_FOUND)
+
+MARK_AS_ADVANCED( CAP_LIBRARIES CAP_INCLUDE_DIRS )
diff --git a/cmake/modules/FindGEOIP.cmake b/cmake/modules/FindGEOIP.cmake
new file mode 100644
index 0000000000..5a84cf29fe
--- /dev/null
+++ b/cmake/modules/FindGEOIP.cmake
@@ -0,0 +1,32 @@
+# - Find GeoIP
+# Find the native GEOIP includes and library
+#
+# GEOIP_INCLUDE_DIRS - where to find GeoIP.h, etc.
+# GEOIP_LIBRARIES - List of libraries when using GeoIP.
+# GEOIP_FOUND - True if GeoIP found.
+
+
+IF (GEOIP_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(GEOIP_FIND_QUIETLY TRUE)
+ENDIF (GEOIP_INCLUDE_DIRS)
+
+FIND_PATH(GEOIP_INCLUDE_DIR GeoIP.h)
+
+SET(GEOIP_NAMES GeoIP)
+FIND_LIBRARY(GEOIP_LIBRARY NAMES ${GEOIP_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set GEOIP_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOIP DEFAULT_MSG GEOIP_LIBRARY GEOIP_INCLUDE_DIR)
+
+IF(GEOIP_FOUND)
+ SET( GEOIP_LIBRARIES ${GEOIP_LIBRARY} )
+ SET( GEOIP_INCLUDE_DIRS ${GEOIP_INCLUDE_DIR} )
+ELSE(GEOIP_FOUND)
+ SET( GEOIP_LIBRARIES )
+ SET( GEOIP_INCLUDE_DIRS )
+ENDIF(GEOIP_FOUND)
+
+MARK_AS_ADVANCED( GEOIP_LIBRARIES GEOIP_INCLUDE_DIRS )
diff --git a/cmake/modules/FindKERBEROS.cmake b/cmake/modules/FindKERBEROS.cmake
new file mode 100644
index 0000000000..4fb8002494
--- /dev/null
+++ b/cmake/modules/FindKERBEROS.cmake
@@ -0,0 +1,38 @@
+# - Find kerberos
+# Find the native KERBEROS includes and library
+#
+# KERBEROS_INCLUDE_DIRS - where to find krb5.h, etc.
+# KERBEROS_LIBRARIES - List of libraries when using krb5.
+# KERBEROS_FOUND - True if krb5 found.
+
+
+IF (KERBEROS_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(KERBEROS_FIND_QUIETLY TRUE)
+ENDIF (KERBEROS_INCLUDE_DIRS)
+
+FIND_PATH(KERBEROS_INCLUDE_DIR krb5.h)
+
+SET(KERBEROS_NAMES krb5)
+FIND_LIBRARY(KERBEROS_LIBRARY NAMES ${KERBEROS_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set KERBEROS_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(KERBEROS DEFAULT_MSG KERBEROS_LIBRARY KERBEROS_INCLUDE_DIR)
+
+# todo
+# add all kerberos libs
+# autodetect HAVE_HEIMDAL_KERBEROS
+# autodetect HAVE_MIT_KERBEROS
+# autodetect(?) HAVE_KEYTYPE_ARCFOUR_56
+
+IF(KERBEROS_FOUND)
+ SET( KERBEROS_LIBRARIES ${KERBEROS_LIBRARY} )
+ SET( KERBEROS_INCLUDE_DIRS ${KERBEROS_INCLUDE_DIR} )
+ELSE(KERBEROS_FOUND)
+ SET( KERBEROS_LIBRARIES )
+ SET( KERBEROS_INCLUDE_DIRS )
+ENDIF(KERBEROS_FOUND)
+
+MARK_AS_ADVANCED( KERBEROS_LIBRARIES KERBEROS_INCLUDE_DIRS )
diff --git a/cmake/modules/FindM.cmake b/cmake/modules/FindM.cmake
new file mode 100644
index 0000000000..6f4477334f
--- /dev/null
+++ b/cmake/modules/FindM.cmake
@@ -0,0 +1,32 @@
+# - Find math
+# Find the native M includes and library
+#
+# M_INCLUDE_DIRS - where to find math.h, etc.
+# M_LIBRARIES - List of libraries when using math.
+# M_FOUND - True if math found.
+
+
+IF (M_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(M_FIND_QUIETLY TRUE)
+ENDIF (M_INCLUDE_DIRS)
+
+FIND_PATH(M_INCLUDE_DIR math.h)
+
+SET(M_NAMES m)
+FIND_LIBRARY(M_LIBRARY NAMES ${M_NAMES} )
+
+# handle the QUIETLY and REQUIRED arguments and set M_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(M DEFAULT_MSG M_LIBRARY M_INCLUDE_DIR)
+
+IF(M_FOUND)
+ SET( M_LIBRARIES ${M_LIBRARY} )
+ SET( M_INCLUDE_DIRS ${M_INCLUDE_DIR} )
+ELSE(M_FOUND)
+ SET( M_LIBRARIES )
+ SET( M_INCLUDE_DIRS )
+ENDIF(M_FOUND)
+
+MARK_AS_ADVANCED( M_LIBRARIES M_INCLUDE_DIRS )
diff --git a/cmake/modules/FindMATH.cmake b/cmake/modules/FindMATH.cmake
deleted file mode 100644
index 9a6dd07149..0000000000
--- a/cmake/modules/FindMATH.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-# - Find math
-# Find the native MATH includes and library
-#
-# MATH_INCLUDE_DIRS - where to find math.h, etc.
-# MATH_LIBRARIES - List of libraries when using math.
-# MATH_FOUND - True if math found.
-
-
-IF (MATH_INCLUDE_DIRS)
- # Already in cache, be silent
- SET(MATH_FIND_QUIETLY TRUE)
-ENDIF (MATH_INCLUDE_DIRS)
-
-FIND_PATH(MATH_INCLUDE_DIR math.h)
-
-SET(MATH_NAMES m)
-FIND_LIBRARY(MATH_LIBRARY NAMES ${MATH_NAMES} )
-
-# handle the QUIETLY and REQUIRED arguments and set MATH_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MATH DEFAULT_MSG MATH_LIBRARY MATH_INCLUDE_DIR)
-
-IF(MATH_FOUND)
- SET( MATH_LIBRARIES ${MATH_LIBRARY} )
- SET( MATH_INCLUDE_DIRS ${MATH_INCLUDE_DIR} )
-ELSE(MATH_FOUND)
- SET( MATH_LIBRARIES )
- SET( MATH_INCLUDE_DIRS )
-ENDIF(MATH_FOUND)
-
-MARK_AS_ADVANCED( MATH_LIBRARIES MATH_INCLUDE_DIRS )
diff --git a/epan/wspython/CMakeLists.txt b/epan/wspython/CMakeLists.txt
new file mode 100644
index 0000000000..320dc3852c
--- /dev/null
+++ b/epan/wspython/CMakeLists.txt
@@ -0,0 +1,32 @@
+# CMakeLists.txt
+#
+# $Id$
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+set(WSPYTHON_FILES
+ wspy_register.c
+ wspy_proto.c
+)
+
+add_library(wspython STATIC
+ ${WSPYTHON_FILES}
+)
+