# This program is free software; you can redistribute it and/or modify it
# under the terms of the license (GNU LGPL) which comes with this package.
++<<<<<<< HEAD
+SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
+
+prefix="@exec_prefix@"
+smpicc="$prefix/bin/smpicc"
+smpif2c="$prefix/bin/smpif2c"
++=======
+ F77=@GFORTRAN_EXE@
+
+ INCLUDEARGS="@includeflag@"
+ CMAKE_LINKARGS="-L@libdir@"
++>>>>>>> 167177a9f2980982c1bb3f89ec90fc1937395cd5
@SMPITOOLS_SH@
ARG="$1"
shift
case "${ARG}" in
- *.f)
- SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
- if [ -z "$SRCFILE" ] ; then
- SRCFILE="$ARG"
- fi
- list_add SRCFILES "${SRCFILE}"
+ -c)
+ CMAKE_LINKARGS=""
+ LINKARGS=""
+ list_add CMDLINE "-c"
+ ;;
+ *.f|*.F)
+ TMPFILE=$(mymktemp "${ARG}" ".f")
+ list_add TMPFILES "${TMPFILE}"
+ #replace "program main_name by subroutine user\_main (and the end clause as well)"
+ sed 's/[[:space:]]\{6\}[[:space:]]*\(end \)\{0,1\}program[[:space:]]*\([a-zA-Z0-9\-\_]*\)/ \1subroutine user_main /gI;s/[[:space:]]*use[[:space:]]*mpi/\include \"mpif\.h\" /gI' "${ARG}" > "${TMPFILE}"
+ SRCFILE="${TMPFILE}"
+ list_add CMDLINE "${SRCFILE}"
;;
+ '-version' | '--version' | '-v')
+ # -e is not recognised by MS-DOS...
+ echo -e $SIMGRID_VERSION
+ exit 0
+ ;;
*)
- if [ "${ARG}" = "-c" ]; then
- LINKARGS=""
- fi
- list_add ARGS "${ARG}"
+ list_add CMDLINE "${ARG}"
;;
esac
done