1 AC_INIT 2 AC_PROG_CC 3 AC_PATH_X 4 if test "x$no_x" != "xyes"; then 5 savecpp="$CPPFLAGS" 6 CPPFLAGS="$CPPFLAGS -I$x_includes" 7 AC_CHECK_HEADER($x_includes/X11/Xlib.h,,\ 8 [AC_MSG_ERROR(Could not find X installation.)]) 9 CPPFLAGS="$savecpp" 10 MDRIINC="-I$x_includes" 11 LIBS="-L$x_libraries $LIBS" 12 else 13 AC_MSG_ERROR(Could not find X installation. Aborting.) 14 fi 15 AC_ARG_WITH(libdrm, 16 AC_HELP_STRING([--with-libdrm=DIR], 17 [Installation prefix of libdrm [[default=/usr]]]), 18 [libdrmpref="$withval"], 19 [libdrmpref="/usr"]) 20 savecpp="$CPPFLAGS" 21 MDRIINC="-I$libdrmpref/include -I$libdrmpref/include/drm -I$x_includes" 22 CPPFLAGS="$CPPFLAGS $MDRIINC" 23 AC_CHECK_HEADER(xf86drm.h,,\ 24 [AC_MSG_ERROR(Could not find libdrm installation. Use --with-libdrm=<libdrm_installation_prefix>)]) 25 AC_CHECK_HEADER(drm.h,,\ 26 [AC_MSG_ERROR(Could not find libdrm installation. Use --with-libdrm=<libdrm_installation_prefix>)]) 27 CPPFLAGS="$savecpp" 28 LIBS="-L$libdrmpref/lib64 -L$libdrmpref/lib $LIBS" 29 AC_SUBST(MDRIINC) 30 AC_SYS_LARGEFILE 31 AM_INIT_AUTOMAKE(minidri,0.1.0) 32 AM_CONFIG_HEADER(config.h) 33 AC_OUTPUT([Makefile src/Makefile]) 34