+if ($TOP_BUILDDIR)
+{
+ # Use LDDLFLAGS here instead of LIBS, because:
+ # 1) We need to make sure our library path comes first (and no locally
+ # installed version is used).
+ # 2) Prevent MakeMaker from stipping the -rpath option when the
+ # library is to be installed in a non-standard path. Standard-paths
+ # are read from $Config{'libsdirs'} above.
+ $OPING_CPPFLAGS = "-I$TOP_BUILDDIR/src";
+ $OPING_LDDLFLAGS = "-L$TOP_BUILDDIR/src/.libs " . $Config{'lddlflags'};
+ $OPING_LIBS = "-L$TOP_BUILDDIR/src/.libs -loping";
+
+ if ($TARGET_LIBDIR)
+ {
+ $OPING_LDDLFLAGS .= qq( -Wl,-rpath -Wl,"$TARGET_LIBDIR");
+ }
+}
+elsif ($OPING_PREFIX)
+{
+ # -rpath is automagically set in this case.
+ $OPING_CPPFLAGS = "-I$OPING_PREFIX/include";
+ $OPING_LIBS = "-L$OPING_PREFIX/lib -loping";