Bladeren bron

simgrid: set SIMGRID_CFLAGS and SIMGRID_LIBS too when the simgrid path is set by hand

So they can be set in the .pc files etc.
Samuel Thibault 4 jaren geleden
bovenliggende
commit
7f94411fe3
1 gewijzigde bestanden met toevoegingen van 11 en 15 verwijderingen
  1. 11 15
      configure.ac

+ 11 - 15
configure.ac

@@ -149,8 +149,18 @@ AC_ARG_WITH(simgrid-lib-dir,
 	], [simgrid_lib_dir=no])
 
 if test x$enable_simgrid = xyes ; then
-	PKG_CHECK_MODULES([SIMGRID], [simgrid])
+	PKG_CHECK_MODULES([SIMGRID], [simgrid], [], [:])
 
+	if test "$simgrid_include_dir" != "no" ; then
+	   	SIMGRID_CFLAGS="$SIMGRID_CFLAGS -I$simgrid_include_dir"
+	fi
+	if test "$simgrid_lib_dir" != "no" ; then
+	   	SIMGRID_LIBS="$SIMGRID_LIBS -L$simgrid_lib_dir"
+	fi
+	if test "$simgrid_dir" != "no" ; then
+	   	SIMGRID_CFLAGS="$SIMGRID_CFLAGS -I$simgrid_dir/include"
+	   	SIMGRID_LIBS="$SIMGRID_LIBS -L$simgrid_dir/lib"
+	fi
    	if test -n "$SIMGRID_CFLAGS" ; then
 	   	CFLAGS="$SIMGRID_CFLAGS $CFLAGS"
 	   	CXXFLAGS="$SIMGRID_CFLAGS $CXXFLAGS"
@@ -159,20 +169,6 @@ if test x$enable_simgrid = xyes ; then
 	if test -n "$SIMGRID_LIBS" ; then
 		LDFLAGS="$SIMGRID_LIBS $LDFLAGS"
 	fi
-	if test "$simgrid_dir" != "no" ; then
-	   	CFLAGS="-I$simgrid_dir/include $CFLAGS"
-	   	CXXFLAGS="-I$simgrid_dir/include $CXXFLAGS"
-	   	NVCCFLAGS="-I$simgrid_dir/include $NVCCFLAGS"
-	   	LDFLAGS="-L$simgrid_dir/lib $LDFLAGS"
-	fi
-	if test "$simgrid_include_dir" != "no" ; then
-	   	CFLAGS="-I$simgrid_include_dir $CFLAGS"
-	   	CXXFLAGS="-I$simgrid_include_dir $CXXFLAGS"
-	   	NVCCFLAGS="-I$simgrid_include_dir $NVCCFLAGS"
-	fi
-	if test "$simgrid_lib_dir" != "no" ; then
-	   	LDFLAGS="-L$simgrid_lib_dir $LDFLAGS"
-	fi
 	AC_HAVE_LIBRARY([simgrid], [],
 		[
 			AC_MSG_ERROR(Simgrid support needs simgrid installed)