<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -44,6 +44,40 @@ AC_DEFUN([FP_EVAL_STDERR],
 ])# FP_EVAL_STDERR
 
 
+# FP_ARG_WITH_PATH_GNU_PROG
+# --------------------
+# XXX
+#
+# $1 = the command to look for
+# $2 = the variable to set
+#
+AC_DEFUN([FP_ARG_WITH_PATH_GNU_PROG],
+[
+AC_ARG_WITH($2,
+[AC_HELP_STRING([--with-$2=ARG],
+        [Use ARG as the path to $2 [default=autodetect]])],
+[
+    if test &quot;$HostOS&quot; = &quot;mingw32&quot;
+    then
+        AC_MSG_WARN([Request to use $withval will be ignored])
+    else
+        $1=$withval
+    fi
+],
+[
+    if test &quot;$HostOS&quot; != &quot;mingw32&quot;
+    then
+        AC_PATH_PROG([$1], [$2])
+        if test -z &quot;$$1&quot;
+        then
+            AC_MSG_ERROR([cannot find $2 in your PATH, no idea how to link])
+        fi
+    fi
+]
+)
+]) # FP_ARG_WITH_PATH_GNU_PROG
+
+
 # FP_PROG_CONTEXT_DIFF
 # --------------------
 # Figure out how to do context diffs. Sets the output variable ContextDiffCmd.</diff>
      <filename>aclocal.m4</filename>
    </modified>
    <modified>
      <diff>@@ -403,50 +403,14 @@ fi
 
 dnl ** Which gcc to use?
 dnl --------------------------------------------------------------
-AC_ARG_WITH(gcc,
-[AC_HELP_STRING([--with-gcc=ARG],
-        [Use ARG as the path to GCC  [default=autodetect]])],
-[CC=&quot;$withval&quot;
-    if test &quot;$HostOS&quot; = &quot;mingw32&quot;
-    then
-        AC_MSG_WARN([Request to use $WhatGccIsCalled will be ignored])
-    fi
-],
-[
-    if test &quot;$HostOS&quot; != &quot;mingw32&quot;
-    then
-        CC=&quot;gcc&quot;
-    fi
-]
-)
+FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
 export CC
 WhatGccIsCalled=&quot;$CC&quot;
 AC_SUBST(WhatGccIsCalled)
 
 dnl ** Which ld to use?
 dnl --------------------------------------------------------------
-AC_ARG_WITH(ld,
-[AC_HELP_STRING([--with-ld=ARG],
-        [Use ARG as the path to LD  [default=autodetect]])],
-[
-    if test &quot;$HostOS&quot; = &quot;mingw32&quot;
-    then
-        AC_MSG_WARN([Request to use $withval will be ignored])
-    else
-        LD=$withval
-    fi
-],
-[
-    if test &quot;$HostOS&quot; != &quot;mingw32&quot;
-    then
-        AC_PATH_PROG([LD], [ld])
-        if test -z &quot;$LD&quot;
-        then
-            AC_MSG_ERROR([cannot find ld in your PATH, no idea how to link])
-        fi
-    fi
-]
-)
+FP_ARG_WITH_PATH_GNU_PROG([LD], [ld])
 LdCmd=&quot;$LD&quot;
 AC_SUBST([LdCmd])
 </diff>
      <filename>configure.ac</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1395742cf937bb749c92a424958635563b38431e</id>
    </parent>
  </parents>
  <author>
    <name>Ian Lynagh</name>
    <email>igloo@earth.li</email>
  </author>
  <url>http://github.com/ghc-hq/ghc/commit/20b15858622acaa671b84a974f698b1a8de558a4</url>
  <id>20b15858622acaa671b84a974f698b1a8de558a4</id>
  <committed-date>2009-10-12T14:34:14-07:00</committed-date>
  <authored-date>2009-10-12T14:34:14-07:00</authored-date>
  <message>Refactor some configure.ac stuff</message>
  <tree>3b74ff8280b6b09186f78a36f07db6fbad800940</tree>
  <committer>
    <name>Ian Lynagh</name>
    <email>igloo@earth.li</email>
  </committer>
</commit>
