*** ./Makefile.ORIG Wed May 29 14:57:17 2019 --- ./Makefile Wed May 29 14:57:44 2019 *************** *** 31,37 **** TARFILE = $(TARNAME)-src.tar.bz2 PKGCONFIG = imagequant.pc ! all: static shared static: $(STATICLIB) --- 31,37 ---- TARFILE = $(TARNAME)-src.tar.bz2 PKGCONFIG = imagequant.pc ! all: static static: $(STATICLIB) *** ./configure.ORIG Wed May 29 15:02:01 2019 --- ./configure Wed May 29 15:23:18 2019 *************** *** 142,163 **** echo fi - echo > pngquant-gcccheck.c "int main(){}" - if ! "$CC" -std=c99 -o pngquant-gcccheck pngquant-gcccheck.c; then - rm -f pngquant-gcccheck pngquant-gcccheck.c - error "Compiler" "$CC failed to compile anything (make sure it's installed and supports C99)" - fi - rm -f pngquant-gcccheck pngquant-gcccheck.c - status "Compiler" "$CC" # init flags ! CFLAGS=${CFLAGS:--fno-math-errno -funroll-loops -fomit-frame-pointer -Wall} ! cflags "-std=c99 -I." # DEBUG if [ -z "$DEBUG" ]; then ! cflags "-O3 -DNDEBUG" status "Debug" "no" else cflags "-O1 -g" --- 142,156 ---- echo fi status "Compiler" "$CC" # init flags ! CFLAGS="" ! cflags "-I." # DEBUG if [ -z "$DEBUG" ]; then ! cflags "-O3 -qstrict -DNDEBUG" status "Debug" "no" else cflags "-O1 -g" *************** *** 206,212 **** fi else # silence warnings about omp pragmas - cflags "-Wno-unknown-pragmas" conditional_cflags "-wd3180" # ICC status "OpenMP" "no" fi --- 199,204 ---- *************** *** 237,243 **** # As of GCC 4.5, 387 fp math is significantly slower in C99 mode without this. # Note: CPUs without SSE2 use 387 for doubles, even when SSE fp math is set. ! conditional_cflags "-fexcess-precision=fast" # Intel C++ Compiler --- 229,235 ---- # As of GCC 4.5, 387 fp math is significantly slower in C99 mode without this. # Note: CPUs without SSE2 use 387 for doubles, even when SSE fp math is set. ! #conditional_cflags "-fexcess-precision=fast" # Intel C++ Compiler *************** *** 246,255 **** conditional_cflags "-xHOST" # Disable unsafe fp optimizations and enforce fp precision as set in the source. ! conditional_cflags "-fp-model source" # Silence a gold linker warning about string misalignment. ! conditional_cflags "-falign-stack=maintain-16-byte" lflags "-lm" # Ubuntu requires this library last, issue #38 --- 238,247 ---- conditional_cflags "-xHOST" # Disable unsafe fp optimizations and enforce fp precision as set in the source. ! #conditional_cflags "-fp-model source" # Silence a gold linker warning about string misalignment. ! #conditional_cflags "-falign-stack=maintain-16-byte" lflags "-lm" # Ubuntu requires this library last, issue #38 *** ./pam.h.ORIG Wed May 29 15:04:59 2019 --- ./pam.h Wed May 29 15:07:37 2019 *************** *** 19,25 **** #include #include #include ! #include #ifndef MAX # define MAX(a,b) ((a) > (b)? (a) : (b)) --- 19,25 ---- #include #include #include ! #include "stdbool.h" #ifndef MAX # define MAX(a,b) ((a) > (b)? (a) : (b)) *************** *** 111,116 **** --- 111,120 ---- .b = gamma_lut[px.b]*a, }; } + + #ifndef powf + #define powf(X,Y) pow(X,Y) + #endif inline static rgba_pixel f_to_rgb(const float gamma, const f_pixel px) { *** ./libimagequant.c.ORIG Wed May 29 15:08:10 2019 --- ./libimagequant.c Wed May 29 15:09:03 2019 *************** *** 1688,1693 **** --- 1688,1697 ---- } } + #ifndef fabsf + #define fabsf(X) fabs(X) + #endif + /** Builds two maps: importance_map - approximation of areas with high-frequency noise, except straight edges. 1=flat, 0=noisy. *************** *** 1855,1860 **** --- 1859,1868 ---- if (palette) pam_freecolormap(palette); return newpal; } + + #ifndef sqrtf + #define sqrtf(X) sqrt(X) + #endif LIQ_NONNULL static void adjust_histogram_callback(hist_item *item, float diff) { *** ./nearest.c.ORIG Wed May 29 15:22:05 2019 --- ./nearest.c Wed May 29 15:22:27 2019 *************** *** 67,72 **** --- 67,76 ---- return best; } + #ifndef sqrtf + #define sqrtf(X) sqrt(X) + #endif + static vp_node *vp_create_node(mempoolptr *m, vp_sort_tmp indexes[], int num_indexes, const colormap_item items[]) { if (num_indexes <= 0) { return NULL;