Skip to content

Commit

Permalink
fix nip2 build on win
Browse files Browse the repository at this point in the history
we have to statically link on win if we are using cfitsio ... make sure
-ljpeg gets into the link line, it doesn't have a .pc

https://github.com/jcupitt/libvips/issues/196
  • Loading branch information
jcupitt committed Nov 29, 2014
1 parent a651f4b commit dbc404e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 8 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,11 @@ AM_GLIB_GNU_GETTEXT
# build list of pkg-config packages we used here
PACKAGES_USED=""

# build list of extra libs we need here
# the main one is jpeg: it does not have a .pc file, so when we make vips.pc
# we need to put -ljpeg into libs ourselves
EXTRA_LIBS_USED=""

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
Expand Down Expand Up @@ -708,7 +713,8 @@ if test x"$with_png" != "xno"; then
fi

FIND_JPEG(
[with_jpeg=yes],
[with_jpeg=yes
EXTRA_LIBS_USED="$EXTRA_LIBS_USED -ljpeg"],
[AC_MSG_WARN([libjpeg not found; disabling JPEG support])
with_jpeg=no
])
Expand Down Expand Up @@ -790,6 +796,7 @@ AC_SUBST(VIPS_INCLUDES)
AC_SUBST(VIPS_LIBS)
AC_SUBST(VIPS_CXX_LIBS)
AC_SUBST(PACKAGES_USED)
AC_SUBST(EXTRA_LIBS_USED)

# needed by test/variables.sh.in
# :( what's a better way to do this, argh
Expand Down
4 changes: 1 addition & 3 deletions vips.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ Name: vips
Description: Image processing library
Version: @VERSION@
Requires: @PACKAGES_USED@
Libs: -L${libdir} -lvips
# necessary for static linking with mingw
Libs.private: @VIPS_LIBS@ @VIPS_CXX_LIBS@
Libs: -L${libdir} -lvips @EXTRA_LIBS_USED@
Cflags: -I${includedir}

0 comments on commit dbc404e

Please sign in to comment.