diff rogue5/configure.ac @ 47:2a59cf36ae38

rogue5: Add chroot support to the autotools system.
author elwin
date Fri, 07 Oct 2011 21:19:14 +0000
parents 655c317b6237
children ea960351de17
line wrap: on
line diff
--- a/rogue5/configure.ac	Fri Oct 07 06:15:48 2011 +0000
+++ b/rogue5/configure.ac	Fri Oct 07 21:19:14 2011 +0000
@@ -40,7 +40,7 @@
 AC_CHECK_PROG([TBL], [tbl], [tbl],)
 AC_CHECK_PROG([SED], [sed], [sed],)
 
-AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue"] )
+AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue5"] )
 PROGRAM=$progname
 AC_SUBST(PROGRAM)
 
@@ -149,6 +149,27 @@
 
 AC_SUBST(SAVEDIR)
 
+AC_ARG_ENABLE([destdir],[AC_HELP_STRING([--enable-destdir=DESTDIR], [chroot to install into])],[],[])
+AC_MSG_CHECKING([for chrooted install])
+if test "x$enable_destdir" = "xno" ; then
+DESTDIR=
+elif test "x$enable_destdir" = "xyes" ; then
+DESTDIR=
+elif test "x$enable_destdir" = "x" ; then
+DESTDIR=
+else
+DESTDIR=$enable_destdir
+fi
+
+if test "x$DESTDIR" != "x" ; then
+AC_DEFINE_UNQUOTED([DESTDIR], ["$DESTDIR"], [Define to a chroot to install into])
+AC_MSG_RESULT([$DESTDIR])
+else
+AC_MSG_RESULT([disabled])
+fi
+
+AC_SUBST(DESTDIR)
+
 AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[])
 AC_MSG_CHECKING([if wizard mode is enabled])
 if test "x$enable_wizardmode" = "xno" ; then