autogen.sh: set format.subjectPrefix and sendemail.to if needed

Just set the rules automatically rather than asking each contributor to
update thing locally.

v2: Silence errors if run outside of git repo. (Eric)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
diff --git a/autogen.sh b/autogen.sh
index c896097..d82ab18 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,12 @@
 autoreconf --force --verbose --install || exit 1
 cd "$ORIGDIR" || exit $?
 
+git config --local --get format.subjectPrefix ||
+    git config --local format.subjectPrefix "PATCH libdrm" 2>/dev/null
+
+git config --local --get sendemail.to ||
+    git config --local sendemail.to "dri-devel@lists.freedesktop.org" 2>/dev/null
+
 if test -z "$NOCONFIGURE"; then
     "$srcdir"/configure "$@"
 fi