Blame SOURCES/nvptx-tools-no-ptxas.patch

0e3697
--- nvptx-tools/configure.ac
0e3697
+++ nvptx-tools/configure.ac
0e3697
@@ -51,6 +51,7 @@ LIBS="$LIBS -lcuda"
0e3697
 AC_CHECK_FUNCS([[cuGetErrorName] [cuGetErrorString]])
0e3697
 AC_CHECK_DECLS([[cuGetErrorName], [cuGetErrorString]],
0e3697
   [], [], [[#include <cuda.h>]])
0e3697
+AC_CHECK_HEADERS(unistd.h sys/stat.h)
0e3697
 
0e3697
 AC_MSG_CHECKING([for extra programs to build requiring -lcuda])
0e3697
 NVPTX_RUN=
0e3697
--- nvptx-tools/include/libiberty.h
0e3697
+++ nvptx-tools/include/libiberty.h
0e3697
@@ -390,6 +390,17 @@ extern void hex_init (void);
0e3697
 /* Save files used for communication between processes.  */
0e3697
 #define PEX_SAVE_TEMPS		0x4
0e3697
 
0e3697
+/* Max number of alloca bytes per call before we must switch to malloc.
0e3697
+
0e3697
+   ?? Swiped from gnulib's regex_internal.h header.  Is this actually
0e3697
+   the case?  This number seems arbitrary, though sane.
0e3697
+
0e3697
+   The OS usually guarantees only one guard page at the bottom of the stack,
0e3697
+   and a page size can be as small as 4096 bytes.  So we cannot safely
0e3697
+   allocate anything larger than 4096 bytes.  Also care for the possibility
0e3697
+   of a few compiler-allocated temporary stack slots.  */
0e3697
+#define MAX_ALLOCA_SIZE	4032
0e3697
+
0e3697
 /* Prepare to execute one or more programs, with standard output of
0e3697
    each program fed to standard input of the next.
0e3697
    FLAGS	As above.
0e3697
--- nvptx-tools/nvptx-as.c
0e3697
+++ nvptx-tools/nvptx-as.c
0e3697
@@ -30,6 +30,9 @@
0e3697
 #include <string.h>
0e3697
 #include <wait.h>
0e3697
 #include <unistd.h>
0e3697
+#ifdef HAVE_SYS_STAT_H
0e3697
+#include <sys/stat.h>
0e3697
+#endif
0e3697
 #include <errno.h>
0e3697
 #define obstack_chunk_alloc malloc
0e3697
 #define obstack_chunk_free free
0e3697
@@ -42,6 +45,38 @@
0e3697
 
0e3697
 #include "version.h"
0e3697
 
0e3697
+#ifndef R_OK
0e3697
+#define R_OK 4
0e3697
+#define W_OK 2
0e3697
+#define X_OK 1
0e3697
+#endif
0e3697
+
0e3697
+#ifndef DIR_SEPARATOR
0e3697
+#  define DIR_SEPARATOR '/'
0e3697
+#endif
0e3697
+
0e3697
+#if defined (_WIN32) || defined (__MSDOS__) \
0e3697
+    || defined (__DJGPP__) || defined (__OS2__)
0e3697
+#  define HAVE_DOS_BASED_FILE_SYSTEM
0e3697
+#  define HAVE_HOST_EXECUTABLE_SUFFIX
0e3697
+#  define HOST_EXECUTABLE_SUFFIX ".exe"
0e3697
+#  ifndef DIR_SEPARATOR_2 
0e3697
+#    define DIR_SEPARATOR_2 '\\'
0e3697
+#  endif
0e3697
+#  define PATH_SEPARATOR ';'
0e3697
+#else
0e3697
+#  define PATH_SEPARATOR ':'
0e3697
+#endif
0e3697
+
0e3697
+#ifndef DIR_SEPARATOR_2
0e3697
+#  define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
0e3697
+#else
0e3697
+#  define IS_DIR_SEPARATOR(ch) \
0e3697
+	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
0e3697
+#endif
0e3697
+
0e3697
+#define DIR_UP ".."
0e3697
+
0e3697
 static const char *outname = NULL;
0e3697
 
0e3697
 static void __attribute__ ((format (printf, 1, 2)))
0e3697
@@ -816,7 +851,7 @@ traverse (void **slot, void *data)
0e3697
 }
0e3697
 
0e3697
 static void
0e3697
-process (FILE *in, FILE *out)
0e3697
+process (FILE *in, FILE *out, int verify, const char *outname)
0e3697
 {
0e3697
   symbol_table = htab_create (500, hash_string_hash, hash_string_eq,
0e3697
                               NULL);
0e3697
@@ -824,6 +859,18 @@ process (FILE *in, FILE *out)
0e3697
   const char *input = read_file (in);
0e3697
   Token *tok = tokenize (input);
0e3697
 
0e3697
+  /* By default, when ptxas is not in PATH, do minimalistic verification,
0e3697
+     just require that the first non-comment directive is .version.  */
0e3697
+  if (verify < 0)
0e3697
+    {
0e3697
+      size_t i;
0e3697
+      for (i = 0; tok[i].kind == K_comment; i++)
0e3697
+	;
0e3697
+      if (tok[i].kind != K_dotted || !is_keyword (&tok[i], "version"))
0e3697
+	fatal_error ("missing .version directive at start of file '%s'",
0e3697
+		     outname);
0e3697
+    }
0e3697
+
0e3697
   do
0e3697
     tok = parse_file (tok);
0e3697
   while (tok->kind);
0e3697
@@ -897,9 +944,83 @@ fork_execute (const char *prog, char *const *argv)
0e3697
   do_wait (prog, pex);
0e3697
 }
0e3697
 
0e3697
+/* Determine if progname is available in PATH.  */
0e3697
+static bool
0e3697
+program_available (const char *progname)
0e3697
+{
0e3697
+  char *temp = getenv ("PATH");
0e3697
+  if (temp)
0e3697
+    {
0e3697
+      char *startp, *endp, *nstore, *alloc_ptr = NULL;
0e3697
+      size_t prefixlen = strlen (temp) + 1;
0e3697
+      size_t len;
0e3697
+      if (prefixlen < 2)
0e3697
+	prefixlen = 2;
0e3697
+
0e3697
+      len = prefixlen + strlen (progname) + 1;
0e3697
+#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
0e3697
+      len += strlen (HOST_EXECUTABLE_SUFFIX);
0e3697
+#endif
0e3697
+      if (len < MAX_ALLOCA_SIZE)
0e3697
+	nstore = (char *) alloca (len);
0e3697
+      else
0e3697
+	alloc_ptr = nstore = (char *) malloc (len);
0e3697
+
0e3697
+      startp = endp = temp;
0e3697
+      while (1)
0e3697
+	{
0e3697
+	  if (*endp == PATH_SEPARATOR || *endp == 0)
0e3697
+	    {
0e3697
+	      if (endp == startp)
0e3697
+		{
0e3697
+		  nstore[0] = '.';
0e3697
+		  nstore[1] = DIR_SEPARATOR;
0e3697
+		  nstore[2] = '\0';
0e3697
+		}
0e3697
+	      else
0e3697
+		{
0e3697
+		  memcpy (nstore, startp, endp - startp);
0e3697
+		  if (! IS_DIR_SEPARATOR (endp[-1]))
0e3697
+		    {
0e3697
+		      nstore[endp - startp] = DIR_SEPARATOR;
0e3697
+		      nstore[endp - startp + 1] = 0;
0e3697
+		    }
0e3697
+		  else
0e3697
+		    nstore[endp - startp] = 0;
0e3697
+		}
0e3697
+	      strcat (nstore, progname);
0e3697
+	      if (! access (nstore, X_OK)
0e3697
+#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
0e3697
+		  || ! access (strcat (nstore, HOST_EXECUTABLE_SUFFIX), X_OK)
0e3697
+#endif
0e3697
+		 )
0e3697
+		{
0e3697
+#if defined (HAVE_SYS_STAT_H) && defined (S_ISREG)
0e3697
+		  struct stat st;
0e3697
+		  if (stat (nstore, &st) >= 0 && S_ISREG (st.st_mode))
0e3697
+#endif
0e3697
+		    {
0e3697
+		      free (alloc_ptr);
0e3697
+		      return true;
0e3697
+		    }
0e3697
+		}
0e3697
+
0e3697
+	      if (*endp == 0)
0e3697
+		break;
0e3697
+	      endp = startp = endp + 1;
0e3697
+	    }
0e3697
+	  else
0e3697
+	    endp++;
0e3697
+	}
0e3697
+      free (alloc_ptr);
0e3697
+    }
0e3697
+  return false;
0e3697
+}
0e3697
+
0e3697
 static struct option long_options[] = {
0e3697
   {"traditional-format",     no_argument, 0,  0 },
0e3697
   {"save-temps",  no_argument,       0,  0 },
0e3697
+  {"verify",  no_argument,       0,  0 },
0e3697
   {"no-verify",  no_argument,       0,  0 },
0e3697
   {"help", no_argument, 0, 'h' },
0e3697
   {"version", no_argument, 0, 'V' },
0e3697
@@ -912,7 +1033,7 @@ main (int argc, char **argv)
0e3697
   FILE *in = stdin;
0e3697
   FILE *out = stdout;
0e3697
   bool verbose __attribute__((unused)) = false;
0e3697
-  bool verify = true;
0e3697
+  int verify = -1;
0e3697
   const char *smver = "sm_30";
0e3697
 
0e3697
   int o;
0e3697
@@ -923,7 +1044,9 @@ main (int argc, char **argv)
0e3697
 	{
0e3697
 	case 0:
0e3697
 	  if (option_index == 2)
0e3697
-	    verify = false;
0e3697
+	    verify = 1;
0e3697
+	  else if (option_index == 3)
0e3697
+	    verify = 0;
0e3697
 	  break;
0e3697
 	case 'v':
0e3697
 	  verbose = true;
0e3697
@@ -948,7 +1071,8 @@ Usage: nvptx-none-as [option...] [asmfile]\n\
0e3697
 Options:\n\
0e3697
   -o FILE               Write output to FILE\n\
0e3697
   -v                    Be verbose\n\
0e3697
+  --verify              Do verify output is acceptable to ptxas\n\
0e3697
   --no-verify           Do not verify output is acceptable to ptxas\n\
0e3697
   --help                Print this help and exit\n\
0e3697
   --version             Print version number and exit\n\
0e3697
 \n\
0e3697
@@ -983,11 +1108,17 @@ This program has absolutely no warranty.\n",
0e3697
   if (!in)
0e3697
     fatal_error ("cannot open input ptx file");
0e3697
 
0e3697
-  process (in, out);
0e3697
-  if  (outname)
0e3697
+  if (outname == NULL)
0e3697
+    verify = 0;
0e3697
+  else if (verify == -1)
0e3697
+    if (program_available ("ptxas"))
0e3697
+      verify = 1;
0e3697
+
0e3697
+  process (in, out, verify, outname);
0e3697
+  if (outname)
0e3697
     fclose (out);
0e3697
 
0e3697
-  if (verify && outname)
0e3697
+  if (verify > 0)
0e3697
     {
0e3697
       struct obstack argv_obstack;
0e3697
       obstack_init (&argv_obstack);
0e3697
--- nvptx-tools/configure
0e3697
+++ nvptx-tools/configure
0e3697
@@ -168,7 +168,8 @@ test x\$exitcode = x0 || exit 1"
0e3697
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
0e3697
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
0e3697
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
0e3697
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
0e3697
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
0e3697
+test \$(( 1 + 1 )) = 2 || exit 1"
0e3697
   if (eval "$as_required") 2>/dev/null; then :
0e3697
   as_have_required=yes
0e3697
 else
0e3697
@@ -552,11 +553,50 @@ PACKAGE_URL=
0e3697
 
0e3697
 ac_unique_file="nvptx-tools"
0e3697
 ac_unique_file="nvptx-as.c"
0e3697
+# Factoring default headers for most tests.
0e3697
+ac_includes_default="\
0e3697
+#include <stdio.h>
0e3697
+#ifdef HAVE_SYS_TYPES_H
0e3697
+# include <sys/types.h>
0e3697
+#endif
0e3697
+#ifdef HAVE_SYS_STAT_H
0e3697
+# include <sys/stat.h>
0e3697
+#endif
0e3697
+#ifdef STDC_HEADERS
0e3697
+# include <stdlib.h>
0e3697
+# include <stddef.h>
0e3697
+#else
0e3697
+# ifdef HAVE_STDLIB_H
0e3697
+#  include <stdlib.h>
0e3697
+# endif
0e3697
+#endif
0e3697
+#ifdef HAVE_STRING_H
0e3697
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
0e3697
+#  include <memory.h>
0e3697
+# endif
0e3697
+# include <string.h>
0e3697
+#endif
0e3697
+#ifdef HAVE_STRINGS_H
0e3697
+# include <strings.h>
0e3697
+#endif
0e3697
+#ifdef HAVE_INTTYPES_H
0e3697
+# include <inttypes.h>
0e3697
+#endif
0e3697
+#ifdef HAVE_STDINT_H
0e3697
+# include <stdint.h>
0e3697
+#endif
0e3697
+#ifdef HAVE_UNISTD_H
0e3697
+# include <unistd.h>
0e3697
+#endif"
0e3697
+
0e3697
 enable_option_checking=no
0e3697
 ac_subst_vars='LTLIBOBJS
0e3697
 LIBOBJS
0e3697
 subdirs
0e3697
 NVPTX_RUN
0e3697
+EGREP
0e3697
+GREP
0e3697
+CPP
0e3697
 CUDA_DRIVER_LDFLAGS
0e3697
 CUDA_DRIVER_CPPFLAGS
0e3697
 AR
0e3697
@@ -635,7 +675,8 @@ LIBS
0e3697
 CPPFLAGS
0e3697
 CXX
0e3697
 CXXFLAGS
0e3697
-CCC'
0e3697
+CCC
0e3697
+CPP'
0e3697
 ac_subdirs_all='libiberty'
0e3697
 
0e3697
 # Initialize some variables set by options.
0e3697
@@ -1267,6 +1308,7 @@ Some influential environment variables:
0e3697
               you have headers in a nonstandard directory <include dir>
0e3697
   CXX         C++ compiler command
0e3697
   CXXFLAGS    C++ compiler flags
0e3697
+  CPP         C preprocessor
0e3697
 
0e3697
 Use these variables to override the choices made by `configure' or to help
0e3697
 it to find libraries and programs with nonstandard names/locations.
0e3697
@@ -1575,6 +1617,203 @@ $as_echo "$ac_res" >&6; }
0e3697
   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0e3697
 
0e3697
 } # ac_fn_c_check_decl
0e3697
+
0e3697
+# ac_fn_c_try_cpp LINENO
0e3697
+# ----------------------
0e3697
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
0e3697
+ac_fn_c_try_cpp ()
0e3697
+{
0e3697
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0e3697
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
0e3697
+case "(($ac_try" in
0e3697
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
0e3697
+  *) ac_try_echo=$ac_try;;
0e3697
+esac
0e3697
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
0e3697
+$as_echo "$ac_try_echo"; } >&5
0e3697
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
0e3697
+  ac_status=$?
0e3697
+  if test -s conftest.err; then
0e3697
+    grep -v '^ *+' conftest.err >conftest.er1
0e3697
+    cat conftest.er1 >&5
0e3697
+    mv -f conftest.er1 conftest.err
0e3697
+  fi
0e3697
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
0e3697
+  test $ac_status = 0; } >/dev/null && {
0e3697
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
0e3697
+	 test ! -s conftest.err
0e3697
+       }; then :
0e3697
+  ac_retval=0
0e3697
+else
0e3697
+  $as_echo "$as_me: failed program was:" >&5
0e3697
+sed 's/^/| /' conftest.$ac_ext >&5
0e3697
+
0e3697
+    ac_retval=1
0e3697
+fi
0e3697
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0e3697
+  return $ac_retval
0e3697
+
0e3697
+} # ac_fn_c_try_cpp
0e3697
+
0e3697
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
0e3697
+# -------------------------------------------------------
0e3697
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
0e3697
+# the include files in INCLUDES and setting the cache variable VAR
0e3697
+# accordingly.
0e3697
+ac_fn_c_check_header_mongrel ()
0e3697
+{
0e3697
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0e3697
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
0e3697
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
0e3697
+$as_echo_n "checking for $2... " >&6; }
0e3697
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+fi
0e3697
+eval ac_res=\$$3
0e3697
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
0e3697
+$as_echo "$ac_res" >&6; }
0e3697
+else
0e3697
+  # Is the header compilable?
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
0e3697
+$as_echo_n "checking $2 usability... " >&6; }
0e3697
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+$4
0e3697
+#include <$2>
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_compile "$LINENO"; then :
0e3697
+  ac_header_compiler=yes
0e3697
+else
0e3697
+  ac_header_compiler=no
0e3697
+fi
0e3697
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
0e3697
+$as_echo "$ac_header_compiler" >&6; }
0e3697
+
0e3697
+# Is the header present?
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
0e3697
+$as_echo_n "checking $2 presence... " >&6; }
0e3697
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <$2>
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_cpp "$LINENO"; then :
0e3697
+  ac_header_preproc=yes
0e3697
+else
0e3697
+  ac_header_preproc=no
0e3697
+fi
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
0e3697
+$as_echo "$ac_header_preproc" >&6; }
0e3697
+
0e3697
+# So?  What about this header?
0e3697
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
0e3697
+  yes:no: )
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
0e3697
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
0e3697
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
0e3697
+    ;;
0e3697
+  no:yes:* )
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
0e3697
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
0e3697
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
0e3697
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
0e3697
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
0e3697
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
0e3697
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
0e3697
+    ;;
0e3697
+esac
0e3697
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
0e3697
+$as_echo_n "checking for $2... " >&6; }
0e3697
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+else
0e3697
+  eval "$3=\$ac_header_compiler"
0e3697
+fi
0e3697
+eval ac_res=\$$3
0e3697
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
0e3697
+$as_echo "$ac_res" >&6; }
0e3697
+fi
0e3697
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0e3697
+
0e3697
+} # ac_fn_c_check_header_mongrel
0e3697
+
0e3697
+# ac_fn_c_try_run LINENO
0e3697
+# ----------------------
0e3697
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
0e3697
+# that executables *can* be run.
0e3697
+ac_fn_c_try_run ()
0e3697
+{
0e3697
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0e3697
+  if { { ac_try="$ac_link"
0e3697
+case "(($ac_try" in
0e3697
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
0e3697
+  *) ac_try_echo=$ac_try;;
0e3697
+esac
0e3697
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
0e3697
+$as_echo "$ac_try_echo"; } >&5
0e3697
+  (eval "$ac_link") 2>&5
0e3697
+  ac_status=$?
0e3697
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
0e3697
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
0e3697
+  { { case "(($ac_try" in
0e3697
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
0e3697
+  *) ac_try_echo=$ac_try;;
0e3697
+esac
0e3697
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
0e3697
+$as_echo "$ac_try_echo"; } >&5
0e3697
+  (eval "$ac_try") 2>&5
0e3697
+  ac_status=$?
0e3697
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
0e3697
+  test $ac_status = 0; }; }; then :
0e3697
+  ac_retval=0
0e3697
+else
0e3697
+  $as_echo "$as_me: program exited with status $ac_status" >&5
0e3697
+       $as_echo "$as_me: failed program was:" >&5
0e3697
+sed 's/^/| /' conftest.$ac_ext >&5
0e3697
+
0e3697
+       ac_retval=$ac_status
0e3697
+fi
0e3697
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
0e3697
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0e3697
+  return $ac_retval
0e3697
+
0e3697
+} # ac_fn_c_try_run
0e3697
+
0e3697
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
0e3697
+# -------------------------------------------------------
0e3697
+# Tests whether HEADER exists and can be compiled using the include files in
0e3697
+# INCLUDES, setting the cache variable VAR accordingly.
0e3697
+ac_fn_c_check_header_compile ()
0e3697
+{
0e3697
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
0e3697
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
0e3697
+$as_echo_n "checking for $2... " >&6; }
0e3697
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+else
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+$4
0e3697
+#include <$2>
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_compile "$LINENO"; then :
0e3697
+  eval "$3=yes"
0e3697
+else
0e3697
+  eval "$3=no"
0e3697
+fi
0e3697
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0e3697
+fi
0e3697
+eval ac_res=\$$3
0e3697
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
0e3697
+$as_echo "$ac_res" >&6; }
0e3697
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
0e3697
+
0e3697
+} # ac_fn_c_check_header_compile
0e3697
 cat >config.log <<_ACEOF
0e3697
 This file contains any messages produced by compilers while
0e3697
 running configure, to aid debugging if configure makes a mistake.
0e3697
@@ -3284,6 +3523,418 @@ cat >>confdefs.h <<_ACEOF
0e3697
 #define HAVE_DECL_CUGETERRORSTRING $ac_have_decl
0e3697
 _ACEOF
0e3697
 
0e3697
+ac_ext=c
0e3697
+ac_cpp='$CPP $CPPFLAGS'
0e3697
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
0e3697
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
0e3697
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
0e3697
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
0e3697
+# On Suns, sometimes $CPP names a directory.
0e3697
+if test -n "$CPP" && test -d "$CPP"; then
0e3697
+  CPP=
0e3697
+fi
0e3697
+if test -z "$CPP"; then
0e3697
+  if test "${ac_cv_prog_CPP+set}" = set; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+else
0e3697
+      # Double quotes because CPP needs to be expanded
0e3697
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
0e3697
+    do
0e3697
+      ac_preproc_ok=false
0e3697
+for ac_c_preproc_warn_flag in '' yes
0e3697
+do
0e3697
+  # Use a header file that comes with gcc, so configuring glibc
0e3697
+  # with a fresh cross-compiler works.
0e3697
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
0e3697
+  # <limits.h> exists even on freestanding compilers.
0e3697
+  # On the NeXT, cc -E runs the code through the compiler's parser,
0e3697
+  # not just through cpp. "Syntax error" is here to catch this case.
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#ifdef __STDC__
0e3697
+# include <limits.h>
0e3697
+#else
0e3697
+# include <assert.h>
0e3697
+#endif
0e3697
+		     Syntax error
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_cpp "$LINENO"; then :
0e3697
+
0e3697
+else
0e3697
+  # Broken: fails on valid input.
0e3697
+continue
0e3697
+fi
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+
0e3697
+  # OK, works on sane cases.  Now check whether nonexistent headers
0e3697
+  # can be detected and how.
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <ac_nonexistent.h>
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_cpp "$LINENO"; then :
0e3697
+  # Broken: success on invalid input.
0e3697
+continue
0e3697
+else
0e3697
+  # Passes both tests.
0e3697
+ac_preproc_ok=:
0e3697
+break
0e3697
+fi
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+
0e3697
+done
0e3697
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+if $ac_preproc_ok; then :
0e3697
+  break
0e3697
+fi
0e3697
+
0e3697
+    done
0e3697
+    ac_cv_prog_CPP=$CPP
0e3697
+
0e3697
+fi
0e3697
+  CPP=$ac_cv_prog_CPP
0e3697
+else
0e3697
+  ac_cv_prog_CPP=$CPP
0e3697
+fi
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
0e3697
+$as_echo "$CPP" >&6; }
0e3697
+ac_preproc_ok=false
0e3697
+for ac_c_preproc_warn_flag in '' yes
0e3697
+do
0e3697
+  # Use a header file that comes with gcc, so configuring glibc
0e3697
+  # with a fresh cross-compiler works.
0e3697
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
0e3697
+  # <limits.h> exists even on freestanding compilers.
0e3697
+  # On the NeXT, cc -E runs the code through the compiler's parser,
0e3697
+  # not just through cpp. "Syntax error" is here to catch this case.
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#ifdef __STDC__
0e3697
+# include <limits.h>
0e3697
+#else
0e3697
+# include <assert.h>
0e3697
+#endif
0e3697
+		     Syntax error
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_cpp "$LINENO"; then :
0e3697
+
0e3697
+else
0e3697
+  # Broken: fails on valid input.
0e3697
+continue
0e3697
+fi
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+
0e3697
+  # OK, works on sane cases.  Now check whether nonexistent headers
0e3697
+  # can be detected and how.
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <ac_nonexistent.h>
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_cpp "$LINENO"; then :
0e3697
+  # Broken: success on invalid input.
0e3697
+continue
0e3697
+else
0e3697
+  # Passes both tests.
0e3697
+ac_preproc_ok=:
0e3697
+break
0e3697
+fi
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+
0e3697
+done
0e3697
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
0e3697
+rm -f conftest.err conftest.$ac_ext
0e3697
+if $ac_preproc_ok; then :
0e3697
+
0e3697
+else
0e3697
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
0e3697
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
0e3697
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
0e3697
+See \`config.log' for more details." "$LINENO" 5; }
0e3697
+fi
0e3697
+
0e3697
+ac_ext=c
0e3697
+ac_cpp='$CPP $CPPFLAGS'
0e3697
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
0e3697
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
0e3697
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
0e3697
+
0e3697
+
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
0e3697
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
0e3697
+if test "${ac_cv_path_GREP+set}" = set; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+else
0e3697
+  if test -z "$GREP"; then
0e3697
+  ac_path_GREP_found=false
0e3697
+  # Loop through the user's path and test for each of PROGNAME-LIST
0e3697
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
0e3697
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
0e3697
+do
0e3697
+  IFS=$as_save_IFS
0e3697
+  test -z "$as_dir" && as_dir=.
0e3697
+    for ac_prog in grep ggrep; do
0e3697
+    for ac_exec_ext in '' $ac_executable_extensions; do
0e3697
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
0e3697
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
0e3697
+# Check for GNU ac_path_GREP and select it if it is found.
0e3697
+  # Check for GNU $ac_path_GREP
0e3697
+case `"$ac_path_GREP" --version 2>&1` in
0e3697
+*GNU*)
0e3697
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
0e3697
+*)
0e3697
+  ac_count=0
0e3697
+  $as_echo_n 0123456789 >"conftest.in"
0e3697
+  while :
0e3697
+  do
0e3697
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
0e3697
+    mv "conftest.tmp" "conftest.in"
0e3697
+    cp "conftest.in" "conftest.nl"
0e3697
+    $as_echo 'GREP' >> "conftest.nl"
0e3697
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
0e3697
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
0e3697
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
0e3697
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
0e3697
+      # Best one so far, save it but keep looking for a better one
0e3697
+      ac_cv_path_GREP="$ac_path_GREP"
0e3697
+      ac_path_GREP_max=$ac_count
0e3697
+    fi
0e3697
+    # 10*(2^10) chars as input seems more than enough
0e3697
+    test $ac_count -gt 10 && break
0e3697
+  done
0e3697
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
0e3697
+esac
0e3697
+
0e3697
+      $ac_path_GREP_found && break 3
0e3697
+    done
0e3697
+  done
0e3697
+  done
0e3697
+IFS=$as_save_IFS
0e3697
+  if test -z "$ac_cv_path_GREP"; then
0e3697
+    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
0e3697
+  fi
0e3697
+else
0e3697
+  ac_cv_path_GREP=$GREP
0e3697
+fi
0e3697
+
0e3697
+fi
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
0e3697
+$as_echo "$ac_cv_path_GREP" >&6; }
0e3697
+ GREP="$ac_cv_path_GREP"
0e3697
+
0e3697
+
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
0e3697
+$as_echo_n "checking for egrep... " >&6; }
0e3697
+if test "${ac_cv_path_EGREP+set}" = set; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+else
0e3697
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
0e3697
+   then ac_cv_path_EGREP="$GREP -E"
0e3697
+   else
0e3697
+     if test -z "$EGREP"; then
0e3697
+  ac_path_EGREP_found=false
0e3697
+  # Loop through the user's path and test for each of PROGNAME-LIST
0e3697
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
0e3697
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
0e3697
+do
0e3697
+  IFS=$as_save_IFS
0e3697
+  test -z "$as_dir" && as_dir=.
0e3697
+    for ac_prog in egrep; do
0e3697
+    for ac_exec_ext in '' $ac_executable_extensions; do
0e3697
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
0e3697
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
0e3697
+# Check for GNU ac_path_EGREP and select it if it is found.
0e3697
+  # Check for GNU $ac_path_EGREP
0e3697
+case `"$ac_path_EGREP" --version 2>&1` in
0e3697
+*GNU*)
0e3697
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
0e3697
+*)
0e3697
+  ac_count=0
0e3697
+  $as_echo_n 0123456789 >"conftest.in"
0e3697
+  while :
0e3697
+  do
0e3697
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
0e3697
+    mv "conftest.tmp" "conftest.in"
0e3697
+    cp "conftest.in" "conftest.nl"
0e3697
+    $as_echo 'EGREP' >> "conftest.nl"
0e3697
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
0e3697
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
0e3697
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
0e3697
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
0e3697
+      # Best one so far, save it but keep looking for a better one
0e3697
+      ac_cv_path_EGREP="$ac_path_EGREP"
0e3697
+      ac_path_EGREP_max=$ac_count
0e3697
+    fi
0e3697
+    # 10*(2^10) chars as input seems more than enough
0e3697
+    test $ac_count -gt 10 && break
0e3697
+  done
0e3697
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
0e3697
+esac
0e3697
+
0e3697
+      $ac_path_EGREP_found && break 3
0e3697
+    done
0e3697
+  done
0e3697
+  done
0e3697
+IFS=$as_save_IFS
0e3697
+  if test -z "$ac_cv_path_EGREP"; then
0e3697
+    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
0e3697
+  fi
0e3697
+else
0e3697
+  ac_cv_path_EGREP=$EGREP
0e3697
+fi
0e3697
+
0e3697
+   fi
0e3697
+fi
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
0e3697
+$as_echo "$ac_cv_path_EGREP" >&6; }
0e3697
+ EGREP="$ac_cv_path_EGREP"
0e3697
+
0e3697
+
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
0e3697
+$as_echo_n "checking for ANSI C header files... " >&6; }
0e3697
+if test "${ac_cv_header_stdc+set}" = set; then :
0e3697
+  $as_echo_n "(cached) " >&6
0e3697
+else
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <stdlib.h>
0e3697
+#include <stdarg.h>
0e3697
+#include <string.h>
0e3697
+#include <float.h>
0e3697
+
0e3697
+int
0e3697
+main ()
0e3697
+{
0e3697
+
0e3697
+  ;
0e3697
+  return 0;
0e3697
+}
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_compile "$LINENO"; then :
0e3697
+  ac_cv_header_stdc=yes
0e3697
+else
0e3697
+  ac_cv_header_stdc=no
0e3697
+fi
0e3697
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0e3697
+
0e3697
+if test $ac_cv_header_stdc = yes; then
0e3697
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <string.h>
0e3697
+
0e3697
+_ACEOF
0e3697
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
0e3697
+  $EGREP "memchr" >/dev/null 2>&1; then :
0e3697
+
0e3697
+else
0e3697
+  ac_cv_header_stdc=no
0e3697
+fi
0e3697
+rm -f conftest*
0e3697
+
0e3697
+fi
0e3697
+
0e3697
+if test $ac_cv_header_stdc = yes; then
0e3697
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <stdlib.h>
0e3697
+
0e3697
+_ACEOF
0e3697
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
0e3697
+  $EGREP "free" >/dev/null 2>&1; then :
0e3697
+
0e3697
+else
0e3697
+  ac_cv_header_stdc=no
0e3697
+fi
0e3697
+rm -f conftest*
0e3697
+
0e3697
+fi
0e3697
+
0e3697
+if test $ac_cv_header_stdc = yes; then
0e3697
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
0e3697
+  if test "$cross_compiling" = yes; then :
0e3697
+  :
0e3697
+else
0e3697
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0e3697
+/* end confdefs.h.  */
0e3697
+#include <ctype.h>
0e3697
+#include <stdlib.h>
0e3697
+#if ((' ' & 0x0FF) == 0x020)
0e3697
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
0e3697
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
0e3697
+#else
0e3697
+# define ISLOWER(c) \
0e3697
+		   (('a' <= (c) && (c) <= 'i') \
0e3697
+		     || ('j' <= (c) && (c) <= 'r') \
0e3697
+		     || ('s' <= (c) && (c) <= 'z'))
0e3697
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
0e3697
+#endif
0e3697
+
0e3697
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
0e3697
+int
0e3697
+main ()
0e3697
+{
0e3697
+  int i;
0e3697
+  for (i = 0; i < 256; i++)
0e3697
+    if (XOR (islower (i), ISLOWER (i))
0e3697
+	|| toupper (i) != TOUPPER (i))
0e3697
+      return 2;
0e3697
+  return 0;
0e3697
+}
0e3697
+_ACEOF
0e3697
+if ac_fn_c_try_run "$LINENO"; then :
0e3697
+
0e3697
+else
0e3697
+  ac_cv_header_stdc=no
0e3697
+fi
0e3697
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
0e3697
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
0e3697
+fi
0e3697
+
0e3697
+fi
0e3697
+fi
0e3697
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
0e3697
+$as_echo "$ac_cv_header_stdc" >&6; }
0e3697
+if test $ac_cv_header_stdc = yes; then
0e3697
+
0e3697
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
0e3697
+
0e3697
+fi
0e3697
+
0e3697
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
0e3697
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
0e3697
+		  inttypes.h stdint.h unistd.h
0e3697
+do :
0e3697
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
0e3697
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
0e3697
+"
0e3697
+eval as_val=\$$as_ac_Header
0e3697
+   if test "x$as_val" = x""yes; then :
0e3697
+  cat >>confdefs.h <<_ACEOF
0e3697
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
0e3697
+_ACEOF
0e3697
+
0e3697
+fi
0e3697
+
0e3697
+done
0e3697
+
0e3697
+
0e3697
+for ac_header in unistd.h sys/stat.h
0e3697
+do :
0e3697
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
0e3697
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
0e3697
+eval as_val=\$$as_ac_Header
0e3697
+   if test "x$as_val" = x""yes; then :
0e3697
+  cat >>confdefs.h <<_ACEOF
0e3697
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
0e3697
+_ACEOF
0e3697
+
0e3697
+fi
0e3697
+
0e3697
+done
0e3697
+
0e3697
 
0e3697
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra programs to build requiring -lcuda" >&5
0e3697
 $as_echo_n "checking for extra programs to build requiring -lcuda... " >&6; }