mirror of https://github.com/fltk/fltk
Fixed image lib configure and fltk-config issues by backporting the image
lib and zlib configure code from FLTK 1.3 (STR #2203) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6892 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
eb9150e0b1
commit
03cf49e895
3
CHANGES
3
CHANGES
|
@ -1,6 +1,7 @@
|
|||
CHANGES IN FLTK 1.1.10
|
||||
|
||||
- Fixed missing jpeg and z lib in static config (STR #2203)
|
||||
- Fixed image lib configure and fltk-config issues by backporting
|
||||
the image lib and zlib configure code from FLTK 1.3 (STR #2203)
|
||||
- Updated the bundled libpng to v1.2.40 (released Sep. 10, 2009)
|
||||
- Fixed Fl_Choice contrast with light-on-dark settings (STR #2219)
|
||||
- Added Xft2 font lookup table (STR #2215)
|
||||
|
|
150
configure.in
150
configure.in
|
@ -529,75 +529,123 @@ STATICIMAGELIBS=""
|
|||
AC_SUBST(IMAGELIBS)
|
||||
AC_SUBST(STATICIMAGELIBS)
|
||||
|
||||
AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library, default=auto],
|
||||
[if test x$enable_localjpeg = xyes; then
|
||||
ac_cv_lib_jpeg_jpeg_CreateCompress=no
|
||||
fi])
|
||||
|
||||
AC_CHECK_LIB(jpeg,jpeg_CreateCompress,
|
||||
# Handle the JPEG lib linking mode (use fltk local or system lib)
|
||||
# If --enable-(resp. --disable-)localjpeg parameter is not set by user
|
||||
# Then we check the JPEG lib usability, with result in sysjpeglib_ok variable
|
||||
AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library, default=auto])
|
||||
# Check for System lib use if automatic mode or --disable-localjpeg is requested
|
||||
sysjpeglib_ok=no
|
||||
sysjpeginc_ok=no
|
||||
if test x$enable_localjpeg != xyes; then
|
||||
AC_CHECK_LIB(jpeg,jpeg_CreateCompress,
|
||||
[AC_CHECK_HEADER(jpeglib.h,
|
||||
sysjpeginc_ok=yes)
|
||||
if test x$sysjpeginc_ok = xyes; then
|
||||
sysjpeglib_ok=yes
|
||||
fi])
|
||||
fi
|
||||
# Now set the jpeg lib and include flags according to the requested mode and availability
|
||||
if test x$enable_localjpeg = xyes -o x$sysjpeglib_ok = xno; then
|
||||
JPEGINC="-I../jpeg"
|
||||
JPEG="jpeg"
|
||||
IMAGELIBS="-lfltk_jpeg $IMAGELIBS"
|
||||
STATICIMAGELIBS="\$libdir/libfltk_jpeg.a $STATICIMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBJPEG)
|
||||
#ac_cv_lib_jpeg_jpeg_CreateCompress=no # from ima: should not be necessary
|
||||
# Finally, warn user if system lib was requested but not found
|
||||
if test x$enable_localjpeg = xno; then
|
||||
AC_MSG_WARN(Cannot find system jpeg lib or header: choosing the local lib mode.)
|
||||
fi
|
||||
else
|
||||
JPEGINC=""
|
||||
JPEG=""
|
||||
IMAGELIBS="-ljpeg $IMAGELIBS"
|
||||
STATICIMAGELIBS="-ljpeg $STATICIMAGELIBS",
|
||||
if test x$enable_localjpeg = xno; then
|
||||
JPEGINC=""
|
||||
JPEG=""
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBJPEG)
|
||||
JPEGINC="-I../jpeg"
|
||||
JPEG="jpeg"
|
||||
IMAGELIBS="-lfltk_jpeg $IMAGELIBS"
|
||||
STATICIMAGELIBS="\$libdir/libfltk_jpeg.a $STATICIMAGELIBS"
|
||||
fi)
|
||||
STATICIMAGELIBS="-ljpeg $STATICIMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBJPEG)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library, default=auto],
|
||||
[if test x$enable_localzlib = xyes; then
|
||||
ac_cv_lib_z_gzgets=no
|
||||
fi])
|
||||
|
||||
AC_CHECK_LIB(z,gzgets,
|
||||
# Handle the ZLIB lib linking mode (use fltk local or system lib)
|
||||
# If --enable-(resp. --disable-)localzlib parameter is not set by user
|
||||
# Then we check the ZLIB lib usability, with result in syszlib_ok variable
|
||||
AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library, default=auto])
|
||||
# Check for System lib use if automatic mode or --disable-localzlib is requested
|
||||
syszlib_ok=no
|
||||
syszinc_ok=no
|
||||
if test x$enable_localzlib != xyes; then
|
||||
AC_CHECK_LIB(z,gzgets,
|
||||
[AC_CHECK_HEADER(zlib.h,
|
||||
syszinc_ok=yes)
|
||||
if test x$syszinc_ok = xyes; then
|
||||
syszlib_ok=yes
|
||||
fi])
|
||||
fi
|
||||
# Now set the Z lib and include flags according to the requested mode and availability
|
||||
if test x$enable_localzlib = xyes -o x$syszlib_ok = xno ; then
|
||||
ZLIBINC="-I../zlib"
|
||||
ZLIB="zlib"
|
||||
LIBS="-lfltk_z $LIBS"
|
||||
IMAGELIBS="-lfltk_z $IMAGELIBS"
|
||||
STATICIMAGELIBS="\$libdir/libfltk_z.a $STATICIMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBZ)
|
||||
ac_cv_lib_z_gzgets=no # fc: is still necessary ?
|
||||
# Finally, warn user if system lib was requested but not found
|
||||
if test x$enable_localzlib = xno; then
|
||||
AC_MSG_WARN(Cannot find system z lib or header: choosing the local lib mode.)
|
||||
fi
|
||||
else
|
||||
ZLIBINC=""
|
||||
ZLIB=""
|
||||
LIBS="-lz $LIBS"
|
||||
IMAGELIBS="-lz $IMAGELIBS"
|
||||
STATICIMAGELIBS="-lz $STATICIMAGELIBS",
|
||||
if test x$enable_localzlib = xno; then
|
||||
ZLIBINC=""
|
||||
ZLIB=""
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBZ)
|
||||
ZLIBINC="-I../zlib"
|
||||
ZLIB="zlib"
|
||||
LIBS="-lfltk_z $LIBS"
|
||||
IMAGELIBS="-lfltk_z $IMAGELIBS"
|
||||
STATICIMAGELIBS="\$libdir/libfltk_z.a $STATICIMAGELIBS"
|
||||
fi)
|
||||
STATICIMAGELIBS="-lz $STATICIMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBZ)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, default=auto],
|
||||
[if test x$enable_localpng = xyes; then
|
||||
ac_cv_lib_png_png_set_tRNS_to_alpha=no
|
||||
# Handle the PNG lib linking mode (use fltk local or system lib)
|
||||
# If --enable-(resp. --disable-)localpng parameter is not set by user
|
||||
# Then we check the png lib usability with result in syspng_lib variable
|
||||
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, default=auto])
|
||||
|
||||
# Now check if system lib is usable, we check Lib AND include availability with inc variant,
|
||||
# but only, if the builtin lib is not requested
|
||||
syspnglib_ok=no
|
||||
syspnginc_ok=no
|
||||
if test x$enable_localpng != xyes; then
|
||||
AC_CHECK_LIB(png, png_read_info,
|
||||
[AC_CHECK_HEADER(png.h,
|
||||
AC_DEFINE(HAVE_PNG_H)
|
||||
syspnginc_ok=yes)
|
||||
AC_CHECK_HEADER(libpng/png.h,
|
||||
AC_DEFINE(HAVE_LIBPNG_PNG_H)
|
||||
syspnginc_ok=yes)
|
||||
if test x$syspnginc_ok = xyes; then
|
||||
syspnglib_ok=yes
|
||||
fi])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(png,png_set_tRNS_to_alpha, [
|
||||
# The following is executed if the lib was not found usable or if local lib is required explicitly
|
||||
if test x$enable_localpng = xyes -o x$syspnglib_ok = xno ; then
|
||||
PNGINC="-I../png"
|
||||
PNG="png"
|
||||
IMAGELIBS="-lfltk_png $IMAGELIBS"
|
||||
STATICIMAGELIBS="\$libdir/libfltk_png.a $STATICIMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBPNG)
|
||||
AC_DEFINE(HAVE_PNG_H)
|
||||
AC_DEFINE(HAVE_PNG_GET_VALID)
|
||||
AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||
# Finally, warn user if system lib was requested but not found
|
||||
if test x$enable_localpng = xno; then
|
||||
AC_MSG_WARN(Cannot find system png lib or header: choosing the local lib mode.)
|
||||
fi
|
||||
else
|
||||
PNGINC=""
|
||||
PNG=""
|
||||
IMAGELIBS="-lpng $IMAGELIBS"
|
||||
STATICIMAGELIBS="-lpng $STATICIMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBPNG)
|
||||
AC_CHECK_HEADER(png.h, AC_DEFINE(HAVE_PNG_H))],[
|
||||
if test x$enable_localpng = xno; then
|
||||
PNGINC=""
|
||||
PNG=""
|
||||
else
|
||||
AC_DEFINE(HAVE_LIBPNG)
|
||||
AC_DEFINE(HAVE_PNG_H)
|
||||
PNGINC="-I../png"
|
||||
PNG="png"
|
||||
IMAGELIBS="-lfltk_png $IMAGELIBS"
|
||||
STATICIMAGELIBS="\$libdir/libfltk_png.a $STATICIMAGELIBS"
|
||||
fi])
|
||||
AC_CHECK_LIB(png,png_get_valid, AC_DEFINE(HAVE_PNG_GET_VALID))
|
||||
AC_CHECK_LIB(png,png_set_tRNS_to_alpha, AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA))
|
||||
fi
|
||||
|
||||
AC_SUBST(JPEG)
|
||||
AC_SUBST(JPEGINC)
|
||||
|
|
Loading…
Reference in New Issue