diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-02-25 19:25:45 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-02-25 19:25:45 +0000 |
| commit | 5c2d98a5fcfdafe2e214a27a92876759cf0caea8 (patch) | |
| tree | ddc723acef7806509e75ff78293ef402732980ae /configure.ac | |
| parent | 0e60b49b52f4e0e488586040a67368b072b82d07 (diff) | |
CMake + configure: improve generation of fltk-config.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac index 616e31962..e5124c086 100644 --- a/configure.ac +++ b/configure.ac @@ -649,41 +649,6 @@ 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 -# 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" - AC_DEFINE(HAVE_LIBJPEG) -fi - # 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 @@ -767,6 +732,40 @@ else AC_CHECK_LIB(png,png_set_tRNS_to_alpha, AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA)) fi +# 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) + # 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" + AC_DEFINE(HAVE_LIBJPEG) +fi + AC_SUBST(JPEG) AC_SUBST(JPEGINC) AC_SUBST(PNG) |
