diff -u libtool.m4 ../nag_trunk/libtool.m4
--- libtool.m4	2010-10-01 20:57:54.000000000 +0200
+++ ../../nag_trunk/m4/libtool.m4	2011-02-28 09:44:50.000000000 +0100
@@ -1053,7 +1053,7 @@
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
@@ -4245,6 +4245,19 @@
       fi
       ;;
 
+     darwin* | rhapsody*)
+       # PIC is the default on this platform
+       # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in 
+       nagfor*)
+ 	# NAG Fortran compiler
+ 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ 	;;
+       esac
+       ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
