Use "symbol prefixing" in bundled libs (part 2 of 3)

Add prefix 'fltk_' to bundled libjpeg.
This commit is contained in:
Albrecht Schlosser 2021-05-31 21:54:32 +02:00
parent 3cbf11af8d
commit 3c407bd588
5 changed files with 200 additions and 0 deletions

View File

@ -182,12 +182,33 @@ jpeg:
Download: See website and follow links.
Repository: <unknown>
Download the latest jpeg-xy sources on a Linux (or Unix) system,
`cd' to /path-to/jpeg-xy and run
$ ./configure
$ make [-jN]
This builds the library and should create the static library file
'.libs/libjpeg.a'.
Execute the following command to extract the libjpeg symbol names
used to build the 'prefixed' libfltk_jpeg library:
$ nm --extern-only --defined-only .libs/libjpeg.a | awk '{print $3}' \
| sed '/^$/d' | sort -u | awk '{print "#define "$1" fltk_"$1}' \
> fltk_jpeg_prefix.h
This creates the header file 'fltk_jpeg_prefix.h' with the
'#define' statements using the 'fltk_' symbol prefix.
The following files need special handling:
CMakeLists.txt: Keep FLTK version, update manually if necessary.
Makefile: Same as CMakeLists.txt.
fltk_jpeg_prefix.h: Generate on a Linux system and merge (see above).
Note: more to come...
makedepend: Keep this file.

View File

@ -82,5 +82,6 @@ endif (OPTION_BUILD_SHARED_LIBS)
#######################################################################
install (FILES jconfig.h jerror.h jmorecfg.h jpeglib.h
fltk_jpeg_prefix.h
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
)

View File

@ -106,6 +106,7 @@ install: $(LIBJPEG)
$(INSTALL_DATA) jerror.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) jmorecfg.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) jpeglib.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) fltk_jpeg_prefix.h $(DESTDIR)$(includedir)/FL/images
#
@ -120,6 +121,7 @@ uninstall:
$(RM) $(includedir)/FL/images/jerror.h
$(RM) $(includedir)/FL/images/jmorecfg.h
$(RM) $(includedir)/FL/images/jpeglib.h
$(RM) $(includedir)/FL/images/fltk_jpeg_prefix.h
#

173
jpeg/fltk_jpeg_prefix.h Normal file
View File

@ -0,0 +1,173 @@
/*
* FLTK symbol prefixes for libjpeg
* This is a generated file: see README.bundled-libs.txt
*/
#define jcopy_block_row fltk_jcopy_block_row
#define jcopy_sample_rows fltk_jcopy_sample_rows
#define jdiv_round_up fltk_jdiv_round_up
#define jinit_1pass_quantizer fltk_jinit_1pass_quantizer
#define jinit_2pass_quantizer fltk_jinit_2pass_quantizer
#define jinit_arith_decoder fltk_jinit_arith_decoder
#define jinit_arith_encoder fltk_jinit_arith_encoder
#define jinit_c_coef_controller fltk_jinit_c_coef_controller
#define jinit_c_main_controller fltk_jinit_c_main_controller
#define jinit_c_master_control fltk_jinit_c_master_control
#define jinit_color_converter fltk_jinit_color_converter
#define jinit_color_deconverter fltk_jinit_color_deconverter
#define jinit_compress_master fltk_jinit_compress_master
#define jinit_c_prep_controller fltk_jinit_c_prep_controller
#define jinit_d_coef_controller fltk_jinit_d_coef_controller
#define jinit_d_main_controller fltk_jinit_d_main_controller
#define jinit_downsampler fltk_jinit_downsampler
#define jinit_d_post_controller fltk_jinit_d_post_controller
#define jinit_forward_dct fltk_jinit_forward_dct
#define jinit_huff_decoder fltk_jinit_huff_decoder
#define jinit_huff_encoder fltk_jinit_huff_encoder
#define jinit_input_controller fltk_jinit_input_controller
#define jinit_inverse_dct fltk_jinit_inverse_dct
#define jinit_marker_reader fltk_jinit_marker_reader
#define jinit_marker_writer fltk_jinit_marker_writer
#define jinit_master_decompress fltk_jinit_master_decompress
#define jinit_memory_mgr fltk_jinit_memory_mgr
#define jinit_merged_upsampler fltk_jinit_merged_upsampler
#define jinit_upsampler fltk_jinit_upsampler
#define jpeg_abort fltk_jpeg_abort
#define jpeg_abort_compress fltk_jpeg_abort_compress
#define jpeg_abort_decompress fltk_jpeg_abort_decompress
#define jpeg_add_quant_table fltk_jpeg_add_quant_table
#define jpeg_alloc_huff_table fltk_jpeg_alloc_huff_table
#define jpeg_alloc_quant_table fltk_jpeg_alloc_quant_table
#define jpeg_aritab fltk_jpeg_aritab
#define jpeg_calc_jpeg_dimensions fltk_jpeg_calc_jpeg_dimensions
#define jpeg_calc_output_dimensions fltk_jpeg_calc_output_dimensions
#define jpeg_consume_input fltk_jpeg_consume_input
#define jpeg_copy_critical_parameters fltk_jpeg_copy_critical_parameters
#define jpeg_core_output_dimensions fltk_jpeg_core_output_dimensions
#define jpeg_CreateCompress fltk_jpeg_CreateCompress
#define jpeg_CreateDecompress fltk_jpeg_CreateDecompress
#define jpeg_default_colorspace fltk_jpeg_default_colorspace
#define jpeg_default_qtables fltk_jpeg_default_qtables
#define jpeg_destroy fltk_jpeg_destroy
#define jpeg_destroy_compress fltk_jpeg_destroy_compress
#define jpeg_destroy_decompress fltk_jpeg_destroy_decompress
#define jpeg_fdct_10x10 fltk_jpeg_fdct_10x10
#define jpeg_fdct_10x5 fltk_jpeg_fdct_10x5
#define jpeg_fdct_11x11 fltk_jpeg_fdct_11x11
#define jpeg_fdct_12x12 fltk_jpeg_fdct_12x12
#define jpeg_fdct_12x6 fltk_jpeg_fdct_12x6
#define jpeg_fdct_13x13 fltk_jpeg_fdct_13x13
#define jpeg_fdct_14x14 fltk_jpeg_fdct_14x14
#define jpeg_fdct_14x7 fltk_jpeg_fdct_14x7
#define jpeg_fdct_15x15 fltk_jpeg_fdct_15x15
#define jpeg_fdct_16x16 fltk_jpeg_fdct_16x16
#define jpeg_fdct_16x8 fltk_jpeg_fdct_16x8
#define jpeg_fdct_1x1 fltk_jpeg_fdct_1x1
#define jpeg_fdct_1x2 fltk_jpeg_fdct_1x2
#define jpeg_fdct_2x1 fltk_jpeg_fdct_2x1
#define jpeg_fdct_2x2 fltk_jpeg_fdct_2x2
#define jpeg_fdct_2x4 fltk_jpeg_fdct_2x4
#define jpeg_fdct_3x3 fltk_jpeg_fdct_3x3
#define jpeg_fdct_3x6 fltk_jpeg_fdct_3x6
#define jpeg_fdct_4x2 fltk_jpeg_fdct_4x2
#define jpeg_fdct_4x4 fltk_jpeg_fdct_4x4
#define jpeg_fdct_4x8 fltk_jpeg_fdct_4x8
#define jpeg_fdct_5x10 fltk_jpeg_fdct_5x10
#define jpeg_fdct_5x5 fltk_jpeg_fdct_5x5
#define jpeg_fdct_6x12 fltk_jpeg_fdct_6x12
#define jpeg_fdct_6x3 fltk_jpeg_fdct_6x3
#define jpeg_fdct_6x6 fltk_jpeg_fdct_6x6
#define jpeg_fdct_7x14 fltk_jpeg_fdct_7x14
#define jpeg_fdct_7x7 fltk_jpeg_fdct_7x7
#define jpeg_fdct_8x16 fltk_jpeg_fdct_8x16
#define jpeg_fdct_8x4 fltk_jpeg_fdct_8x4
#define jpeg_fdct_9x9 fltk_jpeg_fdct_9x9
#define jpeg_fdct_float fltk_jpeg_fdct_float
#define jpeg_fdct_ifast fltk_jpeg_fdct_ifast
#define jpeg_fdct_islow fltk_jpeg_fdct_islow
#define jpeg_finish_compress fltk_jpeg_finish_compress
#define jpeg_finish_decompress fltk_jpeg_finish_decompress
#define jpeg_finish_output fltk_jpeg_finish_output
#define jpeg_free_large fltk_jpeg_free_large
#define jpeg_free_small fltk_jpeg_free_small
#define jpeg_get_large fltk_jpeg_get_large
#define jpeg_get_small fltk_jpeg_get_small
#define jpeg_has_multiple_scans fltk_jpeg_has_multiple_scans
#define jpeg_idct_10x10 fltk_jpeg_idct_10x10
#define jpeg_idct_10x5 fltk_jpeg_idct_10x5
#define jpeg_idct_11x11 fltk_jpeg_idct_11x11
#define jpeg_idct_12x12 fltk_jpeg_idct_12x12
#define jpeg_idct_12x6 fltk_jpeg_idct_12x6
#define jpeg_idct_13x13 fltk_jpeg_idct_13x13
#define jpeg_idct_14x14 fltk_jpeg_idct_14x14
#define jpeg_idct_14x7 fltk_jpeg_idct_14x7
#define jpeg_idct_15x15 fltk_jpeg_idct_15x15
#define jpeg_idct_16x16 fltk_jpeg_idct_16x16
#define jpeg_idct_16x8 fltk_jpeg_idct_16x8
#define jpeg_idct_1x1 fltk_jpeg_idct_1x1
#define jpeg_idct_1x2 fltk_jpeg_idct_1x2
#define jpeg_idct_2x1 fltk_jpeg_idct_2x1
#define jpeg_idct_2x2 fltk_jpeg_idct_2x2
#define jpeg_idct_2x4 fltk_jpeg_idct_2x4
#define jpeg_idct_3x3 fltk_jpeg_idct_3x3
#define jpeg_idct_3x6 fltk_jpeg_idct_3x6
#define jpeg_idct_4x2 fltk_jpeg_idct_4x2
#define jpeg_idct_4x4 fltk_jpeg_idct_4x4
#define jpeg_idct_4x8 fltk_jpeg_idct_4x8
#define jpeg_idct_5x10 fltk_jpeg_idct_5x10
#define jpeg_idct_5x5 fltk_jpeg_idct_5x5
#define jpeg_idct_6x12 fltk_jpeg_idct_6x12
#define jpeg_idct_6x3 fltk_jpeg_idct_6x3
#define jpeg_idct_6x6 fltk_jpeg_idct_6x6
#define jpeg_idct_7x14 fltk_jpeg_idct_7x14
#define jpeg_idct_7x7 fltk_jpeg_idct_7x7
#define jpeg_idct_8x16 fltk_jpeg_idct_8x16
#define jpeg_idct_8x4 fltk_jpeg_idct_8x4
#define jpeg_idct_9x9 fltk_jpeg_idct_9x9
#define jpeg_idct_float fltk_jpeg_idct_float
#define jpeg_idct_ifast fltk_jpeg_idct_ifast
#define jpeg_idct_islow fltk_jpeg_idct_islow
#define jpeg_input_complete fltk_jpeg_input_complete
#define jpeg_mem_available fltk_jpeg_mem_available
#define jpeg_mem_dest fltk_jpeg_mem_dest
#define jpeg_mem_init fltk_jpeg_mem_init
#define jpeg_mem_src fltk_jpeg_mem_src
#define jpeg_mem_term fltk_jpeg_mem_term
#define jpeg_natural_order fltk_jpeg_natural_order
#define jpeg_natural_order2 fltk_jpeg_natural_order2
#define jpeg_natural_order3 fltk_jpeg_natural_order3
#define jpeg_natural_order4 fltk_jpeg_natural_order4
#define jpeg_natural_order5 fltk_jpeg_natural_order5
#define jpeg_natural_order6 fltk_jpeg_natural_order6
#define jpeg_natural_order7 fltk_jpeg_natural_order7
#define jpeg_new_colormap fltk_jpeg_new_colormap
#define jpeg_open_backing_store fltk_jpeg_open_backing_store
#define jpeg_quality_scaling fltk_jpeg_quality_scaling
#define jpeg_read_coefficients fltk_jpeg_read_coefficients
#define jpeg_read_header fltk_jpeg_read_header
#define jpeg_read_raw_data fltk_jpeg_read_raw_data
#define jpeg_read_scanlines fltk_jpeg_read_scanlines
#define jpeg_resync_to_restart fltk_jpeg_resync_to_restart
#define jpeg_save_markers fltk_jpeg_save_markers
#define jpeg_set_colorspace fltk_jpeg_set_colorspace
#define jpeg_set_defaults fltk_jpeg_set_defaults
#define jpeg_set_linear_quality fltk_jpeg_set_linear_quality
#define jpeg_set_marker_processor fltk_jpeg_set_marker_processor
#define jpeg_set_quality fltk_jpeg_set_quality
#define jpeg_simple_progression fltk_jpeg_simple_progression
#define jpeg_start_compress fltk_jpeg_start_compress
#define jpeg_start_decompress fltk_jpeg_start_decompress
#define jpeg_start_output fltk_jpeg_start_output
#define jpeg_std_error fltk_jpeg_std_error
#define jpeg_std_huff_table fltk_jpeg_std_huff_table
#define jpeg_stdio_dest fltk_jpeg_stdio_dest
#define jpeg_stdio_src fltk_jpeg_stdio_src
#define jpeg_std_message_table fltk_jpeg_std_message_table
#define jpeg_suppress_tables fltk_jpeg_suppress_tables
#define jpeg_write_coefficients fltk_jpeg_write_coefficients
#define jpeg_write_marker fltk_jpeg_write_marker
#define jpeg_write_m_byte fltk_jpeg_write_m_byte
#define jpeg_write_m_header fltk_jpeg_write_m_header
#define jpeg_write_raw_data fltk_jpeg_write_raw_data
#define jpeg_write_scanlines fltk_jpeg_write_scanlines
#define jpeg_write_tables fltk_jpeg_write_tables
#define jround_up fltk_jround_up

View File

@ -3,6 +3,9 @@
/* FLTK should probably be preserved when the JPEG lib is upgraded. */
/* FLTK *************************************************************** */
/* FLTK: enable symbol prefixes, see README.bundled-libs.txt */
#include "fltk_jpeg_prefix.h"
/* jconfig.h. Generated from jconfig.cfg by configure. */
/* jconfig.cfg --- source file edited by configure script */
/* see jconfig.txt for explanations */