Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make fortran new bindings almost functional
[simgrid.git] / src / smpi / smpiff.in
index 315349dbf74ce18e878706f7196104fbd01c1948..b86184bd968d305f61cd769abed195a3d84492ee 100644 (file)
@@ -1,7 +1,8 @@
 #! /bin/bash
-prefix="@prefix@"
+prefix="@exec_prefix@"
 
-ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg -lf2c"
+ARGS="-DMAIN__=user_main -Diargc_=smpi_process_argc -Dgetarg_=smpi_process_getarg"
+LINKARGS="-lf2c"
 SRCFILES=""
 
 while [ -n "$1" ]; do
@@ -16,10 +17,14 @@ while [ -n "$1" ]; do
        SRCFILES="${SRCFILES} ${SRCFILE}"
        ;;
     *)
+      if [ "${ARG}" = "-c" ]; then
+          LINKARGS=""
+      fi
       ARGS="${ARGS} ${ARG}"
       ;;
   esac
 done
+ARGS="${ARGS} ${LINKARGS}"
 
 if [ -n "${SRCFILES}" ]
 then