diff --git a/configure b/configure
index 73c0caa..191e167 100755
--- a/configure
+++ b/configure
@@ -486,7 +486,7 @@ printf "Detecting compiler arguments: "
 ( cd tools/extract_args && make ) >ocargs.log 2>&1
 if [ "$?" -eq 0 ]; then
     printf "(extractor built) "
-    tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc >>ocargs.log 2>&1
+    tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmklib ocamlmktop ocamlopt ocamldep ocamldoc >>ocargs.log 2>&1
     # ocamlbrowser does not work!
     if [ $? -eq 0 ]; then
 	echo "ok"
diff --git a/tools/extract_args/extract_args.ml b/tools/extract_args/extract_args.ml
index 9f28e52..7fefdaa 100644
--- a/tools/extract_args/extract_args.ml
+++ b/tools/extract_args/extract_args.ml
@@ -29,7 +29,7 @@ let get_help cmd =
   let help_out =
     try
       let code =
-	Sys.command (sprintf "%s -help >%s" 
+	Sys.command (sprintf "%s -help >%s 2>&1"
 		       cmd
 		       (Filename.quote temp_file)) in
       if code <> 0 then 
@@ -43,7 +43,7 @@ let get_help cmd =
 ;;
 
 
-let switch_re = Str.regexp "[ \t]*\\(-[-a-zA-Z0-9_]*\\)[ \t]\\(.*\\)$";;
+let switch_re = Str.regexp "[ \t]*\\(-[-a-zA-Z0-9_,]*\\)[ \t]?\\(.*\\)$";;
 
 let argument_re = Str.regexp "[ \t]*[<[]";;
 
