summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOneric <oneric@oneric.stub>2023-03-21 17:32:32 +0100
committerOneric <oneric@oneric.stub>2023-03-21 22:40:58 +0100
commit9b3c0d5b350e13eb69dc87b52751ec0ad44280af (patch)
tree5281ae83e2e3b6ac7d0564656cbcc6686fce9668
parent218dacece7d24b45e4637ced4dc56564de29919d (diff)
downloadlibass-9b3c0d5b350e13eb69dc87b52751ec0ad44280af.tar.bz2
libass-9b3c0d5b350e13eb69dc87b52751ec0ad44280af.tar.xz
configure: use $host_os to detect NASM config
We do not care about CPU arch and vendor when configuring NASM. Comparing against the full host triplet anyway requires us to either complicate checks or use more permissive patterns than necessary introducing a dependency on the specific order of checks. Notably GNU Hurd’s "gnu" name overlaps with the "-gnu" suffix used for all glibc systems. This poses a problem for e.g. kfreebsd-gnu which needs different settings than GNU Hurd. By using just the actually relevant part, host_os, we can drop leading globs (and hyphens) for all but *bsd*, avoiding this collision. There are too many BSD variants to list all explicitly and a check against canonical names used by config.guess suggest all matches to *bsd* are actually BSD variants. In practice there are thus probably no collisions to worry about, but to be extra cautious let’s put *bsd* at the end.
-rw-r--r--configure.ac16
1 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 640ff5d..b210d0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -275,29 +275,29 @@ AS_IF([test "x$enable_asm" != xno], [
AC_MSG_WARN(nasm was not found; ASM functions are disabled.)
AC_MSG_WARN(Install nasm for a significantly faster libass build.)
], [
- AS_CASE([$host],
- [*darwin*], [
+ AS_CASE([$host_os],
+ [darwin*], [
ASFLAGS="$ASFLAGS -f macho$BITTYPE -DPREFIX -DSTACK_ALIGNMENT=16"
],
- [*dragonfly*|*bsd*], [
- ASFLAGS="$ASFLAGS -f elf$BITTYPE"
- ],
- [*cygwin*|*mingw*], [
+ [cygwin*|mingw*], [
ASFLAGS="$ASFLAGS -f win$BITTYPE"
AS_IF([test "x$BITS" = x32], [
ASFLAGS="$ASFLAGS -DPREFIX"
])
],
- [*linux*|*solaris*|*haiku*|*-gnu*], [
+ [linux*|solaris*|haiku*|gnu*], [
ASFLAGS="$ASFLAGS -f elf$BITTYPE -DSTACK_ALIGNMENT=16"
],
+ [dragonfly*|*bsd*], [
+ ASFLAGS="$ASFLAGS -f elf$BITTYPE"
+ ],
[ # default
AC_MSG_ERROR(m4_text_wrap(m4_normalize([
Please contact libass upstream to figure out if ASM
support for your platform can be added.
In the meantime you will need to use --disable-asm.]),
[ ],
- [could not identify NASM format for $host !],
+ [could not identify NASM format for $host_os !],
[78]
))
]