From 760bdaf690d94c92e2bd73c302f6561c978b5020 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 27 Nov 2003 09:43:56 +0000 Subject: [PATCH] * configure.ac: + More sensible imlib2 detection, works with cross-compilation. * Makefile.am: + Don't forget to include NOTES to the dist tarball. --- Makefile.am | 2 +- configure.ac | 9 ++++++++- examples/Makefile.am | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3e69672..ec64a49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ SUBDIRS = src examples doc DIST_SUBDIRS = $(SUBDIRS) autotools debian -EXTRA_DIST = BUGS bootstrap caca-config.in +EXTRA_DIST = BUGS NOTES bootstrap caca-config.in AUTOMAKE_OPTIONS = dist-bzip2 bin_SCRIPTS = caca-config diff --git a/configure.ac b/configure.ac index da162fc..c8addf9 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,7 @@ AC_ARG_ENABLE(conio, [ --enable-conio DOS conio.h graphics support (default disabled)]) AC_CHECK_HEADERS(inttypes.h) +AC_CHECK_FUNCS(vsnprintf) USE_SLANG=false USE_NCURSES=false @@ -73,8 +74,14 @@ esac AM_CONDITIONAL(NEED_PIC, ${NEED_PIC}) # Build cacaview? +save_CPPFLAGS="${CPPFLAGS}" AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no) -AM_CONDITIONAL(IMLIB2_CONFIG, test "${IMLIB2_CONFIG}" != "no") +if test "${IMLIB2_CONFIG}" != "no"; then + CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1" +fi +AC_CHECK_HEADER(Imlib2.h, USE_IMLIB2=:, USE_IMLIB2=false) +CPPFLAGS="${save_CPPFLAGS}" +AM_CONDITIONAL(USE_IMLIB2, ${USE_IMLIB2}) # Build documentation? AC_PATH_PROG(DOXYGEN, doxygen, no) diff --git a/examples/Makefile.am b/examples/Makefile.am index 84d4454..077fbd5 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -23,7 +23,7 @@ caca_spritedit_SOURCES = spritedit.c caca_spritedit_LDADD = ../src/libcaca.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) -lm caca_spritedit_CPPFLAGS = -I$(top_srcdir)/src -if IMLIB2_CONFIG +if USE_IMLIB2 cacaview = cacaview cacaview_SOURCES = view.c cacaview_LDADD = ../src/libcaca.a $(LDFLAGS_slang) $(LDFLAGS_ncurses)