1ecce36beSmrgdnl AC_TYPE_SSIZE_T is defined from 2.59c 2ecce36beSmrgAC_PREREQ(2.59c) 3ecce36beSmrgAC_INIT([xcb-util],0.3.6,[xcb@lists.freedesktop.org]) 4ecce36beSmrgAC_CONFIG_SRCDIR([Makefile.am]) 5ecce36beSmrgAM_INIT_AUTOMAKE([foreign dist-bzip2]) 6ecce36beSmrg 7ecce36beSmrgAC_CHECK_PROGS(M4, [m4 gm4], [no]) 8ecce36beSmrgif test $M4 != "no" ; then 9ecce36beSmrg AC_MSG_CHECKING([if $M4 supports -I]) 10ecce36beSmrg if $M4 -I. /dev/null > /dev/null 2>&1 ; then 11ecce36beSmrg AC_MSG_RESULT([yes]) 12ecce36beSmrg else 13ecce36beSmrg AC_MSG_RESULT([no]) 14ecce36beSmrg # Try finding the gnu version 15ecce36beSmrg AC_CHECK_PROGS(GM4, gm4, [no]) 16ecce36beSmrg if test $GM4 = "no" ; then 17ecce36beSmrg AC_PATH_PROGS(GNUM4, m4, [no], [/usr/gnu/bin]) 18ecce36beSmrg M4="$GNUM4" 19ecce36beSmrg else 20ecce36beSmrg M4="$GM4" 21ecce36beSmrg fi 22ecce36beSmrg fi 23ecce36beSmrgfi 24ecce36beSmrgif test $M4 = "no"; then 25ecce36beSmrg AC_MSG_ERROR([Can't find usable m4, please install it and try again]) 26ecce36beSmrgfi 27ecce36beSmrgAC_CHECK_PROGS(GPERF, gperf, [no]) 28ecce36beSmrgif test $GPERF = "no"; then 29ecce36beSmrg AC_MSG_ERROR([Can't find gperf, please install it and try again]) 30ecce36beSmrgfi 31ecce36beSmrgAC_PROG_CC 32ecce36beSmrgAC_PROG_LIBTOOL 33ecce36beSmrg 34ecce36beSmrgif test "x$GCC" = xyes ; then 35ecce36beSmrg CWARNFLAGS="-Wall" 36ecce36beSmrgelse 37ecce36beSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 38ecce36beSmrg if test "x$SUNCC" = "xyes"; then 39ecce36beSmrg CWARNFLAGS="-v" 40ecce36beSmrg fi 41ecce36beSmrgfi 42ecce36beSmrgAC_SUBST(CWARNFLAGS) 43ecce36beSmrgAC_CHECK_FUNCS_ONCE(vasprintf) 44ecce36beSmrg 45ecce36beSmrgdnl Checking whether ssize_t is defined (xcb-util-common.h) 46ecce36beSmrgAC_TYPE_SSIZE_T 47ecce36beSmrg 48ecce36beSmrgxcbincludedir='${includedir}/xcb' 49ecce36beSmrgAC_SUBST(xcbincludedir) 50ecce36beSmrg 51ecce36beSmrgpkgconfigdir='${libdir}/pkgconfig' 52ecce36beSmrgAC_SUBST(pkgconfigdir) 53ecce36beSmrg 54ecce36beSmrgPKG_CHECK_MODULES(XCB, xcb >= 1.4) 55ecce36beSmrg 56ecce36beSmrg###### 57ecce36beSmrg# Check version of xcb-proto that xcb was compiled against 58ecce36beSmrg###### 59ecce36beSmrgxcbproto_required=1.5 60ecce36beSmrg 61ecce36beSmrg# Moved from AX_COMPARE_VERSION to maintain proper output 62ecce36beSmrgAC_PROG_AWK 63ecce36beSmrg 64ecce36beSmrgAC_MSG_CHECKING([whether libxcb was compiled against xcb-proto >= $xcbproto_required]) 65ecce36beSmrgxcbproto_version=`$PKG_CONFIG --variable=xcbproto_version xcb` 66ecce36beSmrgAX_COMPARE_VERSION([$xcbproto_version],[ge],[$xcbproto_required], xcbproto_ok="yes", xcbproto_ok="no") 67ecce36beSmrgAC_MSG_RESULT([$xcbproto_ok]) 68ecce36beSmrg 69ecce36beSmrgif test $xcbproto_ok = no; then 70ecce36beSmrg AC_MSG_ERROR([libxcb was compiled against xcb-proto $xcbproto_version; it needs to be compiled against version $xcbproto_required or higher]) 71ecce36beSmrgfi 72ecce36beSmrg 73ecce36beSmrg 74ecce36beSmrgPKG_CHECK_MODULES(XCB_SHM, xcb-shm) 75ecce36beSmrgPKG_CHECK_MODULES(XCB_RENDER, xcb-render) 76ecce36beSmrgPKG_CHECK_MODULES(XPROTO, xproto >= 7.0.8) 77ecce36beSmrg 78ecce36beSmrgXCB_AUX_CFLAGS='-I$(top_srcdir)/aux' 79ecce36beSmrgXCB_AUX_LIBS='$(top_builddir)/aux/libxcb-aux.la' 80ecce36beSmrgXCB_ATOM_CFLAGS='-I$(top_srcdir)/atom -I$(top_builddir)/atom' 81ecce36beSmrgXCB_ATOM_LIBS='$(top_builddir)/atom/libxcb-atom.la' 82ecce36beSmrgXCB_EVENT_CFLAGS='-I$(top_srcdir)/event' 83ecce36beSmrgXCB_EVENT_LIBS='$(top_builddir)/event/libxcb-event.la' 84ecce36beSmrgXCB_PROPERTY_CFLAGS='-I$(top_srcdir)/property' 85ecce36beSmrgXCB_PROPERTY_LIBS='$(top_builddir)/property/libxcb-property.la' 86ecce36beSmrgXCB_ICCCM_CFLAGS='-I$(top_srcdir)/icccm' 87ecce36beSmrgXCB_ICCCM_LIBS='$(top_builddir)/icccm/libxcb-icccm.la' 88ecce36beSmrgAC_SUBST(XCB_AUX_CFLAGS) 89ecce36beSmrgAC_SUBST(XCB_AUX_LIBS) 90ecce36beSmrgAC_SUBST(XCB_ATOM_CFLAGS) 91ecce36beSmrgAC_SUBST(XCB_ATOM_LIBS) 92ecce36beSmrgAC_SUBST(XCB_EVENT_CFLAGS) 93ecce36beSmrgAC_SUBST(XCB_EVENT_LIBS) 94ecce36beSmrgAC_SUBST(XCB_PROPERTY_CFLAGS) 95ecce36beSmrgAC_SUBST(XCB_PROPERTY_LIBS) 96ecce36beSmrgAC_SUBST(XCB_ICCCM_CFLAGS) 97ecce36beSmrgAC_SUBST(XCB_ICCCM_LIBS) 98ecce36beSmrg 99ecce36beSmrgAC_OUTPUT([Makefile 100ecce36beSmrg aux/Makefile aux/xcb-aux.pc 101ecce36beSmrg reply/Makefile reply/xcb-reply.pc 102ecce36beSmrg image/Makefile image/xcb-image.pc 103ecce36beSmrg atom/Makefile atom/xcb-atom.pc 104ecce36beSmrg event/Makefile event/xcb-event.pc 105ecce36beSmrg keysyms/Makefile keysyms/xcb-keysyms.pc 106ecce36beSmrg property/Makefile property/xcb-property.pc 107ecce36beSmrg icccm/Makefile icccm/xcb-icccm.pc 108ecce36beSmrg renderutil/Makefile renderutil/xcb-renderutil.pc 109ecce36beSmrg xcb_util_intro 110ecce36beSmrg ]) 111