DARG_GNUSTEP_SH="$ARG_GSMAKE/GNUstep.sh"
DARG_IS_FHS=1
-NGSTREAMS_DIR="./sope-core/NGStreams"
+SOPE_SRCDIR="$PWD" # TODO: rather use location of configure (using basename)
+NGSTREAMS_DIR="${SOPE_SRCDIR}/sope-core/NGStreams"
+GSTEPMAKE_SRCDIR="${SOPE_SRCDIR}/gnustep-make"
+
+# TODO: add pg_config, mysql_config etc!
LINK_SYSLIBDIRS="-L/usr/local/pgsql/lib -L/usr/local/lib -L/usr/lib"
# ******************** usage ********************
_ACEOFWARN
}
+function setupInternalGSMake() {
+ if test -d gnustep-make; then
+ SETUP_COMBO="gnu-fd-nil"
+ SETUP_MAKEDIR="${SOPE_SRCDIR}/.gsmake"
+ SETUP_LOGNAME="config-gstepmake.log"
+ if test -d /Developer/Applications/Xcode.app; then
+ # rather weird OSX test, right? ;->
+ SETUP_COMBO="apple-apple-nil"
+ fi
+ pregsmdir="$PWD"
+
+ echo -n "configuring builtin gnustep-make environment .."
+
+ cd "$GSTEPMAKE_SRCDIR"
+ ./configure >${pregsmdir}/${SETUP_LOGNAME} \
+ --prefix="${SETUP_MAKEDIR}" \
+ --without-system-root \
+ --with-network-root="${SETUP_MAKEDIR}" \
+ --with-local-root="${SETUP_MAKEDIR}" \
+ --with-user-root="${SETUP_MAKEDIR}" \
+ --with-library-combo="${SETUP_COMBO}"
+
+ echo -n ".. install .."
+ make install >>${pregsmdir}/${SETUP_LOGNAME}
+ ARG_GSMAKE="${SETUP_MAKEDIR}/Library/Makefiles/"
+
+ cd "$pregsmdir"
+ if test -f $ARG_GSMAKE/GNUstep.sh; then
+ echo ".. done (log in ${SETUP_LOGNAME})."
+ else
+ echo "error: failed to setup embedded gnustep-make sources!"
+ cat ${pregsmdir}/${SETUP_LOGNAME}
+ exit 1
+ fi
+ else
+ echo "error: did not find embedded gnustep-make sources!"
+ exit 1
+ fi
+}
+
function validateGNUstepArgs() {
# GNUstep make
if test "x$ARG_GSMAKE" = "x"; then
elif test -f /usr/GNUstep/System/Library/Makefiles/GNUstep.sh; then
ARG_GSMAKE="/usr/GNUstep/System/Library/Makefiles/"
else
- echo "error: please specify a GNUstep make tree!"
- exit 1
+ setupInternalGSMake;
fi
DARG_GNUSTEP_SH="$ARG_GSMAKE/GNUstep.sh"
elif test -d $ARG_GSMAKE; then