gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r25723 - in gnunet-update: . src


From: gnunet
Subject: [GNUnet-SVN] r25723 - in gnunet-update: . src
Date: Tue, 8 Jan 2013 20:41:11 +0100

Author: harsha
Date: 2013-01-08 20:41:11 +0100 (Tue, 08 Jan 2013)
New Revision: 25723

Modified:
   gnunet-update/configure.ac
   gnunet-update/src/Makefile.am
Log:
allow installing the python code when gnunet is not installed

Modified: gnunet-update/configure.ac
===================================================================
--- gnunet-update/configure.ac  2013-01-08 18:03:57 UTC (rev 25722)
+++ gnunet-update/configure.ac  2013-01-08 19:41:11 UTC (rev 25723)
@@ -121,6 +121,7 @@
 
 # test for GNUnet core
 gnunet=0
+gnunet_check=0
 lookin=${prefix}
 backup_LDFLAGS="$LDFLAGS"      
 backup_CPPFLAGS="$CPPFLAGS"
@@ -135,26 +136,34 @@
         lookin=""
         ;;
       yes)
-        lookin="${prefix}"
+        lookin=""
+        gnunet_check=1
         ;;
       *)
         lookin="$with_gnunet"
+        gnunet_check=1
         ;;
     esac
    ],
    [
-     AC_MSG_RESULT([--with-gnunet not specified])
-     PKG_CHECK_MODULES([GNUNET], [gnunetutil >= 0.9.0], gnunet=1)
+     AC_MSG_RESULT([--with-gnunet not specified. Attempting to detect it])
+     PKG_CHECK_MODULES([GNUNET],
+       [gnunetutil >= 0.9.0],
+       [gnunet=1],
+       [AC_MSG_RESULT([no])])
    ]
 )
 
-if test "x$gnunet" == "x0" -a ! "x$lookin" == "x"
+if test "x$gnunet_check" == "x1"
 then
-  AC_MSG_CHECKING(for GNUnet util library in $lookin)
-  GNUNET_LDFLAGS="-L${lookin}/lib"
-  GNUNET_CPPFLAGS="-I${lookin}/include"
-  LDFLAGS="$GNUNET_LDFLAGS $backup_LDFLAGS"
-  CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS"
+  if test "x$lookin" != "x"
+  then
+    AC_MSG_CHECKING(for GNUnet util library in $lookin)
+    GNUNET_LDFLAGS="-L${lookin}/lib"
+    GNUNET_CPPFLAGS="-I${lookin}/include"
+    LDFLAGS="$GNUNET_LDFLAGS $backup_LDFLAGS"
+    CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS"
+  fi
   AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h],
     AC_CHECK_LIB([gnunetutil], [GNUNET_xfree_],
       [
@@ -163,12 +172,13 @@
       ]
     ),,[#include <gnunet/platform.h>]
   )
+  if test "x$gnunet" == "x0"
+  then
+    AC_MSG_ERROR(["Cannot find GNUnet, but --with-gnunet is specified.])
+  fi
 fi
 
-if test "x$gnunet" == "x0"
-then
-  AC_MSG_ERROR([gnunet-update requires GNUnet])
-fi
+AM_CONDITIONAL([GNUNET_PRESENT], [test "x$gnunet" == "x1"])
 
 AC_SUBST(GNUNET_CPPFLAGS)
 AC_SUBST(GNUNET_LDFLAGS)
@@ -190,3 +200,8 @@
 src/tests/Makefile
 src/tests/__init__.py
 ])
+
+if test "x$gnunet" == "x0"
+then
+  echo "GNUnet not detected. Will only builds and installs the installer."
+fi
\ No newline at end of file

Modified: gnunet-update/src/Makefile.am
===================================================================
--- gnunet-update/src/Makefile.am       2013-01-08 18:03:57 UTC (rev 25722)
+++ gnunet-update/src/Makefile.am       2013-01-08 19:41:11 UTC (rev 25723)
@@ -1,2 +1,6 @@
-SUBDIRS = include ext gnunet_update . tests
+if GNUNET_PRESENT
+  gnunet_dep_src = ext include tests
+endif
 
+SUBDIRS = $(gnunet_dep_src) gnunet_update .
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]