#! /bin/sh

# Copyright (c) 2003-2013
# Distributed Systems Software.  All rights reserved.
# See the file LICENSE for redistribution information.
#
# $Id: fixrpath 2617 2013-01-22 17:06:50Z brachman $

# For each -L<dir> flag, emit a -rpath compile-time flag

for i
do
case "$i" in
-L*)
    echo "$i"
    libpath=`echo "$i" | sed -e 's/^-L//'`
    echo "-Wl,-rpath,$libpath"
    ;;
*)
    echo "$i"
    ;;
esac

done

exit 0
