mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Use case statement for host OS detection
This commit is contained in:
parent
ad8a827c1f
commit
e236a76d5a
2 changed files with 47 additions and 59 deletions
63
configure
vendored
63
configure
vendored
|
@ -5188,53 +5188,38 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether OS is FreeBSD" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable specific tweaks for current host \"$host_os\"" >&5
|
||||||
printf %s "checking whether OS is FreeBSD... " >&6; }
|
printf %s "checking whether to enable specific tweaks for current host \"$host_os\"... " >&6; }
|
||||||
if expr "$host_os" : ".*freebsd.*" > /dev/null
|
case "$host_os" in
|
||||||
then :
|
*darwin*)
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
printf "%s\n" "yes" >&6; }
|
printf "%s\n" "yes" >&6; }
|
||||||
LIBS="-lexecinfo $LIBS"
|
enable_qt_dbus=no
|
||||||
else $as_nop
|
;;
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
printf "%s\n" "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether OS is OpenBSD" >&5
|
*freebsd*)
|
||||||
printf %s "checking whether OS is OpenBSD... " >&6; }
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
if expr "$host_os" : ".*openbsd.*" > /dev/null
|
|
||||||
then :
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
||||||
printf "%s\n" "yes" >&6; }
|
printf "%s\n" "yes" >&6; }
|
||||||
LIBS="-lexecinfo $LIBS"
|
LIBS="-lexecinfo $LIBS"
|
||||||
else $as_nop
|
;;
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
printf "%s\n" "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether OS is macOS" >&5
|
*haiku*)
|
||||||
printf %s "checking whether OS is macOS... " >&6; }
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
if expr "$host_os" : ".*darwin.*" > /dev/null
|
|
||||||
then :
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
||||||
printf "%s\n" "yes" >&6; }
|
printf "%s\n" "yes" >&6; }
|
||||||
enable_qt_dbus=no
|
LIBS="-lnetwork $LIBS"
|
||||||
else $as_nop
|
;;
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
printf "%s\n" "no" >&6; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether OS is Haiku" >&5
|
*openbsd*)
|
||||||
printf %s "checking whether OS is Haiku... " >&6; }
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
if expr "$host_os" : ".*haiku.*" > /dev/null
|
|
||||||
then :
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
||||||
printf "%s\n" "yes" >&6; }
|
printf "%s\n" "yes" >&6; }
|
||||||
LIBS="-lnetwork $LIBS"
|
LIBS="-lexecinfo $LIBS"
|
||||||
else $as_nop
|
;;
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
|
*)
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
printf "%s\n" "no" >&6; }
|
printf "%s\n" "no" >&6; }
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Require 0.23 pkg-config
|
# Require 0.23 pkg-config
|
||||||
|
|
||||||
|
|
43
configure.ac
43
configure.ac
|
@ -54,29 +54,32 @@ AC_ARG_ENABLE(qt-dbus,
|
||||||
[enable_qt_dbus=yes])
|
[enable_qt_dbus=yes])
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
AC_MSG_CHECKING([whether OS is FreeBSD])
|
AC_MSG_CHECKING([whether to enable specific tweaks for current host "$host_os"])
|
||||||
AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
|
case "$host_os" in
|
||||||
[AC_MSG_RESULT([yes])
|
*darwin*)
|
||||||
LIBS="-lexecinfo $LIBS"],
|
AC_MSG_RESULT([yes])
|
||||||
[AC_MSG_RESULT([no])])
|
enable_qt_dbus=no
|
||||||
|
;;
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether OS is OpenBSD])
|
*freebsd*)
|
||||||
AS_IF([expr "$host_os" : ".*openbsd.*" > /dev/null],
|
AC_MSG_RESULT([yes])
|
||||||
[AC_MSG_RESULT([yes])
|
LIBS="-lexecinfo $LIBS"
|
||||||
LIBS="-lexecinfo $LIBS"],
|
;;
|
||||||
[AC_MSG_RESULT([no])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether OS is macOS])
|
*haiku*)
|
||||||
AS_IF([expr "$host_os" : ".*darwin.*" > /dev/null],
|
AC_MSG_RESULT([yes])
|
||||||
[AC_MSG_RESULT([yes])
|
LIBS="-lnetwork $LIBS"
|
||||||
enable_qt_dbus=no],
|
;;
|
||||||
[AC_MSG_RESULT([no])])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether OS is Haiku])
|
*openbsd*)
|
||||||
AS_IF([expr "$host_os" : ".*haiku.*" > /dev/null],
|
AC_MSG_RESULT([yes])
|
||||||
[AC_MSG_RESULT([yes])
|
LIBS="-lexecinfo $LIBS"
|
||||||
LIBS="-lnetwork $LIBS"],
|
;;
|
||||||
[AC_MSG_RESULT([no])])
|
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Require 0.23 pkg-config
|
# Require 0.23 pkg-config
|
||||||
PKG_PROG_PKG_CONFIG([0.23])
|
PKG_PROG_PKG_CONFIG([0.23])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue