forked from osmocom/wireshark
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>
This commit is contained in:
parent
b7fb1167e3
commit
1a446079d1
54
configure.ac
54
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue