aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2014-08-11 16:18:08 -0400
committerJeff Morriss <jeff.morriss.ws@gmail.com>2014-09-02 16:34:00 +0000
commit1a446079d13dae8e4d286677b0458b15558d185d (patch)
treeb04f0c117ecd127225e2ae032c73e3887f7e8072
parentb7fb1167e319ed2b1d1fd37f9844b8bc852ccb0d (diff)
Simplify ./configure logic for telling rpmbuild which GUI(s) we're building.
Rather than checking for all the "--with" arguments just use the "$have_xxx" variables. Don't allow rpmbuild's ./configure to decide to build a GUI just because it's available: make it build only what was ./configure'd. Change-Id: I68582b4c13da7b52d56591dce68ac426e9f607f1 Reviewed-on: https://code.wireshark.org/review/3958 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
-rw-r--r--configure.ac54
-rw-r--r--packaging/rpm/SPECS/wireshark.spec.in18
2 files changed, 32 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac
index 6cdc6e762c..29aa70c4b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2747,43 +2747,6 @@ case $host_cpu in
;;
esac
-# Gather only the "--with*" arguments and also a list of --with arguments for rpmbuild
-for f in $CONFIG_ARGS
-do
- case $f in
- --with-gtk2*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with gtk2"
- ;;
- --without-gtk2*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without gtk2"
- ;;
- --with-gtk3*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with gtk3"
- ;;
- --without-gtk3*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without gtk3"
- ;;
- --with-qt*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt"
- ;;
- --without-qt*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt"
- ;;
- --with*)
- CONFIG_WITH_ARGS="$CONFIG_WITH_ARGS $f"
- ;;
- esac
-
-done
-AC_SUBST(CONFIG_WITH_ARGS)
-AC_SUBST(RPMBUILD_WITH_ARGS)
-
dnl libtool defs
#
# Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)
@@ -2803,6 +2766,23 @@ then
fi
AC_SUBST(ENABLE_STATIC)
+# Gather which GUI we're building for rpmbuild
+if test "x$have_gtk" = "xyes"; then
+ if test "x$with_gtk3" = "xyes"; then
+ RPMBUILD_WITH_ARGS="--with gtk3 --without gtk2"
+ else
+ RPMBUILD_WITH_ARGS="--without gtk3 --with gtk2"
+ fi
+else
+ RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3"
+fi
+if test "x$have_qt" = "xyes" ; then
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt"
+else
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt"
+fi
+AC_SUBST(RPMBUILD_WITH_ARGS)
+
dnl Save the cacheable configure results to config.cache before recursing
AC_CACHE_SAVE
diff --git a/packaging/rpm/SPECS/wireshark.spec.in b/packaging/rpm/SPECS/wireshark.spec.in
index a397cd0b35..d6be99beb4 100644
--- a/packaging/rpm/SPECS/wireshark.spec.in
+++ b/packaging/rpm/SPECS/wireshark.spec.in
@@ -205,9 +205,21 @@ Contains the Gnome (GTK+) Wireshark GUI and desktop integration files.
%if %{with_portaudio}
--with-portaudio \
%endif
- %{?_with_qt} \
- %{?_with_gtk2} \
- %{?_with_gtk3} \
+%if %{with qt}
+ --with-qt \
+%else
+ --without-qt \
+%endif
+%if %{with gtk2}
+ --with-gtk2 \
+%else
+ --without-gtk2 \
+%endif
+%if %{with gtk3}
+ --with-gtk3 \
+%else
+ --without-gtk3 \
+%endif
--disable-warnings-as-errors
# Remove rpath. It's prohibited in Fedora[1] and anyway we don't need it (and