summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2008-12-03 16:38:14 +0100
committerLuc Verhaegen <libv@skynet.be>2008-12-03 16:38:14 +0100
commitc5b70e62374aeb34ebcdc27682bd55e5209c9138 (patch)
tree194de6f53a6c7d3bfeb102f9ebf758c7622af88d
parent8a5fde76400e48343e1c799b592817a9abd828cc (diff)
Wrapper: provide autoconf logic.
Use --without-wrapper to disable the building of the wrapper driver.
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac14
2 files changed, 20 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 8e73b1a..d28cd2b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,13 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src man wrapper
+
+if BUILD_WRAPPER
+ WRAPPER_DIR = wrapper
+endif
+
+SUBDIRS = src man $(WRAPPER_DIR)
+
BUILT_SOURCES = git_version.h
CLEANFILES = git_version.h
git_version.h: Makefile git_version.sh
diff --git a/configure.ac b/configure.ac
index aeb8b7c..99c1019 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,19 @@ AC_ARG_WITH(xorg-module-dir,
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
+AC_MSG_CHECKING([whether to build wrapper driver])
+AC_ARG_WITH(wrapper,
+ AC_HELP_STRING([--with-wrapper],
+ [Enable building of the wrapper driver [[default=yes]]]),
+ ,
+ [with_wrapper=yes])
+AC_MSG_RESULT([$with_wrapper])
+
+AM_CONDITIONAL(BUILD_WRAPPER, test x$with_wrapper = xyes)
+if test x$with_wrapper = xyes; then
+ AC_OUTPUT([wrapper/Makefile])
+fi
+
AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
[Disable DRI support [[default=auto]]]),
[DRI="$enableval"],
@@ -146,5 +159,4 @@ AC_OUTPUT([
Makefile
src/Makefile
man/Makefile
- wrapper/Makefile
])