Skip to content

Commit

Permalink
STR #1962: I tried to fix the configuration scripts so that the image…
Browse files Browse the repository at this point in the history
… support libraries (fltk_jpeg fltk_png fltk_z) are linked in the same fashion as the fltk_image library. Please verify this fix.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Dec 29, 2008
1 parent a85a33a commit 7180c24
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.3.0

- Fixed static linking of image libraries (STR #1962)
- Fixed fl_set_spot() for Windows (STR #2101)
- Added sorting to Fl_Browser_ (STR #2113)
- Added utf8 support for OS X copy and paste
Expand Down
8 changes: 8 additions & 0 deletions configure.in
Expand Up @@ -531,8 +531,10 @@ AC_SUBST(AUDIOLIBS)
dnl Check for image libraries...
SAVELIBS="$LIBS"
IMAGELIBS=""
STATICIMAGELIBS=""

AC_SUBST(IMAGELIBS)
AC_SUBST(STATICIMAGELIBS)

# Handle the JPEG lib linking mode (use fltk local or system lib)
# If --enable-(resp. --disable-)localjpeg parameter is not set by user
Expand All @@ -554,6 +556,7 @@ 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
Expand All @@ -564,6 +567,7 @@ else
JPEGINC=""
JPEG=""
IMAGELIBS="-ljpeg $IMAGELIBS"
STATICIMAGELIBS="-ljpeg $STATICIMAGELIBS"
AC_DEFINE(HAVE_LIBJPEG)
fi

Expand All @@ -588,6 +592,7 @@ if test x$enable_localzlib = xyes -o x$syszlib_ok = xno ; then
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
Expand All @@ -599,6 +604,7 @@ else
ZLIB=""
LIBS="-lz $LIBS"
IMAGELIBS="-lz $IMAGELIBS"
STATICIMAGELIBS="-lz $STATICIMAGELIBS"
AC_DEFINE(HAVE_LIBZ)
fi

Expand Down Expand Up @@ -629,6 +635,7 @@ 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)
Expand All @@ -641,6 +648,7 @@ else
PNGINC=""
PNG=""
IMAGELIBS="-lpng $IMAGELIBS"
STATICIMAGELIBS="-lpng $STATICIMAGELIBS"
AC_DEFINE(HAVE_LIBPNG)
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))
Expand Down
3 changes: 2 additions & 1 deletion fltk-config.in
Expand Up @@ -95,6 +95,7 @@ LIBNAME="@LIBNAME@"
DSONAME="@DSONAME@"
DSOLINK="@DSOLINK@"
IMAGELIBS="@IMAGELIBS@"
STATICIMAGELIBS="@STATICIMAGELIBS@"
CAIROLIBS="@CAIROLIBS@"
SHAREDSUFFIX="@SHAREDSUFFIX@"

Expand Down Expand Up @@ -243,7 +244,7 @@ if test x$use_gl = xyes; then
fi
if test x$use_images = xyes; then
LDLIBS="-lfltk_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS"
LDSTATIC="$libdir/libfltk_images.a $IMAGELIBS $LDSTATIC"
LDSTATIC="$libdir/libfltk_images.a $STATICIMAGELIBS $LDSTATIC"
fi

if test x$use_cairo = xyes; then
Expand Down

0 comments on commit 7180c24

Please sign in to comment.