diff --git a/gtkdocize.in b/gtkdocize.in
index d41794f..312fcdb 100644
--- a/gtkdocize.in
+++ b/gtkdocize.in
@@ -14,6 +14,7 @@ datadir=@datadir@
 docdir=.
 copy=no
 makefile=gtk-doc.make
+flavour=legacy
 
 # mini help
 usage="\
@@ -34,20 +35,15 @@ while test $# -gt 0; do
     shift
     docdir="$1"
     shift ;;
+  --docdir=*)
+    docdir=`expr "X$1" : '[^=]*=\(.*\)'`
+    shift ;;
   --flavour)
     shift
     flavour="$1"
-    case "$flavour" in
-      legacy)
-        ;;
-      no-tmpl)
-        makefile=gtk-doc.notmpl.make
-        ;;
-      *)
-        echo "$progname: invalid value for --flavour" 1>&2
-        echo "$usage" 1>&2
-        exit 1 ;;
-    esac
+    shift ;;
+  --flavour=*)
+    flavour=`expr "X$1" : '[^=]*=\(.*\)'`
     shift ;;
   -*)
     echo "$progname: unrecognised option '$1'" 1>&2
@@ -60,6 +56,18 @@ while test $# -gt 0; do
   esac
 done
 
+case "$flavour" in
+  legacy)
+    ;;
+  no-tmpl)
+    makefile=gtk-doc.notmpl.make
+    ;;
+  *)
+    echo "$progname: invalid value for --flavour" 1>&2
+    echo "$usage" 1>&2
+    exit 1 ;;
+esac
+
 if test -f configure.ac; then
   configure=configure.ac
 elif test -f configure.in; then
