summaryrefslogtreecommitdiff
path: root/m4/docsetup.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/docsetup.m4')
-rw-r--r--m4/docsetup.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/m4/docsetup.m4 b/m4/docsetup.m4
new file mode 100644
index 0000000..7af4381
--- /dev/null
+++ b/m4/docsetup.m4
@@ -0,0 +1,22 @@
+dnl Initiate the documentation directories
+dnl
+dnl MRP_DOCINIT([depdir],[doxyfilename],[docdir])
+dnl
+
+AC_DEFUN([MRP_DOCINIT],
+[
+ m4_ifset([$1], [depdir=$1], [depdir=.deps])
+ m4_ifset([$2], [doxyfile=$1], [doxyfile=Doxyfile])
+ m4_ifset([$3], [docdir=$2], [docdir=doc])
+
+ AC_PATH_TOOL( [MRP_FIND], find )
+ AC_PROG_SED
+ AC_PROG_MKDIR_P
+
+ AS_IF( [ test "x$MRP_FIND" = "x" -o "x$MKDIR_P" = "x" ],
+ [ AC_MSG_ERROR([essential programs are missing to init docs]) ],
+ [ found=`$MRP_FIND $docdir -name $doxyfile`
+ for f in $found ; do
+ $MKDIR_P `echo $f | $SED -e "s/$doxyfile//"`$depdir
+ done])
+])