diff options
-rw-r--r-- | acinclude.m4 | 116 | ||||
-rw-r--r-- | configure.ac | 43 | ||||
-rw-r--r-- | ui/qt/Makefile.am | 144 |
3 files changed, 132 insertions, 171 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 7c5aa1e7ab..b92e455d5f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2133,99 +2133,61 @@ AC_DEFUN([AC_WIRESHARK_QT_CHECK], ]) dnl AC_WIRESHARK_QT_TOOL_CHECK([TOOLPATHVAR, TOOL, REQUESTED-MAJOR_VERSION]) -dnl Test for a particular Qt tool, either for any version of Qt or for -dnl some specific version of Qt +dnl Test for a particular Qt tool for some specific version of Qt dnl AC_DEFUN([AC_WIRESHARK_QT_TOOL_CHECK], [ - if test ! -z "$3"; then - # - # We're building with Qt, so we're looking for a particular - # major version of Qt's flavor of that tool. - # - # If we don't find the tool, we can't build, so we fail. - # - # At least in some versions of Debian/Ubuntu, and perhaps - # other OSes, the Qt build tools are just links to a - # program called "qtchooser", and even if you want to - # build with Qt 5, running the tool might give you the - # Qt 4 version of the tool unless you run the tool with - # a -qt=5 argument. + # + # At least in some versions of Debian/Ubuntu, and perhaps + # other OSes, the Qt build tools are just links to a + # program called "qtchooser", and even if you want to + # build with Qt 5, running the tool might give you the + # Qt 4 version of the tool unless you run the tool with + # a -qt=5 argument. + # + # So we look for qtchooser and, if we find it, use the + # -qt={version} argument, otherwise we look for particular + # tool versions using tool name suffixes. + # + AC_PATH_PROG(QTCHOOSER, qtchooser) + if test ! -z "$QTCHOOSER"; then # - # So we look for qtchooser and, if we find it, use the - # -qt={version} argument, otherwise we look for particular - # tool versions using tool name suffixes. + # We found qtchooser; we assume that means that + # the tool is linked to qtchooser, so that we + # can run it with the -qt={version} flag to get + # the appropriate version of the tool. # - AC_PATH_PROG(QTCHOOSER, qtchooser) - if test ! -z "$QTCHOOSER"; then - # - # We found qtchooser; we assume that means that - # the tool is linked to qtchooser, so that we - # can run it with the -qt={version} flag to get - # the appropriate version of the tool. - # - AC_PATH_PROG($1, $2) - if test "x$$1" = x; then - # - # We can't build Qt Wireshark without that - # tool.. - # - AC_MSG_ERROR(I couldn't find $2; make sure it's installed and in your path) - fi - - # - # Add the -qt={version} argument to it. - # - $1="$$1 -qt=$qt_version" - else - # - # Annoyingly, on some Linux distros (e.g. Debian) - # the Qt 5 tools have no suffix and the Qt 4 tools - # have suffix -qt4. On other distros (e.g. openSUSE) - # the Qt 5 tools have suffix -qt5 and the Qt 4 tools - # have no suffix. + AC_PATH_PROG($1, $2) + if test "x$$1" = x; then # - # So we check for the tool first with the -qtN suffix - # and then with no suffix. + # We can't build Qt Wireshark without that + # tool.. # - AC_PATH_PROGS($1, [$2-qt$qt_version $2]) - if test "x$$1" = x; then - # - # We can't build Qt Wireshark without that - # tool.. - # - AC_MSG_ERROR(I couldn't find $2-qt$qt_version or $2; make sure it's installed and in your path) - fi + AC_MSG_ERROR(I couldn't find $2; make sure it's installed and in your path) fi - else + # - # We're not building with Qt, so we just want some version - # of the tool. + # Add the -qt={version} argument to it. # - # If we don't find the tool, we shouldn't fail, as the - # user's not building with Qt, and we shouldn't force them - # to have Qt installed if they're not doing so. + $1="$$1 -qt=$qt_version" + else # - # "make dist" will fail if they do that, but - # we don't know whether they'll be doing that, - # so this is the best we can do. + # Annoyingly, on some Linux distros (e.g. Debian) + # the Qt 5 tools have no suffix and the Qt 4 tools + # have suffix -qt4. On other distros (e.g. openSUSE) + # the Qt 5 tools have suffix -qt5 and the Qt 4 tools + # have no suffix. # - # For the annoying suffix reasons listed above, we check - # for the tool first with the -qt5 suffix, then with no - # suffix, then with the -qt4 suffix. + # So we check for the tool first with the -qtN suffix + # and then with no suffix. # - AC_PATH_PROGS($1, [$2-qt5 $2 $2-qt4]) + AC_PATH_PROGS($1, [$2-qt$qt_version $2]) if test "x$$1" = x; then # - # We shouldn't fail here, as the user's not - # building with Qt, and we shouldn't force them - # to have Qt installed if they're not doing so. - # - # "make dist" will fail if they do that, but - # we don't know whether they'll be doing that, - # so this is the best we can do. + # We can't build Qt Wireshark without that + # tool.. # - $1=$$2 + AC_MSG_ERROR(I couldn't find $2-qt$qt_version or $2; make sure it's installed and in your path) fi fi ]) diff --git a/configure.ac b/configure.ac index 01d5feeca5..f59b742990 100644 --- a/configure.ac +++ b/configure.ac @@ -1650,6 +1650,22 @@ if test "x$enable_wireshark" = "xyes"; then # compile. # CPPFLAGS="-DQT_GUI_LIB" + + # + # We're building with Qt, so we need the Qt build + # tools in order to build the Wireshark GUI. + # We've found a particular major version of Qt, + # and we want that version's build tools; for + # example, the Qt 4 version of uic produces files + # that include Qt headers with paths that work + # with Qt 4 but not Qt 5, so we can't use the + # Qt 4 version of uic if we're building with Qt 5. + AC_WIRESHARK_QT_TOOL_CHECK(UIC, uic, "$qt_version") + AC_SUBST(UIC) + AC_WIRESHARK_QT_TOOL_CHECK(MOC, moc, "$qt_version") + AC_SUBST(MOC) + AC_WIRESHARK_QT_TOOL_CHECK(RCC, rcc, "$qt_version") + AC_SUBST(RCC) ], [ case "$with_qt" in @@ -1823,33 +1839,6 @@ else AM_PATH_GLIB_2_0($GLIB_MIN_VERSION, , AC_MSG_ERROR(GLib $GLIB_MIN_VERSION or later distribution not found.), gthread gmodule) fi -# -# If we're building with Qt, we need the Qt build tools in order to -# build the Wireshark GUI. We've already found Qt, and found a -# particular major version, and we want that version's build tools; -# for example, the Qt 4 version of uic produces files that include -# Qt headers with paths that work with Qt 4 but not Qt 5, so we can't -# use the Qt 4 version of uic if we're building with Qt 5. -# -# If we're *not* building with Qt, "make dist" requires that we have -# the Qt build tools, so we *still* need to look for them. We didn't -# look for Qt, so we don't know what version(s) we have; we look for -# whatever version we can find. -# -# XXX - but the above comment about Qt 4 vs. Qt 5 means that if we -# ship files built with the uic from one version of Qt, they won't -# compile with another major version of Qt, so should we be shipping -# those files? If we don't, that means somebody building from a -# source tarball would need to have the Qt tools installed, but -# they'll need other developer packages of Qt *anyway*. -# -AC_WIRESHARK_QT_TOOL_CHECK(UIC, uic, "$qt_version") -AC_SUBST(UIC) -AC_WIRESHARK_QT_TOOL_CHECK(MOC, moc, "$qt_version") -AC_SUBST(MOC) -AC_WIRESHARK_QT_TOOL_CHECK(RCC, rcc, "$qt_version") -AC_SUBST(RCC) - # Error out if a glib header other than a "top level" header # (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h) # is used. diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am index 4a50e4e9a3..befd4669ba 100644 --- a/ui/qt/Makefile.am +++ b/ui/qt/Makefile.am @@ -101,8 +101,9 @@ am__v_UIC_ = $(am__v_UIC_@AM_DEFAULT_V@) am__v_UIC_0 = @echo " UIC " $@; # -# For building .moc.cpp files from .h files by running moc -# and building .rcc.cpp files from .qrc files by running rcc +# For building .moc.cpp files from .h files by running moc, +# building .rcc.cpp files from .qrc files by running rcc, +# and building ui_XXX.h files from .ui files by running uic. # SUFFIXES = .moc.cpp .qrc .rcc.cpp @@ -120,135 +121,144 @@ ui_%.h: %.ui #moc_%.cpp: %.h # $(MOC) $< -o $@ -about_dialog.cpp about_dialog.h: ui_about_dialog.h +# +# Explicit dependencies to force the ui_ headers to be built. +# See "Recording Dependencies manually" in the "Built Sources" +# section of the automake documentation: +# +# https://www.gnu.org/software/automake/manual/automake.html#Sources +# +about_dialog.$(OBJEXT): ui_about_dialog.h + +bluetooth_att_server_attributes_dialog.$(OBJEXT): ui_bluetooth_att_server_attributes_dialog.h -bluetooth_att_server_attributes_dialog.cpp bluetooth_att_server_attributes_dialog.h: ui_bluetooth_att_server_attributes_dialog.h +bluetooth_devices_dialog.$(OBJEXT): ui_bluetooth_devices_dialog.h -bluetooth_devices_dialog.cpp bluetooth_devices_dialog.h: ui_bluetooth_devices_dialog.h +capture_file_progress_frame.$(OBJEXT): ui_capture_file_progress_frame.h -capture_file_progress_frame.cpp capture_file_progress_frame.h: ui_capture_file_progress_frame.h +capture_file_properties_dialog.$(OBJEXT): ui_capture_file_properties_dialog.h -capture_file_properties_dialog.cpp capture_file_properties_dialog.h: ui_capture_file_properties_dialog.h +capture_interfaces_dialog.$(OBJEXT): ui_capture_interfaces_dialog.h -capture_interfaces_dialog.cpp capture_interfaces_dialog.h: ui_capture_interfaces_dialog.h +capture_preferences_frame.$(OBJEXT): ui_capture_preferences_frame.h -capture_preferences_frame.cpp capture_preferences_frame.h: ui_capture_preferences_frame.h +coloring_rules_dialog.$(OBJEXT): ui_coloring_rules_dialog.h -coloring_rules_dialog.cpp coloring_rules_dialog.h: ui_coloring_rules_dialog.h +column_editor_frame.$(OBJEXT): ui_column_editor_frame.h -column_editor_frame.cpp column_editor_frame.h: ui_column_editor_frame.h +column_preferences_frame.$(OBJEXT): ui_column_preferences_frame.h -column_preferences_frame.cpp column_preferences_frame.h: ui_column_preferences_frame.h +compiled_filter_output.$(OBJEXT): ui_compiled_filter_output.h -compiled_filter_output.cpp compiled_filter_output.h: ui_compiled_filter_output.h +decode_as_dialog.$(OBJEXT): ui_decode_as_dialog.h -decode_as_dialog.cpp decode_as_dialog.h: ui_decode_as_dialog.h +display_filter_expression_dialog.$(OBJEXT): ui_display_filter_expression_dialog.h -display_filter_expression_dialog.cpp display_filter_expression_dialog.h: ui_display_filter_expression_dialog.h +expert_info_dialog.$(OBJEXT): ui_expert_info_dialog.h -expert_info_dialog.cpp expert_info_dialog.h: ui_expert_info_dialog.h +export_object_dialog.$(OBJEXT): ui_export_object_dialog.h -export_object_dialog.cpp export_object_dialog.h: ui_export_object_dialog.h +export_pdu_dialog.$(OBJEXT): ui_export_pdu_dialog.h -export_pdu_dialog.cpp export_pdu_dialog.h: ui_export_pdu_dialog.h +extcap_options_dialog.$(OBJEXT): ui_extcap_options_dialog.h -extcap_options_dialog.cpp extcap_options_dialog.h: ui_extcap_options_dialog.h +file_set_dialog.$(OBJEXT): ui_file_set_dialog.h -file_set_dialog.cpp file_set_dialog.h: ui_file_set_dialog.h +filter_dialog.$(OBJEXT): ui_filter_dialog.h -filter_dialog.cpp filter_dialog.h: ui_filter_dialog.h +filter_expressions_preferences_frame.$(OBJEXT): ui_filter_expressions_preferences_frame.h -filter_expressions_preferences_frame.cpp filter_expressions_preferences_frame.h: ui_filter_expressions_preferences_frame.h +follow_stream_dialog.$(OBJEXT): ui_follow_stream_dialog.h -follow_stream_dialog.cpp: ui_follow_stream_dialog.h +font_color_preferences_frame.$(OBJEXT): ui_font_color_preferences_frame.h -font_color_preferences_frame.cpp font_color_preferences_frame.h: ui_font_color_preferences_frame.h +funnel_string_dialog.$(OBJEXT): ui_funnel_string_dialog.h -funnel_string_dialog.cpp funnel_string_dialog.h: ui_funnel_string_dialog.h +funnel_text_dialog.$(OBJEXT): ui_funnel_text_dialog.h -funnel_text_dialog.cpp funnel_text_dialog.h: ui_funnel_text_dialog.h +import_text_dialog.$(OBJEXT): ui_import_text_dialog.h -import_text_dialog.cpp import_text_dialog.h: ui_import_text_dialog.h +io_graph_dialog.$(OBJEXT): ui_io_graph_dialog.h -io_graph_dialog.cpp io_graph_dialog.h: ui_io_graph_dialog.h +layout_preferences_frame.$(OBJEXT): ui_layout_preferences_frame.h -layout_preferences_frame.cpp layout_preferences_frame.h: ui_layout_preferences_frame.h +lbm_lbtrm_transport_dialog.$(OBJEXT): ui_lbm_lbtrm_transport_dialog.h -lbm_lbtrm_transport_dialog.cpp lbm_lbtrm_transport_dialog.h: ui_lbm_lbtrm_transport_dialog.h +lbm_lbtru_transport_dialog.$(OBJEXT): ui_lbm_lbtru_transport_dialog.h -lbm_lbtru_transport_dialog.cpp lbm_lbtru_transport_dialog.h: ui_lbm_lbtru_transport_dialog.h +lbm_stream_dialog.$(OBJEXT): ui_lbm_stream_dialog.h -lbm_stream_dialog.cpp lbm_stream_dialog.h: ui_lbm_stream_dialog.h +lbm_uimflow_dialog.$(OBJEXT): ui_lbm_uimflow_dialog.h -lbm_uimflow_dialog.cpp lbm_uimflow_dialog.h: ui_lbm_uimflow_dialog.h +main_welcome.$(OBJEXT): ui_main_welcome.h -main_welcome.cpp main_welcome.h: ui_main_welcome.h +main_window.$(OBJEXT): ui_main_window.h -main_window.cpp main_window_slots.cpp main_window.h: ui_main_window.h +main_window_preferences_frame.$(OBJEXT): ui_main_window_preferences_frame.h -main_window_preferences_frame.cpp main_window_preferences_frame.h: ui_main_window_preferences_frame.h +main_window_slots.$(OBJEXT): ui_main_window.h -manage_interfaces_dialog.cpp manage_interfaces_dialog.h: ui_manage_interfaces_dialog.h +manage_interfaces_dialog.$(OBJEXT): ui_manage_interfaces_dialog.h -module_preferences_scroll_area.cpp module_preferences_scroll_area.h: ui_module_preferences_scroll_area.h +module_preferences_scroll_area.$(OBJEXT): ui_module_preferences_scroll_area.h -packet_comment_dialog.cpp packet_comment_dialog.h: ui_packet_comment_dialog.h +packet_comment_dialog.$(OBJEXT): ui_packet_comment_dialog.h -packet_dialog.cpp packet_dialog.h: ui_packet_dialog.h +packet_dialog.$(OBJEXT): ui_packet_dialog.h -packet_format_group_box.cpp packet_format_group_box.h: ui_packet_format_group_box.h +packet_format_group_box.$(OBJEXT): ui_packet_format_group_box.h -packet_range_group_box.cpp packet_range_group_box.h: ui_packet_range_group_box.h +packet_range_group_box.$(OBJEXT): ui_packet_range_group_box.h -preference_editor_frame.cpp preference_editor_frame.h: ui_preference_editor_frame.h +preference_editor_frame.$(OBJEXT): ui_preference_editor_frame.h -preferences_dialog.cpp preferences_dialog.h: ui_preferences_dialog.h +preferences_dialog.$(OBJEXT): ui_preferences_dialog.h -print_dialog.cpp print_dialog.h: ui_print_dialog.h +print_dialog.$(OBJEXT): ui_print_dialog.h -profile_dialog.cpp profile_dialog.h: ui_profile_dialog.h +profile_dialog.$(OBJEXT): ui_profile_dialog.h -protocol_hierarchy_dialog.cpp protocol_hierarchy_dialog.h: ui_protocol_hierarchy_dialog.h +protocol_hierarchy_dialog.$(OBJEXT): ui_protocol_hierarchy_dialog.h -remote_capture_dialog.cpp remote_capture_dialog.h: ui_remote_capture_dialog.h +remote_capture_dialog.$(OBJEXT): ui_remote_capture_dialog.h -remote_settings_dialog.cpp remote_settings_dialog.h: ui_remote_settings_dialog.h +remote_settings_dialog.$(OBJEXT): ui_remote_settings_dialog.h -resolved_addresses_dialog.cpp resolved_addresses_dialog.h: ui_resolved_addresses_dialog.h +resolved_addresses_dialog.$(OBJEXT): ui_resolved_addresses_dialog.h -rtp_stream_dialog.cpp rtp_stream_dialog.h: ui_rtp_stream_dialog.h +rtp_stream_dialog.$(OBJEXT): ui_rtp_stream_dialog.h -search_frame.cpp search_frame.h: ui_search_frame.h +search_frame.$(OBJEXT): ui_search_frame.h -sequence_dialog.cpp sequence_dialog.h: ui_sequence_dialog.h +sequence_dialog.$(OBJEXT): ui_sequence_dialog.h -sctp_all_assocs_dialog.cpp sctp_all_assocs_dialog.h: ui_sctp_all_assocs_dialog.h +sctp_all_assocs_dialog.$(OBJEXT): ui_sctp_all_assocs_dialog.h -sctp_assoc_analyse_dialog.cpp sctp_assoc_analyse_dialog.h: ui_sctp_assoc_analyse_dialog.h +sctp_assoc_analyse_dialog.$(OBJEXT): ui_sctp_assoc_analyse_dialog.h -sctp_chunk_statistics_dialog.cpp sctp_chunk_statistics_dialog.h: ui_sctp_chunk_statistics_dialog.h +sctp_chunk_statistics_dialog.$(OBJEXT): ui_sctp_chunk_statistics_dialog.h -sctp_graph_dialog.cpp sctp_graph_dialog.h: ui_sctp_graph_dialog.h +sctp_graph_dialog.$(OBJEXT): ui_sctp_graph_dialog.h -sctp_graph_arwnd_dialog.cpp sctp_graph_arwnd_dialog.h: ui_sctp_graph_arwnd_dialog.h +sctp_graph_arwnd_dialog.$(OBJEXT): ui_sctp_graph_arwnd_dialog.h -sctp_graph_byte_dialog.cpp sctp_graph_byte_dialog.h: ui_sctp_graph_byte_dialog.h +sctp_graph_byte_dialog.$(OBJEXT): ui_sctp_graph_byte_dialog.h -splash_overlay.cpp splash_overlay.h: ui_splash_overlay.h +splash_overlay.$(OBJEXT): ui_splash_overlay.h -tap_parameter_dialog.cpp tap_parameter_dialog.h: ui_tap_parameter_dialog.h +tap_parameter_dialog.$(OBJEXT): ui_tap_parameter_dialog.h -tcp_stream_dialog.cpp: ui_tcp_stream_dialog.h +tcp_stream_dialog.$(OBJEXT): ui_tcp_stream_dialog.h -time_shift_dialog.cpp time_shift_dialog.h: ui_time_shift_dialog.h +time_shift_dialog.$(OBJEXT): ui_time_shift_dialog.h -traffic_table_dialog.cpp traffic_table_dialog.h: ui_traffic_table_dialog.h +traffic_table_dialog.$(OBJEXT): ui_traffic_table_dialog.h -uat_dialog.cpp uat_dialog.h: ui_uat_dialog.h +uat_dialog.$(OBJEXT): ui_uat_dialog.h -voip_calls_dialog.cpp voip_calls_dialog.h: ui_voip_calls_dialog.h +voip_calls_dialog.$(OBJEXT): ui_voip_calls_dialog.h -wireless_frame.cpp wireless_frame.h: ui_wireless_frame.h +wireless_frame.$(OBJEXT): ui_wireless_frame.h doxygen: if HAVE_DOXYGEN |