;;
esac
-# Export build flags
-export CPPFLAGS="-I$URCU_INCS"
-export LDFLAGS="-L$URCU_LIBS"
+# Export time env. variables flags
export LD_LIBRARY_PATH="$URCU_LIBS:${LD_LIBRARY_PATH:-}"
+# Define flags
+CPPFLAGS="-I$URCU_INCS"
+LDFLAGS="-L$URCU_LIBS"
+
# Set configure options for each build configuration
CONF_OPTS=""
mkdir -p "$BUILD_PATH"
cd "$BUILD_PATH"
- "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS
+ CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS
;;
dist)
$TAR xvf ./*.tar.* --strip 1
# Build in extracted source tree
- "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
+ CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
;;
oot-dist)
cd "$BUILD_PATH"
# Build oot from extracted sources
- "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
+ CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
;;
*)
echo "Standard in-tree build"
- "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
+ CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
;;
esac