Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix configure #592

Closed
wants to merge 8 commits into from
Closed

fix configure #592

wants to merge 8 commits into from

Conversation

jbowler
Copy link
Contributor

@jbowler jbowler commented Sep 15, 2024

  • Create the branch 'libpng18' for libpng version 1.8.0 alpha
  • doc: Rename README, LICENSE, etc., to README.md, LICENSE.md, etc.
  • doc: Move all manuals to the manuals/ directory
  • build: Run ./configure && make maintainer-clean; update .gitignore
  • build: Raise the minimum required CMake version to 3.14
  • cmake: Remove architecture-specific checks for hardware optimization
  • Full compile time support for target-specific code
  • MIPS support clean-up
  • [libpng18] SIMD makefile updates
  • ARM Ltd palette SIMD code
  • Use standard C attributes
  • [libpng18] fix autoconf

csparker247 and others added 7 commits September 14, 2024 17:33
This removes the need for build configuration of target-specific code
such as SIMD enhancements are machine specific coding (e.g. Intel's
crc32 instruction).

The extensible framework based on checks in the new pngtarget.h allows
per-target description of requirements and capabilities using
PNG_TARGET_ macros defined by the core code and per-target
implementation within, currently, a single core file pngsimd.c

This ensures that no special configuration in the build system is
required on any system which is compiling for the build host (where we
can reasonably assume that the compiler is correct set up) or for
cross-builds so long as the toolchain - the cross compiler and any
ancilliary programs it requires - are correct set up.

See pngtarget.h for more documentation.o

This is still a work-in-progress.  Items which are incomplete are
loongarch support (loongson support is implemented) and ARM palette to
RGBA optimizations where the implementation will allow more than just
palette to RGBA to benefit all architectures.

Signed-off-by: John Bowler <[email protected]>
Everything has been moved into the "mips" directory - loongarch is now a
sub-directory - and there is just one MIPS initialization function which
makes the choices between MSA, MMI and LSX.  This resolves the issues
with the poorly defined precedence of the optimizations and removes the
wacky #if nesting.

Signed-off-by: John Bowler <[email protected]>
This updates scripts/pnglibconf.h.prebuilt which is used by gcc and msys
makefiles.

Updates scripts/makefile.{gcc,std,msys}; the assumption is that the
remainder will be removed.

Adds a comment to scripts/makefile.gcc about how to get the dependencies
working properly; include directives aren't supported by traditional
make.

Tested on Intel; pngsimd.o correctly contains the SSE2 implementations.

Signed-off-by: John Bowler <[email protected]>
This enables the ARM Ltd SIMD code to assist "png_expand_palette".  The
code has been refactored so that while it does not change the disruption
to the main libpng code, in particular pngrtran.c, is minimized and
generalized.

It should now be possible for any manufacturer to optimize the same
transform (expansion of a color-mapped PNG to RGB or RGB8) without new
manufacturer favouring code in the main body of libpng.

Signed-off-by: John Bowler <[email protected]>
ISO have recently standardized a way of using attributes.  This allows
removal of the existing compiler-specific hacks because the existing
supported compilers support the new standard.  This allows enables
market competition in the compiler world by removing support for
specific compilers in this case.

The changes are detailed in these commits:

commit 51b6189
commit 8942be9
This removes the unremoved files, corrects the .gitignore and adds a
.vimrc for my benefit.  The .vimrc is the minimal required for
formatting which obeys Glenn's rules.

Signed-off-by: John Bowler <[email protected]>
@jbowler jbowler changed the base branch from libpng16 to libpng18 September 15, 2024 02:34
@jbowler
Copy link
Contributor Author

jbowler commented Sep 15, 2024

@ctruta: there is only one commit here. All the reset is because of the prior unmerged changes. This is all based on [libpng18]. Fixes #591, adds a .vimrc so those vile VIM users won't mis-indent the source (believe me I don't use 3-space softtabs unless I'm working on libpng), updates the .gitignore for the new maintainer mode system.

TBD: I'll force push a removal of the problematic macro in configure.ac... sorry I just forgot about it.

AM_MAINTAINER_MODE in configure.ac switches off maintainer mode.  This
is a warmly debated topic for everyone who assiduously maintains
configure systems.  For systems which do not distribute "configure"
itself AM_MAINTAINER_MODE is a carefully designed IED.  I've triggered
it about 5 times over the last 5 hours.

Signed-off-by: John Bowler <[email protected]>
@@ -0,0 +1,4 @@
set shiftwidth=3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the .editorconfig files for the users of all text editors that recognize the EditorConfig specification (https://editorconfig.org).

As a matter of fact, an EditorConfig plugin for Vim comes standard:
https://github.com/editorconfig/editorconfig-vim

I, too, am using it with Visual Studio Code (for coding) and with the editorconfig-checker program (for linting). I haven't used it with Vim, as I'm not that much of a Vim user to begin with, but if it doesn't work well enough for you, see if you can tweak the .editorconfig file until Vim does what you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My vi was using it automatically but it didn't do 'set shiftwidth=3', so didn't even know it was there; my default shiftwidth is 4 so every time I editted a file the indentation ended up wrong. #594 fixes this. I'll close this PR.

@jbowler
Copy link
Contributor Author

jbowler commented Sep 15, 2024

Effectively fixed. #594 fixes the missing indent spacing in .editorconfig.

@jbowler jbowler closed this Sep 15, 2024
@jbowler jbowler deleted the fix-configure branch September 15, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants