this removes the legacy gif and webp loaders. moving forward
multi-frame/animated images will be loaded by imlib2 itself.
Closes: https://codeberg.org/nsxiv/nsxiv/issues/397
1. `c99` doesn't exist on openbsd
2. `c99` behaves weirdly on macos (doesn't support -Wall)
since make will already set CC (required by POSIX if the implementation
supports C, see `man 1p make`) to something appropriate (or it might be
set in the environment) go ahead and remove explicitly setting it on our
end.
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/455
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
slight addendum to 657080a7e5
instead of disabling asserts by adding -DNDEBUG to config.mk, this
disables asserts by default in the source code itself. this way, if
someone compiles with `make CFLAGS="-O3 -march=native"` without knowing
about asserts/-DNDEBUG then he won't accidentally get a build with
assertions in it.
this basically makes the assertions opt-in, if someone wants it, he'll
need to *explicitly* set `-DDEBUG` to get it. so that it's not possible
to accidentally end up with assertions enabled.
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/447
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
assertions are for debugging purposes, and so shouldn't be enabled for
"release" builds. disable it by default by using `-DNDEBUG`.
`-O2` on gcc/clang will result it slightly better binary. on tcc it'll
be ignored. and since -O is specified by POSIX there shouldn't be any
portability concern.
additionally add a (commented out) recommended debug build for gcc/clang
with address and undefined sanitizers turned on.
Closes: https://codeberg.org/nsxiv/nsxiv/issues/424
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/435
Reviewed-by: explosion-mental <explosion-mental@noreply.codeberg.org>
Reviewed-by: eylles <eylles@noreply.codeberg.org>
this will be a massive change compared to the usual stuff. however the
gains will be worth it:
* we gain lots of additional animated image support.
* and we'll gain _even_ more format support as imlib2 adds them, without needing
any change in our code-base.
* about ~300 LoC will be purged once we remove our internal gif and webp loader.
as for when to remove the internal loaders, a good time might be when debian
upgrades their imlib2, currently it seems to be at v1.7.5, which doesn't support
animated images.
as of now, nsxiv will continue to build with the internal gif/webp loaders
(assuming they were enabled in config.mk) if imlib2 version is below 1.8.0 and
will print out a deprecation notice.
and if imlib2 version supports multi-frame then it will simply ignore the
internal loaders and use the imlib2 one.
in other words, users shouldn't need to do anything on their side. everything
that previously functioned will continue to function regardless of the user's
imlib2 version (though they might see the annoying deprecation notice if the
imlib2 version doesn't support multi-frame images).
known issue:
* image loading performance can be noticeably worse in
imlib2 versions below 1.9.0
Closes: https://codeberg.org/nsxiv/nsxiv/issues/301
Closes: https://codeberg.org/nsxiv/nsxiv/issues/300
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/373
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
this moves all the build variables intended to be modified by the user
over to `config.mk` similar to other suckless software.
also move CPPFLAGS down below for cosmetic purposes.