diff --git a/configure.in b/configure.in index 4d85051..731462d 100644 --- a/configure.in +++ b/configure.in @@ -172,7 +172,11 @@ AC_PATH_XTRA if test "x$have_x" = "xdisabled"; then AC_MSG_WARN([Xlib support is disabled.]) + AM_CONDITIONAL(HAVE_X, false) + XMISS="-DX_DISPLAY_MISSING" else + AM_CONDITIONAL(HAVE_X, true) + XMISS="" if test "x$x_includes" = "x"; then x_includes="/usr/include" @@ -196,7 +200,8 @@ AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs", AC_MSG_ERROR([ERROR: XShape not found.]); exit, $x_libs) fi - +AC_SUBST(XMISS) +AC_SUBST(XDIR) AC_SUBST(X_OBJS) # This is necessary so that .o files in LIBOBJS are also built via diff --git a/demo/Makefile.am b/demo/Makefile.am index 9b07631..eecffac 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -11,7 +11,13 @@ INCLUDES = -I. -I$(top_srcdir) -I$(top_srcdir)/src \ -I/usr/X11R6/include $(X_CFLAGS) \ -I$(prefix)/include -I$(includedir) +if HAVE_X + bin_PROGRAMS = imlib2_view imconvert imconvert_SOURCES = imconvert.c imlib2_view_SOURCES = view.c LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la + +endif + +EXTRA_DIST = imconvert.c view.c diff --git a/src/Makefile.am b/src/Makefile.am index 06246ac..ecbbbd8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ INCLUDES = -I. -I$(top_srcdir) -I$(top_srcdir)/src \ -I$(top_builddir)/src \ -I$(top_srcdir)/loaders \ $(freetype_cflags) -I/usr/X11R6/include $(X_CFLAGS) \ - -I$(prefix)/include -I$(includedir) + -I$(prefix)/include -I$(includedir) @XMISS@ MMX_SRCS = asm_blend.S asm_rgba.S asm_scale.S asm_rotate.S \ asm_blend_cmod.S MMX_OBJS = $(MMX_SRCS:.S=.lo) diff --git a/test/Makefile.am b/test/Makefile.am index a63e471..edd8d22 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -11,6 +11,8 @@ INCLUDES = -I. -I$(top_srcdir) -I$(top_srcdir)/src \ -I/usr/X11R6/include $(X_CFLAGS) \ -I$(prefix)/include -I$(includedir) +if HAVE_X + bin_PROGRAMS = imlib2 bumpmaptest imlib2_test polytest color_spaces imlib2_SOURCES = main.c imlib2_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la @@ -26,3 +28,34 @@ polytest_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la color_spaces_SOURCES = color_spaces.c color_spaces_LDADD = @DLLDFLAGS@ $(top_builddir)/src/libImlib2.la + +endif + +EXTRA_DIST = \ +test_images/audio.png \ +test_images/bg.png \ +test_images/bulb.png \ +test_images/cal.png \ +test_images/calc.png \ +test_images/folder.png \ +test_images/globe.png \ +test_images/imlib2.png \ +test_images/lock.png \ +test_images/mail.png \ +test_images/menu.png \ +test_images/mush.png \ +test_images/paper.png \ +test_images/sh1.png \ +test_images/sh2.png \ +test_images/sh3.png \ +test_images/stop.png \ +test_images/tnt.png \ +ttfonts/cinema.ttf \ +ttfonts/grunge.ttf \ +ttfonts/morpheus.ttf \ +ttfonts/notepad.ttf \ +bmtest.c \ +color_spaces.c \ +imlib2_test.c \ +main.c \ +polytest.c