summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-10-03 20:56:34 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-19 21:03:41 (GMT)
commitbe8c2117b608a9ce43d3a112230159811d30cea2 (patch)
tree5944ae27ed39637da7800601b9fead8aa9c26b6f /configure.ac
parent126963be0ed9f059b85d400f1d43415275ce1dfa (diff)
downloadhdf5-be8c2117b608a9ce43d3a112230159811d30cea2.zip
hdf5-be8c2117b608a9ce43d3a112230159811d30cea2.tar.gz
hdf5-be8c2117b608a9ce43d3a112230159811d30cea2.tar.bz2
Let us override the examples directory using --with-examplesdir=DIR.
This is handy for NetBSD where HDF5 examples are installed by convention in $prefix/share/examples/hdf5/ rather than in ${prefix}/share/hdf5_examples/, which is the HDF5 default. Place hdf5_examples/ under ${datarootdir} which on most systems will be ${prefix}/share/, anyway.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3d71d09..68b7c42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2967,6 +2967,28 @@ fi
AC_CACHE_SAVE
## ----------------------------------------------------------------------
+## Use custom examples path.
+##
+AC_MSG_CHECKING([for custom examples path definition])
+AC_ARG_WITH([examplesdir],
+ [AS_HELP_STRING([--with-examplesdir=location],
+ [Specify path for examples
+ [default="DATAROOTDIR/hdf5_examples"]])],,
+ withval="${datarootdir}/hdf5_examples")
+
+if test "X$withval" = "X"; then
+ AC_MSG_RESULT([default])
+ examplesdir="${datarootdir}/hdf5_examples"
+else
+ AC_MSG_RESULT([$withval])
+ examplesdir=$withval
+fi
+
+AC_SUBST([examplesdir])
+AC_DEFINE_UNQUOTED([EXAMPLESDIR], ["$examplesdir"],
+ [Define the examples directory])
+
+## ----------------------------------------------------------------------
## Enable custom plugin default path for library. It requires SHARED support.
##
AC_MSG_CHECKING([for custom plugin default path definition])