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
43
configure.ac
43
configure.ac
|
@ -54,29 +54,32 @@ AC_ARG_ENABLE(qt-dbus,
|
|||
[enable_qt_dbus=yes])
|
||||
|
||||
# Detect OS
|
||||
AC_MSG_CHECKING([whether OS is FreeBSD])
|
||||
AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
|
||||
[AC_MSG_RESULT([yes])
|
||||
LIBS="-lexecinfo $LIBS"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
AC_MSG_CHECKING([whether to enable specific tweaks for current host "$host_os"])
|
||||
case "$host_os" in
|
||||
*darwin*)
|
||||
AC_MSG_RESULT([yes])
|
||||
enable_qt_dbus=no
|
||||
;;
|
||||
|
||||
AC_MSG_CHECKING([whether OS is OpenBSD])
|
||||
AS_IF([expr "$host_os" : ".*openbsd.*" > /dev/null],
|
||||
[AC_MSG_RESULT([yes])
|
||||
LIBS="-lexecinfo $LIBS"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
*freebsd*)
|
||||
AC_MSG_RESULT([yes])
|
||||
LIBS="-lexecinfo $LIBS"
|
||||
;;
|
||||
|
||||
AC_MSG_CHECKING([whether OS is macOS])
|
||||
AS_IF([expr "$host_os" : ".*darwin.*" > /dev/null],
|
||||
[AC_MSG_RESULT([yes])
|
||||
enable_qt_dbus=no],
|
||||
[AC_MSG_RESULT([no])])
|
||||
*haiku*)
|
||||
AC_MSG_RESULT([yes])
|
||||
LIBS="-lnetwork $LIBS"
|
||||
;;
|
||||
|
||||
AC_MSG_CHECKING([whether OS is Haiku])
|
||||
AS_IF([expr "$host_os" : ".*haiku.*" > /dev/null],
|
||||
[AC_MSG_RESULT([yes])
|
||||
LIBS="-lnetwork $LIBS"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
*openbsd*)
|
||||
AC_MSG_RESULT([yes])
|
||||
LIBS="-lexecinfo $LIBS"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
|
||||
# Require 0.23 pkg-config
|
||||
PKG_PROG_PKG_CONFIG([0.23])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue