@@ -190,7 +190,6 @@ AC_PROG_CC_STDC
190
190
AC_PROG_CXX
191
191
AC_PROG_INSTALL
192
192
AC_PROG_LN_S
193
- AM_WITH_DMALLOC
194
193
195
194
AC_ARG_WITH ( [ doxygen] ,
196
195
AS_HELP_STRING ( [ --without-doxygen] , [ build without doxygen (default: test)] ) )
@@ -257,7 +256,7 @@ AM_GLIB_GNU_GETTEXT
257
256
# [ax_gcc_version_option=yes],
258
257
# [ax_gcc_version_option=no]
259
258
# )
260
- AC_MSG_CHECKING ( [ for gcc version] )
259
+ AC_MSG_CHECKING ( [ for $CC version] )
261
260
GCC_VERSION=""
262
261
version=$($CC -dumpversion)
263
262
if test $? = 0; then
@@ -311,7 +310,7 @@ AC_TYPE_SIZE_T
311
310
312
311
# g++/gcc 4.x and 5.x have rather broken vector support ... 5.4.1 seems to
313
312
# work, but 5.4.0 fails to even compile
314
- AC_MSG_CHECKING ( [ for gcc with working vector support] )
313
+ AC_MSG_CHECKING ( [ for $CC with working vector support] )
315
314
if test x"$GCC_VERSION_MAJOR" != x"4" -a x"$GCC_VERSION_MAJOR" != x"5"; then
316
315
AC_MSG_RESULT ( [ yes] )
317
316
else
@@ -324,7 +323,7 @@ if test x"$ax_cv_have_var_attribute_vector_size" = x"yes"; then
324
323
AC_MSG_CHECKING ( [ for C++ vector shuffle] )
325
324
AC_LANG_PUSH ( [ C++] )
326
325
AC_TRY_COMPILE ( [
327
- typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
326
+ typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16) ));
328
327
] ,[
329
328
v4f f; f[ 3] = 99;
330
329
] ,[
@@ -347,7 +346,7 @@ if test x"$have_vector_shuffle" = x"yes"; then
347
346
AC_MSG_CHECKING ( [ for C++ vector arithmetic] )
348
347
AC_LANG_PUSH ( [ C++] )
349
348
AC_TRY_COMPILE ( [
350
- typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
349
+ typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16) ));
351
350
] ,[
352
351
v4f f = {1, 2, 3, 4}; f *= 12.0;
353
352
v4f g = {5, 6, 7, 8}; f = g > 0 ? g : -1 * g;
@@ -367,7 +366,7 @@ if test x"$have_vector_arith" = x"yes"; then
367
366
AC_MSG_CHECKING ( [ for C++ signed constants in vector templates] )
368
367
AC_LANG_PUSH ( [ C++] )
369
368
AC_TRY_COMPILE ( [
370
- typedef float v4f __attribute__((vector_size(4 * sizeof(float))));
369
+ typedef float v4f __attribute__((vector_size(4 * sizeof(float)),aligned(16) ));
371
370
template <typename T>
372
371
static void
373
372
h( v4f B )
394
393
AC_FUNC_MEMCMP
395
394
AC_FUNC_MMAP
396
395
AC_FUNC_VPRINTF
397
- AC_CHECK_FUNCS ( [ getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf atexit] )
396
+ AC_CHECK_FUNCS ( [ getcwd gettimeofday getwd memset munmap putenv realpath strcasecmp strchr strcspn strdup strerror strrchr strspn vsnprintf realpath mkstemp mktemp random rand sysconf atexit _aligned_malloc posix_memalign memalign ] )
398
397
AC_CHECK_LIB ( m ,cbrt ,[ AC_DEFINE ( HAVE_CBRT ,1 ,[ have cbrt() in libm.] ) ] )
399
398
AC_CHECK_LIB ( m ,hypot ,[ AC_DEFINE ( HAVE_HYPOT ,1 ,[ have hypot() in libm.] ) ] )
400
399
AC_CHECK_LIB ( m ,atan2 ,[ AC_DEFINE ( HAVE_ATAN2 ,1 ,[ have atan2() in libm.] ) ] )
@@ -1010,6 +1009,16 @@ VIPS_LIBS="$VIPS_LIBS $MATIO_LIBS"
1010
1009
# not external libraries, but have options to disable them, helps to
1011
1010
# reduce attack surface
1012
1011
1012
+ AC_ARG_WITH ( [ nsgif] ,
1013
+ AS_HELP_STRING ( [ --without-nsgif] , [ build without nsgif load (default: with)] ) )
1014
+
1015
+ if test x"$with_nsgif" != x"no"; then
1016
+ AC_DEFINE ( HAVE_NSGIF ,1 ,[ define to build nsgif load support.] )
1017
+ with_nsgif=yes
1018
+ fi
1019
+
1020
+ AM_CONDITIONAL(ENABLE_NSGIF, [ test x"$with_nsgif" = x"yes"] )
1021
+
1013
1022
AC_ARG_WITH ( [ ppm] ,
1014
1023
AS_HELP_STRING ( [ --without-ppm] , [ build without ppm (default: with)] ) )
1015
1024
@@ -1133,19 +1142,6 @@ VIPS_CFLAGS="$VIPS_CFLAGS $TIFF_CFLAGS"
1133
1142
VIPS_INCLUDES="$VIPS_INCLUDES $TIFF_INCLUDES"
1134
1143
VIPS_LIBS="$VIPS_LIBS $TIFF_LIBS"
1135
1144
1136
- # giflib
1137
- FIND_GIFLIB(
1138
- [ with_giflib="yes (found by search)"
1139
- ] ,
1140
- [ AC_MSG_WARN ( [ giflib not found; disabling direct GIF support] )
1141
- with_giflib=no
1142
- ]
1143
- )
1144
-
1145
- VIPS_CFLAGS="$VIPS_CFLAGS $GIFLIB_CFLAGS"
1146
- VIPS_INCLUDES="$VIPS_INCLUDES $GIFLIB_INCLUDES"
1147
- VIPS_LIBS="$VIPS_LIBS $GIFLIB_LIBS"
1148
-
1149
1145
# Look for libspng first
1150
1146
# 0.6.1 uses "libspng.pc", git master libspng uses "spng.pc"
1151
1147
AC_ARG_WITH ( [ libspng] ,
@@ -1323,6 +1319,7 @@ gobject introspection: $found_introspection, \
1323
1319
RAD load/save: $with_radiance, \
1324
1320
Analyze7 load/save: $with_analyze, \
1325
1321
PPM load/save: $with_ppm, \
1322
+ GIF load: $with_nsgif, \
1326
1323
generate C++ docs: $with_doxygen, \
1327
1324
use fftw3 for FFT: $with_fftw, \
1328
1325
accelerate loops with orc: $with_orc, \
@@ -1336,7 +1333,6 @@ PNG load/save with libpng: $with_png, \
1336
1333
8bpp PNG quantisation: $with_imagequant, \
1337
1334
TIFF load/save with libtiff: $with_tiff, \
1338
1335
image pyramid save: $with_gsf, \
1339
- GIF load with giflib: $with_giflib, \
1340
1336
HEIC/AVIF load/save with libheif: $with_heif, \
1341
1337
WebP load/save with libwebp: $with_libwebp, \
1342
1338
PDF load with PDFium: $with_pdfium, \
@@ -1381,6 +1377,7 @@ AC_CONFIG_FILES([
1381
1377
libvips/convolution/Makefile
1382
1378
libvips/deprecated/Makefile
1383
1379
libvips/foreign/Makefile
1380
+ libvips/foreign/libnsgif/Makefile
1384
1381
libvips/freqfilt/Makefile
1385
1382
libvips/histogram/Makefile
1386
1383
libvips/draw/Makefile
@@ -1421,6 +1418,7 @@ gobject introspection: $found_introspection
1421
1418
RAD load/save: $with_radiance
1422
1419
Analyze7 load/save: $with_analyze
1423
1420
PPM load/save: $with_ppm
1421
+ GIF load: $with_nsgif
1424
1422
generate C++ docs: $with_doxygen
1425
1423
1426
1424
## Optional dependencies
@@ -1443,7 +1441,6 @@ PNG load/save with libpng: $with_png
1443
1441
TIFF load/save with libtiff: $with_tiff
1444
1442
image pyramid save: $with_gsf
1445
1443
(requires libgsf-1 1.14.26 or later)
1446
- GIF load with giflib: $with_giflib
1447
1444
HEIC/AVIF load/save with libheif: $with_heif
1448
1445
WebP load/save with libwebp: $with_libwebp
1449
1446
(requires libwebp, libwebpmux, libwebpdemux 0.6.0 or later)
0 commit comments