summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPaulo Zanoni <pzanoni@mandriva.com>2011-01-28 17:34:24 -0200
committerBrian Paul <brianp@vmware.com>2011-02-02 16:45:38 -0700
commit2ec1a249ddb1fe18fd01cc9147f7f5600c613ed7 (patch)
tree9140b072fa262683df7e6ecdcc8feef3b990eccf /configure.ac
parent0838d8038f2a53341a492c62a6368c9d33390521 (diff)
downloadmesa-demos-2ec1a249ddb1fe18fd01cc9147f7f5600c613ed7.zip
mesa-demos-2ec1a249ddb1fe18fd01cc9147f7f5600c613ed7.tar.xz
Add --with-system-data-files option
If you specify --with-system-data-files, binaries will try to find .dat and image files inside ${datadir}/${PACKAGE}. If you don't specify, they will try to find the files inside "../data" (keeping backwards compatibility). Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com> Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 49cd80f..e17fbcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,8 @@ AC_PROG_CXX
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
+AC_CONFIG_MACRO_DIR([m4])
+
# Enable quiet compiles on automake 1.11.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -166,6 +168,20 @@ AC_ARG_WITH([mesa-source],
[mesa_source_enabled="no"])
MESA_GLAPI="$mesa_source_dir/src/mesa/glapi"
+use_system_data=no
+AC_ARG_WITH([system-data-files],
+ [AS_HELP_STRING([--with-system-data-files],
+ [Use system data files for demos (default: no)])],
+ [use_system_data=yes], [])
+if test "x$use_system_data" = xyes; then
+ demos_data_dir="${datadir}/${PACKAGE}/"
+else
+ demos_data_dir="../data/"
+fi
+AC_DEFINE_DIR(DEMOS_DATA_DIR, demos_data_dir, [Data dir for demos])
+AC_DEFINE_UNQUOTED([DEMOS_DATA_DIR], "$DEMOS_DATA_DIR",
+ [Directory for demos data files])
+
dnl
dnl Program library dependencies
dnl Only libm is added here if necessary as the libraries should
@@ -228,7 +244,7 @@ AC_OUTPUT([
src/fpglsl/Makefile
src/glsl/Makefile
src/gs/Makefile
- src/images/Makefile
+ src/data/Makefile
src/objviewer/Makefile
src/osdemos/Makefile
src/perf/Makefile