Clone of mesa.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

configure.ac 72KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237
  1. dnl Process this file with autoconf to create configure.
  2. AC_PREREQ([2.60])
  3. dnl Tell the user about autoconf.html in the --help output
  4. m4_divert_once([HELP_END], [
  5. See docs/autoconf.html for more details on the options for Mesa.])
  6. AC_INIT([Mesa], [9.2.0-devel],
  7. [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
  8. AC_CONFIG_AUX_DIR([bin])
  9. AC_CONFIG_MACRO_DIR([m4])
  10. AC_CANONICAL_SYSTEM
  11. AM_INIT_AUTOMAKE([foreign])
  12. dnl http://people.gnome.org/~walters/docs/build-api.txt
  13. dnl We don't support srcdir != builddir.
  14. echo \#buildapi-variable-no-builddir >/dev/null
  15. # Support silent build rules, requires at least automake-1.11. Disable
  16. # by either passing --disable-silent-rules to configure or passing V=1
  17. # to make
  18. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
  19. [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
  20. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  21. dnl Set internal versions
  22. OSMESA_VERSION=8
  23. AC_SUBST([OSMESA_VERSION])
  24. dnl Versions for external dependencies
  25. LIBDRM_REQUIRED=2.4.24
  26. LIBDRM_RADEON_REQUIRED=2.4.45
  27. LIBDRM_INTEL_REQUIRED=2.4.38
  28. LIBDRM_NVVIEUX_REQUIRED=2.4.33
  29. LIBDRM_NOUVEAU_REQUIRED="2.4.33 libdrm >= 2.4.41"
  30. LIBDRM_FREEDRENO_REQUIRED=2.4.39
  31. DRI2PROTO_REQUIRED=2.6
  32. GLPROTO_REQUIRED=1.4.14
  33. LIBDRM_XORG_REQUIRED=2.4.24
  34. LIBKMS_XORG_REQUIRED=1.0.0
  35. dnl Check for progs
  36. AC_PROG_CPP
  37. AC_PROG_CC
  38. AX_PROG_CC_FOR_BUILD
  39. AC_PROG_CXX
  40. AX_PROG_CXX_FOR_BUILD
  41. AM_PROG_CC_C_O
  42. AM_PROG_AS
  43. AC_CHECK_PROGS([MAKE], [gmake make])
  44. AC_CHECK_PROGS([PYTHON2], [python2 python])
  45. AX_PYTHON_MODULE([libxml2], [needed])
  46. AC_PROG_SED
  47. AC_PROG_MKDIR_P
  48. LT_PREREQ([2.2])
  49. LT_INIT([disable-static])
  50. AX_PROG_BISON([],
  51. AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.c"],
  52. [AC_MSG_ERROR([bison not found - unable to compile glcpp-parse.y])]))
  53. AX_PROG_FLEX([],
  54. AS_IF([test ! -f "$srcdir/src/glsl/glcpp/glcpp-lex.c"],
  55. [AC_MSG_ERROR([flex not found - unable to compile glcpp-lex.l])]))
  56. AC_PATH_PROG([PERL], [perl])
  57. AC_CHECK_PROG(INDENT, indent, indent, cat)
  58. if test "x$INDENT" != "xcat"; then
  59. AC_SUBST(INDENT_FLAGS, '-i4 -nut -br -brs -npcs -ce -TGLubyte -TGLbyte -TBool')
  60. fi
  61. AC_PROG_INSTALL
  62. dnl We need a POSIX shell for parts of the build. Assume we have one
  63. dnl in most cases.
  64. case "$host_os" in
  65. solaris*)
  66. # Solaris /bin/sh is too old/non-POSIX compliant
  67. AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh])
  68. SHELL="$POSIX_SHELL"
  69. ;;
  70. esac
  71. dnl clang is mostly GCC-compatible, but its version is much lower,
  72. dnl so we have to check for it.
  73. AC_MSG_CHECKING([if compiling with clang])
  74. AC_COMPILE_IFELSE(
  75. [AC_LANG_PROGRAM([], [[
  76. #ifndef __clang__
  77. not clang
  78. #endif
  79. ]])],
  80. [acv_mesa_CLANG=yes], [acv_mesa_CLANG=no])
  81. AC_MSG_RESULT([$acv_mesa_CLANG])
  82. dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
  83. dnl versions are explictly not supported.
  84. if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
  85. AC_MSG_CHECKING([whether gcc version is sufficient])
  86. major=0
  87. minor=0
  88. GCC_VERSION=`$CC -dumpversion`
  89. if test $? -eq 0; then
  90. GCC_VERSION_MAJOR=`echo $GCC_VERSION | cut -d. -f1`
  91. GCC_VERSION_MINOR=`echo $GCC_VERSION | cut -d. -f2`
  92. fi
  93. if test $GCC_VERSION_MAJOR -lt 3 -o $GCC_VERSION_MAJOR -eq 3 -a $GCC_VERSION_MINOR -lt 3 ; then
  94. AC_MSG_RESULT([no])
  95. AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.])
  96. else
  97. AC_MSG_RESULT([yes])
  98. fi
  99. fi
  100. dnl Make sure the pkg-config macros are defined
  101. m4_ifndef([PKG_PROG_PKG_CONFIG],
  102. [m4_fatal([Could not locate the pkg-config autoconf macros.
  103. These are usually located in /usr/share/aclocal/pkg.m4. If your macros
  104. are in a different location, try setting the environment variable
  105. ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])])
  106. PKG_PROG_PKG_CONFIG()
  107. dnl LIB_DIR - library basename
  108. LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
  109. AC_SUBST([LIB_DIR])
  110. dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later
  111. _SAVE_LDFLAGS="$LDFLAGS"
  112. _SAVE_CPPFLAGS="$CPPFLAGS"
  113. dnl build host compiler macros
  114. DEFINES_FOR_BUILD=""
  115. AC_SUBST([DEFINES_FOR_BUILD])
  116. case "$build_os" in
  117. linux*|*-gnu*|gnu*)
  118. DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -D_GNU_SOURCE"
  119. ;;
  120. solaris*)
  121. DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DSVR4"
  122. ;;
  123. cygwin*)
  124. DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD"
  125. ;;
  126. esac
  127. dnl Compiler macros
  128. DEFINES=""
  129. AC_SUBST([DEFINES])
  130. case "$host_os" in
  131. linux*|*-gnu*|gnu*)
  132. DEFINES="$DEFINES -D_GNU_SOURCE -DHAVE_PTHREAD"
  133. ;;
  134. solaris*)
  135. DEFINES="$DEFINES -DHAVE_PTHREAD -DSVR4"
  136. ;;
  137. cygwin*)
  138. DEFINES="$DEFINES -DHAVE_PTHREAD"
  139. ;;
  140. esac
  141. dnl Add flags for gcc and g++
  142. if test "x$GCC" = xyes; then
  143. case "$host_os" in
  144. cygwin*)
  145. CFLAGS="$CFLAGS -Wall -std=gnu99"
  146. ;;
  147. *)
  148. CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -Wall -std=c99"
  149. CFLAGS="$CFLAGS -Wall -std=c99"
  150. ;;
  151. esac
  152. # Enable -Werror=implicit-function-declaration and
  153. # -Werror=missing-prototypes, if available, or otherwise, just
  154. # -Wmissing-prototypes. This is particularly useful to avoid
  155. # generating a loadable driver module that has undefined symbols.
  156. save_CFLAGS="$CFLAGS"
  157. AC_MSG_CHECKING([whether $CC supports -Werror=missing-prototypes])
  158. CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
  159. CFLAGS="$CFLAGS -Werror=missing-prototypes"
  160. AC_LINK_IFELSE([AC_LANG_PROGRAM()],
  161. AC_MSG_RESULT([yes]),
  162. [CFLAGS="$save_CFLAGS -Wmissing-prototypes";
  163. AC_MSG_RESULT([no])]);
  164. # Enable -fvisibility=hidden if using a gcc that supports it
  165. save_CFLAGS="$CFLAGS"
  166. AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden])
  167. VISIBILITY_CFLAGS="-fvisibility=hidden"
  168. CFLAGS="$CFLAGS $VISIBILITY_CFLAGS"
  169. AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
  170. [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]);
  171. # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed.
  172. CFLAGS=$save_CFLAGS
  173. # Work around aliasing bugs - developers should comment this out
  174. CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-strict-aliasing"
  175. CFLAGS="$CFLAGS -fno-strict-aliasing"
  176. # gcc's builtin memcmp is slower than glibc's
  177. # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
  178. CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -fno-builtin-memcmp"
  179. CFLAGS="$CFLAGS -fno-builtin-memcmp"
  180. fi
  181. if test "x$GXX" = xyes; then
  182. CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -Wall"
  183. CXXFLAGS="$CXXFLAGS -Wall"
  184. # Enable -fvisibility=hidden if using a gcc that supports it
  185. save_CXXFLAGS="$CXXFLAGS"
  186. AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
  187. VISIBILITY_CXXFLAGS="-fvisibility=hidden"
  188. CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS"
  189. AC_LANG_PUSH([C++])
  190. AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
  191. [VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]);
  192. AC_LANG_POP([C++])
  193. # Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
  194. CXXFLAGS=$save_CXXFLAGS
  195. # Work around aliasing bugs - developers should comment this out
  196. CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-strict-aliasing"
  197. CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
  198. # gcc's builtin memcmp is slower than glibc's
  199. # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
  200. CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -fno-builtin-memcmp"
  201. CXXFLAGS="$CXXFLAGS -fno-builtin-memcmp"
  202. fi
  203. dnl even if the compiler appears to support it, using visibility attributes isn't
  204. dnl going to do anything useful currently on cygwin apart from emit lots of warnings
  205. case "$host_os" in
  206. cygwin*)
  207. VISIBILITY_CFLAGS=""
  208. VISIBILITY_CXXFLAGS=""
  209. ;;
  210. esac
  211. AC_SUBST([VISIBILITY_CFLAGS])
  212. AC_SUBST([VISIBILITY_CXXFLAGS])
  213. dnl
  214. dnl Hacks to enable 32 or 64 bit build
  215. dnl
  216. AC_ARG_ENABLE([32-bit],
  217. [AS_HELP_STRING([--enable-32-bit],
  218. [build 32-bit libraries @<:@default=auto@:>@])],
  219. [enable_32bit="$enableval"],
  220. [enable_32bit=auto]
  221. )
  222. if test "x$enable_32bit" = xyes; then
  223. if test "x$GCC" = xyes; then
  224. CFLAGS="$CFLAGS -m32"
  225. CCASFLAGS="$CCASFLAGS -m32"
  226. fi
  227. if test "x$GXX" = xyes; then
  228. CXXFLAGS="$CXXFLAGS -m32"
  229. fi
  230. fi
  231. AC_ARG_ENABLE([64-bit],
  232. [AS_HELP_STRING([--enable-64-bit],
  233. [build 64-bit libraries @<:@default=auto@:>@])],
  234. [enable_64bit="$enableval"],
  235. [enable_64bit=auto]
  236. )
  237. if test "x$enable_64bit" = xyes; then
  238. if test "x$GCC" = xyes; then
  239. CFLAGS="$CFLAGS -m64"
  240. fi
  241. if test "x$GXX" = xyes; then
  242. CXXFLAGS="$CXXFLAGS -m64"
  243. fi
  244. fi
  245. dnl Can't have static and shared libraries, default to static if user
  246. dnl explicitly requested. If both disabled, set to static since shared
  247. dnl was explicitly requested.
  248. case "x$enable_static$enable_shared" in
  249. xyesyes )
  250. AC_MSG_WARN([Cannot build static and shared libraries, disabling shared])
  251. enable_shared=no
  252. ;;
  253. xnono )
  254. AC_MSG_WARN([Cannot disable both static and shared libraries, enabling static])
  255. enable_static=yes
  256. ;;
  257. esac
  258. AM_CONDITIONAL(BUILD_SHARED, test "x$enable_shared" = xyes)
  259. dnl
  260. dnl other compiler options
  261. dnl
  262. AC_ARG_ENABLE([debug],
  263. [AS_HELP_STRING([--enable-debug],
  264. [use debug compiler flags and macros @<:@default=disabled@:>@])],
  265. [enable_debug="$enableval"],
  266. [enable_debug=no]
  267. )
  268. if test "x$enable_debug" = xyes; then
  269. DEFINES_FOR_BUILD="$DEFINES_FOR_BUILD -DDEBUG"
  270. if test "x$GCC_FOR_BUILD" = xyes; then
  271. CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD -g -O0"
  272. fi
  273. if test "x$GXX_FOR_BUILD" = xyes; then
  274. CXXFLAGS_FOR_BUILD="$CXXFLAGS_FOR_BUILD -g -O0"
  275. fi
  276. DEFINES="$DEFINES -DDEBUG"
  277. if test "x$GCC" = xyes; then
  278. CFLAGS="$CFLAGS -g -O0"
  279. fi
  280. if test "x$GXX" = xyes; then
  281. CXXFLAGS="$CXXFLAGS -g -O0"
  282. fi
  283. fi
  284. dnl
  285. dnl library names
  286. dnl
  287. LIB_PREFIX_GLOB='lib'
  288. LIB_VERSION_SEPARATOR='.'
  289. if test "$enable_static" = yes; then
  290. LIB_EXTENSION='a'
  291. else
  292. case "$host_os" in
  293. darwin* )
  294. LIB_EXTENSION='dylib' ;;
  295. cygwin* )
  296. dnl prefix can be 'cyg' or 'lib'
  297. LIB_PREFIX_GLOB='???'
  298. LIB_VERSION_SEPARATOR='-'
  299. LIB_EXTENSION='dll' ;;
  300. aix* )
  301. LIB_EXTENSION='a' ;;
  302. * )
  303. LIB_EXTENSION='so' ;;
  304. esac
  305. fi
  306. AC_ARG_WITH([gl-lib-name],
  307. [AS_HELP_STRING([--with-gl-lib-name@<:@=NAME@:>@],
  308. [specify GL library name @<:@default=GL@:>@])],
  309. [GL_LIB=$withval],
  310. [GL_LIB=GL])
  311. AC_ARG_WITH([osmesa-lib-name],
  312. [AS_HELP_STRING([--with-osmesa-lib-name@<:@=NAME@:>@],
  313. [specify OSMesa library name @<:@default=OSMesa@:>@])],
  314. [OSMESA_LIB=$withval],
  315. [OSMESA_LIB=OSMesa])
  316. AS_IF([test "x$GL_LIB" = xyes], [GL_LIB=GL])
  317. AS_IF([test "x$OSMESA_LIB" = xyes], [OSMESA_LIB=OSMesa])
  318. dnl
  319. dnl Mangled Mesa support
  320. dnl
  321. AC_ARG_ENABLE([mangling],
  322. [AS_HELP_STRING([--enable-mangling],
  323. [enable mangled symbols and library name @<:@default=disabled@:>@])],
  324. [enable_mangling="${enableval}"],
  325. [enable_mangling=no]
  326. )
  327. if test "x${enable_mangling}" = "xyes" ; then
  328. DEFINES="${DEFINES} -DUSE_MGL_NAMESPACE"
  329. GL_LIB="Mangled${GL_LIB}"
  330. OSMESA_LIB="Mangled${OSMESA_LIB}"
  331. fi
  332. AC_SUBST([GL_LIB])
  333. AC_SUBST([OSMESA_LIB])
  334. dnl
  335. dnl potentially-infringing-but-nobody-knows-for-sure stuff
  336. dnl
  337. AC_ARG_ENABLE([texture-float],
  338. [AS_HELP_STRING([--enable-texture-float],
  339. [enable floating-point textures and renderbuffers @<:@default=disabled@:>@])],
  340. [enable_texture_float="$enableval"],
  341. [enable_texture_float=no]
  342. )
  343. if test "x$enable_texture_float" = xyes; then
  344. AC_MSG_WARN([Floating-point textures enabled.])
  345. AC_MSG_WARN([Please consult docs/patents.txt with your lawyer before building Mesa.])
  346. DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED"
  347. fi
  348. GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION}
  349. OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
  350. EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
  351. GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION}
  352. GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION}
  353. VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION}
  354. GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION}
  355. GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  356. EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  357. EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  358. GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  359. GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  360. VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  361. GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
  362. AC_SUBST([GL_LIB_NAME])
  363. AC_SUBST([OSMESA_LIB_NAME])
  364. AC_SUBST([EGL_LIB_NAME])
  365. AC_SUBST([GLESv1_CM_LIB_NAME])
  366. AC_SUBST([GLESv2_LIB_NAME])
  367. AC_SUBST([VG_LIB_NAME])
  368. AC_SUBST([GLAPI_LIB_NAME])
  369. AC_SUBST([GL_LIB_GLOB])
  370. AC_SUBST([EGL_LIB_GLOB])
  371. AC_SUBST([GLESv1_CM_LIB_GLOB])
  372. AC_SUBST([GLESv2_LIB_GLOB])
  373. AC_SUBST([VG_LIB_GLOB])
  374. AC_SUBST([GLAPI_LIB_GLOB])
  375. dnl
  376. dnl Arch/platform-specific settings
  377. dnl
  378. AC_ARG_ENABLE([asm],
  379. [AS_HELP_STRING([--disable-asm],
  380. [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
  381. [enable_asm="$enableval"],
  382. [enable_asm=yes]
  383. )
  384. asm_arch=""
  385. AC_MSG_CHECKING([whether to enable assembly])
  386. test "x$enable_asm" = xno && AC_MSG_RESULT([no])
  387. # disable if cross compiling on x86/x86_64 since we must run gen_matypes
  388. if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
  389. case "$host_cpu" in
  390. i?86 | x86_64)
  391. enable_asm=no
  392. AC_MSG_RESULT([no, cross compiling])
  393. ;;
  394. esac
  395. fi
  396. # check for supported arches
  397. if test "x$enable_asm" = xyes; then
  398. case "$host_cpu" in
  399. i?86)
  400. case "$host_os" in
  401. linux* | *freebsd* | dragonfly* | *netbsd*)
  402. test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
  403. ;;
  404. gnu*)
  405. asm_arch=x86
  406. ;;
  407. esac
  408. ;;
  409. x86_64)
  410. case "$host_os" in
  411. linux* | *freebsd* | dragonfly* | *netbsd*)
  412. test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
  413. ;;
  414. esac
  415. ;;
  416. sparc*)
  417. case "$host_os" in
  418. linux*)
  419. asm_arch=sparc
  420. ;;
  421. esac
  422. ;;
  423. esac
  424. case "$asm_arch" in
  425. x86)
  426. DEFINES="$DEFINES -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
  427. AC_MSG_RESULT([yes, x86])
  428. ;;
  429. x86_64)
  430. DEFINES="$DEFINES -DUSE_X86_64_ASM"
  431. AC_MSG_RESULT([yes, x86_64])
  432. ;;
  433. sparc)
  434. DEFINES="$DEFINES -DUSE_SPARC_ASM"
  435. AC_MSG_RESULT([yes, sparc])
  436. ;;
  437. *)
  438. AC_MSG_RESULT([no, platform not supported])
  439. ;;
  440. esac
  441. fi
  442. dnl Check to see if dlopen is in default libraries (like Solaris, which
  443. dnl has it in libc), or if libdl is needed to get it.
  444. AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
  445. [AC_CHECK_LIB([dl], [dlopen],
  446. [DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
  447. AC_SUBST([DLOPEN_LIBS])
  448. case "$host_os" in
  449. darwin*|mingw*)
  450. ;;
  451. *)
  452. AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
  453. [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
  454. [AC_MSG_ERROR([Couldn't find clock_gettime])])])
  455. AC_SUBST([CLOCK_LIB])
  456. ;;
  457. esac
  458. dnl See if posix_memalign is available
  459. AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
  460. dnl Check for pthreads
  461. AX_PTHREAD
  462. dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS
  463. dnl to -pthread, which causes problems if we need -lpthread to appear in
  464. dnl pkgconfig files.
  465. test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread"
  466. dnl SELinux awareness.
  467. AC_ARG_ENABLE([selinux],
  468. [AS_HELP_STRING([--enable-selinux],
  469. [Build SELinux-aware Mesa @<:@default=disabled@:>@])],
  470. [MESA_SELINUX="$enableval"],
  471. [MESA_SELINUX=no])
  472. if test "x$enable_selinux" = "xyes"; then
  473. AC_CHECK_HEADER([selinux/selinux.h],[],
  474. [AC_MSG_ERROR([SELinux headers not found])])
  475. AC_CHECK_LIB([selinux],[is_selinux_enabled],[],
  476. [AC_MSG_ERROR([SELinux library not found])])
  477. SELINUX_LIBS="-lselinux"
  478. DEFINES="$DEFINES -DMESA_SELINUX"
  479. fi
  480. AC_SUBST([SELINUX_LIBS])
  481. dnl Options for APIs
  482. AC_ARG_ENABLE([opengl],
  483. [AS_HELP_STRING([--disable-opengl],
  484. [disable support for standard OpenGL API @<:@default=no@:>@])],
  485. [enable_opengl="$enableval"],
  486. [enable_opengl=yes])
  487. AC_ARG_ENABLE([gles1],
  488. [AS_HELP_STRING([--enable-gles1],
  489. [enable support for OpenGL ES 1.x API @<:@default=no@:>@])],
  490. [enable_gles1="$enableval"],
  491. [enable_gles1=no])
  492. AC_ARG_ENABLE([gles2],
  493. [AS_HELP_STRING([--enable-gles2],
  494. [enable support for OpenGL ES 2.x API @<:@default=no@:>@])],
  495. [enable_gles2="$enableval"],
  496. [enable_gles2=no])
  497. AC_ARG_ENABLE([openvg],
  498. [AS_HELP_STRING([--enable-openvg],
  499. [enable support for OpenVG API @<:@default=no@:>@])],
  500. [enable_openvg="$enableval"],
  501. [enable_openvg=no])
  502. AC_ARG_ENABLE([dri],
  503. [AS_HELP_STRING([--enable-dri],
  504. [enable DRI modules @<:@default=enabled@:>@])],
  505. [enable_dri="$enableval"],
  506. [enable_dri=yes])
  507. AC_ARG_ENABLE([glx],
  508. [AS_HELP_STRING([--enable-glx],
  509. [enable GLX library @<:@default=enabled@:>@])],
  510. [enable_glx="$enableval"],
  511. [enable_glx=yes])
  512. AC_ARG_ENABLE([osmesa],
  513. [AS_HELP_STRING([--enable-osmesa],
  514. [enable OSMesa library @<:@default=disabled@:>@])],
  515. [enable_osmesa="$enableval"],
  516. [enable_osmesa=no])
  517. AC_ARG_ENABLE([egl],
  518. [AS_HELP_STRING([--disable-egl],
  519. [disable EGL library @<:@default=enabled@:>@])],
  520. [enable_egl="$enableval"],
  521. [enable_egl=yes])
  522. AC_ARG_ENABLE([xorg],
  523. [AS_HELP_STRING([--enable-xorg],
  524. [enable support for X.Org DDX API @<:@default=no@:>@])],
  525. [enable_xorg="$enableval"],
  526. [enable_xorg=no])
  527. AC_ARG_ENABLE([xa],
  528. [AS_HELP_STRING([--enable-xa],
  529. [enable build of the XA X Acceleration API @<:@default=no@:>@])],
  530. [enable_xa="$enableval"],
  531. [enable_xa=no])
  532. AC_ARG_ENABLE([gbm],
  533. [AS_HELP_STRING([--enable-gbm],
  534. [enable gbm library @<:@default=auto@:>@])],
  535. [enable_gbm="$enableval"],
  536. [enable_gbm=auto])
  537. AC_ARG_ENABLE([xvmc],
  538. [AS_HELP_STRING([--enable-xvmc],
  539. [enable xvmc library @<:@default=auto@:>@])],
  540. [enable_xvmc="$enableval"],
  541. [enable_xvmc=auto])
  542. AC_ARG_ENABLE([vdpau],
  543. [AS_HELP_STRING([--enable-vdpau],
  544. [enable vdpau library @<:@default=auto@:>@])],
  545. [enable_vdpau="$enableval"],
  546. [enable_vdpau=auto])
  547. AC_ARG_ENABLE([opencl],
  548. [AS_HELP_STRING([--enable-opencl],
  549. [enable OpenCL library NOTE: Enabling this option will also enable
  550. --with-llvm-shared-libs
  551. @<:@default=no@:>@])],
  552. [],
  553. [enable_opencl=no])
  554. AC_ARG_ENABLE([xlib_glx],
  555. [AS_HELP_STRING([--enable-xlib-glx],
  556. [make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
  557. [enable_xlib_glx="$enableval"],
  558. [enable_xlib_glx=no])
  559. AC_ARG_ENABLE([gallium_egl],
  560. [AS_HELP_STRING([--enable-gallium-egl],
  561. [enable optional EGL state tracker (not required
  562. for EGL support in Gallium with OpenGL and OpenGL ES)
  563. @<:@default=disable@:>@])],
  564. [enable_gallium_egl="$enableval"],
  565. [enable_gallium_egl=no])
  566. AC_ARG_ENABLE([gallium_gbm],
  567. [AS_HELP_STRING([--enable-gallium-gbm],
  568. [enable optional gbm state tracker (not required for
  569. gbm support in Gallium)
  570. @<:@default=auto@:>@])],
  571. [enable_gallium_gbm="$enableval"],
  572. [enable_gallium_gbm=auto])
  573. AC_ARG_ENABLE([r600-llvm-compiler],
  574. [AS_HELP_STRING([--enable-r600-llvm-compiler],
  575. [Enable experimental LLVM backend for graphics shaders @<:@default=disable@:>@])],
  576. [enable_r600_llvm="$enableval"],
  577. [enable_r600_llvm=no])
  578. AC_ARG_ENABLE([gallium_tests],
  579. [AS_HELP_STRING([--enable-gallium-tests],
  580. [Enable optional Gallium tests) @<:@default=disable@:>@])],
  581. [enable_gallium_tests="$enableval"],
  582. [enable_gallium_tests=no])
  583. # Option for Gallium drivers
  584. # Keep this in sync with the --with-gallium-drivers help string default value
  585. GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
  586. AC_ARG_WITH([gallium-drivers],
  587. [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
  588. [comma delimited Gallium drivers list, e.g.
  589. "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast"
  590. @<:@default=r300,r600,svga,swrast@:>@])],
  591. [with_gallium_drivers="$withval"],
  592. [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
  593. # Doing '--without-gallium-drivers' will set this variable to 'no'. Clear it
  594. # here so that the script doesn't choke on an unknown driver name later.
  595. case "$with_gallium_drivers" in
  596. yes) with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT" ;;
  597. no) with_gallium_drivers='' ;;
  598. esac
  599. if test "x$enable_opengl" = xno -a \
  600. "x$enable_gles1" = xno -a \
  601. "x$enable_gles2" = xno -a \
  602. "x$enable_openvg" = xno -a \
  603. "x$enable_xorg" = xno -a \
  604. "x$enable_xa" = xno -a \
  605. "x$enable_xvmc" = xno -a \
  606. "x$enable_vdpau" = xno -a \
  607. "x$enable_opencl" = xno; then
  608. AC_MSG_ERROR([at least one API should be enabled])
  609. fi
  610. # Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
  611. if test "x$enable_opengl" = xno -a \
  612. "x$enable_gles1" = xyes; then
  613. AC_MSG_ERROR([Building OpenGL ES1 without OpenGL is not supported])
  614. fi
  615. if test "x$enable_opengl" = xno -a \
  616. "x$enable_gles2" = xyes; then
  617. AC_MSG_ERROR([Building OpenGL ES2 without OpenGL is not supported])
  618. fi
  619. AM_CONDITIONAL(HAVE_OPENGL, test "x$enable_opengl" = xyes)
  620. AM_CONDITIONAL(HAVE_OPENGL_ES1, test "x$enable_gles1" = xyes)
  621. AM_CONDITIONAL(HAVE_OPENGL_ES2, test "x$enable_gles2" = xyes)
  622. AM_CONDITIONAL(NEED_OPENGL_COMMON, test "x$enable_opengl" = xyes -o \
  623. "x$enable_gles1" = xyes -o \
  624. "x$enable_gles2" = xyes)
  625. if test "x$enable_glx" = xno; then
  626. AC_MSG_WARN([GLX disabled, disabling Xlib-GLX])
  627. enable_xlib_glx=no
  628. fi
  629. if test "x$enable_dri$enable_xlib_glx" = xyesyes; then
  630. AC_MSG_ERROR([DRI and Xlib-GLX cannot be built together])
  631. fi
  632. if test "x$enable_opengl$enable_xlib_glx" = xnoyes; then
  633. AC_MSG_ERROR([Xlib-GLX cannot be built without OpenGL])
  634. fi
  635. # Disable GLX if OpenGL is not enabled
  636. if test "x$enable_glx$enable_opengl" = xyesno; then
  637. AC_MSG_WARN([OpenGL not enabled, disabling GLX])
  638. enable_glx=no
  639. fi
  640. # Disable GLX if DRI and Xlib-GLX are not enabled
  641. if test "x$enable_glx" = xyes -a \
  642. "x$enable_dri" = xno -a \
  643. "x$enable_xlib_glx" = xno; then
  644. AC_MSG_WARN([Neither DRI nor Xlib-GLX enabled, disabling GLX])
  645. enable_glx=no
  646. fi
  647. AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \
  648. "x$enable_dri" = xyes)
  649. AM_CONDITIONAL(HAVE_DRI, test "x$enable_dri" = xyes)
  650. AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
  651. "x$enable_osmesa" = xyes)
  652. AC_ARG_ENABLE([shared-glapi],
  653. [AS_HELP_STRING([--enable-shared-glapi],
  654. [Enable shared glapi for OpenGL @<:@default=yes@:>@])],
  655. [enable_shared_glapi="$enableval"],
  656. [enable_shared_glapi="$enable_dri"])
  657. # Shared GLAPI is only useful for DRI
  658. if test "x$enable_dri" = xno; then
  659. AC_MSG_NOTICE([Shared GLAPI is only useful for DRI, disabling])
  660. enable_shared_glapi=no
  661. fi
  662. AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes)
  663. dnl
  664. dnl Driver specific build directories
  665. dnl
  666. GALLIUM_TARGET_DIRS=""
  667. GALLIUM_WINSYS_DIRS="sw"
  668. GALLIUM_DRIVERS_DIRS="galahad trace rbug noop identity"
  669. GALLIUM_STATE_TRACKERS_DIRS=""
  670. case "x$enable_glx$enable_xlib_glx" in
  671. xyesyes)
  672. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
  673. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib"
  674. GALLIUM_STATE_TRACKERS_DIRS="glx $GALLIUM_STATE_TRACKERS_DIRS"
  675. NEED_WINSYS_XLIB="yes"
  676. ;;
  677. esac
  678. if test "x$enable_dri" = xyes; then
  679. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/dri"
  680. GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
  681. fi
  682. if test "x$enable_osmesa" = xyes; then
  683. GALLIUM_STATE_TRACKERS_DIRS="osmesa $GALLIUM_STATE_TRACKERS_DIRS"
  684. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa"
  685. fi
  686. AC_SUBST([MESA_LLVM])
  687. # Check for libdrm
  688. PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
  689. [have_libdrm=yes], [have_libdrm=no])
  690. if test "x$enable_dri" = xyes; then
  691. # DRI must be shared, I think
  692. if test "$enable_static" = yes; then
  693. AC_MSG_ERROR([Cannot use static libraries for DRI drivers])
  694. fi
  695. # not a hard requirement as swrast does not depend on it
  696. if test "x$have_libdrm" = xyes; then
  697. DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
  698. fi
  699. fi
  700. dnl Direct rendering or just indirect rendering
  701. case "$host_os" in
  702. gnu*)
  703. dnl Disable by default on GNU/Hurd
  704. driglx_direct_default="no"
  705. ;;
  706. cygwin*)
  707. dnl Disable by default on cygwin
  708. driglx_direct_default="no"
  709. ;;
  710. *)
  711. driglx_direct_default="yes"
  712. ;;
  713. esac
  714. AC_ARG_ENABLE([driglx-direct],
  715. [AS_HELP_STRING([--disable-driglx-direct],
  716. [disable direct rendering in GLX and EGL for DRI \
  717. @<:@default=auto@:>@])],
  718. [driglx_direct="$enableval"],
  719. [driglx_direct="$driglx_direct_default"])
  720. dnl
  721. dnl libGL configuration per driver
  722. dnl
  723. case "x$enable_glx$enable_xlib_glx" in
  724. xyesyes)
  725. # Xlib-based GLX
  726. PKG_CHECK_MODULES([XLIBGL], [x11 xext])
  727. GL_PC_REQ_PRIV="x11 xext"
  728. X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
  729. GL_LIB_DEPS="$XLIBGL_LIBS"
  730. GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
  731. GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm $PTHREAD_LIBS"
  732. ;;
  733. xyesno)
  734. # DRI-based GLX
  735. PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
  736. if test x"$driglx_direct" = xyes; then
  737. if test "x$have_libdrm" != xyes; then
  738. AC_MSG_ERROR([Direct rendering requires libdrm >= $LIBDRM_REQUIRED])
  739. fi
  740. PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
  741. GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED"
  742. fi
  743. # find the DRI deps for libGL
  744. dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8"
  745. # add xf86vidmode if available
  746. PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no)
  747. if test "$HAVE_XF86VIDMODE" = yes ; then
  748. dri_modules="$dri_modules xxf86vm"
  749. fi
  750. PKG_CHECK_MODULES([DRIGL], [$dri_modules])
  751. GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
  752. X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
  753. GL_LIB_DEPS="$DRIGL_LIBS"
  754. # need DRM libs, $PTHREAD_LIBS, etc.
  755. GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
  756. GL_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
  757. ;;
  758. esac
  759. # This is outside the case (above) so that it is invoked even for non-GLX
  760. # builds.
  761. AM_CONDITIONAL(HAVE_XF86VIDMODE, test "x$HAVE_XF86VIDMODE" = xyes)
  762. GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
  763. GLESv1_CM_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
  764. GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
  765. GLESv2_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
  766. AC_SUBST([X11_INCLUDES])
  767. AC_SUBST([GL_LIB_DEPS])
  768. AC_SUBST([GL_PC_REQ_PRIV])
  769. AC_SUBST([GL_PC_LIB_PRIV])
  770. AC_SUBST([GL_PC_CFLAGS])
  771. AC_SUBST([DRI_PC_REQ_PRIV])
  772. AC_SUBST([GLESv1_CM_LIB_DEPS])
  773. AC_SUBST([GLESv1_CM_PC_LIB_PRIV])
  774. AC_SUBST([GLESv2_LIB_DEPS])
  775. AC_SUBST([GLESv2_PC_LIB_PRIV])
  776. DRI_LIB_DEPS="\$(top_builddir)/src/mesa/libdricore/libdricore${VERSION}.la"
  777. AC_SUBST([HAVE_XF86VIDMODE])
  778. dnl
  779. dnl More GLX setup
  780. dnl
  781. case "x$enable_glx$enable_xlib_glx" in
  782. xyesyes)
  783. DEFINES="$DEFINES -DUSE_XSHM"
  784. ;;
  785. xyesno)
  786. DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
  787. if test "x$driglx_direct" = xyes; then
  788. DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
  789. fi
  790. ;;
  791. esac
  792. dnl
  793. dnl TLS detection
  794. dnl
  795. AC_ARG_ENABLE([glx-tls],
  796. [AS_HELP_STRING([--enable-glx-tls],
  797. [enable TLS support in GLX @<:@default=disabled@:>@])],
  798. [GLX_USE_TLS="$enableval"],
  799. [GLX_USE_TLS=no])
  800. AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
  801. AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
  802. [DEFINES="${DEFINES} -DGLX_USE_TLS -DHAVE_PTHREAD"])
  803. dnl
  804. dnl More DRI setup
  805. dnl
  806. dnl Directory for DRI drivers
  807. AC_ARG_WITH([dri-driverdir],
  808. [AS_HELP_STRING([--with-dri-driverdir=DIR],
  809. [directory for the DRI drivers @<:@${libdir}/dri@:>@])],
  810. [DRI_DRIVER_INSTALL_DIR="$withval"],
  811. [DRI_DRIVER_INSTALL_DIR='${libdir}/dri'])
  812. AC_SUBST([DRI_DRIVER_INSTALL_DIR])
  813. dnl Extra search path for DRI drivers
  814. AC_ARG_WITH([dri-searchpath],
  815. [AS_HELP_STRING([--with-dri-searchpath=DIRS...],
  816. [semicolon delimited DRI driver search directories @<:@${libdir}/dri@:>@])],
  817. [DRI_DRIVER_SEARCH_DIR="$withval"],
  818. [DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}'])
  819. AC_SUBST([DRI_DRIVER_SEARCH_DIR])
  820. dnl Which drivers to build - default is chosen by platform
  821. AC_ARG_WITH([dri-drivers],
  822. [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
  823. [comma delimited DRI drivers list, e.g.
  824. "swrast,i965,radeon" @<:@default=auto@:>@])],
  825. [with_dri_drivers="$withval"],
  826. [with_dri_drivers=yes])
  827. if test "x$with_dri_drivers" = x; then
  828. with_dri_drivers=no
  829. fi
  830. dnl If $with_dri_drivers is yes, directories will be added through
  831. dnl platform checks
  832. DRI_DIRS=""
  833. case "$with_dri_drivers" in
  834. no) ;;
  835. yes)
  836. # classic DRI drivers
  837. if test "x$enable_opengl" = xyes; then
  838. DRI_DIRS="yes"
  839. fi
  840. ;;
  841. *)
  842. # verify the requested driver directories exist
  843. dri_drivers=`IFS=', '; echo $with_dri_drivers`
  844. for driver in $dri_drivers; do
  845. test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
  846. AC_MSG_ERROR([DRI driver directory '$driver' does not exist])
  847. done
  848. DRI_DIRS="$dri_drivers"
  849. if test -n "$DRI_DIRS" -a "x$enable_opengl" != xyes; then
  850. AC_MSG_ERROR([--with-dri-drivers requires OpenGL])
  851. fi
  852. ;;
  853. esac
  854. dnl Set DRI_DIRS, DEFINES and LIB_DEPS
  855. if test "x$enable_dri" = xyes; then
  856. # Platform specific settings and drivers to build
  857. case "$host_os" in
  858. linux*)
  859. DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
  860. DEFINES="$DEFINES -DHAVE_ALIAS"
  861. case "$host_cpu" in
  862. x86_64)
  863. if test "x$DRI_DIRS" = "xyes"; then
  864. DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
  865. fi
  866. ;;
  867. powerpc*)
  868. # Build only the drivers for cards that exist on PowerPC.
  869. if test "x$DRI_DIRS" = "xyes"; then
  870. DRI_DIRS="r200 radeon swrast"
  871. fi
  872. ;;
  873. sparc*)
  874. # Build only the drivers for cards that exist on sparc
  875. if test "x$DRI_DIRS" = "xyes"; then
  876. DRI_DIRS="r200 radeon swrast"
  877. fi
  878. ;;
  879. esac
  880. ;;
  881. freebsd* | dragonfly* | *netbsd*)
  882. DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
  883. DEFINES="$DEFINES -DHAVE_ALIAS"
  884. if test "x$DRI_DIRS" = "xyes"; then
  885. DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
  886. fi
  887. ;;
  888. gnu*)
  889. DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
  890. DEFINES="$DEFINES -DHAVE_ALIAS"
  891. ;;
  892. solaris*)
  893. DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
  894. ;;
  895. cygwin*)
  896. DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1"
  897. if test "x$DRI_DIRS" = "xyes"; then
  898. DRI_DIRS="swrast"
  899. fi
  900. ;;
  901. esac
  902. # default drivers
  903. if test "x$DRI_DIRS" = "xyes"; then
  904. DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
  905. fi
  906. DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
  907. # Check for expat
  908. EXPAT_INCLUDES=""
  909. EXPAT_LIB=-lexpat
  910. AC_ARG_WITH([expat],
  911. [AS_HELP_STRING([--with-expat=DIR],
  912. [expat install directory])],[
  913. EXPAT_INCLUDES="-I$withval/include"
  914. CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
  915. LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
  916. EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
  917. ])
  918. AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])])
  919. save_LIBS="$LIBS"
  920. AC_CHECK_LIB([expat],[XML_ParserCreate],[],
  921. [AC_MSG_ERROR([Expat required for DRI.])])
  922. LIBS="$save_LIBS"
  923. # If we are building any DRI driver other than swrast.
  924. if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
  925. # ... libdrm is required
  926. if test "x$have_libdrm" != xyes; then
  927. AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
  928. fi
  929. # ... and build dricommon
  930. HAVE_COMMON_DRI=yes
  931. fi
  932. # put all the necessary libs together
  933. DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
  934. GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
  935. fi
  936. AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
  937. AC_SUBST([EXPAT_INCLUDES])
  938. AC_SUBST([DRI_LIB_DEPS])
  939. AC_SUBST([GALLIUM_DRI_LIB_DEPS])
  940. case $DRI_DIRS in
  941. *i915*|*i965*)
  942. PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
  943. for d in $(echo $DRI_DIRS | sed 's/,/ /g'); do
  944. case $d in
  945. i915)
  946. HAVE_I915_DRI=yes;
  947. ;;
  948. i965)
  949. HAVE_I965_DRI=yes;
  950. ;;
  951. esac
  952. done
  953. ;;
  954. esac
  955. case $DRI_DIRS in
  956. *nouveau*)
  957. PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NVVIEUX_REQUIRED])
  958. HAVE_NOUVEAU_DRI=yes;
  959. ;;
  960. esac
  961. case $DRI_DIRS in
  962. *radeon*|*r200*)
  963. PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
  964. for d in $(echo $DRI_DIRS | sed 's/,/ /g'); do
  965. case $d in
  966. radeon)
  967. HAVE_RADEON_DRI=yes;
  968. ;;
  969. r200)
  970. HAVE_R200_DRI=yes;
  971. ;;
  972. esac
  973. done
  974. ;;
  975. esac
  976. case $DRI_DIRS in
  977. *swrast*)
  978. HAVE_SWRAST_DRI=yes;
  979. ;;
  980. esac
  981. dnl
  982. dnl OSMesa configuration
  983. dnl
  984. dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...)
  985. AC_ARG_WITH([osmesa-bits],
  986. [AS_HELP_STRING([--with-osmesa-bits=BITS],
  987. [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])],
  988. [osmesa_bits="$withval"],
  989. [osmesa_bits=8])
  990. if test "x$osmesa_bits" != x8; then
  991. if test "x$enable_dri" = xyes -o "x$enable_glx" = xyes; then
  992. AC_MSG_WARN([Ignoring OSMesa channel bits because of non-OSMesa driver])
  993. osmesa_bits=8
  994. fi
  995. fi
  996. case "x$osmesa_bits" in
  997. x8)
  998. OSMESA_LIB="${OSMESA_LIB}"
  999. ;;
  1000. x16|x32)
  1001. OSMESA_LIB="${OSMESA_LIB}$osmesa_bits"
  1002. DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31"
  1003. ;;
  1004. *)
  1005. AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
  1006. ;;
  1007. esac
  1008. if test "x$enable_osmesa" = xyes; then
  1009. # only link libraries with osmesa if shared
  1010. if test "$enable_static" = no; then
  1011. OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
  1012. else
  1013. OSMESA_LIB_DEPS=""
  1014. fi
  1015. OSMESA_MESA_DEPS=""
  1016. OSMESA_PC_LIB_PRIV="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
  1017. fi
  1018. AC_SUBST([OSMESA_LIB_DEPS])
  1019. AC_SUBST([OSMESA_MESA_DEPS])
  1020. AC_SUBST([OSMESA_PC_REQ])
  1021. AC_SUBST([OSMESA_PC_LIB_PRIV])
  1022. dnl
  1023. dnl gbm configuration
  1024. dnl
  1025. if test "x$enable_gbm" = xauto; then
  1026. case "$with_egl_platforms" in
  1027. *drm*)
  1028. enable_gbm=yes ;;
  1029. *)
  1030. enable_gbm=no ;;
  1031. esac
  1032. fi
  1033. if test "x$enable_gbm" = xyes; then
  1034. PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
  1035. AC_MSG_ERROR([gbm needs udev]))
  1036. if test "x$enable_dri" = xyes; then
  1037. GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
  1038. if test "x$enable_shared_glapi" = xno; then
  1039. AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
  1040. fi
  1041. fi
  1042. fi
  1043. AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
  1044. GBM_PC_REQ_PRIV="libudev"
  1045. GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
  1046. AC_SUBST([GBM_PC_REQ_PRIV])
  1047. AC_SUBST([GBM_PC_LIB_PRIV])
  1048. dnl
  1049. dnl EGL configuration
  1050. dnl
  1051. EGL_CLIENT_APIS=""
  1052. if test "x$enable_egl" = xyes; then
  1053. EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS $PTHREAD_LIBS"
  1054. AC_CHECK_FUNC(mincore, [DEFINES="$DEFINES -DHAVE_MINCORE"])
  1055. if test "$enable_static" != yes; then
  1056. # build egl_glx when libGL is built
  1057. PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
  1058. [have_libudev=yes],[have_libudev=no])
  1059. if test "$have_libudev" = yes; then
  1060. DEFINES="$DEFINES -DHAVE_LIBUDEV"
  1061. fi
  1062. if test "x$enable_dri" = xyes; then
  1063. HAVE_EGL_DRIVER_DRI2=1
  1064. fi
  1065. fi
  1066. fi
  1067. AM_CONDITIONAL(HAVE_EGL, test "x$enable_egl" = xyes)
  1068. AC_SUBST([EGL_LIB_DEPS])
  1069. dnl
  1070. dnl EGL Gallium configuration
  1071. dnl
  1072. if test "x$enable_gallium_egl" = xyes; then
  1073. if test "x$with_gallium_drivers" = x; then
  1074. AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
  1075. fi
  1076. if test "x$enable_egl" = xno; then
  1077. AC_MSG_ERROR([cannot enable egl_gallium without EGL])
  1078. fi
  1079. if test "x$have_libdrm" != xyes; then
  1080. AC_MSG_ERROR([egl_gallium requires libdrm >= $LIBDRM_REQUIRED])
  1081. fi
  1082. GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
  1083. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static"
  1084. fi
  1085. AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
  1086. dnl
  1087. dnl gbm Gallium configuration
  1088. dnl
  1089. if test "x$enable_gallium_gbm" = xauto; then
  1090. case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
  1091. yesyesyes*drm*)
  1092. enable_gallium_gbm=yes ;;
  1093. *)
  1094. enable_gallium_gbm=no ;;
  1095. esac
  1096. fi
  1097. if test "x$enable_gallium_gbm" = xyes; then
  1098. if test "x$with_gallium_drivers" = x; then
  1099. AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
  1100. fi
  1101. if test "x$enable_gbm" = xno; then
  1102. AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
  1103. fi
  1104. # gbm_gallium abuses DRI_LIB_DEPS to link. Make sure it is set.
  1105. if test "x$enable_dri" = xno; then
  1106. AC_MSG_ERROR([gbm_gallium requires --enable-dri to build])
  1107. fi
  1108. GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
  1109. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
  1110. enable_gallium_loader=yes
  1111. fi
  1112. AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
  1113. dnl
  1114. dnl X.Org DDX configuration
  1115. dnl
  1116. if test "x$enable_xorg" = xyes; then
  1117. PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0])
  1118. PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED])
  1119. PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED])
  1120. PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
  1121. HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
  1122. HAVE_XEXTPROTO_71="no")
  1123. GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS"
  1124. fi
  1125. AM_CONDITIONAL(HAVE_ST_XORG, test "x$enable_xorg" = xyes)
  1126. dnl
  1127. dnl XA configuration
  1128. dnl
  1129. if test "x$enable_xa" = xyes; then
  1130. AC_PROG_AWK
  1131. AC_PROG_GREP
  1132. AC_CHECK_PROG(NM, nm, "nm")
  1133. if test "x$AWK" = x || test "x$GREP" = x || test "x$NM" = x; then
  1134. AC_MSG_WARN([Missing one of nm, grep or awk. Disabling xa.])
  1135. enable_xa=no
  1136. fi
  1137. fi
  1138. if test "x$enable_xa" = xyes; then
  1139. GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
  1140. AC_SUBST(AWK)
  1141. AC_SUBST(GREP)
  1142. AC_SUBST(NM)
  1143. fi
  1144. AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
  1145. dnl
  1146. dnl OpenVG configuration
  1147. dnl
  1148. VG_LIB_DEPS=""
  1149. if test "x$enable_openvg" = xyes; then
  1150. if test "x$enable_egl" = xno; then
  1151. AC_MSG_ERROR([cannot enable OpenVG without EGL])
  1152. fi
  1153. if test "x$with_gallium_drivers" = x; then
  1154. AC_MSG_ERROR([cannot enable OpenVG without Gallium])
  1155. fi
  1156. if test "x$enable_gallium_egl" = xno; then
  1157. AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
  1158. fi
  1159. EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
  1160. VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
  1161. GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
  1162. VG_PC_LIB_PRIV="-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
  1163. AC_SUBST([VG_PC_LIB_PRIV])
  1164. fi
  1165. AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes)
  1166. dnl
  1167. dnl Gallium G3DVL configuration
  1168. dnl
  1169. if test -n "$with_gallium_drivers"; then
  1170. if test "x$enable_xvmc" = xauto; then
  1171. PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no])
  1172. fi
  1173. if test "x$enable_vdpau" = xauto; then
  1174. PKG_CHECK_EXISTS([vdpau], [enable_vdpau=yes], [enable_vdpau=no])
  1175. fi
  1176. fi
  1177. if test "x$enable_xvmc" = xyes; then
  1178. PKG_CHECK_MODULES([XVMC], [xvmc >= 1.0.6 x11-xcb xcb-dri2 >= 1.8])
  1179. GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xvmc"
  1180. fi
  1181. AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)
  1182. if test "x$enable_vdpau" = xyes; then
  1183. PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8])
  1184. GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
  1185. fi
  1186. AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
  1187. dnl
  1188. dnl OpenCL configuration
  1189. dnl
  1190. AC_ARG_WITH([libclc-path],
  1191. [AS_HELP_STRING([--with-libclc-path],
  1192. [DEPRECATED: See http://dri.freedesktop.org/wiki/GalliumCompute#How_to_Install])],
  1193. [LIBCLC_PATH="$withval"],
  1194. [LIBCLC_PATH=""])
  1195. if test "x$LIBCLC_PATH" != x; then
  1196. AC_MSG_ERROR([The --with-libclc-path option has been deprecated.
  1197. Please review the updated build instructions for clover:
  1198. http://dri.freedesktop.org/wiki/GalliumCompute])
  1199. fi
  1200. AC_ARG_WITH([clang-libdir],
  1201. [AS_HELP_STRING([--with-clang-libdir],
  1202. [Path to Clang libraries @<:@default=llvm-config --libdir@:>@])],
  1203. [CLANG_LIBDIR="$withval"],
  1204. [CLANG_LIBDIR=""])
  1205. LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
  1206. LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
  1207. AC_SUBST([LIBCLC_INCLUDEDIR])
  1208. AC_SUBST([LIBCLC_LIBEXECDIR])
  1209. if test "x$enable_opencl" = xyes; then
  1210. if test "x$with_gallium_drivers" = x; then
  1211. AC_MSG_ERROR([cannot enable OpenCL without Gallium])
  1212. fi
  1213. if test $GCC_VERSION_MAJOR -lt 4 -o $GCC_VERSION_MAJOR -eq 4 -a $GCC_VERSION_MINOR -lt 6; then
  1214. AC_MSG_ERROR([gcc >= 4.6 is required to build clover])
  1215. fi
  1216. if test "x$LIBCLC_INCLUDEDIR" == x || test "x$LIBCLC_LIBEXECDIR" == x; then
  1217. AC_MSG_ERROR([pkg-config cannot use libclc.pc which is required to build clover])
  1218. fi
  1219. GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS clover"
  1220. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
  1221. enable_gallium_loader=yes
  1222. fi
  1223. AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
  1224. dnl
  1225. dnl Gallium configuration
  1226. dnl
  1227. AM_CONDITIONAL(HAVE_GALLIUM, test -n "$with_gallium_drivers")
  1228. AC_SUBST([LLVM_BINDIR])
  1229. AC_SUBST([LLVM_CFLAGS])
  1230. AC_SUBST([LLVM_CPPFLAGS])
  1231. AC_SUBST([LLVM_CXXFLAGS])
  1232. AC_SUBST([LLVM_LIBDIR])
  1233. AC_SUBST([LLVM_LIBS])
  1234. AC_SUBST([LLVM_LDFLAGS])
  1235. AC_SUBST([LLVM_INCLUDEDIR])
  1236. AC_SUBST([LLVM_VERSION])
  1237. AC_SUBST([CLANG_RESOURCE_DIR])
  1238. case "x$enable_opengl$enable_gles1$enable_gles2" in
  1239. x*yes*)
  1240. EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)'
  1241. ;;
  1242. esac
  1243. AC_SUBST([VG_LIB_DEPS])
  1244. AC_SUBST([EGL_CLIENT_APIS])
  1245. dnl
  1246. dnl EGL Platforms configuration
  1247. dnl
  1248. AC_ARG_WITH([egl-platforms],
  1249. [AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
  1250. [comma delimited native platforms libEGL supports, e.g.
  1251. "x11,drm" @<:@default=auto@:>@])],
  1252. [with_egl_platforms="$withval"],
  1253. [if test "x$enable_egl" = xyes; then
  1254. with_egl_platforms="x11"
  1255. else
  1256. with_egl_platforms=""
  1257. fi])
  1258. EGL_PLATFORMS=""
  1259. if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
  1260. AC_MSG_ERROR([cannot build egl state tracker without EGL library])
  1261. fi
  1262. # Do per-EGL platform setups and checks
  1263. egl_platforms=`IFS=', '; echo $with_egl_platforms`
  1264. for plat in $egl_platforms; do
  1265. case "$plat" in
  1266. wayland)
  1267. PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
  1268. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
  1269. WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
  1270. AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
  1271. [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
  1272. ;;
  1273. x11)
  1274. PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= 1.8 xcb-xfixes])
  1275. if test "x$enable_glx" = xyes; then
  1276. HAVE_EGL_DRIVER_GLX=1
  1277. fi
  1278. ;;
  1279. drm)
  1280. test "x$enable_gbm" = "xno" &&
  1281. AC_MSG_ERROR([EGL platform drm needs gbm])
  1282. ;;
  1283. android|fbdev|gdi|null)
  1284. ;;
  1285. *)
  1286. AC_MSG_ERROR([EGL platform '$plat' does not exist])
  1287. ;;
  1288. esac
  1289. case "$plat$have_libudev" in
  1290. waylandno|drmno)
  1291. AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;
  1292. esac
  1293. done
  1294. # libEGL wants to default to the first platform specified in
  1295. # ./configure. parse that here.
  1296. if test "x$egl_platforms" != "x"; then
  1297. FIRST_PLATFORM_CAPS=`echo $egl_platforms | sed 's| .*||' | tr 'a-z' 'A-Z'`
  1298. EGL_NATIVE_PLATFORM="_EGL_PLATFORM_$FIRST_PLATFORM_CAPS"
  1299. else
  1300. EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
  1301. fi
  1302. EGL_PLATFORMS="$egl_platforms"
  1303. if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
  1304. NEED_WINSYS_XLIB=yes
  1305. fi
  1306. AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1)
  1307. AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1)
  1308. AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1)
  1309. AM_CONDITIONAL(HAVE_EGL_PLATFORM_FBDEV, echo "$egl_platforms" | grep 'fbdev' >/dev/null 2>&1)
  1310. AM_CONDITIONAL(HAVE_EGL_PLATFORM_NULL, echo "$egl_platforms" | grep 'null' >/dev/null 2>&1)
  1311. AM_CONDITIONAL(HAVE_EGL_DRIVER_DRI2, test "x$HAVE_EGL_DRIVER_DRI2" != "x")
  1312. AM_CONDITIONAL(HAVE_EGL_DRIVER_GLX, test "x$HAVE_EGL_DRIVER_GLX" != "x")
  1313. AC_SUBST([EGL_NATIVE_PLATFORM])
  1314. AC_SUBST([EGL_PLATFORMS])
  1315. AC_SUBST([EGL_CFLAGS])
  1316. # If we don't have the X11 platform, set this define so we don't try to include
  1317. # the X11 headers.
  1318. if ! echo "$egl_platforms" | grep -q 'x11'; then
  1319. DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS"
  1320. GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
  1321. fi
  1322. AC_ARG_WITH([egl-driver-dir],
  1323. [AS_HELP_STRING([--with-egl-driver-dir=DIR],
  1324. [directory for EGL drivers [[default=${libdir}/egl]]])],
  1325. [EGL_DRIVER_INSTALL_DIR="$withval"],
  1326. [EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
  1327. AC_SUBST([EGL_DRIVER_INSTALL_DIR])
  1328. AC_ARG_WITH([xorg-driver-dir],
  1329. [AS_HELP_STRING([--with-xorg-driver-dir=DIR],
  1330. [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
  1331. [XORG_DRIVER_INSTALL_DIR="$withval"],
  1332. [XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
  1333. AC_SUBST([XORG_DRIVER_INSTALL_DIR])
  1334. AC_ARG_WITH([max-width],
  1335. [AS_HELP_STRING([--with-max-width=N],
  1336. [Maximum framebuffer width (4096)])],
  1337. [DEFINES="${DEFINES} -DMAX_WIDTH=${withval}";
  1338. AS_IF([test "${withval}" -gt "4096"],
  1339. [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
  1340. )
  1341. AC_ARG_WITH([max-height],
  1342. [AS_HELP_STRING([--with-max-height=N],
  1343. [Maximum framebuffer height (4096)])],
  1344. [DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}";
  1345. AS_IF([test "${withval}" -gt "4096"],
  1346. [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
  1347. )
  1348. dnl
  1349. dnl Gallium LLVM
  1350. dnl
  1351. AC_ARG_ENABLE([gallium-llvm],
  1352. [AS_HELP_STRING([--enable-gallium-llvm],
  1353. [build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])],
  1354. [enable_gallium_llvm="$enableval"],
  1355. [enable_gallium_llvm=auto])
  1356. AC_ARG_WITH([llvm-shared-libs],
  1357. [AS_HELP_STRING([--with-llvm-shared-libs],
  1358. [link with LLVM shared libraries @<:@default=disabled@:>@])],
  1359. [],
  1360. [with_llvm_shared_libs=no])
  1361. AS_IF([test x$enable_opencl = xyes],
  1362. [
  1363. AC_MSG_WARN([OpenCL required, forcing LLVM shared libraries])
  1364. with_llvm_shared_libs=yes
  1365. ])
  1366. AC_ARG_WITH([llvm-prefix],
  1367. [AS_HELP_STRING([--with-llvm-prefix],
  1368. [Prefix for LLVM installations in non-standard locations])],
  1369. [llvm_prefix="$withval"],
  1370. [llvm_prefix=""])
  1371. # Call this inside ` ` to get the return value.
  1372. # $1 is the llvm-config command with arguments.
  1373. strip_unwanted_llvm_flags() {
  1374. # Use \> (marks the end of the word)
  1375. echo `$1` | sed \
  1376. -e 's/-DNDEBUG\>//g' \
  1377. -e 's/-pedantic\>//g' \
  1378. -e 's/-Wcovered-switch-default\>//g' \
  1379. -e 's/-O.\>//g' \
  1380. -e 's/-g\>//g' \
  1381. -e 's/-Wall\>//g' \
  1382. -e 's/-fomit-frame-pointer\>//g'
  1383. }
  1384. if test "x$with_gallium_drivers" = x; then
  1385. enable_gallium_llvm=no
  1386. fi
  1387. if test "x$enable_gallium_llvm" = xauto; then
  1388. case "$host_cpu" in
  1389. i*86|x86_64) enable_gallium_llvm=yes;;
  1390. esac
  1391. fi
  1392. if test "x$enable_gallium_llvm" = xyes; then
  1393. if test "x$llvm_prefix" != x; then
  1394. AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
  1395. else
  1396. AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
  1397. fi
  1398. if test "x$LLVM_CONFIG" != xno; then
  1399. LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
  1400. LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
  1401. LLVM_COMPONENTS="engine bitwriter"
  1402. if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
  1403. LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
  1404. fi
  1405. if test "x$enable_opencl" = xyes; then
  1406. LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
  1407. # LLVM 3.3 >= 177971 requires IRReader
  1408. if $LLVM_CONFIG --components | grep -q '\<irreader\>'; then
  1409. LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
  1410. fi
  1411. fi
  1412. LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
  1413. LLVM_BINDIR=`$LLVM_CONFIG --bindir`
  1414. LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
  1415. LLVM_CFLAGS=$LLVM_CPPFLAGS # CPPFLAGS seem to be sufficient
  1416. LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
  1417. LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
  1418. LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
  1419. DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
  1420. MESA_LLVM=1
  1421. dnl Check for Clang interanl headers
  1422. if test "x$enable_opencl" = xyes; then
  1423. if test "x$CLANG_LIBDIR" = x; then
  1424. CLANG_LIBDIR=${LLVM_LIBDIR}
  1425. fi
  1426. CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
  1427. AC_CHECK_FILE("$CLANG_RESOURCE_DIR/include/stddef.h",,
  1428. AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.]))
  1429. fi
  1430. else
  1431. MESA_LLVM=0
  1432. LLVM_VERSION_INT=0
  1433. fi
  1434. else
  1435. MESA_LLVM=0
  1436. LLVM_VERSION_INT=0
  1437. fi
  1438. dnl Directory for XVMC libs
  1439. AC_ARG_WITH([xvmc-libdir],
  1440. [AS_HELP_STRING([--with-xvmc-libdir=DIR],
  1441. [directory for the XVMC libraries @<:@default=${libdir}@:>@])],
  1442. [XVMC_LIB_INSTALL_DIR="$withval"],
  1443. [XVMC_LIB_INSTALL_DIR='${libdir}'])
  1444. AC_SUBST([XVMC_LIB_INSTALL_DIR])
  1445. dnl
  1446. dnl Gallium Tests
  1447. dnl
  1448. if test "x$enable_gallium_tests" = xyes; then
  1449. enable_gallium_loader=yes
  1450. fi
  1451. AM_CONDITIONAL(HAVE_GALLIUM_TESTS, test "x$enable_gallium_tests" = xyes)
  1452. if test "x$enable_gallium_loader" = xyes; then
  1453. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
  1454. fi
  1455. AM_CONDITIONAL(NEED_GALLIUM_LOADER, test "x$enable_gallium_loader" = xyes)
  1456. dnl Directory for VDPAU libs
  1457. AC_ARG_WITH([vdpau-libdir],
  1458. [AS_HELP_STRING([--with-vdpau-libdir=DIR],
  1459. [directory for the VDPAU libraries @<:@default=${libdir}/vdpau@:>@])],
  1460. [VDPAU_LIB_INSTALL_DIR="$withval"],
  1461. [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau'])
  1462. AC_SUBST([VDPAU_LIB_INSTALL_DIR])
  1463. dnl Directory for OpenCL libs
  1464. AC_ARG_WITH([opencl-libdir],
  1465. [AS_HELP_STRING([--with-opencl-libdir=DIR],
  1466. [directory for auxiliary libraries used by the OpenCL implementation @<:@default=${libdir}/opencl@:>@])],
  1467. [OPENCL_LIB_INSTALL_DIR="$withval"],
  1468. [OPENCL_LIB_INSTALL_DIR='${libdir}/opencl'])
  1469. AC_SUBST([OPENCL_LIB_INSTALL_DIR])
  1470. dnl
  1471. dnl Gallium helper functions
  1472. dnl
  1473. gallium_check_st() {
  1474. if test "x$NEED_NONNULL_WINSYS" = xyes; then
  1475. if test "x$have_libdrm" != xyes; then
  1476. AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
  1477. fi
  1478. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1"
  1479. fi
  1480. if test "x$enable_dri" = xyes && test "x$2" != x; then
  1481. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
  1482. HAVE_COMMON_DRI=yes
  1483. fi
  1484. if test "x$enable_xorg" = xyes && test "x$3" != x; then
  1485. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
  1486. fi
  1487. if test "x$enable_xa" = xyes && test "x$4" != x; then
  1488. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
  1489. fi
  1490. if test "x$enable_xvmc" = xyes && test "x$5" != x; then
  1491. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
  1492. fi
  1493. if test "x$enable_vdpau" = xyes && test "x$6" != x; then
  1494. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
  1495. fi
  1496. }
  1497. gallium_require_llvm() {
  1498. if test "x$MESA_LLVM" = x0; then
  1499. case "$host_cpu" in
  1500. i*86|x86_64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
  1501. esac
  1502. fi
  1503. }
  1504. gallium_require_drm_loader() {
  1505. if test "x$enable_gallium_loader" = xyes; then
  1506. PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
  1507. AC_MSG_ERROR([Gallium drm loader requires libudev]))
  1508. if test "x$have_libdrm" != xyes; then
  1509. AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED])
  1510. fi
  1511. enable_gallium_drm_loader=yes
  1512. fi
  1513. }
  1514. radeon_llvm_check() {
  1515. LLVM_REQUIRED_VERSION_MAJOR="3"
  1516. LLVM_REQUIRED_VERSION_MINOR="3"
  1517. if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
  1518. AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer is required for r600g and radeonsi.])
  1519. fi
  1520. if test true && $LLVM_CONFIG --targets-built | grep -qv '\<R600\>' ; then
  1521. AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM
  1522. sources with the --enable-experimental-targets=R600
  1523. configure flag])
  1524. fi
  1525. LLVM_COMPONENTS="${LLVM_COMPONENTS} r600 bitreader ipo"
  1526. NEED_RADEON_LLVM=yes
  1527. AC_CHECK_LIB([elf], [elf_memory], [ELF_LIB=-lelf],
  1528. [AC_MSG_ERROR([radeonsi and r600g require libelf when using LLVM])])
  1529. }
  1530. dnl Gallium drivers
  1531. if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \
  1532. "x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \
  1533. "x$enable_vdpau" = xyes; then
  1534. NEED_NONNULL_WINSYS=yes
  1535. fi
  1536. AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes)
  1537. dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
  1538. if test "x$with_gallium_drivers" != x; then
  1539. gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
  1540. for driver in $gallium_drivers; do
  1541. case "x$driver" in
  1542. xsvga)
  1543. HAVE_GALLIUM_SVGA=yes
  1544. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga softpipe"
  1545. gallium_check_st "svga/drm" "dri-vmwgfx" "" "xa-vmwgfx"
  1546. ;;
  1547. xi915)
  1548. HAVE_GALLIUM_I915=yes
  1549. PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
  1550. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 softpipe"
  1551. if test "x$MESA_LLVM" = x1; then
  1552. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
  1553. fi
  1554. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw"
  1555. gallium_check_st "i915/drm" "dri-i915" "xorg-i915"
  1556. ;;
  1557. xilo)
  1558. HAVE_GALLIUM_ILO=yes
  1559. PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED])
  1560. gallium_require_drm_loader
  1561. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS ilo"
  1562. gallium_check_st "intel/drm" "dri-ilo"
  1563. ;;
  1564. xr300)
  1565. HAVE_GALLIUM_R300=yes
  1566. PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
  1567. gallium_require_llvm "Gallium R300"
  1568. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
  1569. gallium_check_st "radeon/drm" "dri-r300" "" "" "xvmc-r300" "vdpau-r300"
  1570. ;;
  1571. xr600)
  1572. HAVE_GALLIUM_R600=yes
  1573. PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
  1574. gallium_require_drm_loader
  1575. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600"
  1576. if test "x$enable_r600_llvm" = xyes -o "x$enable_opencl" = xyes; then
  1577. radeon_llvm_check
  1578. R600_NEED_RADEON_GALLIUM=yes;
  1579. LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
  1580. fi
  1581. if test "x$enable_r600_llvm" = xyes; then
  1582. USE_R600_LLVM_COMPILER=yes;
  1583. fi
  1584. if test "x$enable_opencl" = xyes; then
  1585. LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
  1586. fi
  1587. gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600"
  1588. ;;
  1589. xradeonsi)
  1590. HAVE_GALLIUM_RADEONSI=yes
  1591. PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
  1592. gallium_require_drm_loader
  1593. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS radeonsi"
  1594. radeon_llvm_check
  1595. gallium_check_st "radeon/drm" "dri-radeonsi" "xorg-radeonsi" "" "" "vdpau-radeonsi" ""
  1596. ;;
  1597. xnouveau)
  1598. HAVE_GALLIUM_NOUVEAU=yes
  1599. PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
  1600. gallium_require_drm_loader
  1601. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv50 nvc0"
  1602. gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" "vdpau-nouveau"
  1603. ;;
  1604. xfreedreno)
  1605. HAVE_GALLIUM_FREEDRENO=yes
  1606. PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
  1607. gallium_require_drm_loader
  1608. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS freedreno"
  1609. gallium_check_st "freedreno/drm" "dri-freedreno" "" "" "" ""
  1610. ;;
  1611. xswrast)
  1612. HAVE_GALLIUM_SOFTPIPE=yes
  1613. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS softpipe"
  1614. if test "x$MESA_LLVM" = x1; then
  1615. HAVE_GALLIUM_LLVMPIPE=yes
  1616. GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
  1617. fi
  1618. if test "x$enable_dri" = xyes; then
  1619. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
  1620. HAVE_COMMON_DRI=yes
  1621. fi
  1622. if test "x$enable_vdpau" = xyes; then
  1623. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe"
  1624. fi
  1625. if test "x$enable_xvmc" = xyes; then
  1626. GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
  1627. fi
  1628. if test "x$enable_vdpau" = xyes -o "x$enable_xvmc" = xyes; then
  1629. NEED_WINSYS_XLIB=yes
  1630. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
  1631. fi
  1632. ;;
  1633. *)
  1634. AC_MSG_ERROR([Unknown Gallium driver: $driver])
  1635. ;;
  1636. esac
  1637. done
  1638. fi
  1639. dnl Set LLVM_LIBS - This is done after the driver configuration so
  1640. dnl that drivers can add additonal components to LLVM_COMPONENTS.
  1641. dnl Previously, gallium drivers were updating LLVM_LIBS directly
  1642. dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
  1643. dnl this was causing the same libraries to be appear multiple times
  1644. dnl in LLVM_LIBS.
  1645. if test "x$MESA_LLVM" != x0; then
  1646. LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
  1647. if test "x$with_llvm_shared_libs" = xyes; then
  1648. dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
  1649. LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
  1650. AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
  1651. if test "x$llvm_have_one_so" = xyes; then
  1652. dnl LLVM was built using auto*, so there is only one shared object.
  1653. LLVM_LIBS="-l$LLVM_SO_NAME"
  1654. else
  1655. dnl If LLVM was built with CMake, there will be one shared object per
  1656. dnl component.
  1657. AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
  1658. AC_MSG_ERROR([Could not find llvm shared libraries:
  1659. Please make sure you have built llvm with the --enable-shared option
  1660. and that your llvm libraries are installed in $LLVM_LIBDIR
  1661. If you have installed your llvm libraries to a different directory you
  1662. can use the --with-llvm-prefix= configure flag to specify this directory.
  1663. NOTE: Mesa is attempting to use llvm shared libraries because you have
  1664. passed one of the following options to configure:
  1665. --with-llvm-shared-libs
  1666. --enable-opencl
  1667. If you do not want to build with llvm shared libraries and instead want to
  1668. use llvm static libraries then remove these options from your configure
  1669. invocation and reconfigure.]))
  1670. dnl We don't need to update LLVM_LIBS in this case because the LLVM
  1671. dnl install uses a shared object for each compoenent and we have
  1672. dnl already added all of these objects to LLVM_LIBS.
  1673. fi
  1674. fi
  1675. fi
  1676. AM_CONDITIONAL(HAVE_GALLIUM_SVGA, test "x$HAVE_GALLIUM_SVGA" = xyes)
  1677. AM_CONDITIONAL(HAVE_GALLIUM_I915, test "x$HAVE_GALLIUM_I915" = xyes)
  1678. AM_CONDITIONAL(HAVE_GALLIUM_ILO, test "x$HAVE_GALLIUM_ILO" = xyes)
  1679. AM_CONDITIONAL(HAVE_GALLIUM_R300, test "x$HAVE_GALLIUM_R300" = xyes)
  1680. AM_CONDITIONAL(HAVE_GALLIUM_R600, test "x$HAVE_GALLIUM_R600" = xyes)
  1681. AM_CONDITIONAL(HAVE_GALLIUM_RADEONSI, test "x$HAVE_GALLIUM_RADEONSI" = xyes)
  1682. AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
  1683. AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
  1684. AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
  1685. AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
  1686. AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes -o \
  1687. "x$HAVE_GALLIUM_I915" = xyes -o \
  1688. "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
  1689. AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes -o \
  1690. "x$HAVE_GALLIUM_SOFTPIPE" = xyes -a \
  1691. "x$MESA_LLVM" = x1)
  1692. if test "x$enable_gallium_loader" = xyes; then
  1693. GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
  1694. if test "x$enable_gallium_drm_loader" = xyes; then
  1695. GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_DRM"
  1696. PKG_CHECK_MODULES([GALLIUM_PIPE_LOADER_XCB], [xcb xcb-dri2],
  1697. pipe_loader_have_xcb=yes, pipe_loader_have_xcb=no)
  1698. if test "x$pipe_loader_have_xcb" = xyes; then
  1699. GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XCB"
  1700. GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS $GALLIUM_PIPE_LOADER_XCB_LIBS $LIBDRM_LIBS"
  1701. fi
  1702. fi
  1703. AC_SUBST([GALLIUM_PIPE_LOADER_DEFINES])
  1704. AC_SUBST([GALLIUM_PIPE_LOADER_LIBS])
  1705. fi
  1706. AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes)
  1707. AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes)
  1708. AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes)
  1709. AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes)
  1710. AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
  1711. AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
  1712. AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
  1713. AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \
  1714. "x$HAVE_GALLIUM_R300" = xyes -o \
  1715. "x$HAVE_GALLIUM_R600" = xyes -o \
  1716. "x$HAVE_GALLIUM_RADEONSI" = xyes)
  1717. AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \
  1718. "x$HAVE_GALLIUM_SVGA" = xyes)
  1719. AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)
  1720. AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
  1721. AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes)
  1722. AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
  1723. AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
  1724. AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
  1725. AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
  1726. AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
  1727. AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
  1728. AC_SUBST([ELF_LIB])
  1729. AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
  1730. "x$enable_xlib_glx" = xyes -o \
  1731. "x$enable_osmesa" = xyes)
  1732. AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)
  1733. AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
  1734. AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
  1735. AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
  1736. AM_CONDITIONAL(HAVE_SPARC_ASM, echo "$DEFINES" | grep 'SPARC_ASM' >/dev/null 2>&1)
  1737. AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
  1738. AC_SUBST([VDPAU_MAJOR], 1)
  1739. AC_SUBST([VDPAU_MINOR], 0)
  1740. AC_SUBST([XVMC_MAJOR], 1)
  1741. AC_SUBST([XVMC_MINOR], 0)
  1742. AC_SUBST([XA_MAJOR], 1)
  1743. AC_SUBST([XA_MINOR], 0)
  1744. AC_SUBST([XA_TINY], 0)
  1745. AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
  1746. dnl Restore LDFLAGS and CPPFLAGS
  1747. LDFLAGS="$_SAVE_LDFLAGS"
  1748. CPPFLAGS="$_SAVE_CPPFLAGS"
  1749. dnl Add user CFLAGS and CXXFLAGS
  1750. CFLAGS="$CFLAGS $USER_CFLAGS"
  1751. CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
  1752. dnl Substitute the config
  1753. AC_CONFIG_FILES([Makefile
  1754. src/Makefile
  1755. src/egl/Makefile
  1756. src/egl/drivers/Makefile
  1757. src/egl/drivers/dri2/Makefile
  1758. src/egl/drivers/glx/Makefile
  1759. src/egl/main/Makefile
  1760. src/egl/main/egl.pc
  1761. src/egl/wayland/Makefile
  1762. src/egl/wayland/wayland-drm/Makefile
  1763. src/egl/wayland/wayland-egl/Makefile
  1764. src/egl/wayland/wayland-egl/wayland-egl.pc
  1765. src/gallium/auxiliary/Makefile
  1766. src/gallium/auxiliary/pipe-loader/Makefile
  1767. src/gallium/drivers/Makefile
  1768. src/gallium/drivers/freedreno/Makefile
  1769. src/gallium/drivers/freedreno/a2xx/Makefile
  1770. src/gallium/drivers/freedreno/a3xx/Makefile
  1771. src/gallium/drivers/i915/Makefile
  1772. src/gallium/drivers/ilo/Makefile
  1773. src/gallium/drivers/llvmpipe/Makefile
  1774. src/gallium/drivers/nouveau/Makefile
  1775. src/gallium/drivers/nv30/Makefile
  1776. src/gallium/drivers/nv50/Makefile
  1777. src/gallium/drivers/nvc0/Makefile
  1778. src/gallium/drivers/r300/Makefile
  1779. src/gallium/drivers/r600/Makefile
  1780. src/gallium/drivers/radeon/Makefile
  1781. src/gallium/drivers/radeonsi/Makefile
  1782. src/gallium/drivers/rbug/Makefile
  1783. src/gallium/drivers/softpipe/Makefile
  1784. src/gallium/drivers/svga/Makefile
  1785. src/gallium/drivers/trace/Makefile
  1786. src/gallium/state_trackers/Makefile
  1787. src/gallium/state_trackers/clover/Makefile
  1788. src/gallium/state_trackers/dri/Makefile
  1789. src/gallium/state_trackers/dri/drm/Makefile
  1790. src/gallium/state_trackers/dri/sw/Makefile
  1791. src/gallium/state_trackers/egl/Makefile
  1792. src/gallium/state_trackers/gbm/Makefile
  1793. src/gallium/state_trackers/glx/Makefile
  1794. src/gallium/state_trackers/osmesa/Makefile
  1795. src/gallium/state_trackers/vdpau/Makefile
  1796. src/gallium/state_trackers/vega/Makefile
  1797. src/gallium/state_trackers/xa/Makefile
  1798. src/gallium/state_trackers/xorg/Makefile
  1799. src/gallium/state_trackers/xvmc/Makefile
  1800. src/gallium/targets/Makefile
  1801. src/gallium/targets/dri-freedreno/Makefile
  1802. src/gallium/targets/dri-i915/Makefile
  1803. src/gallium/targets/dri-ilo/Makefile
  1804. src/gallium/targets/dri-nouveau/Makefile
  1805. src/gallium/targets/dri-r300/Makefile
  1806. src/gallium/targets/dri-r600/Makefile
  1807. src/gallium/targets/dri-radeonsi/Makefile
  1808. src/gallium/targets/dri-swrast/Makefile
  1809. src/gallium/targets/dri-vmwgfx/Makefile
  1810. src/gallium/targets/egl-static/Makefile
  1811. src/gallium/targets/gbm/Makefile
  1812. src/gallium/targets/opencl/Makefile
  1813. src/gallium/targets/osmesa/Makefile
  1814. src/gallium/targets/pipe-loader/Makefile
  1815. src/gallium/targets/libgl-xlib/Makefile
  1816. src/gallium/targets/vdpau-nouveau/Makefile
  1817. src/gallium/targets/vdpau-r300/Makefile
  1818. src/gallium/targets/vdpau-r600/Makefile
  1819. src/gallium/targets/vdpau-radeonsi/Makefile
  1820. src/gallium/targets/vdpau-softpipe/Makefile
  1821. src/gallium/targets/xa-vmwgfx/Makefile
  1822. src/gallium/targets/xa-vmwgfx/xatracker.pc
  1823. src/gallium/targets/xorg-i915/Makefile
  1824. src/gallium/targets/xorg-nouveau/Makefile
  1825. src/gallium/targets/xorg-r600/Makefile
  1826. src/gallium/targets/xorg-radeonsi/Makefile
  1827. src/gallium/targets/xvmc-nouveau/Makefile
  1828. src/gallium/targets/xvmc-r300/Makefile
  1829. src/gallium/targets/xvmc-r600/Makefile
  1830. src/gallium/targets/xvmc-softpipe/Makefile
  1831. src/gallium/tests/trivial/Makefile
  1832. src/gallium/tests/unit/Makefile
  1833. src/gallium/winsys/Makefile
  1834. src/gallium/winsys/freedreno/drm/Makefile
  1835. src/gallium/winsys/i915/drm/Makefile
  1836. src/gallium/winsys/i915/sw/Makefile
  1837. src/gallium/winsys/intel/drm/Makefile
  1838. src/gallium/winsys/nouveau/drm/Makefile
  1839. src/gallium/winsys/radeon/drm/Makefile
  1840. src/gallium/winsys/svga/drm/Makefile
  1841. src/gallium/winsys/sw/dri/Makefile
  1842. src/gallium/winsys/sw/fbdev/Makefile
  1843. src/gallium/winsys/sw/null/Makefile
  1844. src/gallium/winsys/sw/wayland/Makefile
  1845. src/gallium/winsys/sw/wrapper/Makefile
  1846. src/gallium/winsys/sw/xlib/Makefile
  1847. src/gbm/Makefile
  1848. src/gbm/main/gbm.pc
  1849. src/glsl/Makefile
  1850. src/glsl/builtin_compiler/Makefile
  1851. src/glx/Makefile
  1852. src/glx/tests/Makefile
  1853. src/gtest/Makefile
  1854. src/mapi/Makefile
  1855. src/mapi/es1api/Makefile
  1856. src/mapi/es1api/glesv1_cm.pc
  1857. src/mapi/es2api/Makefile
  1858. src/mapi/es2api/glesv2.pc
  1859. src/mapi/glapi/Makefile
  1860. src/mapi/glapi/gen/Makefile
  1861. src/mapi/glapi/tests/Makefile
  1862. src/mapi/shared-glapi/Makefile
  1863. src/mapi/shared-glapi/tests/Makefile
  1864. src/mapi/vgapi/Makefile
  1865. src/mapi/vgapi/vg.pc
  1866. src/mesa/Makefile
  1867. src/mesa/gl.pc
  1868. src/mesa/drivers/dri/dri.pc
  1869. src/mesa/drivers/dri/common/Makefile
  1870. src/mesa/drivers/dri/common/xmlpool/Makefile
  1871. src/mesa/drivers/dri/i915/Makefile
  1872. src/mesa/drivers/dri/i965/Makefile
  1873. src/mesa/drivers/dri/Makefile
  1874. src/mesa/drivers/dri/nouveau/Makefile
  1875. src/mesa/drivers/dri/r200/Makefile
  1876. src/mesa/drivers/dri/radeon/Makefile
  1877. src/mesa/drivers/dri/swrast/Makefile
  1878. src/mesa/drivers/osmesa/Makefile
  1879. src/mesa/drivers/osmesa/osmesa.pc
  1880. src/mesa/drivers/x11/Makefile
  1881. src/mesa/libdricore/Makefile
  1882. src/mesa/main/tests/Makefile
  1883. src/mesa/main/tests/hash_table/Makefile
  1884. src/mesa/program/Makefile
  1885. src/mesa/x86-64/Makefile
  1886. src/mesa/x86/Makefile])
  1887. dnl Sort the dirs alphabetically
  1888. GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
  1889. GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
  1890. GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
  1891. GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
  1892. AC_OUTPUT
  1893. dnl
  1894. dnl Output some configuration info for the user
  1895. dnl
  1896. echo ""
  1897. echo " prefix: $prefix"
  1898. echo " exec_prefix: $exec_prefix"
  1899. echo " libdir: $libdir"
  1900. echo " includedir: $includedir"
  1901. dnl API info
  1902. echo ""
  1903. echo " OpenGL: $enable_opengl (ES1: $enable_gles1 ES2: $enable_gles2)"
  1904. echo " OpenVG: $enable_openvg"
  1905. dnl Driver info
  1906. echo ""
  1907. if test "x$enable_osmesa" != xno; then
  1908. echo " OSMesa: lib$OSMESA_LIB"
  1909. else
  1910. echo " OSMesa: no"
  1911. fi
  1912. if test "x$enable_dri" != xno; then
  1913. # cleanup the drivers var
  1914. dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
  1915. if test "x$DRI_DIRS" = x; then
  1916. echo " DRI drivers: no"
  1917. else
  1918. echo " DRI drivers: $dri_dirs"
  1919. fi
  1920. echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
  1921. fi
  1922. case "x$enable_glx$enable_xlib_glx" in
  1923. xyesyes)
  1924. echo " GLX: Xlib-based"
  1925. ;;
  1926. xyesno)
  1927. echo " GLX: DRI-based"
  1928. ;;
  1929. *)
  1930. echo " GLX: $enable_glx"
  1931. ;;
  1932. esac
  1933. dnl EGL
  1934. echo ""
  1935. echo " EGL: $enable_egl"
  1936. if test "$enable_egl" = yes; then
  1937. echo " EGL platforms: $EGL_PLATFORMS"
  1938. egl_drivers=""
  1939. if test "x$HAVE_EGL_DRIVER_GLX" != "x"; then
  1940. egl_drivers="$egl_drivers builtin:egl_glx"
  1941. fi
  1942. if test "x$HAVE_EGL_DRIVER_DRI2" != "x"; then
  1943. egl_drivers="$egl_drivers builtin:egl_dri2"
  1944. fi
  1945. if test "x$enable_gallium_egl" = xyes; then
  1946. echo " EGL drivers: ${egl_drivers} egl_gallium"
  1947. echo " EGL Gallium STs:$EGL_CLIENT_APIS"
  1948. else
  1949. echo " EGL drivers: $egl_drivers"
  1950. fi
  1951. fi
  1952. echo ""
  1953. if test "x$MESA_LLVM" = x1; then
  1954. echo " llvm: yes"
  1955. echo " llvm-config: $LLVM_CONFIG"
  1956. echo " llvm-version: $LLVM_VERSION"
  1957. else
  1958. echo " llvm: no"
  1959. fi
  1960. echo ""
  1961. if test -n "$with_gallium_drivers"; then
  1962. echo " Gallium: yes"
  1963. echo " Target dirs: $GALLIUM_TARGET_DIRS"
  1964. echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
  1965. echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
  1966. echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
  1967. else
  1968. echo " Gallium: no"
  1969. fi
  1970. dnl Libraries
  1971. echo ""
  1972. echo " Shared libs: $enable_shared"
  1973. echo " Static libs: $enable_static"
  1974. echo " Shared-glapi: $enable_shared_glapi"
  1975. dnl Compiler options
  1976. # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
  1977. cflags=`echo $CFLAGS | \
  1978. $SED 's/^ *//;s/ */ /;s/ *$//'`
  1979. cxxflags=`echo $CXXFLAGS | \
  1980. $SED 's/^ *//;s/ */ /;s/ *$//'`
  1981. defines=`echo $DEFINES | $SED 's/^ *//;s/ */ /;s/ *$//'`
  1982. echo ""
  1983. echo " CFLAGS: $cflags"
  1984. echo " CXXFLAGS: $cxxflags"
  1985. echo " Macros: $defines"
  1986. echo ""
  1987. if test "x$MESA_LLVM" = x1; then
  1988. echo " LLVM_CFLAGS: $LLVM_CFLAGS"
  1989. echo " LLVM_CXXFLAGS: $LLVM_CXXFLAGS"
  1990. echo " LLVM_CPPFLAGS: $LLVM_CPPFLAGS"
  1991. echo ""
  1992. fi
  1993. echo " PYTHON2: $PYTHON2"
  1994. echo ""
  1995. echo " Run '${MAKE-make}' to build Mesa"
  1996. echo ""