Message ID | 1449767109-29903-2-git-send-email-s.pop@samsung.com |
---|---|
State | New |
Headers | show |
On Thu, Dec 10, 2015 at 6:05 PM, Sebastian Pop <s.pop@samsung.com> wrote: > we now check the isl version, as there are no real differences in existing files > in between isl 0.14 and isl 0.15. I thought ISL 0.15 has some new features you could check? Also using a run test is bad for cross compiling. I'd simply change the "compatible" test to check for isl_ctx_get_max_operations or whatever is needed to implement the compute bound and not worry about warning about using a deprecated ISL during configure. Maybe add the ISL version to the list of dependency versions we print in toplev.c:print_version. Richard. > --- > config/isl.m4 | 41 +++++++++++++++------ > configure | 112 ++++++++++++++++++++++++++++++++++++++++++++++++---------- > 2 files changed, 123 insertions(+), 30 deletions(-) > > diff --git a/config/isl.m4 b/config/isl.m4 > index 459fac1..886b0e4 100644 > --- a/config/isl.m4 > +++ b/config/isl.m4 > @@ -19,23 +19,23 @@ > > # ISL_INIT_FLAGS () > # ------------------------- > -# Provide configure switches for ISL support. > +# Provide configure switches for isl support. > # Initialize isllibs/islinc according to the user input. > AC_DEFUN([ISL_INIT_FLAGS], > [ > AC_ARG_WITH([isl-include], > [AS_HELP_STRING( > [--with-isl-include=PATH], > - [Specify directory for installed ISL include files])]) > + [Specify directory for installed isl include files])]) > AC_ARG_WITH([isl-lib], > [AS_HELP_STRING( > [--with-isl-lib=PATH], > - [Specify the directory for the installed ISL library])]) > + [Specify the directory for the installed isl library])]) > > AC_ARG_ENABLE(isl-version-check, > [AS_HELP_STRING( > [--disable-isl-version-check], > - [disable check for ISL version])], > + [disable check for isl version])], > ENABLE_ISL_CHECK=$enableval, > ENABLE_ISL_CHECK=yes) > > @@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS], > if test "x${with_isl_lib}" != x; then > isllibs="-L$with_isl_lib" > fi > - dnl If no --with-isl flag was specified and there is in-tree ISL > + dnl If no --with-isl flag was specified and there is in-tree isl > dnl source, set up flags to use that and skip any version tests > - dnl as we cannot run them before building ISL. > + dnl as we cannot run them before building isl. > if test "x${islinc}" = x && test "x${isllibs}" = x \ > && test -d ${srcdir}/isl; then > isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' > islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' > ENABLE_ISL_CHECK=no > - AC_MSG_WARN([using in-tree ISL, disabling version check]) > + AC_MSG_WARN([using in-tree isl, disabling version check]) > fi > > isllibs="${isllibs} -lisl" > @@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS], > > # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) > # ---------------------------------------------------- > -# Provide actions for failed ISL detection. > +# Provide actions for failed isl detection. > AC_DEFUN([ISL_REQUESTED], > [ > AC_REQUIRE([ISL_INIT_FLAGS]) > @@ -106,12 +106,31 @@ AC_DEFUN([ISL_CHECK_VERSION], > LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" > LIBS="${_isl_saved_LIBS} -lisl" > > - AC_MSG_CHECKING([for compatible ISL]) > - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])], > + AC_MSG_CHECKING([for recommended isl 0.15]) > + AC_TRY_RUN([#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8)) > + return 1; > + return 0; > + }], > [gcc_cv_isl=yes], > - [gcc_cv_isl=no]) > + [gcc_cv_isl=no], [gcc_cv_isl=no]) > AC_MSG_RESULT([$gcc_cv_isl]) > > + if test "${gcc_cv_isl}" = no ; then > + AC_MSG_CHECKING([for deprecated isl 0.14]) > + AC_TRY_RUN([#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8)) > + return 1; > + return 0; > + }], > + [gcc_cv_isl=yes], > + [gcc_cv_isl=no], [gcc_cv_isl=no]) > + AC_MSG_RESULT([$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated]) > + fi > CFLAGS=$_isl_saved_CFLAGS > LDFLAGS=$_isl_saved_LDFLAGS > LIBS=$_isl_saved_LIBS > diff --git a/configure b/configure > index 090615f..4284ba7 100755 > --- a/configure > +++ b/configure > @@ -1492,7 +1492,7 @@ Optional Features: > build static libjava [default=no] > --enable-bootstrap enable bootstrapping [yes if native build] > --disable-isl-version-check > - disable check for ISL version > + disable check for isl version > --enable-lto enable link time optimization support > --enable-linker-plugin-configure-flags=FLAGS > additional flags for configuring linker plugins > @@ -1553,8 +1553,8 @@ Optional Packages: > package. Equivalent to > --with-isl-include=PATH/include plus > --with-isl-lib=PATH/lib > - --with-isl-include=PATH Specify directory for installed ISL include files > - --with-isl-lib=PATH Specify the directory for the installed ISL library > + --with-isl-include=PATH Specify directory for installed isl include files > + --with-isl-lib=PATH Specify the directory for the installed isl library > --with-build-sysroot=SYSROOT > use sysroot as the system root during the build > --with-debug-prefix-map='A=B C=D ...' > @@ -1879,6 +1879,48 @@ fi > return $ac_retval > > } # ac_fn_c_try_link > + > +# ac_fn_c_try_run LINENO > +# ---------------------- > +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes > +# that executables *can* be run. > +ac_fn_c_try_run () > +{ > + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack > + if { { ac_try="$ac_link" > +case "(($ac_try" in > + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; > + *) ac_try_echo=$ac_try;; > +esac > +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" > +$as_echo "$ac_try_echo"; } >&5 > + (eval "$ac_link") 2>&5 > + ac_status=$? > + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' > + { { case "(($ac_try" in > + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; > + *) ac_try_echo=$ac_try;; > +esac > +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" > +$as_echo "$ac_try_echo"; } >&5 > + (eval "$ac_try") 2>&5 > + ac_status=$? > + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > + test $ac_status = 0; }; }; then : > + ac_retval=0 > +else > + $as_echo "$as_me: program exited with status $ac_status" >&5 > + $as_echo "$as_me: failed program was:" >&5 > +sed 's/^/| /' conftest.$ac_ext >&5 > + > + ac_retval=$ac_status > +fi > + rm -rf conftest.dSYM conftest_ipa8_conftest.oo > + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} > + return $ac_retval > + > +} # ac_fn_c_try_run > cat >config.log <<_ACEOF > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > @@ -6003,8 +6045,8 @@ fi > isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' > islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' > ENABLE_ISL_CHECK=no > - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5 > -$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} > + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5 > +$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;} > fi > > isllibs="${isllibs} -lisl" > @@ -6020,29 +6062,61 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} > LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" > LIBS="${_isl_saved_LIBS} -lisl" > > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5 > -$as_echo_n "checking for compatible ISL... " >&6; } > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recommended isl 0.15" >&5 > +$as_echo_n "checking for recommended isl 0.15... " >&6; } > + if test "$cross_compiling" = yes; then : > + gcc_cv_isl=no > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include <isl/val.h> > -int > -main () > -{ > -; > - ; > - return 0; > -} > +#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8)) > + return 1; > + return 0; > + } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > +if ac_fn_c_try_run "$LINENO"; then : > gcc_cv_isl=yes > else > gcc_cv_isl=no > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > +fi > + > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 > $as_echo "$gcc_cv_isl" >&6; } > > + if test "${gcc_cv_isl}" = no ; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated isl 0.14" >&5 > +$as_echo_n "checking for deprecated isl 0.14... " >&6; } > + if test "$cross_compiling" = yes; then : > + gcc_cv_isl=no > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8)) > + return 1; > + return 0; > + } > +_ACEOF > +if ac_fn_c_try_run "$LINENO"; then : > + gcc_cv_isl=yes > +else > + gcc_cv_isl=no > +fi > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > +fi > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&5 > +$as_echo "$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; } > + fi > CFLAGS=$_isl_saved_CFLAGS > LDFLAGS=$_isl_saved_LDFLAGS > LIBS=$_isl_saved_LIBS > -- > 1.9.1 >
Good points. I will send an updated patch following all your recommendations. Sebastian -----Original Message----- From: Richard Biener [mailto:richard.guenther@gmail.com] Sent: Friday, December 11, 2015 3:42 AM To: Sebastian Pop Cc: Sebastian Pop; GCC Patches; hiraditya@msn.com Subject: Re: [PATCH 2/2] [graphite] update required isl versions On Thu, Dec 10, 2015 at 6:05 PM, Sebastian Pop <s.pop@samsung.com> wrote: > we now check the isl version, as there are no real differences in existing files > in between isl 0.14 and isl 0.15. I thought ISL 0.15 has some new features you could check? Also using a run test is bad for cross compiling. I'd simply change the "compatible" test to check for isl_ctx_get_max_operations or whatever is needed to implement the compute bound and not worry about warning about using a deprecated ISL during configure. Maybe add the ISL version to the list of dependency versions we print in toplev.c:print_version. Richard. > --- > config/isl.m4 | 41 +++++++++++++++------ > configure | 112 ++++++++++++++++++++++++++++++++++++++++++++++++---------- > 2 files changed, 123 insertions(+), 30 deletions(-) > > diff --git a/config/isl.m4 b/config/isl.m4 > index 459fac1..886b0e4 100644 > --- a/config/isl.m4 > +++ b/config/isl.m4 > @@ -19,23 +19,23 @@ > > # ISL_INIT_FLAGS () > # ------------------------- > -# Provide configure switches for ISL support. > +# Provide configure switches for isl support. > # Initialize isllibs/islinc according to the user input. > AC_DEFUN([ISL_INIT_FLAGS], > [ > AC_ARG_WITH([isl-include], > [AS_HELP_STRING( > [--with-isl-include=PATH], > - [Specify directory for installed ISL include files])]) > + [Specify directory for installed isl include files])]) > AC_ARG_WITH([isl-lib], > [AS_HELP_STRING( > [--with-isl-lib=PATH], > - [Specify the directory for the installed ISL library])]) > + [Specify the directory for the installed isl library])]) > > AC_ARG_ENABLE(isl-version-check, > [AS_HELP_STRING( > [--disable-isl-version-check], > - [disable check for ISL version])], > + [disable check for isl version])], > ENABLE_ISL_CHECK=$enableval, > ENABLE_ISL_CHECK=yes) > > @@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS], > if test "x${with_isl_lib}" != x; then > isllibs="-L$with_isl_lib" > fi > - dnl If no --with-isl flag was specified and there is in-tree ISL > + dnl If no --with-isl flag was specified and there is in-tree isl > dnl source, set up flags to use that and skip any version tests > - dnl as we cannot run them before building ISL. > + dnl as we cannot run them before building isl. > if test "x${islinc}" = x && test "x${isllibs}" = x \ > && test -d ${srcdir}/isl; then > isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' > islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' > ENABLE_ISL_CHECK=no > - AC_MSG_WARN([using in-tree ISL, disabling version check]) > + AC_MSG_WARN([using in-tree isl, disabling version check]) > fi > > isllibs="${isllibs} -lisl" > @@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS], > > # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) > # ---------------------------------------------------- > -# Provide actions for failed ISL detection. > +# Provide actions for failed isl detection. > AC_DEFUN([ISL_REQUESTED], > [ > AC_REQUIRE([ISL_INIT_FLAGS]) > @@ -106,12 +106,31 @@ AC_DEFUN([ISL_CHECK_VERSION], > LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" > LIBS="${_isl_saved_LIBS} -lisl" > > - AC_MSG_CHECKING([for compatible ISL]) > - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])], > + AC_MSG_CHECKING([for recommended isl 0.15]) > + AC_TRY_RUN([#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8)) > + return 1; > + return 0; > + }], > [gcc_cv_isl=yes], > - [gcc_cv_isl=no]) > + [gcc_cv_isl=no], [gcc_cv_isl=no]) > AC_MSG_RESULT([$gcc_cv_isl]) > > + if test "${gcc_cv_isl}" = no ; then > + AC_MSG_CHECKING([for deprecated isl 0.14]) > + AC_TRY_RUN([#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8)) > + return 1; > + return 0; > + }], > + [gcc_cv_isl=yes], > + [gcc_cv_isl=no], [gcc_cv_isl=no]) > + AC_MSG_RESULT([$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated]) > + fi > CFLAGS=$_isl_saved_CFLAGS > LDFLAGS=$_isl_saved_LDFLAGS > LIBS=$_isl_saved_LIBS > diff --git a/configure b/configure > index 090615f..4284ba7 100755 > --- a/configure > +++ b/configure > @@ -1492,7 +1492,7 @@ Optional Features: > build static libjava [default=no] > --enable-bootstrap enable bootstrapping [yes if native build] > --disable-isl-version-check > - disable check for ISL version > + disable check for isl version > --enable-lto enable link time optimization support > --enable-linker-plugin-configure-flags=FLAGS > additional flags for configuring linker plugins > @@ -1553,8 +1553,8 @@ Optional Packages: > package. Equivalent to > --with-isl-include=PATH/include plus > --with-isl-lib=PATH/lib > - --with-isl-include=PATH Specify directory for installed ISL include files > - --with-isl-lib=PATH Specify the directory for the installed ISL library > + --with-isl-include=PATH Specify directory for installed isl include files > + --with-isl-lib=PATH Specify the directory for the installed isl library > --with-build-sysroot=SYSROOT > use sysroot as the system root during the build > --with-debug-prefix-map='A=B C=D ...' > @@ -1879,6 +1879,48 @@ fi > return $ac_retval > > } # ac_fn_c_try_link > + > +# ac_fn_c_try_run LINENO > +# ---------------------- > +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes > +# that executables *can* be run. > +ac_fn_c_try_run () > +{ > + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack > + if { { ac_try="$ac_link" > +case "(($ac_try" in > + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; > + *) ac_try_echo=$ac_try;; > +esac > +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" > +$as_echo "$ac_try_echo"; } >&5 > + (eval "$ac_link") 2>&5 > + ac_status=$? > + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' > + { { case "(($ac_try" in > + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; > + *) ac_try_echo=$ac_try;; > +esac > +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" > +$as_echo "$ac_try_echo"; } >&5 > + (eval "$ac_try") 2>&5 > + ac_status=$? > + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 > + test $ac_status = 0; }; }; then : > + ac_retval=0 > +else > + $as_echo "$as_me: program exited with status $ac_status" >&5 > + $as_echo "$as_me: failed program was:" >&5 > +sed 's/^/| /' conftest.$ac_ext >&5 > + > + ac_retval=$ac_status > +fi > + rm -rf conftest.dSYM conftest_ipa8_conftest.oo > + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} > + return $ac_retval > + > +} # ac_fn_c_try_run > cat >config.log <<_ACEOF > This file contains any messages produced by compilers while > running configure, to aid debugging if configure makes a mistake. > @@ -6003,8 +6045,8 @@ fi > isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' > islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' > ENABLE_ISL_CHECK=no > - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5 > -$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} > + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5 > +$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;} > fi > > isllibs="${isllibs} -lisl" > @@ -6020,29 +6062,61 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} > LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" > LIBS="${_isl_saved_LIBS} -lisl" > > - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5 > -$as_echo_n "checking for compatible ISL... " >&6; } > - cat confdefs.h - <<_ACEOF >conftest.$ac_ext > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recommended isl 0.15" >&5 > +$as_echo_n "checking for recommended isl 0.15... " >&6; } > + if test "$cross_compiling" = yes; then : > + gcc_cv_isl=no > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include <isl/val.h> > -int > -main () > -{ > -; > - ; > - return 0; > -} > +#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8)) > + return 1; > + return 0; > + } > _ACEOF > -if ac_fn_c_try_link "$LINENO"; then : > +if ac_fn_c_try_run "$LINENO"; then : > gcc_cv_isl=yes > else > gcc_cv_isl=no > fi > -rm -f core conftest.err conftest.$ac_objext \ > - conftest$ac_exeext conftest.$ac_ext > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > +fi > + > { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 > $as_echo "$gcc_cv_isl" >&6; } > > + if test "${gcc_cv_isl}" = no ; then > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated isl 0.14" >&5 > +$as_echo_n "checking for deprecated isl 0.14... " >&6; } > + if test "$cross_compiling" = yes; then : > + gcc_cv_isl=no > +else > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > +#include <isl/stdint.h> > + #include <string.h> > + int main() { > + if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8)) > + return 1; > + return 0; > + } > +_ACEOF > +if ac_fn_c_try_run "$LINENO"; then : > + gcc_cv_isl=yes > +else > + gcc_cv_isl=no > +fi > +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ > + conftest.$ac_objext conftest.beam conftest.$ac_ext > +fi > + > + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&5 > +$as_echo "$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; } > + fi > CFLAGS=$_isl_saved_CFLAGS > LDFLAGS=$_isl_saved_LDFLAGS > LIBS=$_isl_saved_LIBS > -- > 1.9.1 >
diff --git a/config/isl.m4 b/config/isl.m4 index 459fac1..886b0e4 100644 --- a/config/isl.m4 +++ b/config/isl.m4 @@ -19,23 +19,23 @@ # ISL_INIT_FLAGS () # ------------------------- -# Provide configure switches for ISL support. +# Provide configure switches for isl support. # Initialize isllibs/islinc according to the user input. AC_DEFUN([ISL_INIT_FLAGS], [ AC_ARG_WITH([isl-include], [AS_HELP_STRING( [--with-isl-include=PATH], - [Specify directory for installed ISL include files])]) + [Specify directory for installed isl include files])]) AC_ARG_WITH([isl-lib], [AS_HELP_STRING( [--with-isl-lib=PATH], - [Specify the directory for the installed ISL library])]) + [Specify the directory for the installed isl library])]) AC_ARG_ENABLE(isl-version-check, [AS_HELP_STRING( [--disable-isl-version-check], - [disable check for ISL version])], + [disable check for isl version])], ENABLE_ISL_CHECK=$enableval, ENABLE_ISL_CHECK=yes) @@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS], if test "x${with_isl_lib}" != x; then isllibs="-L$with_isl_lib" fi - dnl If no --with-isl flag was specified and there is in-tree ISL + dnl If no --with-isl flag was specified and there is in-tree isl dnl source, set up flags to use that and skip any version tests - dnl as we cannot run them before building ISL. + dnl as we cannot run them before building isl. if test "x${islinc}" = x && test "x${isllibs}" = x \ && test -d ${srcdir}/isl; then isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' ENABLE_ISL_CHECK=no - AC_MSG_WARN([using in-tree ISL, disabling version check]) + AC_MSG_WARN([using in-tree isl, disabling version check]) fi isllibs="${isllibs} -lisl" @@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS], # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) # ---------------------------------------------------- -# Provide actions for failed ISL detection. +# Provide actions for failed isl detection. AC_DEFUN([ISL_REQUESTED], [ AC_REQUIRE([ISL_INIT_FLAGS]) @@ -106,12 +106,31 @@ AC_DEFUN([ISL_CHECK_VERSION], LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" LIBS="${_isl_saved_LIBS} -lisl" - AC_MSG_CHECKING([for compatible ISL]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])], + AC_MSG_CHECKING([for recommended isl 0.15]) + AC_TRY_RUN([#include <isl/stdint.h> + #include <string.h> + int main() { + if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8)) + return 1; + return 0; + }], [gcc_cv_isl=yes], - [gcc_cv_isl=no]) + [gcc_cv_isl=no], [gcc_cv_isl=no]) AC_MSG_RESULT([$gcc_cv_isl]) + if test "${gcc_cv_isl}" = no ; then + AC_MSG_CHECKING([for deprecated isl 0.14]) + AC_TRY_RUN([#include <isl/stdint.h> + #include <string.h> + int main() { + if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8)) + return 1; + return 0; + }], + [gcc_cv_isl=yes], + [gcc_cv_isl=no], [gcc_cv_isl=no]) + AC_MSG_RESULT([$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated]) + fi CFLAGS=$_isl_saved_CFLAGS LDFLAGS=$_isl_saved_LDFLAGS LIBS=$_isl_saved_LIBS diff --git a/configure b/configure index 090615f..4284ba7 100755 --- a/configure +++ b/configure @@ -1492,7 +1492,7 @@ Optional Features: build static libjava [default=no] --enable-bootstrap enable bootstrapping [yes if native build] --disable-isl-version-check - disable check for ISL version + disable check for isl version --enable-lto enable link time optimization support --enable-linker-plugin-configure-flags=FLAGS additional flags for configuring linker plugins @@ -1553,8 +1553,8 @@ Optional Packages: package. Equivalent to --with-isl-include=PATH/include plus --with-isl-lib=PATH/lib - --with-isl-include=PATH Specify directory for installed ISL include files - --with-isl-lib=PATH Specify the directory for the installed ISL library + --with-isl-include=PATH Specify directory for installed isl include files + --with-isl-lib=PATH Specify the directory for the installed isl library --with-build-sysroot=SYSROOT use sysroot as the system root during the build --with-debug-prefix-map='A=B C=D ...' @@ -1879,6 +1879,48 @@ fi return $ac_retval } # ac_fn_c_try_link + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval + +} # ac_fn_c_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -6003,8 +6045,8 @@ fi isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' ENABLE_ISL_CHECK=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5 -$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5 +$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;} fi isllibs="${isllibs} -lisl" @@ -6020,29 +6062,61 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;} LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" LIBS="${_isl_saved_LIBS} -lisl" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5 -$as_echo_n "checking for compatible ISL... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recommended isl 0.15" >&5 +$as_echo_n "checking for recommended isl 0.15... " >&6; } + if test "$cross_compiling" = yes; then : + gcc_cv_isl=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <isl/val.h> -int -main () -{ -; - ; - return 0; -} +#include <isl/stdint.h> + #include <string.h> + int main() { + if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8)) + return 1; + return 0; + } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_run "$LINENO"; then : gcc_cv_isl=yes else gcc_cv_isl=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5 $as_echo "$gcc_cv_isl" >&6; } + if test "${gcc_cv_isl}" = no ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated isl 0.14" >&5 +$as_echo_n "checking for deprecated isl 0.14... " >&6; } + if test "$cross_compiling" = yes; then : + gcc_cv_isl=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <isl/stdint.h> + #include <string.h> + int main() { + if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8)) + return 1; + return 0; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gcc_cv_isl=yes +else + gcc_cv_isl=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&5 +$as_echo "$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; } + fi CFLAGS=$_isl_saved_CFLAGS LDFLAGS=$_isl_saved_LDFLAGS LIBS=$_isl_saved_LIBS