Custom Arguments

It is also possible to add your own arguments...

AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])

if test "x$with_html_dir" = "x" ; then
  HTML_DIR='${datadir}/gtk-doc/html'
else
  HTML_DIR=$with_html_dir
fi

... and to have features which can be enabled and disabled.

AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  
                         Use gtk-doc to build documentation [default=auto]],
   enable_gtk_doc="$enableval", enable_gtk_doc=auto)

if test x$enable_gtk_doc = xauto ; then
  if test x$GTKDOC = xtrue ; then
    enable_gtk_doc=yes
  else
    enable_gtk_doc=no
  fi
fi