dnl Find Isl
find_lib_and_headers([isl], [isl/config.h], [isl], [required])
+dnl Find whether ISL has a codegen.h file.
+find_lib_and_headers([isl], [isl/codegen.h], [isl])
+AS_IF([test "x$isl_found" = "xyes"],
+ [AC_DEFINE([ISL_CODEGEN_FOUND],[1],[Define if ISL has a code generator])])
+
dnl Check that we have cloog.
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $gmp_inc $isl_inc"
find_lib_and_headers([cloog], [cloog/isl/cloog.h], [cloog-isl], [required])
CXXFLAGS=$saved_CXXFLAGS
-AS_IF([test "cloog_found" = "xyes"],
+AS_IF([test "x$cloog_found" = "xyes"],
[AC_DEFINE([CLOOG_FOUND],[1],[Define if cloog found])])
dnl Check that we have openscop.
fi
# Check for library and headers works
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmp in $given_inc_path, $given_lib_path" >&5
-$as_echo_n "checking for gmp in $given_inc_path, $given_lib_path... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmp: gmp.h in $given_inc_path, and libgmp in $given_lib_path" >&5
+$as_echo_n "checking for gmp: gmp.h in $given_inc_path, and libgmp in $given_lib_path... " >&6; }
+
# try to compile a file that includes a header of the library
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
fi
# Check for library and headers works
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl in $given_inc_path, $given_lib_path" >&5
-$as_echo_n "checking for isl in $given_inc_path, $given_lib_path... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl: isl/config.h in $given_inc_path, and libisl in $given_lib_path" >&5
+$as_echo_n "checking for isl: isl/config.h in $given_inc_path, and libisl in $given_lib_path... " >&6; }
+
# try to compile a file that includes a header of the library
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ OLD_CXXFLAGS=$CXXFLAGS;
+ OLD_LDFLAGS=$LDFLAGS;
+ OLD_LIBS=$LIBS;
+
+ LIBS="$LIBS -lisl";
+
+ # Get include path and lib path
+
+# Check whether --with-isl was given.
+if test "${with_isl+set}" = set; then :
+ withval=$with_isl; given_inc_path="$withval/include"; CXXFLAGS="-I$given_inc_path $CXXFLAGS";
+ given_lib_path="$withval/lib"; LDFLAGS="-L$given_lib_path $LDFLAGS"
+else
+ given_inc_path=inc_not_give_isl;
+ given_lib_path=lib_not_give_isl
+
+fi
+
+ # Check for library and headers works
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl: isl/codegen.h in $given_inc_path, and libisl in $given_lib_path" >&5
+$as_echo_n "checking for isl: isl/codegen.h in $given_inc_path, and libisl in $given_lib_path... " >&6; }
+
+ # try to compile a file that includes a header of the library
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <isl/codegen.h>
+int
+main ()
+{
+;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ isl_found="yes"
+
+ if test "x$given_inc_path" != "xinc_not_give_isl"; then :
+ isl_inc="-I$given_inc_path"
+
+fi
+ isl_lib="-lisl"
+
+ if test "x$given_lib_path" != "xlib_not_give_isl"; then :
+ isl_ld="-L$given_lib_path"
+
+fi
+else
+ if test "x" = "xrequired"; then :
+ as_fn_error $? "isl required but not found" "$LINENO" 5
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ # reset original CXXFLAGS
+ CXXFLAGS=$OLD_CXXFLAGS
+ LDFLAGS=$OLD_LDFLAGS;
+ LIBS=$OLD_LIBS
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "x$isl_found" = "xyes"; then :
+
+$as_echo "#define ISL_CODEGEN_FOUND 1" >>confdefs.h
+
+fi
+
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $gmp_inc $isl_inc"
fi
# Check for library and headers works
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cloog in $given_inc_path, $given_lib_path" >&5
-$as_echo_n "checking for cloog in $given_inc_path, $given_lib_path... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cloog: cloog/isl/cloog.h in $given_inc_path, and libcloog-isl in $given_lib_path" >&5
+$as_echo_n "checking for cloog: cloog/isl/cloog.h in $given_inc_path, and libcloog-isl in $given_lib_path... " >&6; }
+
# try to compile a file that includes a header of the library
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
CXXFLAGS=$saved_CXXFLAGS
-if test "cloog_found" = "xyes"; then :
+if test "x$cloog_found" = "xyes"; then :
$as_echo "#define CLOOG_FOUND 1" >>confdefs.h
fi
# Check for library and headers works
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openscop in $given_inc_path, $given_lib_path" >&5
-$as_echo_n "checking for openscop in $given_inc_path, $given_lib_path... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openscop: openscop/scop.h in $given_inc_path, and libopenscop in $given_lib_path" >&5
+$as_echo_n "checking for openscop: openscop/scop.h in $given_inc_path, and libopenscop in $given_lib_path... " >&6; }
+
# try to compile a file that includes a header of the library
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
fi
# Check for library and headers works
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for scoplib in $given_inc_path, $given_lib_path" >&5
-$as_echo_n "checking for scoplib in $given_inc_path, $given_lib_path... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for scoplib: scoplib/scop.h in $given_inc_path, and libscoplib in $given_lib_path" >&5
+$as_echo_n "checking for scoplib: scoplib/scop.h in $given_inc_path, and libscoplib in $given_lib_path... " >&6; }
+
# try to compile a file that includes a header of the library
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */