Play Three-card^WTwo-link-target Monte with Autotools.

svn path=/trunk/; revision=46887
This commit is contained in:
Gerald Combs 2013-01-01 23:39:00 +00:00
parent 7fd75ad2c5
commit b62d650ba1
2 changed files with 18 additions and 8 deletions

View File

@ -50,7 +50,8 @@ bin_PROGRAMS = \
@rawshark_bin@ @rawshark_bin@
EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \ EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \
randpkt text2pcap dumpcap reordercap rawshark randpkt text2pcap dumpcap reordercap rawshark \
wireshark_c wireshark_cxx
# #
# Wireshark configuration files are put in $(pkgdatadir). # Wireshark configuration files are put in $(pkgdatadir).
@ -366,12 +367,21 @@ wireshark_LDADD = \
wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir) wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
if HAVE_WIRESHARK_CPP
# Ideally we could trigger automatic c++ linking here with # Ideally we could trigger automatic c++ linking here with
# nodist_EXTRA_wireshark_SOURCES = dummy.cpp # nodist_EXTRA_wireshark_SOURCES = dummy.cpp
# Unfortunately that check is done by automake and not configure # Unfortunately that check is done by automake and not configure.
# c++ linking for Wireshark at all times. # We do the following to try to avoid c++ linking for Wireshark at
wireshark_LDFLAGS += -lstdc++ # all times.
nodist_EXTRA_wireshark_cxx_SOURCES = dummy.cpp
wireshark_c_CFLAGS = $(wireshark_CFLAGS)
wireshark_c_LDFLAGS = $(wireshark_LDFLAGS)
wireshark_cxx_CFLAGS = $(wireshark_CFLAGS)
wireshark_cxx_LDFLAGS = $(wireshark_LDFLAGS)
if HAVE_WIRESHARK_CXX
wireshark_LINK = $(wireshark_cxx_LINK)
else
wireshark_LINK = $(wireshark_c_LINK)
endif endif
if ENABLE_STATIC if ENABLE_STATIC

View File

@ -994,7 +994,7 @@ fi
# 2.32.0: 24 Mar 2012 # 2.32.0: 24 Mar 2012
# 2.34.0: 24 Sep 2012 # 2.34.0: 24 Sep 2012
have_wireshark_cpp="false" have_wireshark_cxx="false"
if test "$have_gtk" = "no" ; then if test "$have_gtk" = "no" ; then
# #
# We don't have GTK+. # We don't have GTK+.
@ -1009,7 +1009,7 @@ if test "$have_gtk" = "no" ; then
wireshark_bin="wireshark\$(EXEEXT)" wireshark_bin="wireshark\$(EXEEXT)"
wireshark_ui_lib="ui/qt/libqtui.a" wireshark_ui_lib="ui/qt/libqtui.a"
# Give automake a hint that it needs to use c++ linking. # Give automake a hint that it needs to use c++ linking.
have_wireshark_cpp="true" have_wireshark_cxx="true"
wireshark_man="wireshark.1" wireshark_man="wireshark.1"
wireshark_SUBDIRS="codecs ui/qt" wireshark_SUBDIRS="codecs ui/qt"
else else
@ -1181,7 +1181,7 @@ fi
AC_SUBST(wireshark_bin) AC_SUBST(wireshark_bin)
AC_SUBST(wireshark_ui_lib) AC_SUBST(wireshark_ui_lib)
AC_SUBST(wireshark_man) AC_SUBST(wireshark_man)
AM_CONDITIONAL(HAVE_WIRESHARK_CPP, test "$have_wireshark_cpp" = "true") AM_CONDITIONAL(HAVE_WIRESHARK_CXX, test "$have_wireshark_cxx" = "true")
# Enable/disable tshark # Enable/disable tshark