summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 1204b00450deb662ec8caa01ea1cd9f434a5eb39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
AC_PREREQ(2.57)
AC_INIT([xcb-util],0.1,[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])

AC_CHECK_PROGS(M4, m4)
AC_CHECK_PROGS(GPERF, gperf, [no])
if test $GPERF = "no"; then
	AC_MSG_ERROR([Can't find gperf, please install it and try again])
fi
AC_PROG_CC
AC_PROG_LIBTOOL

if  test "x$GCC" = xyes ; then
    CWARNFLAGS="-Wall"
else
    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
    if test "x$SUNCC" = "xyes"; then
	CWARNFLAGS="-v"
    fi
fi
AC_SUBST(CWARNFLAGS)

xcbincludedir='${includedir}/xcb'
AC_SUBST(xcbincludedir)

pkgconfigdir='${libdir}/pkgconfig'
AC_SUBST(pkgconfigdir)

PKG_CHECK_MODULES(XCB, xcb)
PKG_CHECK_MODULES(XCB_SHM, xcb-shm)
PKG_CHECK_MODULES(XCB_RENDER, xcb-render)

XCB_AUX_CFLAGS='-I$(top_srcdir)/convenient'
XCB_AUX_LIBS='$(top_builddir)/convenient/libXCBAux.la'
XCB_ATOM_CFLAGS='-I$(top_srcdir)/atom -I$(top_builddir)/atom'
XCB_ATOM_LIBS='$(top_builddir)/atom/libXCBAtom.la'
XCB_EVENT_CFLAGS='-I$(top_srcdir)/event'
XCB_EVENT_LIBS='$(top_builddir)/event/libXCBEvent.la'
XCB_PROPERTY_CFLAGS='-I$(top_srcdir)/property'
XCB_PROPERTY_LIBS='$(top_builddir)/property/libXCBProperty.la'
XCB_ICCCM_CFLAGS='-I$(top_srcdir)/icccm'
XCB_ICCCM_LIBS='$(top_builddir)/icccm/libXCBICCCM.la'
AC_SUBST(XCB_AUX_CFLAGS)
AC_SUBST(XCB_AUX_LIBS)
AC_SUBST(XCB_ATOM_CFLAGS)
AC_SUBST(XCB_ATOM_LIBS)
AC_SUBST(XCB_EVENT_CFLAGS)
AC_SUBST(XCB_EVENT_LIBS)
AC_SUBST(XCB_PROPERTY_CFLAGS)
AC_SUBST(XCB_PROPERTY_LIBS)
AC_SUBST(XCB_ICCCM_CFLAGS)
AC_SUBST(XCB_ICCCM_LIBS)

AC_OUTPUT([Makefile
	convenient/Makefile convenient/xcb-aux.pc
	reply/Makefile reply/xcb-reply.pc
	image/Makefile image/xcb-image.pc
	atom/Makefile atom/xcb-atom.pc
	event/Makefile event/xcb-event.pc
	keysyms/Makefile keysyms/xcb-keysyms.pc
	property/Makefile property/xcb-property.pc
	icccm/Makefile icccm/xcb-icccm.pc
	wm/Makefile wm/xcb-wm.pc
	renderutil/Makefile renderutil/xcb-renderutil.pc
	xcb_util_intro
	])