])
AM_CONDITIONAL([ENABLE_MAN_PDFS], [test "x$enable_man_pdfs" != "xno" && test -n "$GROFF" && test -n "$PS2PDF"])
+# allow disabling of demos installation
+AC_ARG_WITH([demos],
+ [AS_HELP_STRING([--with-demos=DIR], [Install demos (default: $(pkgdatadir)/demo)])])
+
+demodir='$(pkgdatadir)/demo'
+AS_IF([test "$with_demos" != "xyes" && test -n "$with_demos"], [
+ dnl user provided --with-demos=/my/demo/dir
+ demodir="$with_demos"
+])
+AM_CONDITIONAL([INSTALL_DEMOS], [test "x$with_demos" != "xno"])
+AC_SUBST([demodir])
+
PKG_INSTALLDIR
PKG_PROG_PKG_CONFIG
## Process this file with automake to produce Makefile.in
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
if WITH_TCL
dist_demo_SCRIPTS = entities.tcl
dist_demo_DATA = entities.tcl.README entities.html
endif
+endif
## Process this file with automake to produce Makefile.in
-demosharpdir = $(pkgdatadir)/demo
-demoguiledir = $(pkgdatadir)/demo
-demoiodir = $(pkgdatadir)/demo
-demojavadir = $(pkgdatadir)/demo
-demoluadir = $(pkgdatadir)/demo
-demoocamldir = $(pkgdatadir)/demo
-demoperldir = $(pkgdatadir)/demo
-demophpdir = $(pkgdatadir)/demo
-demopythondir = $(pkgdatadir)/demo
-demopython3dir = $(pkgdatadir)/demo
-demoRdir = $(pkgdatadir)/demo
-demorubydir = $(pkgdatadir)/demo
-demotcldir = $(pkgdatadir)/demo
+demosharpdir = $(demodir)
+demoguiledir = $(demodir)
+demoiodir = $(demodir)
+demojavadir = $(demodir)
+demoluadir = $(demodir)
+demoocamldir = $(demodir)
+demoperldir = $(demodir)
+demophpdir = $(demodir)
+demopythondir = $(demodir)
+demopython3dir = $(demodir)
+demoRdir = $(demodir)
+demorubydir = $(demodir)
+demotcldir = $(demodir)
+if INSTALL_DEMOS
if WITH_SHARP
demosharp_SCRIPTS =
endif
if WITH_TCL
demotcl_SCRIPTS = modgraph.tcl
endif
+endif
EXTRA_DIST = modgraph.*
## Process this file with automake to produce Makefile.in
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
if WITH_TCL
demo_SCRIPTS = doted.tcl gcat.tcl
demo_DATA = doted.tcl.README gcat.tcl.README
endif
+endif
EXTRA_DIST = doted.tcl gcat.tcl doted.tcl.README gcat.tcl.README
SUBDIRS = pathplan_data
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
if WITH_TCL
demo_SCRIPTS = pathplan.tcl
demo_DATA = pathplan.tcl.README
endif
+endif
EXTRA_DIST = pathplan.tcl pathplan.tcl.README
## Process this file with automake to produce Makefile.in
-pathplanexampledir = $(pkgdatadir)/demo/pathplan_data
+pathplanexampledir = $(demodir)/pathplan_data
+if INSTALL_DEMOS
if WITH_TCL
dist_pathplanexample_DATA = boxes.dat dpd.dat funny.dat maze.dat nested.dat northo.dat \
obs.dat other.dat paths.dat rotor.dat u.dat unknown.dat
endif
+endif
## Process this file with automake to produce Makefile.in
-demodir = $(pkgdatadir)/demo
-
+if INSTALL_DEMOS
if WITH_TK
demo_SCRIPTS = spline.tcl
demo_DATA = spline.tcl.README
endif
+endif
EXTRA_DIST = spline.tcl spline.tcl.README