[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14696 - in gnunet: . src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14696 - in gnunet: . src/transport |
Date: |
Wed, 23 Mar 2011 13:55:18 +0100 |
Author: wachs
Date: 2011-03-23 13:55:18 +0100 (Wed, 23 Mar 2011)
New Revision: 14696
Modified:
gnunet/configure.ac
gnunet/src/transport/Makefile.am
gnunet/src/transport/gnunet-service-transport.c
Log:
changes to configure.ac
Modified: gnunet/configure.ac
===================================================================
--- gnunet/configure.ac 2011-03-23 12:00:20 UTC (rev 14695)
+++ gnunet/configure.ac 2011-03-23 12:55:18 UTC (rev 14696)
@@ -248,16 +248,23 @@
LIBS=$SAVE_LIBS
# glpk
-glpk=0
-AC_CHECK_HEADERS([glpk.h])
-if test "$ac_cv_header_glpk_h" = yes; then
-AM_CONDITIONAL(HAVE_GLPK, 1)
-AC_DEFINE_UNQUOTED([HAVE_GLPK], test x$glpk = xtrue, [We have GLPK])
-else
-AM_CONDITIONAL(HAVE_GLPK, test x$glpk = xtrue)
-AC_MSG_WARN([GLPK not installed.])
-fi
+#AC_CHECK_HEADERS(glpk.h, glpk=true)
+#AM_CONDITIONAL(HAVE_GLPK, test x$glpk = xtrue)
+#AC_CHECK_LIB([glpk],[glp_create_prob])
+a=true
+AC_CHECK_HEADERS(glpk.h, ,[a=false])
+AC_CHECK_LIB([glpk],[glp_create_prob], , [a=false])
+if test $a == false
+then
+ AC_MSG_NOTICE([Feature b0rk is missing.])
+ AM_CONDITIONAL(HAVE_GLPK, [test x$a = xtrue])
+else
+ AC_MSG_NOTICE([Feature b0rk is present.])
+ AM_CONDITIONAL(HAVE_GLPK, [test x$a = xtrue])
+ AM_CONDITIONAL(HAVE_LIBGLPK, [test x$a = x$a])
+fi
+
# test for kvm and kstat (for CPU stats under BSD/Solaris)
AC_CHECK_LIB([kvm],[kvm_open])
AC_CHECK_LIB([kstat],[kstat_open])
Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am 2011-03-23 12:00:20 UTC (rev 14695)
+++ gnunet/src/transport/Makefile.am 2011-03-23 12:55:18 UTC (rev 14696)
@@ -105,7 +105,7 @@
gnunet_transport_DEPENDENCIES = \
libgnunettransport.la
-if HAVE_GLPK
+if HAVE_LIBGLPK
GN_GLPK = -lglpk
endif
Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c 2011-03-23 12:00:20 UTC
(rev 14695)
+++ gnunet/src/transport/gnunet-service-transport.c 2011-03-23 12:55:18 UTC
(rev 14696)
@@ -38,7 +38,7 @@
#include "gnunet_signatures.h"
#include "gnunet_transport_plugin.h"
#include "transport.h"
-#if HAVE_GLPK
+#if HAVE_LIBGLPK
#include <glpk.h>
#endif
@@ -5548,12 +5548,14 @@
GNUNET_break (bl_head == NULL);
GNUNET_break (bc_head == NULL);
}
+#if !HAVE_LIBGLPK
+void ats_create_problem(int peers, double b_min, double b_max, double r, const
struct ATS_peer * list, int max_it, int max_dur)
+{
-
-#if HAVE_GLPK
-
-glp_prob * ats_create_problem(int peers, double b_min, double b_max, double r,
const struct ATS_peer * list, int max_it, int max_dur)
+}
+#else
+glp_prob * ats_create_problem (int peers, double b_min, double b_max, double
r, const struct ATS_peer * list, int max_it, int max_dur)
{
int c1, c2;
glp_prob *lp;
@@ -5689,11 +5691,6 @@
//GNUNET_free(options);
return lp;
}
-#else
-void ats_create_problem(int peers, double b_min, double b_max, double r, const
struct ATS_peer * list, int max_it, int max_dur)
-{
-
-}
#endif
void ats_calculate_bandwidth_distribution (struct ATS_info * ats)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14696 - in gnunet: . src/transport,
gnunet <=