Ignore:
Timestamp:
Dec 31, 2003, 12:17:00 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: + Error out if Imlib2 was not found. Override with --disable-imlib2.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r285 r288  
    121121AM_CONDITIONAL(NEED_PIC, ${NEED_PIC})
    122122
    123 # Build cacaview?
     123# Use Imlib2?
     124ac_cv_my_have_imlib2="no"
     125AC_ARG_ENABLE(imlib2,
     126  [  --enable-imlib2         Imlib2 graphics support (default enabled)])
    124127save_CPPFLAGS="${CPPFLAGS}"
    125 AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
    126 if test "${IMLIB2_CONFIG}" != "no"; then
    127   CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
     128if test "${enable_imlib2}" != "no"; then
     129  AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
     130  if test "${IMLIB2_CONFIG}" != "no"; then
     131    CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
     132  fi
     133  AC_CHECK_HEADERS(Imlib2.h,
     134    ac_cv_my_have_imlib2="yes",
     135   [ac_cv_my_have_imlib2="no"
     136    AC_MSG_ERROR([[cannot find Imlib2 development files. Without Imlib2, cacaview will only open BMP files; if this is really what you want, re-run configure with '--disable-imlib2'.]])])
     137  CPPFLAGS="${save_CPPFLAGS}"
    128138fi
    129 AC_CHECK_HEADERS(Imlib2.h, USE_IMLIB2=:, USE_IMLIB2=false)
    130 CPPFLAGS="${save_CPPFLAGS}"
    131 AM_CONDITIONAL(USE_IMLIB2, ${USE_IMLIB2})
     139AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
    132140
    133141# Build documentation?
Note: See TracChangeset for help on using the changeset viewer.