Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stop C file inclusion madness and do include the files in the libraries the proper...
[simgrid.git] / configure.ac
index 3b8e92b..16ccabc 100644 (file)
@@ -162,6 +162,7 @@ if test "x$with_context" = "xpthread"; then
   AC_DEFINE([CONTEXT_THREADS],1,[Define if xbt contexts are based on our threads implementation or not])
   AC_MSG_RESULT(You have pthreads. Let's use them.)
 fi
+AM_CONDITIONAL(CONTEXT_THREADS,test "x$with_context" = xpthread)
 
 dnl #
 dnl #  4. determine a few additional details
@@ -201,7 +202,6 @@ if test xpthread=xyes ; then
   fi
 fi
 
-
 #########################################
 ## Build optional modules (gtnets)
 ##
@@ -228,8 +228,7 @@ else
   AC_LANG_POP([C++])  
 
   if test "x$gtnets" = xyes ; then 
-    CPPFLAGS+=$GTNETS_CPPFLAGS
-    LDFLAGS+=$GTNETS_LDFLAGS
+    AM_CPPFLAGS="$AM_CPPFLAGS $GTNETS_CPPFLAGS"
     SIMGRID_DEP="$SIMGRID_DEP $GTNETS_LDFLAGS"
     AC_MSG_RESULT(Found working gtnets library.)
     AC_DEFINE(HAVE_GTNETS, 1, [Indicates whether we have the GTNETS library or not])
@@ -269,7 +268,7 @@ else
      csdp=no;
   fi
   if test "x$csdp" = xyes; then 
-    CPPFLAGS+=$CSDP_CPPFLAGS
+    AM_CPPFLAGS="$AM_CPPFLAGS $CSDP_CPPFLAGS"
     SIMGRID_DEP="$SIMGRID_DEP $CSDP_LDFLAGS"
     AC_MSG_RESULT(Found working sdp library.)
     AC_DEFINE(HAVE_SDP, 1, [Indicates whether we have the CSDP library or not])
@@ -287,7 +286,7 @@ AC_CHECK_LIB(socket, connect,    [GRAS_DEP="$GRAS_DEP -lsocket"])
 AC_MSG_CHECKING(for extra dependencies of libgras)
 case $host_os in
   *mingw* ) GRAS_DEP="$GRAS_DEP -lws2_32" ; SIMGRID_DEP="$SIMGRID_DEP -lws2_32";
-            AC_SUBST(AM_CFLAGS,-DDLL_EXPORT)
+            AM_CPPFLAGS="$AM_CPPFLAGS -DDLL_EXPORT"
             AC_DEFINE(CONTEXT_THREADS,1);;
 esac
           
@@ -321,9 +320,10 @@ then
 fi
 SG_COMPILE_FLAGS
 
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
+AC_SUBST([CFLAGS])
+AC_SUBST([CPPFLAGS])
+AC_SUBST([LDFLAGS])
+AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([abs_builddir])
 AC_SUBST([abs_srcdir])
 AC_SUBST([abs_top_builddir])