diff options
author | Christian Beier <dontmind@freeshell.org> | 2012-04-26 19:44:11 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2012-04-26 19:44:11 +0200 |
commit | cdf8a18c13ae3786068a5b3184d32014775a580a (patch) | |
tree | cd3569c7e16150bd205a614eb6b6c1938e265a1d /configure.ac | |
parent | a48ef69be3f01624e3cd3683269a361557e227c7 (diff) | |
download | libtdevnc-cdf8a18c13ae3786068a5b3184d32014775a580a.tar.gz libtdevnc-cdf8a18c13ae3786068a5b3184d32014775a580a.zip |
Fix build when no libjpeg is available.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 9906712..356984a 100644 --- a/configure.ac +++ b/configure.ac @@ -533,10 +533,11 @@ HAVE_LIBJPEG_TURBO="false" if test "x$with_jpeg" != "xno"; then AC_ARG_VAR(JPEG_LDFLAGS, [Linker flags to use when linking with libjpeg, e.g. -L/foo/dir/lib -Wl,-static -ljpeg -Wl,-shared. This overrides the linker flags set by --with-jpeg.]) + saved_CPPFLAGS="$CPPFLAGS" + saved_LDFLAGS="$LDFLAGS" + saved_LIBS="$LIBS" if test ! -z "$with_jpeg" -a "x$with_jpeg" != "xyes"; then # add user supplied directory to flags: - saved_CPPFLAGS="$CPPFLAGS" - saved_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS -I$with_jpeg/include" LDFLAGS="$LDFLAGS -L$with_jpeg/lib" if test "x$ld_minus_R" = "xno"; then @@ -562,15 +563,11 @@ if test "x$with_jpeg" != "xno"; then AC_DEFINE(HAVE_LIBJPEG, 1, libjpeg support enabled)], [AC_MSG_RESULT(no); HAVE_JPEGLIB_H=""]) fi - if test ! -z "$with_jpeg" -a "x$with_jpeg" != "xyes"; then - if test "x$HAVE_JPEGLIB_H" != "xtrue"; then + if test "x$HAVE_JPEGLIB_H" != "xtrue"; then # restore old flags on failure: CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" - fi - fi - if test "$build_x11vnc" = "yes"; then - if test "x$HAVE_JPEGLIB_H" != "xtrue"; then + LIBS="$saved_LIBS" AC_MSG_WARN([ ========================================================================== *** The libjpeg compression library was not found. *** @@ -585,7 +582,6 @@ A copy of libjpeg may be obtained from: http://ijg.org/files/ ]) sleep 5 fi - fi if test "x$HAVE_JPEGLIB_H" = "xtrue"; then AC_MSG_CHECKING(whether JPEG library is libjpeg-turbo) @@ -613,7 +609,7 @@ A copy of libjpeg may be obtained from: http://ijg.org/files/ fi fi - if test "x$HAVE_LIBJPEG_TURBO" != "xtrue"; then + if test "x$HAVE_JPEGLIB_H" = "xtrue" -a "x$HAVE_LIBJPEG_TURBO" != "xtrue"; then AC_MSG_WARN([ ========================================================================== *** The libjpeg library you are building against is not libjpeg-turbo. |