diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-08-03 10:22:55 -0400 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-08-08 07:53:55 -0400 |
commit | 4fd038dba6f9b4d87c0e14fa5ff59abbcd46e794 (patch) | |
tree | b95fcb44e2f0b7203eb78457646308c2df61485e /m4 | |
parent | 430ae6eb6c4659f3bd907ceb84b7b7bcaf65071b (diff) | |
download | nx-libs-4fd038dba6f9b4d87c0e14fa5ff59abbcd46e794.tar.gz nx-libs-4fd038dba6f9b4d87c0e14fa5ff59abbcd46e794.tar.bz2 nx-libs-4fd038dba6f9b4d87c0e14fa5ff59abbcd46e794.zip |
nxcomp/configure.ac: Don't rely on pkg-config alone when it comes to testing for presence of libjpeg shared lib and header files.
Especially systems still using the IJG libjpeg implementation
are likely to lack the libjpeg.pc file.
.
So this adds some alternative way of detecting if all libjpeg related
build-dependencies are in place.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/nx-macros.m4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/m4/nx-macros.m4 b/m4/nx-macros.m4 index 816bf4003..06217f075 100644 --- a/m4/nx-macros.m4 +++ b/m4/nx-macros.m4 @@ -303,3 +303,21 @@ rm -f conftest*]) FreeBSD= test "$nxconf_cv_freebsd" = yes && FreeBSD=yes ]) # NX_BUILD_ON_FreeBSD + +AC_DEFUN([LIBJPEG_FALLBACK_CHECK],[ +AC_MSG_CHECKING([for libjpeg shared libary file and headers]) +AC_CHECK_LIB([jpeg], [jpeg_destroy_compress], + [have_jpeg_lib=yes], [have_jpeg_lib=no]) +AC_CHECK_HEADERS([jpeglib.h], + [have_jpeg_headers=yes], [have_jpeg_headers=no]) + +if test x"$have_jpeg_lib" = "xyes" && test x"$have_jpeg_headers" = "xyes"; then + AC_MSG_RESULT([yes]) + JPEG_CFLAGS="" + JPEG_LIBS="-ljpeg" +else + AC_MSG_RESULT([no]) + AC_MSG_FAILURE([Could not find libjpeg on your system, make sure +the JPEG shared library and header files are installed.]) +fi +]) # LIBJPEG_FALLBACK_CHECK |