--- configure.orig 2004-08-02 16:20:13.000000000 -0700 +++ configure 2012-04-20 14:50:23.000000000 -0700 @@ -10646,6 +10646,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #include #include "png.h" int main (void) @@ -10653,7 +10654,7 @@ int main (void) const char *version = png_get_libpng_ver(NULL) ; fprintf (stderr, "%s\n", version); - return ! (strcmp (version ? version : "", "$required_libpng_version") >= 0); + return (system ("pkg-config --atleast-version=$required_libpng_version libpng")); } @@ -14889,990 +14890,8 @@ echo "${ECHO_T}$pov_prog_cc_flags_value" esac done - if test -z "$pov_arch"; then - case "$host" in - i486-*) pov_arch="i486";; - i586-*) pov_arch="pentium";; # for GCC / ICC - i686-*|i386-*) # FreeBSD seems to only report i386 - pov_cpu=${pov_modelname:-`uname -p 2> /dev/null`} - case "$pov_cpu" in - # Intel - *pentium*4*|*xeon*) pov_arch="pentium4";; # for GCC / ICC - *pentium*mmx*) pov_arch="pentium";; # catch this first - *pentium*m*) - if test x"$CXX" = x"icc"; then - pov_arch="pentium4" - else - pov_arch="pentium-m" - fi - ;; - *pentium*iii*|*celeron*) # assume all celerons belong here - if test x"$CXX" = x"icc"; then - pov_arch="pentiumiii" - else - pov_arch="pentium3" - fi - ;; - *pentium*ii*) - if test x"$CXX" = x"icc"; then - pov_arch="pentiumii" - else - pov_arch="pentium2" - fi - ;; - *pentium*pro*) pov_arch="pentiumpro";; # for GCC / ICC - *pentium*) pov_arch="pentium";; # for GCC / ICC - # AMD - *athlon*xp*) pov_arch="athlon-xp";; - *athlon*mp*) pov_arch="athlon-mp";; - *athlon*|*duron*) pov_arch="athlon";; - # others - *) pov_arch="i686";; # don't support true i386 - esac - pov_arch_fallback="i686" - ;; - k6-*) pov_arch="k6"; pov_arch_fallback="i686";; - k7-*) pov_arch="k7"; pov_arch_fallback="i686";; - k8-*|x86_64-*) pov_arch="k8"; pov_arch_fallback="i686";; - *) pov_arch="unknown";; - esac - fi - if test x"$pov_arch" != x"unknown"; then - - - - # Create a unique cache-id name (multiple flags are handled). - pov_prog_cxx_flags_var=pov_cv_prog_cxx_flags`echo -march=$pov_arch -mtune=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - - # Create the extended regular expression to handle multiple flags. - # For instance, "-first-flag -second-flag -X" gives the regexp: - # "\-f|irst-flag|\-s|econd-flag|\-X|X" - # - # FreeBSD and Darwin seem to have a problem with the \+ sed construct - # (but apparently not with the \{x,y\} one). For safety, I prefer to - # use [[:space:]][[:space:]]* for [[:space:]]\+ - pov_prog_cxx_flags_regexp=`echo -march=$pov_arch -mtune=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - # Cannot use AC_CACHE_CHECK due to the nature of the cache-id variable. - echo "$as_me:$LINENO: checking whether $CXX accepts -march=$pov_arch -mtune=$pov_arch" >&5 -echo $ECHO_N "checking whether $CXX accepts -march=$pov_arch -mtune=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cxx_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - # Create a conftest file for CXX. - ac_ext=cc -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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - - # Compile with $CXX and inspect standard error for given flags. - { ac_try='$CXX -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CXX -c -march=$pov_arch -mtune=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cxx_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - # the command above seems to not always return the correct status, so - # for safety I rerun it here; I keep the other one for logging purpose. - pov_prog_cxx_flags_err=`$ac_cv_prog_egrep "$pov_prog_cxx_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cxx_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cxx_flags_var=yes" - else - eval "$pov_prog_cxx_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cxx_flags_value=\$$pov_prog_cxx_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cxx_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cxx_flags_value" >&6 - - # Update CXXFLAGS when flags are working, and run provided actions. - if test x"$pov_prog_cxx_flags_value" = x"yes"; then - CXXFLAGS="$CXXFLAGS -march=$pov_arch -mtune=$pov_arch" - - if test "$subdirs"; then - { - - - - pov_prog_cc_flags_var=pov_cv_prog_cc_flags`echo -march=$pov_arch -mtune=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - pov_prog_cc_flags_regexp=`echo -march=$pov_arch -mtune=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - echo "$as_me:$LINENO: checking whether $CC accepts -march=$pov_arch -mtune=$pov_arch" >&5 -echo $ECHO_N "checking whether $CC accepts -march=$pov_arch -mtune=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cc_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - 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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - { ac_try='$CC -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CC -c -march=$pov_arch -mtune=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cc_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - pov_prog_cc_flags_err=`$ac_cv_prog_egrep "$pov_prog_cc_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cc_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cc_flags_var=yes" - else - eval "$pov_prog_cc_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cc_flags_value=\$$pov_prog_cc_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cc_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cc_flags_value" >&6 - - if test x"$pov_prog_cc_flags_value" = x"yes"; then - CFLAGS="$CFLAGS -march=$pov_arch -mtune=$pov_arch" - : - else - - - - pov_prog_cc_flags_var=pov_cv_prog_cc_flags`echo -march=$pov_arch -mcpu=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - pov_prog_cc_flags_regexp=`echo -march=$pov_arch -mcpu=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - echo "$as_me:$LINENO: checking whether $CC accepts -march=$pov_arch -mcpu=$pov_arch" >&5 -echo $ECHO_N "checking whether $CC accepts -march=$pov_arch -mcpu=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cc_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - 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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - { ac_try='$CC -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CC -c -march=$pov_arch -mcpu=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cc_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - pov_prog_cc_flags_err=`$ac_cv_prog_egrep "$pov_prog_cc_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cc_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cc_flags_var=yes" - else - eval "$pov_prog_cc_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cc_flags_value=\$$pov_prog_cc_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cc_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cc_flags_value" >&6 - - if test x"$pov_prog_cc_flags_value" = x"yes"; then - CFLAGS="$CFLAGS -march=$pov_arch -mcpu=$pov_arch" - : - else - : - fi - - - fi - - } - fi - - else - - - - - # Create a unique cache-id name (multiple flags are handled). - pov_prog_cxx_flags_var=pov_cv_prog_cxx_flags`echo -march=$pov_arch -mcpu=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - - # Create the extended regular expression to handle multiple flags. - # For instance, "-first-flag -second-flag -X" gives the regexp: - # "\-f|irst-flag|\-s|econd-flag|\-X|X" - # - # FreeBSD and Darwin seem to have a problem with the \+ sed construct - # (but apparently not with the \{x,y\} one). For safety, I prefer to - # use [[:space:]][[:space:]]* for [[:space:]]\+ - pov_prog_cxx_flags_regexp=`echo -march=$pov_arch -mcpu=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - # Cannot use AC_CACHE_CHECK due to the nature of the cache-id variable. - echo "$as_me:$LINENO: checking whether $CXX accepts -march=$pov_arch -mcpu=$pov_arch" >&5 -echo $ECHO_N "checking whether $CXX accepts -march=$pov_arch -mcpu=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cxx_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - # Create a conftest file for CXX. - ac_ext=cc -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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - - # Compile with $CXX and inspect standard error for given flags. - { ac_try='$CXX -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CXX -c -march=$pov_arch -mcpu=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cxx_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - # the command above seems to not always return the correct status, so - # for safety I rerun it here; I keep the other one for logging purpose. - pov_prog_cxx_flags_err=`$ac_cv_prog_egrep "$pov_prog_cxx_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cxx_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cxx_flags_var=yes" - else - eval "$pov_prog_cxx_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cxx_flags_value=\$$pov_prog_cxx_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cxx_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cxx_flags_value" >&6 - - # Update CXXFLAGS when flags are working, and run provided actions. - if test x"$pov_prog_cxx_flags_value" = x"yes"; then - CXXFLAGS="$CXXFLAGS -march=$pov_arch -mcpu=$pov_arch" - - if test "$subdirs"; then - { - - - pov_prog_cc_flags_var=pov_cv_prog_cc_flags`echo -march=$pov_arch -mcpu=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - pov_prog_cc_flags_regexp=`echo -march=$pov_arch -mcpu=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - echo "$as_me:$LINENO: checking whether $CC accepts -march=$pov_arch -mcpu=$pov_arch" >&5 -echo $ECHO_N "checking whether $CC accepts -march=$pov_arch -mcpu=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cc_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - 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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - { ac_try='$CC -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CC -c -march=$pov_arch -mcpu=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cc_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - pov_prog_cc_flags_err=`$ac_cv_prog_egrep "$pov_prog_cc_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cc_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cc_flags_var=yes" - else - eval "$pov_prog_cc_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cc_flags_value=\$$pov_prog_cc_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cc_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cc_flags_value" >&6 - - if test x"$pov_prog_cc_flags_value" = x"yes"; then - CFLAGS="$CFLAGS -march=$pov_arch -mcpu=$pov_arch" - : - else - : - fi - } - fi - - else - - - - - # Create a unique cache-id name (multiple flags are handled). - pov_prog_cxx_flags_var=pov_cv_prog_cxx_flags`echo -march=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - - # Create the extended regular expression to handle multiple flags. - # For instance, "-first-flag -second-flag -X" gives the regexp: - # "\-f|irst-flag|\-s|econd-flag|\-X|X" - # - # FreeBSD and Darwin seem to have a problem with the \+ sed construct - # (but apparently not with the \{x,y\} one). For safety, I prefer to - # use [[:space:]][[:space:]]* for [[:space:]]\+ - pov_prog_cxx_flags_regexp=`echo -march=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - # Cannot use AC_CACHE_CHECK due to the nature of the cache-id variable. - echo "$as_me:$LINENO: checking whether $CXX accepts -march=$pov_arch" >&5 -echo $ECHO_N "checking whether $CXX accepts -march=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cxx_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - # Create a conftest file for CXX. - ac_ext=cc -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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - - # Compile with $CXX and inspect standard error for given flags. - { ac_try='$CXX -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CXX -c -march=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cxx_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - # the command above seems to not always return the correct status, so - # for safety I rerun it here; I keep the other one for logging purpose. - pov_prog_cxx_flags_err=`$ac_cv_prog_egrep "$pov_prog_cxx_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cxx_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cxx_flags_var=yes" - else - eval "$pov_prog_cxx_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cxx_flags_value=\$$pov_prog_cxx_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cxx_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cxx_flags_value" >&6 - - # Update CXXFLAGS when flags are working, and run provided actions. - if test x"$pov_prog_cxx_flags_value" = x"yes"; then - CXXFLAGS="$CXXFLAGS -march=$pov_arch" - - if test "$subdirs"; then - { - - - pov_prog_cc_flags_var=pov_cv_prog_cc_flags`echo -march=$pov_arch | sed 's,[^a-zA-Z0-9],_,g'` - pov_prog_cc_flags_regexp=`echo -march=$pov_arch | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - echo "$as_me:$LINENO: checking whether $CC accepts -march=$pov_arch" >&5 -echo $ECHO_N "checking whether $CC accepts -march=$pov_arch... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cc_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - 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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - { ac_try='$CC -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CC -c -march=$pov_arch conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cc_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - pov_prog_cc_flags_err=`$ac_cv_prog_egrep "$pov_prog_cc_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cc_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cc_flags_var=yes" - else - eval "$pov_prog_cc_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cc_flags_value=\$$pov_prog_cc_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cc_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cc_flags_value" >&6 - - if test x"$pov_prog_cc_flags_value" = x"yes"; then - CFLAGS="$CFLAGS -march=$pov_arch" - : - else - : - fi - } - fi - - else - - if test "$pov_arch_fallback"; then - { - - - - # Create a unique cache-id name (multiple flags are handled). - pov_prog_cxx_flags_var=pov_cv_prog_cxx_flags`echo -march=$pov_arch_fallback | sed 's,[^a-zA-Z0-9],_,g'` - - # Create the extended regular expression to handle multiple flags. - # For instance, "-first-flag -second-flag -X" gives the regexp: - # "\-f|irst-flag|\-s|econd-flag|\-X|X" - # - # FreeBSD and Darwin seem to have a problem with the \+ sed construct - # (but apparently not with the \{x,y\} one). For safety, I prefer to - # use [[:space:]][[:space:]]* for [[:space:]]\+ - pov_prog_cxx_flags_regexp=`echo -march=$pov_arch_fallback | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - # Cannot use AC_CACHE_CHECK due to the nature of the cache-id variable. - echo "$as_me:$LINENO: checking whether $CXX accepts -march=$pov_arch_fallback" >&5 -echo $ECHO_N "checking whether $CXX accepts -march=$pov_arch_fallback... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cxx_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - # Create a conftest file for CXX. - ac_ext=cc -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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - - # Compile with $CXX and inspect standard error for given flags. - { ac_try='$CXX -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CXX -c -march=$pov_arch_fallback conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cxx_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - # the command above seems to not always return the correct status, so - # for safety I rerun it here; I keep the other one for logging purpose. - pov_prog_cxx_flags_err=`$ac_cv_prog_egrep "$pov_prog_cxx_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cxx_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cxx_flags_var=yes" - else - eval "$pov_prog_cxx_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cxx_flags_value=\$$pov_prog_cxx_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cxx_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cxx_flags_value" >&6 - - # Update CXXFLAGS when flags are working, and run provided actions. - if test x"$pov_prog_cxx_flags_value" = x"yes"; then - CXXFLAGS="$CXXFLAGS -march=$pov_arch_fallback" - if test "$subdirs"; then { - - - pov_prog_cc_flags_var=pov_cv_prog_cc_flags`echo $pov_arch_fallback | sed 's,[^a-zA-Z0-9],_,g'` - pov_prog_cc_flags_regexp=`echo $pov_arch_fallback | sed 's,\(-.\)\([^[:space:]]*\),\\\\\1|\2,g; s,[[:space:]][[:space:]]*,|,g; s,\(.\)||,\1|\1|,g; s,\(.\)|$,\1|\1,'` - - echo "$as_me:$LINENO: checking whether $CC accepts $pov_arch_fallback" >&5 -echo $ECHO_N "checking whether $CC accepts $pov_arch_fallback... $ECHO_C" >&6 - if eval "test \"\${$pov_prog_cc_flags_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - 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 - - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - { ac_try='$CC -c conftest.$ac_ext > /dev/null 2> conftest.err0' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$CC -c $pov_arch_fallback conftest.$ac_ext > /dev/null 2> conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='cat conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - { ac_try='$ac_cv_prog_egrep \"$pov_prog_cc_flags_regexp\" conftest.err 2>&1 > /dev/null' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - pov_prog_cc_flags_err=`$ac_cv_prog_egrep "$pov_prog_cc_flags_regexp" conftest.err` - { ac_try='diff conftest.err0 conftest.err >&5' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } - if test -z "$pov_prog_cc_flags_err" \ - || test -z "`diff conftest.err0 conftest.err`"; then - eval "$pov_prog_cc_flags_var=yes" - else - eval "$pov_prog_cc_flags_var=no" - fi - - rm -f conftest.$ac_ext conftest.$ac_objext conftest.err conftest.err0 - ac_ext=cc -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 - - - -fi - - eval "pov_prog_cc_flags_value=\$$pov_prog_cc_flags_var" - echo "$as_me:$LINENO: result: $pov_prog_cc_flags_value" >&5 -echo "${ECHO_T}$pov_prog_cc_flags_value" >&6 - - if test x"$pov_prog_cc_flags_value" = x"yes"; then - CFLAGS="$CFLAGS $pov_arch_fallback" - : - else - : - fi - }; fi - - else - : - fi - - } - fi - - - fi - - - - fi - - - - fi - - fi - # gcc says -malign-double makes no sense in the 64bit mode and reject it - for pov_flags in "-malign-double" "-minline-all-stringops"; do + for pov_flags in "-minline-all-stringops"; do