diff -Naur mpich2-1.0.6p1/confdb/aclocal_shl.m4 mpich2-1.0.6p1.new/confdb/aclocal_shl.m4 --- mpich2-1.0.6p1/confdb/aclocal_shl.m4 2007-05-16 09:39:01.000000000 -0400 +++ mpich2-1.0.6p1.new/confdb/aclocal_shl.m4 2008-05-09 09:04:35.000000000 -0400 @@ -89,7 +89,7 @@ # For example, include the libname as ${LIBNAME_SHL} #C_LINK_SHL='${CC} -shared -Wl,-h,' # May need -fPIC - CC_SHL='${CC} -fpic' + CC_SHL='${CC} -fPIC' #C_LINKPATH_SHL="-Wl,-rpath -Wl," # More recent versions allow multiple args, separated by commas C_LINKPATH_SHL="-Wl,-rpath," @@ -233,7 +233,7 @@ gcc) # For example, include the libname as ${LIBNAME_SHL} #C_LINK_SHL='${CC} -shared -Wl,-h,' - pac_cc_sharedlibs='gcc -shared -fpic' + pac_cc_sharedlibs='gcc -shared -fPIC' pac_clink_sharedlibs='gcc -shared' ;; libtool) diff -Naur mpich2-1.0.6p1/configure mpich2-1.0.6p1.new/configure --- mpich2-1.0.6p1/configure 2008-05-09 09:08:14.000000000 -0400 +++ mpich2-1.0.6p1.new/configure 2008-05-09 09:06:52.000000000 -0400 @@ -9061,24 +9061,24 @@ # if the compiler allows it (e.g., building with gcc but # a different Fortran compiler. Another option is to # *require* g77. - { $as_echo "$as_me:$LINENO: checking whether $F77 allows -shared -fpic" >&5 -$as_echo_n "checking whether $F77 allows -shared -fpic... " >&6; } + { $as_echo "$as_me:$LINENO: checking whether $F77 allows -shared -fPIC" >&5 +$as_echo_n "checking whether $F77 allows -shared -fPIC... " >&6; } rm -f conftest.f cat > conftest.f </dev/null 2>&1 ; then - FC_SHL="$F77 -shared -fpic" + if $F77 -shared -fPIC -o conftest conftest.f >/dev/null 2>&1 ; then + FC_SHL="$F77 -shared -fPIC" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: checking whether $F77 allows -fpic" >&5 -$as_echo_n "checking whether $F77 allows -fpic... " >&6; } - if $F77 -fpic -o conftest conftest.f >/dev/null 2>&1 ; then - FC_SHL="$F77 -fpic" + { $as_echo "$as_me:$LINENO: checking whether $F77 allows -fPIC" >&5 +$as_echo_n "checking whether $F77 allows -fPIC... " >&6; } + if $F77 -fPIC -o conftest conftest.f >/dev/null 2>&1 ; then + FC_SHL="$F77 -fPIC" { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else @@ -10118,7 +10118,7 @@ gcc) if test "$pac_cv_f90_vendor" = gnu -o "$F90" = "g95" ; then # If we have the GNU Fortran 95 compiler (untested) - F90_SHL="$F90 -shared -fpic" + F90_SHL="$F90 -shared -fPIC" F90_LINKPATH_SHL="-Wl,-rpath -Wl," else case "$pac_cv_f90_vendor" in @@ -10129,13 +10129,13 @@ intel) # Intel implements the GNU options - F90_SHL="$F90 -shared -fpic" + F90_SHL="$F90 -shared -fPIC" F90_LINKPATH_SHL="-Wl,-rpath -Wl," ;; pgi) # Portland Group implements the GNU options - F90_SHL="$F90 -shared -fpic" + F90_SHL="$F90 -shared -fPIC" F90_LINKPATH_SHL="-Wl,-rpath -Wl," ;; @@ -11155,7 +11155,7 @@ ;; gcc) # Assume that the compiler is g++ if gcc style shared libraries chosen - CXX_SHL="$CXX -shared -fpic" + CXX_SHL="$CXX -shared -fPIC" CXX_LINKPATH_SHL="-Wl,-rpath -Wl," ;; cygwin|cygwin-gcc) @@ -12906,7 +12906,7 @@ # For example, include the libname as ${LIBNAME_SHL} #C_LINK_SHL='${CC} -shared -Wl,-h,' # May need -fPIC - CC_SHL='${CC} -fpic' + CC_SHL='${CC} -fPIC' #C_LINKPATH_SHL="-Wl,-rpath -Wl," # More recent versions allow multiple args, separated by commas C_LINKPATH_SHL="-Wl,-rpath," @@ -13174,7 +13174,7 @@ gcc) # For example, include the libname as ${LIBNAME_SHL} #C_LINK_SHL='${CC} -shared -Wl,-h,' - pac_cc_sharedlibs='gcc -shared -fpic' + pac_cc_sharedlibs='gcc -shared -fPIC' pac_clink_sharedlibs='gcc -shared' ;; libtool)