1*7688df22SAndroid Build Coastguard WorkerAC_INIT 2*7688df22SAndroid Build Coastguard WorkerAC_PROG_CC 3*7688df22SAndroid Build Coastguard WorkerAC_PATH_X 4*7688df22SAndroid Build Coastguard Workerif test "x$no_x" != "xyes"; then 5*7688df22SAndroid Build Coastguard Worker savecpp="$CPPFLAGS" 6*7688df22SAndroid Build Coastguard Worker CPPFLAGS="$CPPFLAGS -I$x_includes" 7*7688df22SAndroid Build Coastguard Worker AC_CHECK_HEADER($x_includes/X11/Xlib.h,,\ 8*7688df22SAndroid Build Coastguard Worker [AC_MSG_ERROR(Could not find X installation.)]) 9*7688df22SAndroid Build Coastguard Worker CPPFLAGS="$savecpp" 10*7688df22SAndroid Build Coastguard Worker MDRIINC="-I$x_includes" 11*7688df22SAndroid Build Coastguard Worker LIBS="-L$x_libraries $LIBS" 12*7688df22SAndroid Build Coastguard Workerelse 13*7688df22SAndroid Build Coastguard Worker AC_MSG_ERROR(Could not find X installation. Aborting.) 14*7688df22SAndroid Build Coastguard Workerfi 15*7688df22SAndroid Build Coastguard WorkerAC_ARG_WITH(libdrm, 16*7688df22SAndroid Build Coastguard Worker AC_HELP_STRING([--with-libdrm=DIR], 17*7688df22SAndroid Build Coastguard Worker [Installation prefix of libdrm [[default=/usr]]]), 18*7688df22SAndroid Build Coastguard Worker [libdrmpref="$withval"], 19*7688df22SAndroid Build Coastguard Worker [libdrmpref="/usr"]) 20*7688df22SAndroid Build Coastguard Workersavecpp="$CPPFLAGS" 21*7688df22SAndroid Build Coastguard WorkerMDRIINC="-I$libdrmpref/include -I$libdrmpref/include/drm -I$x_includes" 22*7688df22SAndroid Build Coastguard WorkerCPPFLAGS="$CPPFLAGS $MDRIINC" 23*7688df22SAndroid Build Coastguard WorkerAC_CHECK_HEADER(xf86drm.h,,\ 24*7688df22SAndroid Build Coastguard Worker [AC_MSG_ERROR(Could not find libdrm installation. Use --with-libdrm=<libdrm_installation_prefix>)]) 25*7688df22SAndroid Build Coastguard WorkerAC_CHECK_HEADER(drm.h,,\ 26*7688df22SAndroid Build Coastguard Worker [AC_MSG_ERROR(Could not find libdrm installation. Use --with-libdrm=<libdrm_installation_prefix>)]) 27*7688df22SAndroid Build Coastguard WorkerCPPFLAGS="$savecpp" 28*7688df22SAndroid Build Coastguard WorkerLIBS="-L$libdrmpref/lib64 -L$libdrmpref/lib $LIBS" 29*7688df22SAndroid Build Coastguard WorkerAC_SUBST(MDRIINC) 30*7688df22SAndroid Build Coastguard WorkerAC_SYS_LARGEFILE 31*7688df22SAndroid Build Coastguard WorkerAM_INIT_AUTOMAKE(minidri,0.1.0) 32*7688df22SAndroid Build Coastguard WorkerAM_CONFIG_HEADER(config.h) 33*7688df22SAndroid Build Coastguard WorkerAC_OUTPUT([Makefile src/Makefile]) 34