Skip to content

--disable-doc is not parsed correctly by configure #394

@saraedum

Description

@saraedum

Currently, configure --disable-doc makes fflas-ffpack try to build the documentation. The reason is that AC_ARG_ENABLE is not used correctly; that's because it's AC_ARG_ENABLE(name, help, help, present, missing) and not AC_ARG_ENABLE(name, help, help, enable, disable). Something like this should fix it:

diff --git a/macros/fflas-ffpack-doc.m4 b/macros/fflas-ffpack-doc.m4
index c225398..6adb7fe 100644
--- a/macros/fflas-ffpack-doc.m4
+++ b/macros/fflas-ffpack-doc.m4
@@ -47,25 +47,26 @@ AC_ARG_WITH(doxygen,
                DOXYGEN_PATH="$PATH"
            ])

-AC_ARG_ENABLE(doc,[AC_HELP_STRING([--enable-doc], [Enable building documentation])],
-[
-AC_MSG_RESULT(yes)
-AC_MSG_CHECKING(whether doxygen works)
-export PATH=$DOXYGEN_PATH
-(doxygen --version) < /dev/null > /dev/null 2>&1 || {
-       AC_MSG_RESULT(no)
-       echo
-       echo "You must have doxygen installed to create documentation for"
-       echo "FFLAS-FFPACK. This error only happens if you use --enable-doc."
-       echo "Download the appropriate package for your distribution, or get"
-       echo "the source tarball from http://www.stack.nl/~dimitri/doxygen/"
-       exit -1
-}
-AC_MSG_RESULT(yes)
-AM_CONDITIONAL(FFLASFFPACK_BUILD_DOC, true)
-],
-[
-AC_MSG_RESULT(no)
-AM_CONDITIONAL(FFLASFFPACK_BUILD_DOC, false)
-])
+AC_ARG_ENABLE(doc,[AC_HELP_STRING([--enable-doc], [Enable building documentation])])
+
+AS_IF([test x"$enable_doc" != "xno"],[
+  enable_doc=yes
+  AC_MSG_RESULT(yes)
+  AC_MSG_CHECKING(whether doxygen works)
+  export PATH=$DOXYGEN_PATH
+  (doxygen --version) < /dev/null > /dev/null 2>&1 || {
+    AC_MSG_RESULT(no)
+    echo
+    echo "You must have doxygen installed to create documentation for"
+    echo "FFLAS-FFPACK. This error only happens if you use --enable-doc."
+    echo "Download the appropriate package for your distribution, or get"
+    echo "the source tarball from http://www.stack.nl/~dimitri/doxygen/"
+    exit -1
+  }
+  AC_MSG_RESULT(yes)
+  AM_CONDITIONAL(FFLASFFPACK_BUILD_DOC, true)
+], [
+  AC_MSG_RESULT(no)
 ])
+
+AM_CONDITIONAL(FFLASFFPACK_BUILD_DOC, [test "x$enable_doc" = "xyes"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions