[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9699 - in /libdfp/trunk: TODO autom4te.cache/output.0 autom4te.cache/traces.0 configure configure.ac
- To: commits@xxxxxxxxxx
- Subject: [commits] r9699 - in /libdfp/trunk: TODO autom4te.cache/output.0 autom4te.cache/traces.0 configure configure.ac
- From: ryanarn@xxxxxxxxxx
- Date: Thu, 21 Jan 2010 05:46:56 -0000
Author: ryanarn
Date: Wed Jan 20 21:46:55 2010
New Revision: 9699
Log:
2010-12-20 Ryan S. Arnold <rsa@xxxxxxxxxx>
* configure: Regenerated.
* configure.ac: Add check for glibc headers that support the
printf-hooks. Add runtime check for printf-hooks in libc specified by
--with-glibc-build.
* TODO: Updated.
Modified:
libdfp/trunk/TODO
libdfp/trunk/autom4te.cache/output.0
libdfp/trunk/autom4te.cache/traces.0
libdfp/trunk/configure
libdfp/trunk/configure.ac
Modified: libdfp/trunk/TODO
==============================================================================
--- libdfp/trunk/TODO (original)
+++ libdfp/trunk/TODO Wed Jan 20 21:46:55 2010
@@ -1,13 +1,24 @@
-Configure test for NEEDED glibc 2.10
+[DONE] Configure runtime test for decimal floating point support in compiler.
-libdecnumber.so phantom library for compat issues
+[DONE] Configure test for glibc 2.10 headers.
+
+[DONE] Configure runtime test for glibc 2.10 based on register_printf_type()
+function..
+
+Add --with-cross feature to prevent the make check suite from being executed
+on the build machine.
+
+Add --export-test feature to export the test-suite into stand-alone static
+test cases.
+
+libdecnumber.so phantom library for compat issues.
libdfp version issues with older apps.
If system glibc is 2.10 then make check shouldn't need all the GLIBC build
-scaffolding.
+scaffolding for executing and debugging tests.
-Clear up make clean and make distclean
+Clear up make clean and make distclean.
Clear up dependency issue so that libdfp.so.1 is rebuilt when a .c file
changes.
@@ -19,6 +30,8 @@
Optimize the math routines for hardware dfp support.
+Implement dpd backend for x86 and x86_64.
+
+Prototype versioned symbols support.
+
Implement libbid backend.
-
-configure runtime test for decimal floating point support in compiler.
Modified: libdfp/trunk/autom4te.cache/output.0
==============================================================================
--- libdfp/trunk/autom4te.cache/output.0 (original)
+++ libdfp/trunk/autom4te.cache/output.0 Wed Jan 20 21:46:55 2010
@@ -2407,12 +2407,14 @@
EOF
fi
+user_headers=no
glibc_headers=
# Check whether --with-glibc-headers or --without-glibc-headers was given.
if test "${with_glibc_headers+set}" = set; then
withval="$with_glibc_headers"
glibc_headers=$withval
+ user_headers=yes
{ echo "$as_me:$LINENO: Building against GLIBC headers in ${glibc_headers}" >&5
echo "$as_me: Building against GLIBC headers in ${glibc_headers}" >&6;}
@@ -2421,12 +2423,111 @@
fi;
+glibc_headers_inc=
+if test "x$glibc_headers" != x; then
+ glibc_headers_inc="-I$glibc_headers"
+fi
+
+# Check for GLIBC 2.10 headers
+have_glibc_2_10_headers=yes
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-m$cc_msize $CFLAGS $glibc_headers_inc"
+
+echo "$as_me:$LINENO: checking for printf-hook register_printf_type() in printf.h to verify GLIBC 2.10" >&5
+echo $ECHO_N "checking for printf-hook register_printf_type() in printf.h to verify GLIBC 2.10... $ECHO_C" >&6
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include "printf.h"
+int
+main ()
+{
+
+ static int foo;
+ void foo_va (void *mem, va_list *ap)
+ {
+ return;
+ }
+ foo = register_printf_type (foo_va);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s 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='test -s conftest.$ac_objext'
+ { (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); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; have_glibc_2_10_headers=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+CFLAGS="$saved_CFLAGS"
+
+if test x$have_glibc_2_10_headers != xyes; then
+ if test x$user_headers = xyes; then
+ { { echo "$as_me:$LINENO: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The headers you
+ provided in $glibc_headers do not provide this." >&5
+echo "$as_me: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The headers you
+ provided in $glibc_headers do not provide this." >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { { echo "$as_me:$LINENO: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default
+ headers that this build is using don't provide this
+ functionality." >&5
+echo "$as_me: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default
+ headers that this build is using don't provide this
+ functionality." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ exit 1;
+fi
+
+user_glibc=no
glibc_build=
# Check whether --with-glibc-build or --without-glibc-build was given.
if test "${with_glibc_build+set}" = set; then
withval="$with_glibc_build"
glibc_build=$withval
+ user_glibc=yes
{ echo "$as_me:$LINENO: Linking against GLIBC build in ${glibc_build}" >&5
echo "$as_me: Linking against GLIBC build in ${glibc_build}" >&6;}
@@ -2434,6 +2535,114 @@
glibc_build=''
fi;
+
+glibc_headers_inc=
+if test "x$glibc_headers" != x; then
+ glibc_headers_inc="-I$glibc_headers"
+fi
+glibc_build_lib=
+if test "x$glibc_build" != x; then
+ # I don't like this but -L <path> -lc wasn't working.
+ glibc_build_lib="$glibc_build/libc.so"
+fi
+
+# Check for GLIBC 2.10 runtime support
+have_glibc_2_10=yes
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-m$cc_msize $CFLAGS $glibc_headers_inc"
+saved_LIBS="$LIBS"
+LIBS="$LIBS $glibc_build_lib"
+
+echo "$as_me:$LINENO: checking for register_printf_type() runtime support" >&5
+echo $ECHO_N "checking for register_printf_type() runtime support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include "printf.h"
+int
+main ()
+{
+
+ static int foo;
+ void foo_va (void *mem, va_list *ap)
+ {
+ return;
+ }
+ foo = register_printf_type (foo_va);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s 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='test -s conftest$ac_exeext'
+ { (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); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; have_glibc_2_10=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+LIBS="$saved_LIBS"
+CFLAGS="$saved_CFLAGS"
+
+if test x$have_glibc_2_10 != xyes; then
+ if test x$user_glibc = xyes; then
+ { echo "$as_me:$LINENO: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The glibc build
+ you specified with --with-glibc-build=$glibc_build does not
+ provide this. You will not be able to successfully execute
+ the test suite." >&5
+echo "$as_me: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The glibc build
+ you specified with --with-glibc-build=$glibc_build does not
+ provide this. You will not be able to successfully execute
+ the test suite." >&2;}
+ else
+ { echo "$as_me:$LINENO: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default libc
+ that this build is using doesn't provide this functionality.
+ You will not be able to successfully execute the test
+ suite." >&5
+echo "$as_me: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default libc
+ that this build is using doesn't provide this functionality.
+ You will not be able to successfully execute the test
+ suite." >&2;}
+ fi
+fi
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
Modified: libdfp/trunk/autom4te.cache/traces.0
==============================================================================
--- libdfp/trunk/autom4te.cache/traces.0 (original)
+++ libdfp/trunk/autom4te.cache/traces.0 Wed Jan 20 21:46:55 2010
@@ -90,30 +90,36 @@
m4trace:configure.ac:259: -1- AC_SUBST([CFLAGS])
m4trace:configure.ac:260: -1- AC_SUBST([ASFLAGS])
m4trace:configure.ac:280: -1- AC_SUBST([libdfp_cv_cc_with_decimal_float])
-m4trace:configure.ac:297: -1- AC_SUBST([glibc_headers])
-m4trace:configure.ac:308: -1- AC_SUBST([glibc_build])
-m4trace:configure.ac:325: -1- AC_SUBST([enable_static])
-m4trace:configure.ac:342: -1- AC_SUBST([enable_shared])
-m4trace:configure.ac:436: -1- AC_SUBST([submachine])
-m4trace:configure.ac:437: -1- AC_SUBST([submachine_opt])
-m4trace:configure.ac:503: -1- AC_SUBST([sysdep_dirs])
-m4trace:configure.ac:525: -1- AC_DEFINE_TRACE_LITERAL([ASM_GLOBAL_DIRECTIVE])
-m4trace:configure.ac:525: -1- AH_OUTPUT([ASM_GLOBAL_DIRECTIVE], [/* "Define to the name of the assembler\'s directive for declaring a symbol
+m4trace:configure.ac:299: -1- AC_SUBST([glibc_headers])
+m4trace:configure.ac:312: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [/home/ryanarn/autoconf-2.59/tests/../lib/autoconf/general.m4:2179: AC_TRY_COMPILE is expanded from...
+configure.ac:312: the top level])
+m4trace:configure.ac:350: -1- AC_SUBST([glibc_build])
+m4trace:configure.ac:370: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [/home/ryanarn/autoconf-2.59/tests/../lib/autoconf/general.m4:2222: AC_TRY_LINK is expanded from...
+configure.ac:370: the top level])
+m4trace:configure.ac:415: -1- AC_SUBST([enable_static])
+m4trace:configure.ac:432: -1- AC_SUBST([enable_shared])
+m4trace:configure.ac:526: -1- AC_SUBST([submachine])
+m4trace:configure.ac:527: -1- AC_SUBST([submachine_opt])
+m4trace:configure.ac:593: -1- AC_SUBST([sysdep_dirs])
+m4trace:configure.ac:615: -1- AC_DEFINE_TRACE_LITERAL([ASM_GLOBAL_DIRECTIVE])
+m4trace:configure.ac:615: -1- AH_OUTPUT([ASM_GLOBAL_DIRECTIVE], [/* "Define to the name of the assembler\'s directive for declaring a symbol
global (default `.globl\')." */
#undef ASM_GLOBAL_DIRECTIVE])
-m4trace:configure.ac:548: -1- AC_DEFINE_TRACE_LITERAL([ASM_TYPE_DIRECTIVE_PREFIX])
-m4trace:configure.ac:548: -1- AH_OUTPUT([ASM_TYPE_DIRECTIVE_PREFIX], [/* "Define to the prefix before `object\' or `function\' in the assembler\'s
+m4trace:configure.ac:638: -1- AC_DEFINE_TRACE_LITERAL([ASM_TYPE_DIRECTIVE_PREFIX])
+m4trace:configure.ac:638: -1- AH_OUTPUT([ASM_TYPE_DIRECTIVE_PREFIX], [/* "Define to the prefix before `object\' or `function\' in the assembler\'s
`.type\' directive */
#undef ASM_TYPE_DIRECTIVE_PREFIX])
-m4trace:configure.ac:551: -1- AC_PROG_RANLIB
-m4trace:configure.ac:551: -1- AC_SUBST([RANLIB])
-m4trace:configure.ac:551: -1- AC_SUBST([ac_ct_RANLIB])
-m4trace:configure.ac:552: -1- AC_PROG_AWK
-m4trace:configure.ac:552: -1- AC_SUBST([AWK])
-m4trace:configure.ac:570: -1- AC_CONFIG_SUBDIRS([libdecnumber])
-m4trace:configure.ac:570: -1- AC_SUBST([subdirs], ["$subdirs libdecnumber"])
-m4trace:configure.ac:572: -1- AC_CONFIG_SUBDIRS([libbid])
-m4trace:configure.ac:572: -1- AC_SUBST([subdirs], ["$subdirs libbid"])
-m4trace:configure.ac:578: -1- AC_CONFIG_FILES([Makefile])
-m4trace:configure.ac:580: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
-m4trace:configure.ac:580: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.ac:641: -1- AC_PROG_RANLIB
+m4trace:configure.ac:641: -1- AC_SUBST([RANLIB])
+m4trace:configure.ac:641: -1- AC_SUBST([ac_ct_RANLIB])
+m4trace:configure.ac:642: -1- AC_PROG_AWK
+m4trace:configure.ac:642: -1- AC_SUBST([AWK])
+m4trace:configure.ac:660: -1- AC_CONFIG_SUBDIRS([libdecnumber])
+m4trace:configure.ac:660: -1- AC_SUBST([subdirs], ["$subdirs libdecnumber"])
+m4trace:configure.ac:662: -1- AC_CONFIG_SUBDIRS([libbid])
+m4trace:configure.ac:662: -1- AC_SUBST([subdirs], ["$subdirs libbid"])
+m4trace:configure.ac:668: -1- AC_CONFIG_FILES([Makefile])
+m4trace:configure.ac:670: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:670: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
Modified: libdfp/trunk/configure
==============================================================================
--- libdfp/trunk/configure (original)
+++ libdfp/trunk/configure Wed Jan 20 21:46:55 2010
@@ -2407,12 +2407,14 @@
EOF
fi
+user_headers=no
glibc_headers=
# Check whether --with-glibc-headers or --without-glibc-headers was given.
if test "${with_glibc_headers+set}" = set; then
withval="$with_glibc_headers"
glibc_headers=$withval
+ user_headers=yes
{ echo "$as_me:$LINENO: Building against GLIBC headers in ${glibc_headers}" >&5
echo "$as_me: Building against GLIBC headers in ${glibc_headers}" >&6;}
@@ -2421,12 +2423,111 @@
fi;
+glibc_headers_inc=
+if test "x$glibc_headers" != x; then
+ glibc_headers_inc="-I$glibc_headers"
+fi
+
+# Check for GLIBC 2.10 headers
+have_glibc_2_10_headers=yes
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-m$cc_msize $CFLAGS $glibc_headers_inc"
+
+echo "$as_me:$LINENO: checking for printf-hook register_printf_type() in printf.h to verify GLIBC 2.10" >&5
+echo $ECHO_N "checking for printf-hook register_printf_type() in printf.h to verify GLIBC 2.10... $ECHO_C" >&6
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include "printf.h"
+int
+main ()
+{
+
+ static int foo;
+ void foo_va (void *mem, va_list *ap)
+ {
+ return;
+ }
+ foo = register_printf_type (foo_va);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s 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='test -s conftest.$ac_objext'
+ { (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); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; have_glibc_2_10_headers=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+CFLAGS="$saved_CFLAGS"
+
+if test x$have_glibc_2_10_headers != xyes; then
+ if test x$user_headers = xyes; then
+ { { echo "$as_me:$LINENO: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The headers you
+ provided in $glibc_headers do not provide this." >&5
+echo "$as_me: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The headers you
+ provided in $glibc_headers do not provide this." >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { { echo "$as_me:$LINENO: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default
+ headers that this build is using don't provide this
+ functionality." >&5
+echo "$as_me: error: Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default
+ headers that this build is using don't provide this
+ functionality." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ exit 1;
+fi
+
+user_glibc=no
glibc_build=
# Check whether --with-glibc-build or --without-glibc-build was given.
if test "${with_glibc_build+set}" = set; then
withval="$with_glibc_build"
glibc_build=$withval
+ user_glibc=yes
{ echo "$as_me:$LINENO: Linking against GLIBC build in ${glibc_build}" >&5
echo "$as_me: Linking against GLIBC build in ${glibc_build}" >&6;}
@@ -2434,6 +2535,114 @@
glibc_build=''
fi;
+
+glibc_headers_inc=
+if test "x$glibc_headers" != x; then
+ glibc_headers_inc="-I$glibc_headers"
+fi
+glibc_build_lib=
+if test "x$glibc_build" != x; then
+ # I don't like this but -L <path> -lc wasn't working.
+ glibc_build_lib="$glibc_build/libc.so"
+fi
+
+# Check for GLIBC 2.10 runtime support
+have_glibc_2_10=yes
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-m$cc_msize $CFLAGS $glibc_headers_inc"
+saved_LIBS="$LIBS"
+LIBS="$LIBS $glibc_build_lib"
+
+echo "$as_me:$LINENO: checking for register_printf_type() runtime support" >&5
+echo $ECHO_N "checking for register_printf_type() runtime support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include "printf.h"
+int
+main ()
+{
+
+ static int foo;
+ void foo_va (void *mem, va_list *ap)
+ {
+ return;
+ }
+ foo = register_printf_type (foo_va);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s 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='test -s conftest$ac_exeext'
+ { (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); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; have_glibc_2_10=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+LIBS="$saved_LIBS"
+CFLAGS="$saved_CFLAGS"
+
+if test x$have_glibc_2_10 != xyes; then
+ if test x$user_glibc = xyes; then
+ { echo "$as_me:$LINENO: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The glibc build
+ you specified with --with-glibc-build=$glibc_build does not
+ provide this. You will not be able to successfully execute
+ the test suite." >&5
+echo "$as_me: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The glibc build
+ you specified with --with-glibc-build=$glibc_build does not
+ provide this. You will not be able to successfully execute
+ the test suite." >&2;}
+ else
+ { echo "$as_me:$LINENO: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default libc
+ that this build is using doesn't provide this functionality.
+ You will not be able to successfully execute the test
+ suite." >&5
+echo "$as_me: WARNING: Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default libc
+ that this build is using doesn't provide this functionality.
+ You will not be able to successfully execute the test
+ suite." >&2;}
+ fi
+fi
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
Modified: libdfp/trunk/configure.ac
==============================================================================
--- libdfp/trunk/configure.ac (original)
+++ libdfp/trunk/configure.ac Wed Jan 20 21:46:55 2010
@@ -284,6 +284,7 @@
EOF
fi
+user_headers=no
glibc_headers=
AC_ARG_WITH([glibc-headers],
AS_HELP_STRING([--with-glibc-headers=PATH],
@@ -291,21 +292,110 @@
fenv.h, features.h, et al.
@<:@default=compiler default@:>@]),
[glibc_headers=$withval
+ user_headers=yes
AC_MSG_NOTICE(Building against GLIBC headers in ${glibc_headers})
],
[glibc_headers=''])
AC_SUBST(glibc_headers)
+glibc_headers_inc=
+if test "x$glibc_headers" != x; then
+ glibc_headers_inc="-I$glibc_headers"
+fi
+
+# Check for GLIBC 2.10 headers
+have_glibc_2_10_headers=yes
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-m$cc_msize $CFLAGS $glibc_headers_inc"
+
+AC_MSG_CHECKING([for printf-hook register_printf_type() in printf.h to verify GLIBC 2.10])
+AC_TRY_COMPILE([#include "printf.h"],[
+ static int foo;
+ void foo_va (void *mem, va_list *ap)
+ {
+ return;
+ }
+ foo = register_printf_type (foo_va);
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_glibc_2_10_headers=no])
+
+CFLAGS="$saved_CFLAGS"
+
+if test x$have_glibc_2_10_headers != xyes; then
+ if test x$user_headers = xyes; then
+ AC_MSG_ERROR([Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The headers you
+ provided in $glibc_headers do not provide this.])
+ else
+ AC_MSG_ERROR([Building Libdfp requires a GLIBC printf.h header that
+ provides the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default
+ headers that this build is using don't provide this
+ functionality.])
+ fi
+ exit 1;
+fi
+
+user_glibc=no
glibc_build=
AC_ARG_WITH([glibc-build],
AS_HELP_STRING([--with-glibc-build=PATH],
[Location of a GLIBC 2.10+ build to link against for make check.
@<:@system libdir@:>@]),
[glibc_build=$withval
+ user_glibc=yes
AC_MSG_NOTICE(Linking against GLIBC build in ${glibc_build})
],
[glibc_build=''])
AC_SUBST(glibc_build)
+
+glibc_headers_inc=
+if test "x$glibc_headers" != x; then
+ glibc_headers_inc="-I$glibc_headers"
+fi
+glibc_build_lib=
+if test "x$glibc_build" != x; then
+ # I don't like this but -L <path> -lc wasn't working.
+ glibc_build_lib="$glibc_build/libc.so"
+fi
+
+# Check for GLIBC 2.10 runtime support
+have_glibc_2_10=yes
+saved_CFLAGS="$CFLAGS"
+CFLAGS="-m$cc_msize $CFLAGS $glibc_headers_inc"
+saved_LIBS="$LIBS"
+LIBS="$LIBS $glibc_build_lib"
+
+AC_MSG_CHECKING([for register_printf_type() runtime support])
+AC_TRY_LINK([#include "printf.h"],[
+ static int foo;
+ void foo_va (void *mem, va_list *ap)
+ {
+ return;
+ }
+ foo = register_printf_type (foo_va);
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_glibc_2_10=no])
+
+LIBS="$saved_LIBS"
+CFLAGS="$saved_CFLAGS"
+
+if test x$have_glibc_2_10 != xyes; then
+ if test x$user_glibc = xyes; then
+ AC_MSG_WARN([Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The glibc build
+ you specified with --with-glibc-build=$glibc_build does not
+ provide this. You will not be able to successfully execute
+ the test suite.])
+ else
+ AC_MSG_WARN([Executing Libdfp tests requires a GLIBC runtime that
+ supports the register_printf_type() function which is
+ available in GLIBC Version 2.10 or later. The default libc
+ that this build is using doesn't provide this functionality.
+ You will not be able to successfully execute the test
+ suite.])
+ fi
+fi
AC_ARG_ENABLE([static],
AS_HELP_STRING([--enable-static],