]> err.no Git - sope/commitdiff
improved configure system, more libraries are optional now
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sat, 6 Aug 2005 18:04:59 +0000 (18:04 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sat, 6 Aug 2005 18:04:59 +0000 (18:04 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@984 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

GNUmakefile
configure
sope-gdl1/GNUmakefile
sope-xml/GNUmakefile

index 60b164aaf77fb540cd26d39c2400c04e844b1e4e..c5f4f7edbc425ac2875687e222c354e459003901 100644 (file)
@@ -1,6 +1,14 @@
 # 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 += \
@@ -8,14 +16,20 @@ 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
index 985b89b216cfd8fc096c3dad61fd2f41546c9f56..07ccb86362d0e64ceb3bedfe94ae3139faef384d 100755 (executable)
--- a/configure
+++ b/configure
@@ -137,9 +137,9 @@ function setupAppleArgs() {
   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
@@ -278,6 +278,7 @@ function genConfigMake() {
 }
 
 function checkLinking() {
+  # library-name => $1, type => $2
   local oldpwd=$PWD
   local tmpdir=".configure-test-$$"
   
@@ -296,9 +297,10 @@ function checkLinking() {
   
   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"
@@ -306,6 +308,7 @@ function checkLinking() {
       exit 1
     else
       echo "failed to link $2 library: $1"
+      cfgwrite "HAS_LIBRARY_$1=no"
     fi
   fi
   
@@ -314,10 +317,14 @@ function checkLinking() {
 }
 
 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() {
index 7d5450617e3807189152ff7f928553ba21e16780..dee50979b39fd2394e25693f78b649f1cb02b816 100644 (file)
@@ -8,8 +8,19 @@ VERSION=4.5.0
 
 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
index cf91b49a5dae9c359924ac6f8bf207d9f57f13a2..7a0a94b2bc3b166e90114c7c08b6ec5b06389f65 100644 (file)
@@ -9,9 +9,12 @@ VERSION=4.5.0
 SUBPROJECTS = \
        SaxObjC         \
        DOM             \
-       libxmlSAXDriver \
        STXSaxDriver    \
        XmlRpc          \
-       samples         \
+       samples
+
+ifeq ($(HAS_LIBRARY_xml2),yes)
+SUBPROJECTS += libxmlSAXDriver
+endif
 
 include $(GNUSTEP_MAKEFILES)/aggregate.make