#! /bin/sh -f

args=''
libdirs=''

for arg in ` echo "$LIBRARY_PATH" | tr : ' ' `
do
  libdirs="$libdirs '-L$arg'"
done

for arg
do
  case "$arg" in
  -L*)
    libdirs="$libdirs '$arg'"
    ;;
  *)
    args="$args '$arg'"
    ;;
  esac
done

eval "c++  $libdirs -L/usr/pkg/lib -Wl,-R/usr/pkg/lib  $args -lssl -lcrypto -lelf -lm  -lpthread"
exit $?
