Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1 | dnl Process this file with autoconf to create configure. |
| 2 | |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 3 | AC_PREREQ([2.59]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 4 | |
Dan Nicholson | 00994ac | 2008-04-30 15:06:00 -0700 | [diff] [blame] | 5 | dnl Versioning - scrape the version from configs/default |
| 6 | m4_define([mesa_version], |
| 7 | [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n'])]) |
| 8 | m4_ifval(mesa_version,[],[ |
| 9 | m4_errprint([Error: Failed to get the Mesa version from the output of |
| 10 | running `make -f bin/version.mk version' |
| 11 | ]) |
| 12 | m4_exit([1]) |
| 13 | ]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 14 | |
Dan Nicholson | e97ab72 | 2008-07-01 08:55:42 -0700 | [diff] [blame] | 15 | dnl Tell the user about autoconf.html in the --help output |
| 16 | m4_divert_once([HELP_END], [ |
| 17 | See docs/autoconf.html for more details on the options for Mesa.]) |
| 18 | |
Dan Nicholson | 00994ac | 2008-04-30 15:06:00 -0700 | [diff] [blame] | 19 | AC_INIT([Mesa],[mesa_version], |
Dan Nicholson | f64d6fe | 2007-12-12 17:57:45 -0800 | [diff] [blame] | 20 | [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 21 | AC_CONFIG_AUX_DIR([bin]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 22 | AC_CANONICAL_HOST |
| 23 | |
Dan Nicholson | cc77e8f | 2008-05-05 14:38:22 -0700 | [diff] [blame] | 24 | dnl Versions for external dependencies |
Brian | 44557bf | 2009-01-10 16:32:32 -0700 | [diff] [blame] | 25 | LIBDRM_REQUIRED=2.4.3 |
Kristian Høgsberg | 154a9e5 | 2008-12-01 21:44:03 -0500 | [diff] [blame] | 26 | DRI2PROTO_REQUIRED=1.99.3 |
Dan Nicholson | cc77e8f | 2008-05-05 14:38:22 -0700 | [diff] [blame] | 27 | |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 28 | dnl Check for progs |
| 29 | AC_PROG_CPP |
| 30 | AC_PROG_CC |
| 31 | AC_PROG_CXX |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 32 | AC_CHECK_PROGS([MAKE], [gmake make]) |
| 33 | AC_PATH_PROG([MKDEP], [makedepend]) |
| 34 | AC_PATH_PROG([SED], [sed]) |
Dan Nicholson | 41b0070 | 2007-12-12 08:48:30 -0800 | [diff] [blame] | 35 | |
Dan Nicholson | bfb27b5 | 2008-06-30 09:40:30 -0700 | [diff] [blame] | 36 | dnl We need a POSIX shell for parts of the build. Assume we have one |
| 37 | dnl in most cases. |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 38 | case "$host_os" in |
| 39 | solaris*) |
| 40 | # Solaris /bin/sh is too old/non-POSIX compliant |
| 41 | AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh]) |
Dan Nicholson | bfb27b5 | 2008-06-30 09:40:30 -0700 | [diff] [blame] | 42 | SHELL="$POSIX_SHELL" |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 43 | ;; |
| 44 | esac |
| 45 | |
Dan Nicholson | db7fc63 | 2008-03-07 11:48:09 -0800 | [diff] [blame] | 46 | MKDEP_OPTIONS=-fdepend |
Kristian Høgsberg | bcecea6 | 2008-02-25 18:50:26 -0500 | [diff] [blame] | 47 | dnl Ask gcc where it's keeping its secret headers |
| 48 | if test "x$GCC" = xyes; then |
Dan Nicholson | a3d223f | 2009-01-30 10:52:09 -0800 | [diff] [blame] | 49 | for dir in include include-fixed; do |
| 50 | GCC_INCLUDES=`$CC -print-file-name=$dir` |
| 51 | if test "x$GCC_INCLUDES" != x && \ |
| 52 | test "$GCC_INCLUDES" != "$dir" && \ |
| 53 | test -d "$GCC_INCLUDES"; then |
| 54 | MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES" |
| 55 | fi |
| 56 | done |
Kristian Høgsberg | bcecea6 | 2008-02-25 18:50:26 -0500 | [diff] [blame] | 57 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 58 | AC_SUBST([MKDEP_OPTIONS]) |
Kristian Høgsberg | bcecea6 | 2008-02-25 18:50:26 -0500 | [diff] [blame] | 59 | |
Dan Nicholson | 41b0070 | 2007-12-12 08:48:30 -0800 | [diff] [blame] | 60 | dnl Make sure the pkg-config macros are defined |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 61 | m4_ifdef([PKG_PROG_PKG_CONFIG],[],[ |
Dan Nicholson | 7154d66 | 2008-04-30 13:53:37 -0700 | [diff] [blame] | 62 | m4_errprint([Error: Could not locate the pkg-config autoconf macros. |
| 63 | These are usually located in /usr/share/aclocal/pkg.m4. If your |
| 64 | macros are in a different location, try setting the environment |
| 65 | variable ACLOCAL="aclocal -I/other/macro/dir" before running |
| 66 | autoreconf. |
| 67 | ]) |
| 68 | m4_exit([1]) |
| 69 | ]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 70 | PKG_PROG_PKG_CONFIG() |
| 71 | |
| 72 | dnl LIB_DIR - library basename |
| 73 | LIB_DIR=`echo $libdir | $SED 's%.*/%%'` |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 74 | AC_SUBST([LIB_DIR]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 75 | |
| 76 | dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later |
| 77 | _SAVE_LDFLAGS="$LDFLAGS" |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 78 | AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker]) |
| 79 | AC_SUBST([EXTRA_LIB_PATH]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 80 | |
| 81 | dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later |
| 82 | _SAVE_CPPFLAGS="$CPPFLAGS" |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 83 | AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers]) |
| 84 | AC_SUBST([X11_INCLUDES]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 85 | |
| 86 | dnl Compiler macros |
| 87 | DEFINES="" |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 88 | AC_SUBST([DEFINES]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 89 | case "$host_os" in |
Julien Cristau | 7f7fc3e | 2009-01-12 16:04:32 +0100 | [diff] [blame] | 90 | *-gnu*) |
Dan Nicholson | 29f603a | 2009-01-12 11:10:31 -0800 | [diff] [blame] | 91 | DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 92 | ;; |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 93 | solaris*) |
| 94 | DEFINES="$DEFINES -DPTHREADS -DSVR4" |
| 95 | ;; |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 96 | esac |
| 97 | |
| 98 | dnl Add flags for gcc and g++ |
| 99 | if test "x$GCC" = xyes; then |
| 100 | CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math" |
Dan Nicholson | 0c275b6 | 2008-01-15 22:52:25 -0800 | [diff] [blame] | 101 | |
| 102 | # Work around aliasing bugs - developers should comment this out |
| 103 | CFLAGS="$CFLAGS -fno-strict-aliasing" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 104 | fi |
| 105 | if test "x$GXX" = xyes; then |
| 106 | CXXFLAGS="$CXXFLAGS -Wall" |
Dan Nicholson | 0c275b6 | 2008-01-15 22:52:25 -0800 | [diff] [blame] | 107 | |
| 108 | # Work around aliasing bugs - developers should comment this out |
| 109 | CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 110 | fi |
| 111 | |
| 112 | dnl These should be unnecessary, but let the user set them if they want |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 113 | AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler. |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 114 | Default is to use CFLAGS.]) |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 115 | AC_ARG_VAR([ARCH_FLAGS], [Additional architecture specific flags for the |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 116 | compiler. Default is to use CFLAGS.]) |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 117 | AC_SUBST([OPT_FLAGS]) |
| 118 | AC_SUBST([ARCH_FLAGS]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 119 | |
| 120 | dnl |
Dan Nicholson | ab57cba | 2007-12-26 11:12:29 -0600 | [diff] [blame] | 121 | dnl Hacks to enable 32 or 64 bit build |
| 122 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 123 | AC_ARG_ENABLE([32-bit], |
Dan Nicholson | ab57cba | 2007-12-26 11:12:29 -0600 | [diff] [blame] | 124 | [AS_HELP_STRING([--enable-32-bit], |
| 125 | [build 32-bit libraries @<:@default=auto@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 126 | [enable_32bit="$enableval"], |
| 127 | [enable_32bit=auto] |
Dan Nicholson | ab57cba | 2007-12-26 11:12:29 -0600 | [diff] [blame] | 128 | ) |
| 129 | if test "x$enable_32bit" = xyes; then |
| 130 | if test "x$GCC" = xyes; then |
| 131 | CFLAGS="$CFLAGS -m32" |
| 132 | fi |
| 133 | if test "x$GXX" = xyes; then |
| 134 | CXXFLAGS="$CXXFLAGS -m32" |
| 135 | fi |
| 136 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 137 | AC_ARG_ENABLE([64-bit], |
Dan Nicholson | ab57cba | 2007-12-26 11:12:29 -0600 | [diff] [blame] | 138 | [AS_HELP_STRING([--enable-64-bit], |
| 139 | [build 64-bit libraries @<:@default=auto@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 140 | [enable_64bit="$enableval"], |
| 141 | [enable_64bit=auto] |
Dan Nicholson | ab57cba | 2007-12-26 11:12:29 -0600 | [diff] [blame] | 142 | ) |
| 143 | if test "x$enable_64bit" = xyes; then |
| 144 | if test "x$GCC" = xyes; then |
| 145 | CFLAGS="$CFLAGS -m64" |
| 146 | fi |
| 147 | if test "x$GXX" = xyes; then |
| 148 | CXXFLAGS="$CXXFLAGS -m64" |
| 149 | fi |
| 150 | fi |
| 151 | |
| 152 | dnl |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 153 | dnl shared/static libraries, mimic libtool options |
| 154 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 155 | AC_ARG_ENABLE([static], |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 156 | [AS_HELP_STRING([--enable-static], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 157 | [build static libraries @<:@default=disabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 158 | [enable_static="$enableval"], |
| 159 | [enable_static=no] |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 160 | ) |
| 161 | case "x$enable_static" in |
| 162 | xyes|xno ) ;; |
| 163 | x ) enable_static=no ;; |
| 164 | * ) |
| 165 | AC_MSG_ERROR([Static library option '$enable_static' is not a valid]) |
| 166 | ;; |
| 167 | esac |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 168 | AC_ARG_ENABLE([shared], |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 169 | [AS_HELP_STRING([--disable-shared], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 170 | [build shared libraries @<:@default=enabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 171 | [enable_shared="$enableval"], |
| 172 | [enable_shared=yes] |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 173 | ) |
| 174 | case "x$enable_shared" in |
| 175 | xyes|xno ) ;; |
| 176 | x ) enable_shared=yes ;; |
| 177 | * ) |
| 178 | AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid]) |
| 179 | ;; |
| 180 | esac |
| 181 | |
| 182 | dnl Can't have static and shared libraries, default to static if user |
| 183 | dnl explicitly requested. If both disabled, set to static since shared |
| 184 | dnl was explicitly requirested. |
| 185 | case "x$enable_static$enable_shared" in |
| 186 | xyesyes ) |
| 187 | AC_MSG_WARN([Can't build static and shared libraries, disabling shared]) |
| 188 | enable_shared=no |
| 189 | ;; |
| 190 | xnono ) |
| 191 | AC_MSG_WARN([Can't disable both static and shared libraries, enabling static]) |
| 192 | enable_static=yes |
| 193 | ;; |
| 194 | esac |
| 195 | |
| 196 | dnl |
| 197 | dnl mklib options |
| 198 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 199 | AC_ARG_VAR([MKLIB_OPTIONS],[Options for the Mesa library script, mklib]) |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 200 | if test "$enable_static" = yes; then |
| 201 | MKLIB_OPTIONS="$MKLIB_OPTIONS -static" |
| 202 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 203 | AC_SUBST([MKLIB_OPTIONS]) |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 204 | |
Dan Nicholson | 23656c4 | 2007-12-12 09:02:31 -0800 | [diff] [blame] | 205 | dnl |
| 206 | dnl other compiler options |
| 207 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 208 | AC_ARG_ENABLE([debug], |
Dan Nicholson | 23656c4 | 2007-12-12 09:02:31 -0800 | [diff] [blame] | 209 | [AS_HELP_STRING([--enable-debug], |
| 210 | [use debug compiler flags and macros @<:@default=disabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 211 | [enable_debug="$enableval"], |
| 212 | [enable_debug=no] |
Dan Nicholson | 23656c4 | 2007-12-12 09:02:31 -0800 | [diff] [blame] | 213 | ) |
| 214 | if test "x$enable_debug" = xyes; then |
| 215 | DEFINES="$DEFINES -DDEBUG" |
| 216 | if test "x$GCC" = xyes; then |
| 217 | CFLAGS="$CFLAGS -g" |
| 218 | fi |
| 219 | if test "x$GXX" = xyes; then |
| 220 | CXXFLAGS="$CXXFLAGS -g" |
| 221 | fi |
| 222 | fi |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 223 | |
| 224 | dnl |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 225 | dnl library names |
| 226 | dnl |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 227 | if test "$enable_static" = yes; then |
| 228 | GL_LIB_NAME='lib$(GL_LIB).a' |
| 229 | GLU_LIB_NAME='lib$(GLU_LIB).a' |
| 230 | GLUT_LIB_NAME='lib$(GLUT_LIB).a' |
| 231 | GLW_LIB_NAME='lib$(GLW_LIB).a' |
| 232 | OSMESA_LIB_NAME='lib$(OSMESA_LIB).a' |
| 233 | else |
Siddhartha Chaudhuri | 1a46c8a | 2009-02-09 07:58:38 -0700 | [diff] [blame^] | 234 | case "$host_os" in |
| 235 | darwin* ) |
| 236 | LIB_EXTENSION='dylib' ;; |
| 237 | * ) |
| 238 | LIB_EXTENSION='so' ;; |
| 239 | esac |
| 240 | |
| 241 | GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION} |
| 242 | GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} |
| 243 | GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION} |
| 244 | GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION} |
| 245 | OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} |
| 246 | |
| 247 | GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*' |
| 248 | GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*' |
| 249 | GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*' |
| 250 | GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*' |
| 251 | OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 252 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 253 | AC_SUBST([GL_LIB_NAME]) |
| 254 | AC_SUBST([GLU_LIB_NAME]) |
| 255 | AC_SUBST([GLUT_LIB_NAME]) |
| 256 | AC_SUBST([GLW_LIB_NAME]) |
| 257 | AC_SUBST([OSMESA_LIB_NAME]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 258 | |
Siddhartha Chaudhuri | 1a46c8a | 2009-02-09 07:58:38 -0700 | [diff] [blame^] | 259 | AC_SUBST([GL_LIB_GLOB]) |
| 260 | AC_SUBST([GLU_LIB_GLOB]) |
| 261 | AC_SUBST([GLUT_LIB_GLOB]) |
| 262 | AC_SUBST([GLW_LIB_GLOB]) |
| 263 | AC_SUBST([OSMESA_LIB_GLOB]) |
| 264 | |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 265 | dnl |
Dan Nicholson | 871125a | 2008-06-04 13:00:35 -0700 | [diff] [blame] | 266 | dnl Arch/platform-specific settings |
| 267 | dnl |
| 268 | AC_ARG_ENABLE([asm], |
| 269 | [AS_HELP_STRING([--disable-asm], |
| 270 | [disable assembly usage @<:@default=enabled on supported plaforms@:>@])], |
| 271 | [enable_asm="$enableval"], |
| 272 | [enable_asm=yes] |
| 273 | ) |
| 274 | asm_arch="" |
| 275 | ASM_FLAGS="" |
| 276 | ASM_SOURCES="" |
| 277 | ASM_API="" |
| 278 | AC_MSG_CHECKING([whether to enable assembly]) |
| 279 | test "x$enable_asm" = xno && AC_MSG_RESULT([no]) |
| 280 | # disable if cross compiling on x86/x86_64 since we must run gen_matypes |
| 281 | if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then |
| 282 | case "$host_cpu" in |
| 283 | i?86 | x86_64) |
| 284 | enable_asm=no |
| 285 | AC_MSG_RESULT([no, cross compiling]) |
| 286 | ;; |
| 287 | esac |
| 288 | fi |
| 289 | # check for supported arches |
| 290 | if test "x$enable_asm" = xyes; then |
| 291 | case "$host_cpu" in |
| 292 | i?86) |
| 293 | case "$host_os" in |
Julien Cristau | 98fcdf3 | 2008-10-28 18:56:05 +0100 | [diff] [blame] | 294 | linux* | *freebsd* | dragonfly*) |
Dan Nicholson | 871125a | 2008-06-04 13:00:35 -0700 | [diff] [blame] | 295 | test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86 |
| 296 | ;; |
| 297 | esac |
| 298 | ;; |
| 299 | x86_64) |
| 300 | case "$host_os" in |
Julien Cristau | 98fcdf3 | 2008-10-28 18:56:05 +0100 | [diff] [blame] | 301 | linux* | *freebsd* | dragonfly*) |
Dan Nicholson | 871125a | 2008-06-04 13:00:35 -0700 | [diff] [blame] | 302 | test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64 |
| 303 | ;; |
| 304 | esac |
| 305 | ;; |
| 306 | powerpc) |
| 307 | case "$host_os" in |
| 308 | linux*) |
| 309 | asm_arch=ppc |
| 310 | ;; |
| 311 | esac |
| 312 | ;; |
| 313 | esac |
| 314 | |
| 315 | case "$asm_arch" in |
| 316 | x86) |
| 317 | ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" |
| 318 | ASM_SOURCES='$(X86_SOURCES)' |
| 319 | ASM_API='$(X86_API)' |
| 320 | AC_MSG_RESULT([yes, x86]) |
| 321 | ;; |
| 322 | x86_64) |
| 323 | ASM_FLAGS="-DUSE_X86_64_ASM" |
| 324 | ASM_SOURCES='$(X86-64_SOURCES)' |
| 325 | ASM_API='$(X86-64_API)' |
| 326 | AC_MSG_RESULT([yes, x86_64]) |
| 327 | ;; |
| 328 | ppc) |
| 329 | ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" |
| 330 | ASM_SOURCES='$(PPC_SOURCES)' |
| 331 | AC_MSG_RESULT([yes, ppc]) |
| 332 | ;; |
| 333 | *) |
| 334 | AC_MSG_RESULT([no, platform not supported]) |
| 335 | ;; |
| 336 | esac |
| 337 | fi |
| 338 | AC_SUBST([ASM_FLAGS]) |
| 339 | AC_SUBST([ASM_SOURCES]) |
| 340 | AC_SUBST([ASM_API]) |
| 341 | |
| 342 | dnl PIC code macro |
| 343 | MESA_PIC_FLAGS |
| 344 | |
| 345 | dnl Check to see if dlopen is in default libraries (like Solaris, which |
| 346 | dnl has it in libc), or if libdl is needed to get it. |
| 347 | AC_CHECK_FUNC([dlopen], [], |
| 348 | [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])]) |
| 349 | |
Dan Nicholson | 985e1cd | 2008-06-04 13:17:06 -0700 | [diff] [blame] | 350 | dnl See if posix_memalign is available |
| 351 | AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) |
| 352 | |
Dan Nicholson | 871125a | 2008-06-04 13:00:35 -0700 | [diff] [blame] | 353 | dnl SELinux awareness. |
| 354 | AC_ARG_ENABLE([selinux], |
| 355 | [AS_HELP_STRING([--enable-selinux], |
| 356 | [Build SELinux-aware Mesa @<:@default=disabled@:>@])], |
| 357 | [MESA_SELINUX="$enableval"], |
| 358 | [MESA_SELINUX=no]) |
| 359 | if test "x$enable_selinux" = "xyes"; then |
| 360 | AC_CHECK_HEADER([selinux/selinux.h],[], |
| 361 | [AC_MSG_ERROR([SELinux headers not found])]) |
| 362 | AC_CHECK_LIB([selinux],[is_selinux_enabled],[], |
| 363 | [AC_MSG_ERROR([SELinux library not found])]) |
| 364 | SELINUX_LIBS="-lselinux" |
| 365 | DEFINES="$DEFINES -DMESA_SELINUX" |
| 366 | fi |
| 367 | |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 368 | dnl OS-specific libraries |
| 369 | OS_LIBS="" |
| 370 | case "$host_os" in |
| 371 | solaris*) |
| 372 | OS_LIBS="-lc" |
| 373 | if test "x$GXX" != xyes; then |
| 374 | OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS" |
| 375 | fi |
| 376 | ;; |
| 377 | esac |
Dan Nicholson | 871125a | 2008-06-04 13:00:35 -0700 | [diff] [blame] | 378 | |
| 379 | dnl |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 380 | dnl Driver configuration. Options are xlib, dri and osmesa right now. |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 381 | dnl More later: directfb, fbdev, ... |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 382 | dnl |
Eric Anholt | 711222b | 2008-04-18 15:03:01 -0700 | [diff] [blame] | 383 | default_driver="xlib" |
| 384 | |
| 385 | case "$host_os" in |
| 386 | linux*) |
| 387 | case "$host_cpu" in |
| 388 | i*86|x86_64|powerpc*) default_driver="dri";; |
| 389 | esac |
| 390 | ;; |
Julien Cristau | 98fcdf3 | 2008-10-28 18:56:05 +0100 | [diff] [blame] | 391 | *freebsd* | dragonfly*) |
Eric Anholt | 711222b | 2008-04-18 15:03:01 -0700 | [diff] [blame] | 392 | case "$host_cpu" in |
| 393 | i*86|x86_64) default_driver="dri";; |
| 394 | esac |
| 395 | ;; |
| 396 | esac |
| 397 | |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 398 | AC_ARG_WITH([driver], |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 399 | [AS_HELP_STRING([--with-driver=DRIVER], |
Eric Anholt | 711222b | 2008-04-18 15:03:01 -0700 | [diff] [blame] | 400 | [driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or xlib@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 401 | [mesa_driver="$withval"], |
| 402 | [mesa_driver="$default_driver"]) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 403 | dnl Check for valid option |
| 404 | case "x$mesa_driver" in |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 405 | xxlib|xdri|xosmesa) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 406 | ;; |
| 407 | *) |
| 408 | AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option]) |
| 409 | ;; |
| 410 | esac |
| 411 | |
| 412 | dnl |
| 413 | dnl Driver specific build directories |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 414 | dnl |
| 415 | SRC_DIRS="mesa" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 416 | GLU_DIRS="sgi" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 417 | WINDOW_SYSTEM="" |
| 418 | case "$mesa_driver" in |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 419 | xlib) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 420 | DRIVER_DIRS="x11" |
| 421 | ;; |
| 422 | dri) |
| 423 | SRC_DIRS="glx/x11 $SRC_DIRS" |
| 424 | DRIVER_DIRS="dri" |
| 425 | WINDOW_SYSTEM="dri" |
| 426 | ;; |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 427 | osmesa) |
| 428 | DRIVER_DIRS="osmesa" |
| 429 | ;; |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 430 | esac |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 431 | AC_SUBST([SRC_DIRS]) |
| 432 | AC_SUBST([GLU_DIRS]) |
| 433 | AC_SUBST([DRIVER_DIRS]) |
| 434 | AC_SUBST([WINDOW_SYSTEM]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 435 | |
| 436 | dnl |
Dan Nicholson | 8e4d147 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 437 | dnl User supplied program configuration |
| 438 | dnl |
| 439 | if test -d "$srcdir/progs/demos"; then |
| 440 | default_demos=yes |
| 441 | else |
| 442 | default_demos=no |
| 443 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 444 | AC_ARG_WITH([demos], |
Dan Nicholson | 8e4d147 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 445 | [AS_HELP_STRING([--with-demos@<:@=DIRS...@:>@], |
| 446 | [optional comma delimited demo directories to build |
Dan Nicholson | c79c93c | 2007-12-12 18:13:04 -0800 | [diff] [blame] | 447 | @<:@default=auto if source available@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 448 | [with_demos="$withval"], |
| 449 | [with_demos="$default_demos"]) |
Dan Nicholson | 8e4d147 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 450 | if test "x$with_demos" = x; then |
| 451 | with_demos=no |
| 452 | fi |
| 453 | |
| 454 | dnl If $with_demos is yes, directories will be added as libs available |
| 455 | PROGRAM_DIRS="" |
| 456 | case "$with_demos" in |
Dan Nicholson | b957655 | 2008-03-10 14:05:46 -0700 | [diff] [blame] | 457 | no) ;; |
| 458 | yes) |
| 459 | # If the driver isn't osmesa, we have libGL and can build xdemos |
| 460 | if test "$mesa_driver" != osmesa; then |
| 461 | PROGRAM_DIRS="xdemos" |
| 462 | fi |
| 463 | ;; |
Dan Nicholson | 8e4d147 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 464 | *) |
| 465 | # verify the requested demos directories exist |
| 466 | demos=`IFS=,; echo $with_demos` |
| 467 | for demo in $demos; do |
| 468 | test -d "$srcdir/progs/$demo" || \ |
| 469 | AC_MSG_ERROR([Program directory '$demo' doesn't exist]) |
| 470 | done |
| 471 | PROGRAM_DIRS="$demos" |
| 472 | ;; |
| 473 | esac |
| 474 | |
| 475 | dnl |
Dan Nicholson | e6a0609 | 2008-05-05 15:16:22 -0700 | [diff] [blame] | 476 | dnl Find out if X is available. The variable have_x is set if libX11 is |
Dan Nicholson | 99803a4 | 2008-07-01 09:03:15 -0700 | [diff] [blame] | 477 | dnl found to mimic AC_PATH_XTRA. |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 478 | dnl |
| 479 | if test -n "$PKG_CONFIG"; then |
| 480 | AC_MSG_CHECKING([pkg-config files for X11 are available]) |
Dan Nicholson | e6a0609 | 2008-05-05 15:16:22 -0700 | [diff] [blame] | 481 | PKG_CHECK_EXISTS([x11],[ |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 482 | x11_pkgconfig=yes |
| 483 | have_x=yes |
Dan Nicholson | e6a0609 | 2008-05-05 15:16:22 -0700 | [diff] [blame] | 484 | ],[ |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 485 | x11_pkgconfig=no |
Dan Nicholson | e6a0609 | 2008-05-05 15:16:22 -0700 | [diff] [blame] | 486 | ]) |
| 487 | AC_MSG_RESULT([$x11_pkgconfig]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 488 | else |
| 489 | x11_pkgconfig=no |
| 490 | fi |
| 491 | dnl Use the autoconf macro if no pkg-config files |
| 492 | if test "$x11_pkgconfig" = no; then |
| 493 | AC_PATH_XTRA |
| 494 | fi |
| 495 | |
Dan Nicholson | 99803a4 | 2008-07-01 09:03:15 -0700 | [diff] [blame] | 496 | dnl Try to tell the user that the --x-* options are only used when |
| 497 | dnl pkg-config is not available. This must be right after AC_PATH_XTRA. |
| 498 | m4_divert_once([HELP_BEGIN], |
| 499 | [These options are only used when the X libraries cannot be found by the |
| 500 | pkg-config utility.]) |
| 501 | |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 502 | dnl We need X for xlib and dri, so bomb now if it's not found |
| 503 | case "$mesa_driver" in |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 504 | xlib|dri) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 505 | if test "$no_x" = yes; then |
| 506 | AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver]) |
| 507 | fi |
| 508 | ;; |
| 509 | esac |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 510 | |
Dan Nicholson | 2d709fe | 2008-05-06 10:51:49 -0700 | [diff] [blame] | 511 | dnl XCB - this is only used for GLX right now |
| 512 | AC_ARG_ENABLE([xcb], |
| 513 | [AS_HELP_STRING([--enable-xcb], |
| 514 | [use XCB for GLX @<:@default=disabled@:>@])], |
| 515 | [enable_xcb="$enableval"], |
| 516 | [enable_xcb=no]) |
| 517 | if test "x$enable_xcb" = xyes; then |
| 518 | DEFINES="$DEFINES -DUSE_XCB" |
| 519 | else |
| 520 | enable_xcb=no |
| 521 | fi |
| 522 | |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 523 | dnl |
| 524 | dnl libGL configuration per driver |
| 525 | dnl |
| 526 | case "$mesa_driver" in |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 527 | xlib) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 528 | if test "$x11_pkgconfig" = yes; then |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 529 | PKG_CHECK_MODULES([XLIBGL], [x11 xext]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 530 | GL_PC_REQ_PRIV="x11 xext" |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 531 | X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS" |
| 532 | GL_LIB_DEPS="$XLIBGL_LIBS" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 533 | else |
| 534 | # should check these... |
| 535 | X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" |
| 536 | GL_LIB_DEPS="$X_LIBS -lX11 -lXext" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 537 | GL_PC_LIB_PRIV="$GL_LIB_DEPS" |
| 538 | GL_PC_CFLAGS="$X11_INCLUDES" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 539 | fi |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 540 | GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 541 | GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $OS_LIBS" |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 542 | |
| 543 | # if static, move the external libraries to the programs |
| 544 | # and empty the libraries for libGL |
| 545 | if test "$enable_static" = yes; then |
| 546 | APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS" |
| 547 | GL_LIB_DEPS="" |
| 548 | fi |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 549 | ;; |
| 550 | dri) |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 551 | # DRI must be shared, I think |
| 552 | if test "$enable_static" = yes; then |
| 553 | AC_MSG_ERROR([Can't use static libraries for DRI drivers]) |
| 554 | fi |
| 555 | |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 556 | # Check for libdrm |
Dan Nicholson | cc77e8f | 2008-05-05 14:38:22 -0700 | [diff] [blame] | 557 | PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) |
| 558 | PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 559 | GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" |
| 560 | DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 561 | |
| 562 | # find the DRI deps for libGL |
| 563 | if test "$x11_pkgconfig" = yes; then |
Dan Nicholson | 2d709fe | 2008-05-06 10:51:49 -0700 | [diff] [blame] | 564 | # add xcb modules if necessary |
| 565 | dri_modules="x11 xext xxf86vm xdamage xfixes" |
| 566 | if test "$enable_xcb" = yes; then |
| 567 | dri_modules="$dri_modules x11-xcb xcb-glx" |
| 568 | fi |
| 569 | |
| 570 | PKG_CHECK_MODULES([DRIGL], [$dri_modules]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 571 | GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 572 | X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" |
| 573 | GL_LIB_DEPS="$DRIGL_LIBS" |
| 574 | else |
| 575 | # should check these... |
| 576 | X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" |
| 577 | GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 578 | GL_PC_LIB_PRIV="$GL_LIB_DEPS" |
| 579 | GL_PC_CFLAGS="$X11_INCLUDES" |
Dan Nicholson | 2d709fe | 2008-05-06 10:51:49 -0700 | [diff] [blame] | 580 | |
| 581 | # XCB can only be used from pkg-config |
| 582 | if test "$enable_xcb" = yes; then |
| 583 | PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 584 | GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx" |
Dan Nicholson | 2d709fe | 2008-05-06 10:51:49 -0700 | [diff] [blame] | 585 | X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS" |
| 586 | GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS" |
| 587 | fi |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 588 | fi |
| 589 | |
| 590 | # need DRM libs, -lpthread, etc. |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 591 | GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 592 | GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS $OS_LIBS" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 593 | ;; |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 594 | osmesa) |
| 595 | # No libGL for osmesa |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 596 | GL_LIB_DEPS="$OS_LIBS" |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 597 | ;; |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 598 | esac |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 599 | AC_SUBST([GL_LIB_DEPS]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 600 | AC_SUBST([GL_PC_REQ_PRIV]) |
| 601 | AC_SUBST([GL_PC_LIB_PRIV]) |
| 602 | AC_SUBST([GL_PC_CFLAGS]) |
| 603 | AC_SUBST([DRI_PC_REQ_PRIV]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 604 | |
| 605 | dnl |
| 606 | dnl More X11 setup |
| 607 | dnl |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 608 | if test "$mesa_driver" = xlib; then |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 609 | DEFINES="$DEFINES -DUSE_XSHM" |
| 610 | fi |
| 611 | |
| 612 | dnl |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 613 | dnl More DRI setup |
| 614 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 615 | AC_ARG_ENABLE([glx-tls], |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 616 | [AS_HELP_STRING([--enable-glx-tls], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 617 | [enable TLS support in GLX @<:@default=disabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 618 | [GLX_USE_TLS="$enableval"], |
| 619 | [GLX_USE_TLS=no]) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 620 | dnl Directory for DRI drivers |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 621 | AC_ARG_WITH([dri-driverdir], |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 622 | [AS_HELP_STRING([--with-dri-driverdir=DIR], |
Dan Nicholson | 5dbbde5 | 2008-05-06 06:21:41 -0700 | [diff] [blame] | 623 | [directory for the DRI drivers @<:@${libdir}/dri@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 624 | [DRI_DRIVER_INSTALL_DIR="$withval"], |
Dan Nicholson | 5dbbde5 | 2008-05-06 06:21:41 -0700 | [diff] [blame] | 625 | [DRI_DRIVER_INSTALL_DIR='${libdir}/dri']) |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 626 | AC_SUBST([DRI_DRIVER_INSTALL_DIR]) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 627 | dnl Direct rendering or just indirect rendering |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 628 | AC_ARG_ENABLE([driglx-direct], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 629 | [AS_HELP_STRING([--disable-driglx-direct], |
| 630 | [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 631 | [driglx_direct="$enableval"], |
| 632 | [driglx_direct="yes"]) |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 633 | dnl Which drivers to build - default is chosen by platform |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 634 | AC_ARG_WITH([dri-drivers], |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 635 | [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@], |
Dan Nicholson | 5cae1b7 | 2008-06-30 10:28:02 -0700 | [diff] [blame] | 636 | [comma delimited DRI drivers list, e.g. |
| 637 | "swrast,i965,radeon,nouveau" @<:@default=auto@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 638 | [with_dri_drivers="$withval"], |
| 639 | [with_dri_drivers=yes]) |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 640 | if test "x$with_dri_drivers" = x; then |
| 641 | with_dri_drivers=no |
| 642 | fi |
| 643 | |
| 644 | dnl If $with_dri_drivers is yes, directories will be added through |
| 645 | dnl platform checks |
| 646 | DRI_DIRS="" |
| 647 | case "$with_dri_drivers" in |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 648 | no) ;; |
| 649 | yes) |
| 650 | DRI_DIRS="yes" |
| 651 | ;; |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 652 | *) |
| 653 | # verify the requested driver directories exist |
Dan Nicholson | e6e4f25 | 2008-07-06 14:17:39 -0700 | [diff] [blame] | 654 | dri_drivers=`IFS=', '; echo $with_dri_drivers` |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 655 | for driver in $dri_drivers; do |
| 656 | test -d "$srcdir/src/mesa/drivers/dri/$driver" || \ |
| 657 | AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist]) |
| 658 | done |
| 659 | DRI_DIRS="$dri_drivers" |
| 660 | ;; |
| 661 | esac |
| 662 | |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 663 | dnl Just default to no EGL for now |
| 664 | USING_EGL=0 |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 665 | AC_SUBST([USING_EGL]) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 666 | |
| 667 | dnl Set DRI_DIRS, DEFINES and LIB_DEPS |
| 668 | if test "$mesa_driver" = dri; then |
| 669 | # Use TLS in GLX? |
| 670 | if test "x$GLX_USE_TLS" = xyes; then |
| 671 | DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS" |
| 672 | fi |
| 673 | |
| 674 | if test "x$USING_EGL" = x1; then |
| 675 | PROGRAM_DIRS="egl" |
| 676 | fi |
| 677 | |
| 678 | # Platform specific settings and drivers to build |
| 679 | case "$host_os" in |
| 680 | linux*) |
| 681 | DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" |
| 682 | DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS" |
| 683 | if test "x$driglx_direct" = xyes; then |
| 684 | DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" |
| 685 | fi |
| 686 | |
| 687 | case "$host_cpu" in |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 688 | x86_64) |
Dan Nicholson | a76e245 | 2007-12-07 11:25:08 -0800 | [diff] [blame] | 689 | # ffb, gamma, and sis are missing because they have not be |
| 690 | # converted to use the new interface. i810 are missing |
| 691 | # because there is no x86-64 system where they could *ever* |
| 692 | # be used. |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 693 | if test "x$DRI_DIRS" = "xyes"; then |
Dan Nicholson | a76e245 | 2007-12-07 11:25:08 -0800 | [diff] [blame] | 694 | DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \ |
George Sapountzis | 280bf89 | 2008-05-11 14:43:40 +0300 | [diff] [blame] | 695 | savage tdfx unichrome swrast" |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 696 | fi |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 697 | ;; |
| 698 | powerpc*) |
Dan Nicholson | a76e245 | 2007-12-07 11:25:08 -0800 | [diff] [blame] | 699 | # Build only the drivers for cards that exist on PowerPC. |
| 700 | # At some point MGA will be added, but not yet. |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 701 | if test "x$DRI_DIRS" = "xyes"; then |
George Sapountzis | 280bf89 | 2008-05-11 14:43:40 +0300 | [diff] [blame] | 702 | DRI_DIRS="mach64 r128 r200 r300 radeon tdfx swrast" |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 703 | fi |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 704 | ;; |
Dave Airlie | 2b0e75e | 2008-06-12 12:06:50 +1000 | [diff] [blame] | 705 | sparc*) |
| 706 | # Build only the drivers for cards that exist on sparc` |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 707 | if test "x$DRI_DIRS" = "xyes"; then |
Dave Airlie | 41bdb88 | 2008-06-12 16:26:46 +1000 | [diff] [blame] | 708 | DRI_DIRS="mach64 r128 r200 r300 radeon ffb swrast" |
Dave Airlie | 2b0e75e | 2008-06-12 12:06:50 +1000 | [diff] [blame] | 709 | fi |
| 710 | ;; |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 711 | esac |
| 712 | ;; |
Hasso Tepper | 9f8df2d | 2008-04-09 10:51:21 -0700 | [diff] [blame] | 713 | freebsd* | dragonfly*) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 714 | DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1" |
| 715 | DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS" |
| 716 | DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" |
| 717 | if test "x$driglx_direct" = xyes; then |
| 718 | DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" |
| 719 | fi |
| 720 | if test "x$GXX" = xyes; then |
| 721 | CXXFLAGS="$CXXFLAGS -ansi -pedantic" |
| 722 | fi |
| 723 | |
Dan Nicholson | a76e245 | 2007-12-07 11:25:08 -0800 | [diff] [blame] | 724 | # ffb and gamma are missing because they have not been converted |
| 725 | # to use the new interface. |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 726 | if test "x$DRI_DIRS" = "xyes"; then |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 727 | DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \ |
George Sapountzis | 280bf89 | 2008-05-11 14:43:40 +0300 | [diff] [blame] | 728 | unichrome savage sis swrast" |
Dan Nicholson | af3d2f2 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 729 | fi |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 730 | ;; |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 731 | solaris*) |
| 732 | DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" |
| 733 | DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" |
| 734 | if test "x$driglx_direct" = xyes; then |
| 735 | DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" |
| 736 | fi |
| 737 | ;; |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 738 | esac |
Dan Nicholson | 112a40e | 2008-02-21 10:17:19 -0800 | [diff] [blame] | 739 | |
| 740 | # default drivers |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 741 | if test "x$DRI_DIRS" = "xyes"; then |
Dan Nicholson | 112a40e | 2008-02-21 10:17:19 -0800 | [diff] [blame] | 742 | DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ |
George Sapountzis | 280bf89 | 2008-05-11 14:43:40 +0300 | [diff] [blame] | 743 | savage sis tdfx trident unichrome ffb swrast" |
Dan Nicholson | 112a40e | 2008-02-21 10:17:19 -0800 | [diff] [blame] | 744 | fi |
| 745 | |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 746 | DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` |
| 747 | |
| 748 | # Check for expat |
| 749 | EXPAT_INCLUDES="" |
| 750 | EXPAT_LIB=-lexpat |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 751 | AC_ARG_WITH([expat], |
| 752 | [AS_HELP_STRING([--with-expat=DIR], |
| 753 | [expat install directory])],[ |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 754 | EXPAT_INCLUDES="-I$withval/include" |
| 755 | CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" |
| 756 | LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR" |
| 757 | EXPAT_LIB="-L$withval/$LIB_DIR -lexpat" |
| 758 | ]) |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 759 | AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])]) |
| 760 | AC_CHECK_LIB([expat],[XML_ParserCreate],[], |
| 761 | [AC_MSG_ERROR([Expat required for DRI.])]) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 762 | |
| 763 | # put all the necessary libs together |
Eric Anholt | 050c533 | 2008-03-20 17:28:58 -0700 | [diff] [blame] | 764 | DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS" |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 765 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 766 | AC_SUBST([DRI_DIRS]) |
| 767 | AC_SUBST([EXPAT_INCLUDES]) |
| 768 | AC_SUBST([DRI_LIB_DEPS]) |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 769 | |
| 770 | dnl |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 771 | dnl OSMesa configuration |
| 772 | dnl |
Dan Nicholson | a130718 | 2007-12-12 17:49:49 -0800 | [diff] [blame] | 773 | if test "$mesa_driver" = xlib; then |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 774 | default_gl_osmesa=yes |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 775 | else |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 776 | default_gl_osmesa=no |
Dan Nicholson | 44d9914 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 777 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 778 | AC_ARG_ENABLE([gl-osmesa], |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 779 | [AS_HELP_STRING([--enable-gl-osmesa], |
| 780 | [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 781 | [gl_osmesa="$enableval"], |
| 782 | [gl_osmesa="$default_gl_osmesa"]) |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 783 | if test "x$gl_osmesa" = xyes; then |
| 784 | if test "$mesa_driver" = osmesa; then |
| 785 | AC_MSG_ERROR([libGL is not available for OSMesa driver]) |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 786 | else |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 787 | DRIVER_DIRS="$DRIVER_DIRS osmesa" |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 788 | fi |
| 789 | fi |
| 790 | |
Dan Nicholson | 6689f9e | 2007-12-05 21:04:15 -0800 | [diff] [blame] | 791 | dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...) |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 792 | AC_ARG_WITH([osmesa-bits], |
Dan Nicholson | 6689f9e | 2007-12-05 21:04:15 -0800 | [diff] [blame] | 793 | [AS_HELP_STRING([--with-osmesa-bits=BITS], |
| 794 | [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 795 | [osmesa_bits="$withval"], |
| 796 | [osmesa_bits=8]) |
Dan Nicholson | 6689f9e | 2007-12-05 21:04:15 -0800 | [diff] [blame] | 797 | if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then |
| 798 | AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver]) |
| 799 | osmesa_bits=8 |
| 800 | fi |
| 801 | case "x$osmesa_bits" in |
| 802 | x8) |
| 803 | OSMESA_LIB=OSMesa |
| 804 | ;; |
| 805 | x16|x32) |
| 806 | OSMESA_LIB="OSMesa$osmesa_bits" |
| 807 | DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31" |
| 808 | ;; |
| 809 | *) |
| 810 | AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option]) |
| 811 | ;; |
| 812 | esac |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 813 | AC_SUBST([OSMESA_LIB]) |
Dan Nicholson | 6689f9e | 2007-12-05 21:04:15 -0800 | [diff] [blame] | 814 | |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 815 | case "$mesa_driver" in |
| 816 | osmesa) |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 817 | # only link libraries with osmesa if shared |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 818 | if test "$enable_static" = no; then |
Adam Jackson | 66611f2 | 2008-02-15 13:49:12 -0500 | [diff] [blame] | 819 | OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS" |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 820 | else |
| 821 | OSMESA_LIB_DEPS="" |
| 822 | fi |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 823 | OSMESA_MESA_DEPS="" |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 824 | OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS" |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 825 | ;; |
| 826 | *) |
| 827 | # Link OSMesa to libGL otherwise |
| 828 | OSMESA_LIB_DEPS="" |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 829 | # only link libraries with osmesa if shared |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 830 | if test "$enable_static" = no; then |
| 831 | OSMESA_MESA_DEPS='-l$(GL_LIB)' |
| 832 | else |
| 833 | OSMESA_MESA_DEPS="" |
| 834 | fi |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 835 | OSMESA_PC_REQ="gl" |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 836 | ;; |
| 837 | esac |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 838 | if test "$enable_static" = no; then |
| 839 | OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS" |
| 840 | fi |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 841 | OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS" |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 842 | AC_SUBST([OSMESA_LIB_DEPS]) |
| 843 | AC_SUBST([OSMESA_MESA_DEPS]) |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 844 | AC_SUBST([OSMESA_PC_REQ]) |
| 845 | AC_SUBST([OSMESA_PC_LIB_PRIV]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 846 | |
| 847 | dnl |
| 848 | dnl GLU configuration |
| 849 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 850 | AC_ARG_ENABLE([glu], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 851 | [AS_HELP_STRING([--disable-glu], |
| 852 | [enable OpenGL Utility library @<:@default=enabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 853 | [enable_glu="$enableval"], |
| 854 | [enable_glu=yes]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 855 | if test "x$enable_glu" = xyes; then |
| 856 | SRC_DIRS="$SRC_DIRS glu" |
| 857 | |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 858 | case "$mesa_driver" in |
| 859 | osmesa) |
Dan Nicholson | 6689f9e | 2007-12-05 21:04:15 -0800 | [diff] [blame] | 860 | # If GLU is available and we have libOSMesa (not 16 or 32), |
| 861 | # we can build the osdemos |
Dan Nicholson | 8e4d147 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 862 | if test "$with_demos" = yes && test "$osmesa_bits" = 8; then |
Dan Nicholson | 6689f9e | 2007-12-05 21:04:15 -0800 | [diff] [blame] | 863 | PROGRAM_DIRS="$PROGRAM_DIRS osdemos" |
| 864 | fi |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 865 | |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 866 | # Link libGLU to libOSMesa instead of libGL |
| 867 | GLU_LIB_DEPS="" |
Dan Nicholson | 8be02fc | 2008-12-14 09:35:29 -0800 | [diff] [blame] | 868 | GLU_PC_REQ="osmesa" |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 869 | if test "$enable_static" = no; then |
| 870 | GLU_MESA_DEPS='-l$(OSMESA_LIB)' |
| 871 | else |
| 872 | GLU_MESA_DEPS="" |
| 873 | fi |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 874 | ;; |
| 875 | *) |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 876 | # If static, empty GLU_LIB_DEPS and add libs for programs to link |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 877 | GLU_PC_REQ="gl" |
| 878 | GLU_PC_LIB_PRIV="-lm" |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 879 | if test "$enable_static" = no; then |
| 880 | GLU_LIB_DEPS="-lm" |
| 881 | GLU_MESA_DEPS='-l$(GL_LIB)' |
| 882 | else |
| 883 | GLU_LIB_DEPS="" |
| 884 | GLU_MESA_DEPS="" |
| 885 | APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++" |
| 886 | fi |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 887 | ;; |
| 888 | esac |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 889 | fi |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 890 | if test "$enable_static" = no; then |
| 891 | GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS" |
| 892 | fi |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 893 | GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS" |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 894 | AC_SUBST([GLU_LIB_DEPS]) |
| 895 | AC_SUBST([GLU_MESA_DEPS]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 896 | AC_SUBST([GLU_PC_REQ]) |
| 897 | AC_SUBST([GLU_PC_REQ_PRIV]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 898 | AC_SUBST([GLU_PC_LIB_PRIV]) |
| 899 | AC_SUBST([GLU_PC_CFLAGS]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 900 | |
| 901 | dnl |
| 902 | dnl GLw configuration |
| 903 | dnl |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 904 | AC_ARG_ENABLE([glw], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 905 | [AS_HELP_STRING([--disable-glw], |
| 906 | [enable Xt/Motif widget library @<:@default=enabled@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 907 | [enable_glw="$enableval"], |
| 908 | [enable_glw=yes]) |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 909 | dnl Don't build GLw on osmesa |
| 910 | if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then |
| 911 | AC_MSG_WARN([Disabling GLw since the driver is OSMesa]) |
| 912 | enable_glw=no |
| 913 | fi |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 914 | AC_ARG_ENABLE([motif], |
| 915 | [AS_HELP_STRING([--enable-motif], |
| 916 | [use Motif widgets in GLw @<:@default=disabled@:>@])], |
| 917 | [enable_motif="$enableval"], |
| 918 | [enable_motif=no]) |
| 919 | |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 920 | if test "x$enable_glw" = xyes; then |
| 921 | SRC_DIRS="$SRC_DIRS glw" |
| 922 | if test "$x11_pkgconfig" = yes; then |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 923 | PKG_CHECK_MODULES([GLW],[x11 xt]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 924 | GLW_PC_REQ_PRIV="x11 xt" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 925 | GLW_LIB_DEPS="$GLW_LIBS" |
| 926 | else |
| 927 | # should check these... |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 928 | GLW_LIB_DEPS="$X_LIBS -lXt -lX11" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 929 | GLW_PC_LIB_PRIV="$GLW_LIB_DEPS" |
| 930 | GLW_PC_CFLAGS="$X11_INCLUDES" |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 931 | fi |
| 932 | |
| 933 | GLW_SOURCES="GLwDrawA.c" |
| 934 | MOTIF_CFLAGS= |
| 935 | if test "x$enable_motif" = xyes; then |
| 936 | GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c" |
| 937 | AC_PATH_PROG([MOTIF_CONFIG], [motif-config], [no]) |
| 938 | if test "x$MOTIF_CONFIG" != xno; then |
| 939 | MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags` |
| 940 | MOTIF_LIBS=`$MOTIF_CONFIG --libs` |
| 941 | else |
| 942 | AC_CHECK_HEADER([Xm/PrimitiveP.h], [], |
| 943 | [AC_MSG_ERROR([Can't locate Motif headers])]) |
| 944 | AC_CHECK_LIB([Xm], [XmGetPixmap], [MOTIF_LIBS="-lXm"], |
| 945 | [AC_MSG_ERROR([Can't locate Motif Xm library])]) |
| 946 | fi |
| 947 | # MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11 |
| 948 | GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 949 | GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV" |
| 950 | GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 951 | fi |
| 952 | |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 953 | # If static, empty GLW_LIB_DEPS and add libs for programs to link |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 954 | GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV $OS_LIBS" |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 955 | if test "$enable_static" = no; then |
| 956 | GLW_MESA_DEPS='-l$(GL_LIB)' |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 957 | GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS" |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 958 | else |
| 959 | APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS" |
| 960 | GLW_LIB_DEPS="" |
| 961 | GLW_MESA_DEPS="" |
| 962 | fi |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 963 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 964 | AC_SUBST([GLW_LIB_DEPS]) |
| 965 | AC_SUBST([GLW_MESA_DEPS]) |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 966 | AC_SUBST([GLW_SOURCES]) |
| 967 | AC_SUBST([MOTIF_CFLAGS]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 968 | AC_SUBST([GLW_PC_REQ_PRIV]) |
| 969 | AC_SUBST([GLW_PC_LIB_PRIV]) |
| 970 | AC_SUBST([GLW_PC_CFLAGS]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 971 | |
| 972 | dnl |
| 973 | dnl GLUT configuration |
| 974 | dnl |
| 975 | if test -f "$srcdir/include/GL/glut.h"; then |
| 976 | default_glut=yes |
| 977 | else |
| 978 | default_glut=no |
| 979 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 980 | AC_ARG_ENABLE([glut], |
Dan Nicholson | 79ad458 | 2007-12-07 19:11:01 -0800 | [diff] [blame] | 981 | [AS_HELP_STRING([--disable-glut], |
| 982 | [enable GLUT library @<:@default=enabled if source available@:>@])], |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 983 | [enable_glut="$enableval"], |
| 984 | [enable_glut="$default_glut"]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 985 | |
| 986 | dnl Can't build glut if GLU not available |
| 987 | if test "x$enable_glu$enable_glut" = xnoyes; then |
| 988 | AC_MSG_WARN([Disabling glut since GLU is disabled]) |
| 989 | enable_glut=no |
| 990 | fi |
Dan Nicholson | 979ff51 | 2007-12-05 18:47:01 -0800 | [diff] [blame] | 991 | dnl Don't build glut on osmesa |
| 992 | if test "x$enable_glut" = xyes && test "$mesa_driver" = osmesa; then |
| 993 | AC_MSG_WARN([Disabling glut since the driver is OSMesa]) |
| 994 | enable_glut=no |
| 995 | fi |
| 996 | |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 997 | if test "x$enable_glut" = xyes; then |
| 998 | SRC_DIRS="$SRC_DIRS glut/glx" |
| 999 | GLUT_CFLAGS="" |
| 1000 | if test "x$GCC" = xyes; then |
| 1001 | GLUT_CFLAGS="-fexceptions" |
| 1002 | fi |
| 1003 | if test "$x11_pkgconfig" = yes; then |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 1004 | PKG_CHECK_MODULES([GLUT],[x11 xmu xi]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 1005 | GLUT_PC_REQ_PRIV="x11 xmu xi" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1006 | GLUT_LIB_DEPS="$GLUT_LIBS" |
| 1007 | else |
| 1008 | # should check these... |
Dan Nicholson | 70d0c83 | 2007-12-07 11:12:20 -0800 | [diff] [blame] | 1009 | GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 1010 | GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS" |
| 1011 | GLUT_PC_CFLAGS="$X11_INCLUDES" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1012 | fi |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 1013 | GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS" |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 1014 | GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm $OS_LIBS" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1015 | |
| 1016 | # If glut is available, we can build most programs |
Dan Nicholson | 8e4d147 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 1017 | if test "$with_demos" = yes; then |
| 1018 | PROGRAM_DIRS="$PROGRAM_DIRS demos redbook samples glsl" |
| 1019 | fi |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1020 | |
Dan Nicholson | 8858633 | 2007-11-15 08:59:57 -0800 | [diff] [blame] | 1021 | # If static, empty GLUT_LIB_DEPS and add libs for programs to link |
| 1022 | if test "$enable_static" = no; then |
| 1023 | GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)' |
| 1024 | else |
| 1025 | APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS" |
| 1026 | GLUT_LIB_DEPS="" |
| 1027 | GLUT_MESA_DEPS="" |
| 1028 | fi |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1029 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 1030 | AC_SUBST([GLUT_LIB_DEPS]) |
| 1031 | AC_SUBST([GLUT_MESA_DEPS]) |
| 1032 | AC_SUBST([GLUT_CFLAGS]) |
Dan Nicholson | 71e208b | 2008-11-24 11:01:57 -0800 | [diff] [blame] | 1033 | AC_SUBST([GLUT_PC_REQ_PRIV]) |
| 1034 | AC_SUBST([GLUT_PC_LIB_PRIV]) |
| 1035 | AC_SUBST([GLUT_PC_CFLAGS]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1036 | |
| 1037 | dnl |
| 1038 | dnl Program library dependencies |
| 1039 | dnl Only libm is added here if necessary as the libraries should |
| 1040 | dnl be pulled in by the linker |
| 1041 | dnl |
| 1042 | if test "x$APP_LIB_DEPS" = x; then |
Alan Coopersmith | e1f9adc | 2008-06-20 17:58:53 -0700 | [diff] [blame] | 1043 | case "$host_os" in |
| 1044 | solaris*) |
| 1045 | APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm" |
| 1046 | ;; |
| 1047 | *) |
| 1048 | APP_LIB_DEPS="-lm" |
| 1049 | ;; |
| 1050 | esac |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1051 | fi |
Dan Nicholson | 297e16c | 2008-05-05 15:42:53 -0700 | [diff] [blame] | 1052 | AC_SUBST([APP_LIB_DEPS]) |
| 1053 | AC_SUBST([PROGRAM_DIRS]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1054 | |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1055 | |
| 1056 | dnl Restore LDFLAGS and CPPFLAGS |
| 1057 | LDFLAGS="$_SAVE_LDFLAGS" |
| 1058 | CPPFLAGS="$_SAVE_CPPFLAGS" |
| 1059 | |
| 1060 | dnl Substitute the config |
Dan Nicholson | f64d6fe | 2007-12-12 17:57:45 -0800 | [diff] [blame] | 1061 | AC_CONFIG_FILES([configs/autoconf]) |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1062 | |
Dan Nicholson | aab38cf | 2007-12-11 08:21:51 -0800 | [diff] [blame] | 1063 | dnl Replace the configs/current symlink |
Dan Nicholson | e14ebbc | 2008-05-06 11:28:43 -0700 | [diff] [blame] | 1064 | AC_CONFIG_COMMANDS([configs],[ |
Dan Nicholson | aab38cf | 2007-12-11 08:21:51 -0800 | [diff] [blame] | 1065 | if test -f configs/current || test -L configs/current; then |
| 1066 | rm -f configs/current |
| 1067 | fi |
| 1068 | ln -s autoconf configs/current |
Dan Nicholson | e14ebbc | 2008-05-06 11:28:43 -0700 | [diff] [blame] | 1069 | ]) |
| 1070 | |
| 1071 | AC_OUTPUT |
Dan Nicholson | aab38cf | 2007-12-11 08:21:51 -0800 | [diff] [blame] | 1072 | |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1073 | dnl |
| 1074 | dnl Output some configuration info for the user |
| 1075 | dnl |
| 1076 | echo "" |
| 1077 | echo " prefix: $prefix" |
| 1078 | echo " exec_prefix: $exec_prefix" |
| 1079 | echo " libdir: $libdir" |
Dan Nicholson | 11ac5b2 | 2008-07-03 09:17:44 -0700 | [diff] [blame] | 1080 | echo " includedir: $includedir" |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1081 | |
| 1082 | dnl Driver info |
| 1083 | echo "" |
| 1084 | echo " Driver: $mesa_driver" |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 1085 | if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then |
| 1086 | echo " OSMesa: lib$OSMESA_LIB" |
| 1087 | else |
| 1088 | echo " OSMesa: no" |
| 1089 | fi |
| 1090 | if test "$mesa_driver" = dri; then |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1091 | # cleanup the drivers var |
| 1092 | dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'` |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 1093 | if test "x$DRI_DIRS" = x; then |
| 1094 | echo " DRI drivers: no" |
| 1095 | else |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1096 | echo " DRI drivers: $dri_dirs" |
Florent Thoumie | b5095ab | 2008-07-28 14:44:43 +0100 | [diff] [blame] | 1097 | fi |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1098 | echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR" |
Dan Nicholson | 544ab20 | 2007-12-30 08:41:53 -0800 | [diff] [blame] | 1099 | fi |
RALOVICH, Kristóf | 5f19f5c | 2008-11-04 11:53:32 +0100 | [diff] [blame] | 1100 | echo " Use XCB: $enable_xcb" |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1101 | |
| 1102 | dnl Libraries |
| 1103 | echo "" |
| 1104 | echo " Shared libs: $enable_shared" |
| 1105 | echo " Static libs: $enable_static" |
| 1106 | echo " GLU: $enable_glu" |
Dan Nicholson | 776c60d | 2008-07-18 07:40:41 -0700 | [diff] [blame] | 1107 | echo " GLw: $enable_glw (Motif: $enable_motif)" |
Dan Nicholson | 9cad8e3 | 2007-11-30 08:49:57 -0800 | [diff] [blame] | 1108 | echo " glut: $enable_glut" |
| 1109 | |
| 1110 | dnl Programs |
| 1111 | # cleanup the programs var for display |
| 1112 | program_dirs=`echo $PROGRAM_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'` |
| 1113 | if test "x$program_dirs" = x; then |
| 1114 | echo " Demos: no" |
| 1115 | else |
| 1116 | echo " Demos: $program_dirs" |
| 1117 | fi |
| 1118 | |
Dan Nicholson | 16a07fb | 2007-12-12 09:12:15 -0800 | [diff] [blame] | 1119 | dnl Compiler options |
| 1120 | # cleanup the CFLAGS/CXXFLAGS/DEFINES vars |
| 1121 | cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ |
| 1122 | $SED 's/^ *//;s/ */ /;s/ *$//'` |
| 1123 | cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ |
| 1124 | $SED 's/^ *//;s/ */ /;s/ *$//'` |
| 1125 | defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'` |
| 1126 | echo "" |
| 1127 | echo " CFLAGS: $cflags" |
| 1128 | echo " CXXFLAGS: $cxxflags" |
| 1129 | echo " Macros: $defines" |
| 1130 | |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1131 | echo "" |
Dan Nicholson | b645942 | 2008-03-24 10:01:50 -0700 | [diff] [blame] | 1132 | echo " Run '${MAKE-make}' to build Mesa" |
Dan Nicholson | dca1b79 | 2007-10-23 09:25:58 -0700 | [diff] [blame] | 1133 | echo "" |