Explorar el Código

* Use pkg-config to check for Imlib2. Patch adapted from Alt Linux.

tags/v0.99.beta14
Sam Hocevar sam hace 18 años
padre
commit
67fa6ead18
Se han modificado 2 ficheros con 10 adiciones y 24 borrados
  1. +6
    -12
      configure.ac
  2. +4
    -12
      src/Makefile.am

+ 6
- 12
configure.ac Ver fichero

@@ -31,7 +31,7 @@ dnl PKG_PROG_PKG_CONFIG which needs to be called first.
AC_EGREP_CPP(yes, foo)
PKG_PROG_PKG_CONFIG()
m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then
if test "${build}" != "${host}" -a "${PKG_CONFIG_LIBDIR}" = ""; then
export PKG_CONFIG_LIBDIR=/dev/null
fi

@@ -222,6 +222,7 @@ if test -z "${CACA_DRIVERS}"; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([no output drivers were selected!])
else
CACA_DRIVERS="${CACA_DRIVERS# *}"
AC_MSG_RESULT([${CACA_DRIVERS}])
fi

@@ -251,20 +252,13 @@ AC_CHECK_HEADERS(sys/socket.h,
AM_CONDITIONAL(USE_NETWORK, test "${ac_cv_my_have_network}" = "yes")

# Use Imlib2?
ac_cv_my_have_imlib2="no"
save_CPPFLAGS="${CPPFLAGS}"
if test "${enable_imlib2}" != "no"; then
AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
if test "${IMLIB2_CONFIG}" != "no"; then
CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
IMLIB2="no"
PKG_CHECK_MODULES(imlib2, imlib2, [IMLIB2="yes"], [AC_MSG_RESULT(no)])
if test "${IMLIB2}" = no; then
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'.]])
fi
AC_CHECK_HEADERS(Imlib2.h,
ac_cv_my_have_imlib2="yes",
[ac_cv_my_have_imlib2="no"
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'.]])])
CPPFLAGS="${save_CPPFLAGS}"
fi
AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")

# Build development tools?
PANGOFT2="no"


+ 4
- 12
src/Makefile.am Ver fichero

@@ -16,8 +16,8 @@ cacafire_LDADD = ../caca/libcaca.la ../cucul/libcucul.la @CACA_LIBS@

cacaview_SOURCES = cacaview.c common-image.c common-image.h
cacaview_LDADD = ../caca/libcaca.la ../cucul/libcucul.la @CACA_LIBS@
cacaview_CFLAGS = $(img_cflags)
cacaview_LDFLAGS = $(img_ldflags)
cacaview_CFLAGS = @IMLIB2_CFLAGS@
cacaview_LDFLAGS = @IMLIB2_LIBS@

cacadraw_SOURCES = cacadraw.c
cacadraw_LDADD = ../caca/libcaca.la ../cucul/libcucul.la @CACA_LIBS@
@@ -30,16 +30,8 @@ cacaserver_LDADD = ../caca/libcaca.la ../cucul/libcucul.la @CACA_LIBS@

img2irc_SOURCES = img2irc.c common-image.c common-image.h
img2irc_LDADD = ../cucul/libcucul.la @CACA_LIBS@
img2irc_CFLAGS = $(img_cflags)
img2irc_LDFLAGS = $(img_ldflags)

if USE_IMLIB2
img_cflags = `imlib2-config --cflags`
img_ldflags = `imlib2-config --libs`
else
img_cflags =
img_ldflags =
endif
img2irc_CFLAGS = @IMLIB2_CFLAGS@
img2irc_LDFLAGS = @IMLIB2_LIBS@

if USE_NETWORK
fcntl_programs = cacaserver


Cargando…
Cancelar
Guardar