small fixes to help freebsd

This commit is contained in:
John Cupitt 2014-06-27 13:11:57 +01:00
parent a02deb3ac9
commit 243c86f405
3 changed files with 42 additions and 11 deletions

View File

@ -109,8 +109,9 @@ Static analysis with:
# Dependencies # Dependencies
libvips has to have gettext, glib-2.x and libxml-2.0. The build system needs libvips has to have gettext, glib-2.x and libxml-2.0. The build system
sh, pkg-config, swig, gtk-doc-tools, automake, gobject-introspection and gnu make. needs sh, pkg-config, swig, gtk-doc-tools, automake, gobject-introspection
and gnu make.
# Optional dependencies # Optional dependencies
@ -155,10 +156,6 @@ If available, libvips adds support for creating image pyramids with dzsave.
The TIFF library. It needs to be built with support for JPEG and The TIFF library. It needs to be built with support for JPEG and
ZIP compression. 3.4b037 and later are known to be OK. ZIP compression. 3.4b037 and later are known to be OK.
## libz
If your TIFF library includes ZIP compression, you'll need this too.
## fftw3 ## fftw3
If libvips finds this library, it uses it for fourier transforms. It If libvips finds this library, it uses it for fourier transforms. It

3
TODO
View File

@ -1,3 +1,6 @@
- need a --nodoc flag for freebsd
stops anything in doc/ running
- threadpool recyling might be useful for dzsave? - threadpool recyling might be useful for dzsave?

View File

@ -63,13 +63,25 @@ GOBJECT_INTROSPECTION_CHECK([1.30.0])
introspection_sources=$(cd libvips ; find . -name "*.c") introspection_sources=$(cd libvips ; find . -name "*.c")
filter_list="deprecated " filter_list="deprecated "
# contains(string, substring)
#
# Returns 0 if the specified string contains the specified substring,
# otherwise returns 1.
contains() {
string="$1"
substring="$2"
if test "${string#*$substring}" != "$string"; then
return 0 # $substring is in $string
else
return 1 # $substring is not in $string
fi
}
introspection_sources2= introspection_sources2=
for name in $introspection_sources; do for name in $introspection_sources; do
found=0 found=0
for filter in $filter_list; do for filter in $filter_list; do
# FIXME .. argh a bash-ism :( not sure of a nice, portable way to do if contains $name ${filter}; then
# regexp matching
if [[[ $name == *${filter}* ]]]; then
found=1 found=1
fi fi
done done
@ -112,6 +124,23 @@ else
fi fi
fi fi
# we are a C library with some optional C++ components inside it
# on most platforms, we just include -lstdc++ in the link line for programs
# using vips, but not all
# we ought to write a proper configure test for this :(
AC_MSG_CHECKING([for needs -lstdc++])
case "$host_os" in
freebsd*)
vips_needs_stdcpp=no
;;
*)
vips_needs_stdcpp=yes
;;
esac
AC_MSG_RESULT([$vips_needs_stdcpp])
AC_MSG_CHECKING([for native Win32]) AC_MSG_CHECKING([for native Win32])
case "$host" in case "$host" in
*-*-mingw*) *-*-mingw*)
@ -221,7 +250,9 @@ if test x"$enable_cxx" != x"no"; then
# need -lstdc++ for (eg.) the C++ format loaders # need -lstdc++ for (eg.) the C++ format loaders
# this gets added to vips.pc to help mingw and friends link programs # this gets added to vips.pc to help mingw and friends link programs
# using libvips # using libvips
VIPS_CXX_LIBS="-lstdc++" if test x"$vips_needs_stdcpp" != x"no"; then
VIPS_CXX_LIBS="-lstdc++"
fi
enable_cxx=yes enable_cxx=yes
fi fi
fi fi
@ -338,7 +369,7 @@ PKG_CHECK_MODULES(THREADS, glib-2.0 >= 2.32,[
] ]
) )
# after 2.36 the type system inits itself # with 2.36 and after the type system inits itself
PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 < 2.36,[ PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 < 2.36,[
AC_DEFINE(NEED_TYPE_INIT,1,[define if your glib needs g_type_init().]) AC_DEFINE(NEED_TYPE_INIT,1,[define if your glib needs g_type_init().])
],[ ],[