# GNUstep makefile
-include ./config.make
+
+ifeq ($(GNUSTEP_MAKEFILES),)
+
+$(warning Note: Your $(GNUSTEP_MAKEFILES) environment variable is empty!)
+$(warning Either use ./configure or source GNUstep.sh.)
+
+else
+
include $(GNUSTEP_MAKEFILES)/common.make
SUBPROJECTS += \
sope-core \
sope-mime \
sope-appserver \
- sope-ldap \
sope-ical \
sope-gdl1 \
- xmlrpc_call \
+ xmlrpc_call
+
+ifeq ($(HAS_LIBRARY_ldap),yes)
+SUBPROJECTS += sope-ldap
+endif
+
-include $(GNUSTEP_MAKEFILES)/GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/aggregate.make
-include $(GNUSTEP_MAKEFILES)/GNUmakefile.postamble
+endif
+
distclean ::
if test -f config.make; then rm config.make; fi
ARG_WITH_STRIP=0
ARG_WITH_GNUSTEP=1
- if test "xLIBRARY_COMBO" != "apple-apple-nil"; then
- if test "xLIBRARY_COMBO" != "apple-apple-apple"; then
- echo "WARNING: detected unusual GNUstep setup: $LIBRARY_COMBO"
+ if test "x${xLIBRARY_COMBO}" != "xapple-apple-nil"; then
+ if test "x${LIBRARY_COMBO}" != "xapple-apple-apple"; then
+ echo "WARNING: detected unusual GNUstep setup: ${LIBRARY_COMBO}"
echo ""
fi
fi
}
function checkLinking() {
+ # library-name => $1, type => $2
local oldpwd=$PWD
local tmpdir=".configure-test-$$"
make -s messages=yes -f $tmpmake linktest >out.log 2>err.log
LINK_RESULT=$?
-
+
if test $LINK_RESULT = 0; then
echo "$2 library found: $1"
+ cfgwrite "HAS_LIBRARY_$1=yes"
else
if test "x$2" = "xrequired"; then
echo "failed to link $2 library: $1"
exit 1
else
echo "failed to link $2 library: $1"
+ cfgwrite "HAS_LIBRARY_$1=no"
fi
fi
}
function checkDependencies() {
- checkLinking "xml2" required;
- checkLinking "ldap" required;
- checkLinking "ssl" required; # TODO: make optional
- checkLinking "pq" required; # TODO: make optional
+ cfgwrite ""
+ cfgwrite "# library dependencies"
+ checkLinking "xml2" optional;
+ checkLinking "ldap" optional;
+ checkLinking "ssl" required; # TODO: make optional
+ checkLinking "pq" optional;
+ checkLinking "sqlite3" optional;
+ checkLinking "mysqlclient" optional;
}
function runIt() {
SUBPROJECTS += \
GDLAccess \
- GDLContentStore \
- PostgreSQL
+ GDLContentStore
+
+ifeq ($(HAS_LIBRARY_pq),yes)
+SUBPROJECTS += PostgreSQL
+endif
+
+ifeq ($(HAS_LIBRARY_sqlite3),yes)
+SUBPROJECTS += SQLite3
+endif
+
+ifeq ($(HAS_LIBRARY_mysqlclient),yes)
+SUBPROJECTS += MySQL
+endif
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/aggregate.make