--- src/env/mpifort.bash.in.orig	2015-11-09 19:39:01.000000000 -0700
+++ src/env/mpifort.bash.in	2017-11-15 05:48:26.000000000 -0700
@@ -234,6 +234,22 @@
     # Otherwise, just accept the argument
     ;;
     # - end of special handling for .F files
+    -arch|-m32|-m64)
+    case "$arg" in
+	-arch)
+	    other_arch=${allargs[$argno+1]}
+	    ;;
+	-m32)
+	    other_arch=__MACPORTS_32_BIT_ARCH__
+	    ;;
+	-m64)
+	    other_arch=__MACPORTS_64_BIT_ARCH__
+	    ;;
+	esac
+        if [ "$other_arch" != "__MACPORTS_BUILD_ARCH__" ]; then
+	    allargs+=("-I${includedir}/${other_arch}")
+	fi
+    ;;
 
     esac
     if [ $addarg = no ] ; then