Commit | Line | Data |
---|---|---|
c906108c | 1 | #! /bin/sh |
c906108c | 2 | # Guess values for system-dependent variables and create Makefiles. |
b4e70030 | 3 | # Generated by GNU Autoconf 2.59. |
c906108c | 4 | # |
b4e70030 | 5 | # Copyright (C) 2003 Free Software Foundation, Inc. |
c906108c SS |
6 | # This configure script is free software; the Free Software Foundation |
7 | # gives unlimited permission to copy, distribute and modify it. | |
bec39cab AC |
8 | ## --------------------- ## |
9 | ## M4sh Initialization. ## | |
10 | ## --------------------- ## | |
11 | ||
12 | # Be Bourne compatible | |
13 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
14 | emulate sh | |
15 | NULLCMD=: | |
16 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17 | # is contrary to our usage. Disable this feature. | |
18 | alias -g '${1+"$@"}'='"$@"' | |
b4e70030 JB |
19 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then |
20 | set -o posix | |
bec39cab AC |
21 | fi |
22 | DUALCASE=1; export DUALCASE # for MKS sh | |
23 | ||
24 | # Support unset when possible. | |
25 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
26 | as_unset=unset | |
27 | else | |
28 | as_unset=false | |
29 | fi | |
30 | ||
31 | ||
32 | # Work around bugs in pre-3.0 UWIN ksh. | |
b4e70030 | 33 | $as_unset ENV MAIL MAILPATH |
bec39cab AC |
34 | PS1='$ ' |
35 | PS2='> ' | |
36 | PS4='+ ' | |
37 | ||
38 | # NLS nuisances. | |
39 | for as_var in \ | |
40 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
41 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
42 | LC_TELEPHONE LC_TIME | |
43 | do | |
44 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then | |
45 | eval $as_var=C; export $as_var | |
46 | else | |
b4e70030 | 47 | $as_unset $as_var |
bec39cab AC |
48 | fi |
49 | done | |
50 | ||
51 | # Required to use basename. | |
b4e70030 | 52 | if expr a : '\(a\)' >/dev/null 2>&1; then |
bec39cab AC |
53 | as_expr=expr |
54 | else | |
55 | as_expr=false | |
56 | fi | |
57 | ||
b4e70030 | 58 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
bec39cab AC |
59 | as_basename=basename |
60 | else | |
61 | as_basename=false | |
62 | fi | |
63 | ||
64 | ||
65 | # Name of the executable. | |
b4e70030 | 66 | as_me=`$as_basename "$0" || |
bec39cab AC |
67 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
68 | X"$0" : 'X\(//\)$' \| \ | |
b4e70030 JB |
69 | X"$0" : 'X\(/\)$' \| \ |
70 | . : '\(.\)' 2>/dev/null || | |
bec39cab | 71 | echo X/"$0" | |
b4e70030 JB |
72 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } |
73 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
74 | /^X\/\(\/\).*/{ s//\1/; q; } | |
75 | s/.*/./; q'` | |
bec39cab | 76 | |
4e8d927d | 77 | |
b4e70030 JB |
78 | # PATH needs CR, and LINENO needs CR and PATH. |
79 | # Avoid depending upon Character Ranges. | |
80 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
81 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
82 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
83 | as_cr_digits='0123456789' | |
84 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
4e8d927d | 85 | |
b4e70030 JB |
86 | # The user is always right. |
87 | if test "${PATH_SEPARATOR+set}" != set; then | |
88 | echo "#! /bin/sh" >conf$$.sh | |
89 | echo "exit 0" >>conf$$.sh | |
90 | chmod +x conf$$.sh | |
91 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
92 | PATH_SEPARATOR=';' | |
93 | else | |
94 | PATH_SEPARATOR=: | |
95 | fi | |
96 | rm -f conf$$.sh | |
4e8d927d DJ |
97 | fi |
98 | ||
4e8d927d | 99 | |
b4e70030 JB |
100 | as_lineno_1=$LINENO |
101 | as_lineno_2=$LINENO | |
102 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
103 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
104 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
105 | # Find who we are. Look in the path if we contain no path at all | |
106 | # relative or not. | |
107 | case $0 in | |
108 | *[\\/]* ) as_myself=$0 ;; | |
109 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
110 | for as_dir in $PATH | |
111 | do | |
112 | IFS=$as_save_IFS | |
113 | test -z "$as_dir" && as_dir=. | |
114 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
115 | done | |
4e8d927d | 116 | |
b4e70030 JB |
117 | ;; |
118 | esac | |
119 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
120 | # in which case we are not to be found in the path. | |
121 | if test "x$as_myself" = x; then | |
122 | as_myself=$0 | |
123 | fi | |
124 | if test ! -f "$as_myself"; then | |
125 | { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 | |
126 | { (exit 1); exit 1; }; } | |
127 | fi | |
128 | case $CONFIG_SHELL in | |
129 | '') | |
bec39cab | 130 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
b4e70030 | 131 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH |
bec39cab AC |
132 | do |
133 | IFS=$as_save_IFS | |
134 | test -z "$as_dir" && as_dir=. | |
b4e70030 JB |
135 | for as_base in sh bash ksh sh5; do |
136 | case $as_dir in | |
bec39cab | 137 | /*) |
b4e70030 | 138 | if ("$as_dir/$as_base" -c ' |
4e8d927d DJ |
139 | as_lineno_1=$LINENO |
140 | as_lineno_2=$LINENO | |
b4e70030 | 141 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` |
4e8d927d | 142 | test "x$as_lineno_1" != "x$as_lineno_2" && |
b4e70030 JB |
143 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then |
144 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
145 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
146 | CONFIG_SHELL=$as_dir/$as_base | |
147 | export CONFIG_SHELL | |
148 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
149 | fi;; | |
150 | esac | |
151 | done | |
152 | done | |
153 | ;; | |
154 | esac | |
bec39cab AC |
155 | |
156 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
157 | # uniformly replaced by the line number. The first 'sed' inserts a | |
b4e70030 JB |
158 | # line-number line before each line; the second 'sed' does the real |
159 | # work. The second script uses 'N' to pair each line-number line | |
160 | # with the numbered line, and appends trailing '-' during | |
161 | # substitution so that $LINENO is not a special case at line end. | |
bec39cab | 162 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
b4e70030 JB |
163 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) |
164 | sed '=' <$as_myself | | |
bec39cab AC |
165 | sed ' |
166 | N | |
b4e70030 JB |
167 | s,$,-, |
168 | : loop | |
169 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
bec39cab | 170 | t loop |
b4e70030 JB |
171 | s,-$,, |
172 | s,^['$as_cr_digits']*\n,, | |
bec39cab | 173 | ' >$as_me.lineno && |
b4e70030 | 174 | chmod +x $as_me.lineno || |
bec39cab AC |
175 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 |
176 | { (exit 1); exit 1; }; } | |
177 | ||
178 | # Don't try to exec as it changes $[0], causing all sort of problems | |
179 | # (the dirname of $[0] is not the place where we might find the | |
b4e70030 JB |
180 | # original and so on. Autoconf is especially sensible to this). |
181 | . ./$as_me.lineno | |
bec39cab AC |
182 | # Exit status is that of the last command. |
183 | exit | |
184 | } | |
185 | ||
186 | ||
b4e70030 JB |
187 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in |
188 | *c*,-n*) ECHO_N= ECHO_C=' | |
189 | ' ECHO_T=' ' ;; | |
190 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
191 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
bec39cab AC |
192 | esac |
193 | ||
b4e70030 | 194 | if expr a : '\(a\)' >/dev/null 2>&1; then |
bec39cab AC |
195 | as_expr=expr |
196 | else | |
197 | as_expr=false | |
198 | fi | |
199 | ||
200 | rm -f conf$$ conf$$.exe conf$$.file | |
201 | echo >conf$$.file | |
202 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 JB |
203 | # We could just check for DJGPP; but this test a) works b) is more generic |
204 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
205 | if test -f conf$$.exe; then | |
206 | # Don't use ln at all; we don't have any links | |
bec39cab | 207 | as_ln_s='cp -p' |
b4e70030 JB |
208 | else |
209 | as_ln_s='ln -s' | |
210 | fi | |
bec39cab AC |
211 | elif ln conf$$.file conf$$ 2>/dev/null; then |
212 | as_ln_s=ln | |
213 | else | |
214 | as_ln_s='cp -p' | |
215 | fi | |
b4e70030 | 216 | rm -f conf$$ conf$$.exe conf$$.file |
bec39cab AC |
217 | |
218 | if mkdir -p . 2>/dev/null; then | |
219 | as_mkdir_p=: | |
220 | else | |
221 | test -d ./-p && rmdir ./-p | |
222 | as_mkdir_p=false | |
223 | fi | |
224 | ||
b4e70030 | 225 | as_executable_p="test -f" |
bec39cab AC |
226 | |
227 | # Sed expression to map a string onto a valid CPP name. | |
228 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
229 | ||
230 | # Sed expression to map a string onto a valid variable name. | |
231 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
232 | ||
233 | ||
b4e70030 JB |
234 | # IFS |
235 | # We need space, tab and new line, in precisely that order. | |
236 | as_nl=' | |
237 | ' | |
238 | IFS=" $as_nl" | |
239 | ||
240 | # CDPATH. | |
241 | $as_unset CDPATH | |
bec39cab | 242 | |
c906108c | 243 | |
bec39cab AC |
244 | # Name of the host. |
245 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
246 | # so uname gets run too. | |
247 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
248 | ||
b4e70030 JB |
249 | exec 6>&1 |
250 | ||
bec39cab AC |
251 | # |
252 | # Initializations. | |
253 | # | |
c906108c | 254 | ac_default_prefix=/usr/local |
bec39cab AC |
255 | ac_config_libobj_dir=. |
256 | cross_compiling=no | |
257 | subdirs= | |
258 | MFLAGS= | |
259 | MAKEFLAGS= | |
260 | SHELL=${CONFIG_SHELL-/bin/sh} | |
261 | ||
b4e70030 JB |
262 | # Maximum number of lines to put in a shell here document. |
263 | # This variable seems obsolete. It should probably be removed, and | |
264 | # only ac_max_sed_lines should be used. | |
265 | : ${ac_max_here_lines=38} | |
266 | ||
bec39cab AC |
267 | # Identity of this package. |
268 | PACKAGE_NAME= | |
269 | PACKAGE_TARNAME= | |
270 | PACKAGE_VERSION= | |
271 | PACKAGE_STRING= | |
272 | PACKAGE_BUGREPORT= | |
273 | ||
274 | ac_unique_file="main.c" | |
275 | # Factoring default headers for most tests. | |
276 | ac_includes_default="\ | |
277 | #include <stdio.h> | |
278 | #if HAVE_SYS_TYPES_H | |
279 | # include <sys/types.h> | |
280 | #endif | |
281 | #if HAVE_SYS_STAT_H | |
282 | # include <sys/stat.h> | |
283 | #endif | |
284 | #if STDC_HEADERS | |
285 | # include <stdlib.h> | |
286 | # include <stddef.h> | |
287 | #else | |
288 | # if HAVE_STDLIB_H | |
289 | # include <stdlib.h> | |
290 | # endif | |
291 | #endif | |
292 | #if HAVE_STRING_H | |
293 | # if !STDC_HEADERS && HAVE_MEMORY_H | |
294 | # include <memory.h> | |
295 | # endif | |
296 | # include <string.h> | |
297 | #endif | |
298 | #if HAVE_STRINGS_H | |
299 | # include <strings.h> | |
300 | #endif | |
301 | #if HAVE_INTTYPES_H | |
302 | # include <inttypes.h> | |
b4e70030 JB |
303 | #else |
304 | # if HAVE_STDINT_H | |
305 | # include <stdint.h> | |
306 | # endif | |
bec39cab AC |
307 | #endif |
308 | #if HAVE_UNISTD_H | |
309 | # include <unistd.h> | |
310 | #endif" | |
311 | ||
783e057b DJ |
312 | gl_header_list= |
313 | ac_subdirs_all="$ac_subdirs_all doc testsuite" | |
b4e70030 JB |
314 | ac_subdirs_all="$ac_subdirs_all gdbtk" |
315 | ac_subdirs_all="$ac_subdirs_all multi-ice" | |
316 | ac_subdirs_all="$ac_subdirs_all gdbserver" | |
6c7a06a3 | 317 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG LIBICONV LIBICONV_INCLUDE LIBICONV_LIBDIR READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS' |
a4ce5b0d | 318 | ac_subst_files='host_makefile_frag' |
d5af19ba | 319 | ac_pwd=`pwd` |
c906108c SS |
320 | |
321 | # Initialize some variables set by options. | |
bec39cab AC |
322 | ac_init_help= |
323 | ac_init_version=false | |
c906108c SS |
324 | # The variables have the same names as the options, with |
325 | # dashes changed to underlines. | |
bec39cab | 326 | cache_file=/dev/null |
c906108c | 327 | exec_prefix=NONE |
c906108c | 328 | no_create= |
c906108c SS |
329 | no_recursion= |
330 | prefix=NONE | |
331 | program_prefix=NONE | |
332 | program_suffix=NONE | |
333 | program_transform_name=s,x,x, | |
334 | silent= | |
335 | site= | |
336 | srcdir= | |
c906108c SS |
337 | verbose= |
338 | x_includes=NONE | |
339 | x_libraries=NONE | |
bec39cab AC |
340 | |
341 | # Installation directory options. | |
342 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
343 | # and all the variables that are supposed to be based on exec_prefix | |
344 | # by default will actually change. | |
345 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
c906108c SS |
346 | bindir='${exec_prefix}/bin' |
347 | sbindir='${exec_prefix}/sbin' | |
348 | libexecdir='${exec_prefix}/libexec' | |
b4e70030 | 349 | datadir='${prefix}/share' |
c906108c SS |
350 | sysconfdir='${prefix}/etc' |
351 | sharedstatedir='${prefix}/com' | |
352 | localstatedir='${prefix}/var' | |
b4e70030 | 353 | libdir='${exec_prefix}/lib' |
c906108c SS |
354 | includedir='${prefix}/include' |
355 | oldincludedir='/usr/include' | |
b4e70030 JB |
356 | infodir='${prefix}/info' |
357 | mandir='${prefix}/man' | |
c906108c | 358 | |
c906108c SS |
359 | ac_prev= |
360 | for ac_option | |
361 | do | |
c906108c SS |
362 | # If the previous option needs an argument, assign it. |
363 | if test -n "$ac_prev"; then | |
b4e70030 | 364 | eval "$ac_prev=\$ac_option" |
c906108c SS |
365 | ac_prev= |
366 | continue | |
367 | fi | |
368 | ||
b4e70030 | 369 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
c906108c SS |
370 | |
371 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
372 | ||
b4e70030 | 373 | case $ac_option in |
c906108c SS |
374 | |
375 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
376 | ac_prev=bindir ;; | |
377 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
bec39cab | 378 | bindir=$ac_optarg ;; |
c906108c SS |
379 | |
380 | -build | --build | --buil | --bui | --bu) | |
bec39cab | 381 | ac_prev=build_alias ;; |
c906108c | 382 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
bec39cab | 383 | build_alias=$ac_optarg ;; |
c906108c SS |
384 | |
385 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
386 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
387 | ac_prev=cache_file ;; | |
388 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
389 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
bec39cab AC |
390 | cache_file=$ac_optarg ;; |
391 | ||
392 | --config-cache | -C) | |
393 | cache_file=config.cache ;; | |
c906108c | 394 | |
b4e70030 | 395 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
c906108c | 396 | ac_prev=datadir ;; |
b4e70030 JB |
397 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
398 | | --da=*) | |
bec39cab | 399 | datadir=$ac_optarg ;; |
c906108c SS |
400 | |
401 | -disable-* | --disable-*) | |
bec39cab | 402 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
c906108c | 403 | # Reject names that are not valid shell variable names. |
bec39cab AC |
404 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
405 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
406 | { (exit 1); exit 1; }; } | |
407 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
b4e70030 | 408 | eval "enable_$ac_feature=no" ;; |
c906108c SS |
409 | |
410 | -enable-* | --enable-*) | |
bec39cab | 411 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
c906108c | 412 | # Reject names that are not valid shell variable names. |
bec39cab AC |
413 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
414 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
415 | { (exit 1); exit 1; }; } | |
416 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
b4e70030 JB |
417 | case $ac_option in |
418 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
419 | *) ac_optarg=yes ;; | |
420 | esac | |
421 | eval "enable_$ac_feature='$ac_optarg'" ;; | |
c906108c SS |
422 | |
423 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
424 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
425 | | --exec | --exe | --ex) | |
426 | ac_prev=exec_prefix ;; | |
427 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
428 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
429 | | --exec=* | --exe=* | --ex=*) | |
bec39cab | 430 | exec_prefix=$ac_optarg ;; |
c906108c SS |
431 | |
432 | -gas | --gas | --ga | --g) | |
433 | # Obsolete; use --with-gas. | |
434 | with_gas=yes ;; | |
435 | ||
bec39cab AC |
436 | -help | --help | --hel | --he | -h) |
437 | ac_init_help=long ;; | |
438 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
439 | ac_init_help=recursive ;; | |
440 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
441 | ac_init_help=short ;; | |
c906108c SS |
442 | |
443 | -host | --host | --hos | --ho) | |
bec39cab | 444 | ac_prev=host_alias ;; |
c906108c | 445 | -host=* | --host=* | --hos=* | --ho=*) |
bec39cab | 446 | host_alias=$ac_optarg ;; |
c906108c SS |
447 | |
448 | -includedir | --includedir | --includedi | --included | --include \ | |
449 | | --includ | --inclu | --incl | --inc) | |
450 | ac_prev=includedir ;; | |
451 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
452 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
bec39cab | 453 | includedir=$ac_optarg ;; |
c906108c SS |
454 | |
455 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
456 | ac_prev=infodir ;; | |
457 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
bec39cab | 458 | infodir=$ac_optarg ;; |
c906108c SS |
459 | |
460 | -libdir | --libdir | --libdi | --libd) | |
461 | ac_prev=libdir ;; | |
462 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
bec39cab | 463 | libdir=$ac_optarg ;; |
c906108c SS |
464 | |
465 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
466 | | --libexe | --libex | --libe) | |
467 | ac_prev=libexecdir ;; | |
468 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
469 | | --libexe=* | --libex=* | --libe=*) | |
bec39cab | 470 | libexecdir=$ac_optarg ;; |
c906108c SS |
471 | |
472 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
b4e70030 JB |
473 | | --localstate | --localstat | --localsta | --localst \ |
474 | | --locals | --local | --loca | --loc | --lo) | |
c906108c SS |
475 | ac_prev=localstatedir ;; |
476 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
b4e70030 JB |
477 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
478 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
bec39cab | 479 | localstatedir=$ac_optarg ;; |
c906108c SS |
480 | |
481 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
482 | ac_prev=mandir ;; | |
483 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
bec39cab | 484 | mandir=$ac_optarg ;; |
c906108c SS |
485 | |
486 | -nfp | --nfp | --nf) | |
487 | # Obsolete; use --without-fp. | |
488 | with_fp=no ;; | |
489 | ||
490 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
bec39cab | 491 | | --no-cr | --no-c | -n) |
c906108c SS |
492 | no_create=yes ;; |
493 | ||
494 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
495 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
496 | no_recursion=yes ;; | |
497 | ||
498 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
499 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
500 | | --oldin | --oldi | --old | --ol | --o) | |
501 | ac_prev=oldincludedir ;; | |
502 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
503 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
504 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
bec39cab | 505 | oldincludedir=$ac_optarg ;; |
c906108c SS |
506 | |
507 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
508 | ac_prev=prefix ;; | |
509 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
bec39cab | 510 | prefix=$ac_optarg ;; |
c906108c SS |
511 | |
512 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
513 | | --program-pre | --program-pr | --program-p) | |
514 | ac_prev=program_prefix ;; | |
515 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
516 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
bec39cab | 517 | program_prefix=$ac_optarg ;; |
c906108c SS |
518 | |
519 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
520 | | --program-suf | --program-su | --program-s) | |
521 | ac_prev=program_suffix ;; | |
522 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
523 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
bec39cab | 524 | program_suffix=$ac_optarg ;; |
c906108c SS |
525 | |
526 | -program-transform-name | --program-transform-name \ | |
527 | | --program-transform-nam | --program-transform-na \ | |
528 | | --program-transform-n | --program-transform- \ | |
529 | | --program-transform | --program-transfor \ | |
530 | | --program-transfo | --program-transf \ | |
531 | | --program-trans | --program-tran \ | |
532 | | --progr-tra | --program-tr | --program-t) | |
533 | ac_prev=program_transform_name ;; | |
534 | -program-transform-name=* | --program-transform-name=* \ | |
535 | | --program-transform-nam=* | --program-transform-na=* \ | |
536 | | --program-transform-n=* | --program-transform-=* \ | |
537 | | --program-transform=* | --program-transfor=* \ | |
538 | | --program-transfo=* | --program-transf=* \ | |
539 | | --program-trans=* | --program-tran=* \ | |
540 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
bec39cab | 541 | program_transform_name=$ac_optarg ;; |
c906108c SS |
542 | |
543 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
544 | | -silent | --silent | --silen | --sile | --sil) | |
545 | silent=yes ;; | |
546 | ||
547 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
548 | ac_prev=sbindir ;; | |
549 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
550 | | --sbi=* | --sb=*) | |
bec39cab | 551 | sbindir=$ac_optarg ;; |
c906108c SS |
552 | |
553 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
554 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
555 | | --sharedst | --shareds | --shared | --share | --shar \ | |
556 | | --sha | --sh) | |
557 | ac_prev=sharedstatedir ;; | |
558 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
559 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
560 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
561 | | --sha=* | --sh=*) | |
bec39cab | 562 | sharedstatedir=$ac_optarg ;; |
c906108c SS |
563 | |
564 | -site | --site | --sit) | |
565 | ac_prev=site ;; | |
566 | -site=* | --site=* | --sit=*) | |
bec39cab | 567 | site=$ac_optarg ;; |
3ace7edb | 568 | |
c906108c SS |
569 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
570 | ac_prev=srcdir ;; | |
571 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
bec39cab | 572 | srcdir=$ac_optarg ;; |
c906108c SS |
573 | |
574 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
575 | | --syscon | --sysco | --sysc | --sys | --sy) | |
576 | ac_prev=sysconfdir ;; | |
577 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
578 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
bec39cab | 579 | sysconfdir=$ac_optarg ;; |
c906108c SS |
580 | |
581 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
bec39cab | 582 | ac_prev=target_alias ;; |
c906108c | 583 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
bec39cab | 584 | target_alias=$ac_optarg ;; |
c906108c SS |
585 | |
586 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
587 | verbose=yes ;; | |
588 | ||
bec39cab AC |
589 | -version | --version | --versio | --versi | --vers | -V) |
590 | ac_init_version=: ;; | |
c906108c SS |
591 | |
592 | -with-* | --with-*) | |
bec39cab | 593 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
c906108c | 594 | # Reject names that are not valid shell variable names. |
bec39cab AC |
595 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
596 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
597 | { (exit 1); exit 1; }; } | |
c906108c | 598 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
b4e70030 JB |
599 | case $ac_option in |
600 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
601 | *) ac_optarg=yes ;; | |
602 | esac | |
603 | eval "with_$ac_package='$ac_optarg'" ;; | |
c906108c SS |
604 | |
605 | -without-* | --without-*) | |
bec39cab | 606 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
c906108c | 607 | # Reject names that are not valid shell variable names. |
bec39cab AC |
608 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
609 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
610 | { (exit 1); exit 1; }; } | |
611 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
b4e70030 | 612 | eval "with_$ac_package=no" ;; |
c906108c SS |
613 | |
614 | --x) | |
615 | # Obsolete; use --with-x. | |
616 | with_x=yes ;; | |
617 | ||
618 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
619 | | --x-incl | --x-inc | --x-in | --x-i) | |
620 | ac_prev=x_includes ;; | |
621 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
622 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
bec39cab | 623 | x_includes=$ac_optarg ;; |
c906108c SS |
624 | |
625 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
626 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
627 | ac_prev=x_libraries ;; | |
628 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
629 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
bec39cab | 630 | x_libraries=$ac_optarg ;; |
c906108c | 631 | |
bec39cab AC |
632 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
633 | Try \`$0 --help' for more information." >&2 | |
634 | { (exit 1); exit 1; }; } | |
c906108c SS |
635 | ;; |
636 | ||
bec39cab AC |
637 | *=*) |
638 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
639 | # Reject names that are not valid shell variable names. | |
640 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
641 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
642 | { (exit 1); exit 1; }; } | |
b4e70030 JB |
643 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` |
644 | eval "$ac_envvar='$ac_optarg'" | |
bec39cab AC |
645 | export $ac_envvar ;; |
646 | ||
c906108c | 647 | *) |
bec39cab AC |
648 | # FIXME: should be removed in autoconf 3.0. |
649 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
650 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
651 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
652 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
c906108c SS |
653 | ;; |
654 | ||
655 | esac | |
656 | done | |
657 | ||
658 | if test -n "$ac_prev"; then | |
bec39cab AC |
659 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
660 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
661 | { (exit 1); exit 1; }; } | |
c906108c | 662 | fi |
c906108c | 663 | |
b4e70030 JB |
664 | # Be sure to have absolute paths. |
665 | for ac_var in exec_prefix prefix | |
c906108c | 666 | do |
b4e70030 | 667 | eval ac_val=$`echo $ac_var` |
bec39cab | 668 | case $ac_val in |
b4e70030 JB |
669 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; |
670 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
671 | { (exit 1); exit 1; }; };; | |
672 | esac | |
673 | done | |
674 | ||
675 | # Be sure to have absolute paths. | |
676 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
677 | localstatedir libdir includedir oldincludedir infodir mandir | |
678 | do | |
679 | eval ac_val=$`echo $ac_var` | |
680 | case $ac_val in | |
681 | [\\/$]* | ?:[\\/]* ) ;; | |
682 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
683 | { (exit 1); exit 1; }; };; | |
c906108c SS |
684 | esac |
685 | done | |
686 | ||
bec39cab AC |
687 | # There might be people who depend on the old broken behavior: `$host' |
688 | # used to hold the argument of --host etc. | |
689 | # FIXME: To remove some day. | |
690 | build=$build_alias | |
691 | host=$host_alias | |
692 | target=$target_alias | |
693 | ||
694 | # FIXME: To remove some day. | |
695 | if test "x$host_alias" != x; then | |
696 | if test "x$build_alias" = x; then | |
697 | cross_compiling=maybe | |
698 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
699 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
700 | elif test "x$build_alias" != "x$host_alias"; then | |
701 | cross_compiling=yes | |
702 | fi | |
703 | fi | |
c906108c | 704 | |
bec39cab AC |
705 | ac_tool_prefix= |
706 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
707 | ||
708 | test "$silent" = yes && exec 6>/dev/null | |
c906108c | 709 | |
c906108c SS |
710 | |
711 | # Find the source files, if location was not specified. | |
712 | if test -z "$srcdir"; then | |
713 | ac_srcdir_defaulted=yes | |
b4e70030 JB |
714 | # Try the directory containing this script, then its parent. |
715 | ac_confdir=`(dirname "$0") 2>/dev/null || | |
bec39cab AC |
716 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
717 | X"$0" : 'X\(//\)[^/]' \| \ | |
718 | X"$0" : 'X\(//\)$' \| \ | |
b4e70030 JB |
719 | X"$0" : 'X\(/\)' \| \ |
720 | . : '\(.\)' 2>/dev/null || | |
bec39cab | 721 | echo X"$0" | |
b4e70030 JB |
722 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
723 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
724 | /^X\(\/\/\)$/{ s//\1/; q; } | |
725 | /^X\(\/\).*/{ s//\1/; q; } | |
726 | s/.*/./; q'` | |
c906108c | 727 | srcdir=$ac_confdir |
b4e70030 | 728 | if test ! -r $srcdir/$ac_unique_file; then |
c906108c SS |
729 | srcdir=.. |
730 | fi | |
731 | else | |
732 | ac_srcdir_defaulted=no | |
733 | fi | |
b4e70030 JB |
734 | if test ! -r $srcdir/$ac_unique_file; then |
735 | if test "$ac_srcdir_defaulted" = yes; then | |
736 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 | |
737 | { (exit 1); exit 1; }; } | |
738 | else | |
739 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 | |
bec39cab | 740 | { (exit 1); exit 1; }; } |
b4e70030 | 741 | fi |
c906108c | 742 | fi |
b4e70030 JB |
743 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
744 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
bec39cab | 745 | { (exit 1); exit 1; }; } |
b4e70030 JB |
746 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` |
747 | ac_env_build_alias_set=${build_alias+set} | |
748 | ac_env_build_alias_value=$build_alias | |
749 | ac_cv_env_build_alias_set=${build_alias+set} | |
750 | ac_cv_env_build_alias_value=$build_alias | |
751 | ac_env_host_alias_set=${host_alias+set} | |
752 | ac_env_host_alias_value=$host_alias | |
753 | ac_cv_env_host_alias_set=${host_alias+set} | |
754 | ac_cv_env_host_alias_value=$host_alias | |
755 | ac_env_target_alias_set=${target_alias+set} | |
756 | ac_env_target_alias_value=$target_alias | |
757 | ac_cv_env_target_alias_set=${target_alias+set} | |
758 | ac_cv_env_target_alias_value=$target_alias | |
759 | ac_env_CC_set=${CC+set} | |
760 | ac_env_CC_value=$CC | |
761 | ac_cv_env_CC_set=${CC+set} | |
762 | ac_cv_env_CC_value=$CC | |
763 | ac_env_CFLAGS_set=${CFLAGS+set} | |
764 | ac_env_CFLAGS_value=$CFLAGS | |
765 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
766 | ac_cv_env_CFLAGS_value=$CFLAGS | |
767 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
768 | ac_env_LDFLAGS_value=$LDFLAGS | |
769 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
770 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
771 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
772 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
773 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
774 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
775 | ac_env_CPP_set=${CPP+set} | |
776 | ac_env_CPP_value=$CPP | |
777 | ac_cv_env_CPP_set=${CPP+set} | |
778 | ac_cv_env_CPP_value=$CPP | |
c906108c | 779 | |
bec39cab AC |
780 | # |
781 | # Report the --help message. | |
782 | # | |
783 | if test "$ac_init_help" = "long"; then | |
784 | # Omit some internal or obsolete options to make the list less imposing. | |
785 | # This message is too long to be a string in the A/UX 3.1 sh. | |
786 | cat <<_ACEOF | |
787 | \`configure' configures this package to adapt to many kinds of systems. | |
788 | ||
789 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
790 | ||
791 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
792 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
793 | ||
794 | Defaults for the options are specified in brackets. | |
795 | ||
796 | Configuration: | |
797 | -h, --help display this help and exit | |
798 | --help=short display options specific to this package | |
799 | --help=recursive display the short help of all the included packages | |
800 | -V, --version display version information and exit | |
801 | -q, --quiet, --silent do not print \`checking...' messages | |
802 | --cache-file=FILE cache test results in FILE [disabled] | |
803 | -C, --config-cache alias for \`--cache-file=config.cache' | |
804 | -n, --no-create do not create output files | |
805 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
806 | ||
b4e70030 JB |
807 | _ACEOF |
808 | ||
809 | cat <<_ACEOF | |
bec39cab AC |
810 | Installation directories: |
811 | --prefix=PREFIX install architecture-independent files in PREFIX | |
812 | [$ac_default_prefix] | |
813 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
814 | [PREFIX] | |
815 | ||
816 | By default, \`make install' will install all the files in | |
817 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
818 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
819 | for instance \`--prefix=\$HOME'. | |
820 | ||
821 | For better control, use the options below. | |
822 | ||
823 | Fine tuning of the installation directories: | |
824 | --bindir=DIR user executables [EPREFIX/bin] | |
825 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
826 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
b4e70030 | 827 | --datadir=DIR read-only architecture-independent data [PREFIX/share] |
bec39cab AC |
828 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
829 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
830 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
831 | --libdir=DIR object code libraries [EPREFIX/lib] | |
832 | --includedir=DIR C header files [PREFIX/include] | |
833 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
b4e70030 JB |
834 | --infodir=DIR info documentation [PREFIX/info] |
835 | --mandir=DIR man documentation [PREFIX/man] | |
bec39cab AC |
836 | _ACEOF |
837 | ||
838 | cat <<\_ACEOF | |
839 | ||
840 | Program names: | |
841 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
842 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
843 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
844 | ||
845 | X features: | |
846 | --x-includes=DIR X include files are in DIR | |
847 | --x-libraries=DIR X library files are in DIR | |
848 | ||
849 | System types: | |
850 | --build=BUILD configure for building on BUILD [guessed] | |
851 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
852 | --target=TARGET configure for building compilers for TARGET [HOST] | |
853 | _ACEOF | |
854 | fi | |
855 | ||
856 | if test -n "$ac_init_help"; then | |
857 | ||
858 | cat <<\_ACEOF | |
859 | ||
860 | Optional Features: | |
861 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
862 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
85981d60 AC |
863 | --enable-maintainer-mode enable make rules and dependencies not useful |
864 | (and sometimes confusing) to the casual installer | |
e28b3332 DJ |
865 | --disable-dependency-tracking speeds up one-time build |
866 | --enable-dependency-tracking do not reject slow dependency extractors | |
d0c678e6 | 867 | --enable-targets alternative target configurations |
c0993dbe | 868 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
bec39cab AC |
869 | --disable-gdbcli disable command-line interface (CLI) |
870 | --disable-gdbmi disable machine-interface (MI) | |
871 | --enable-tui enable full-screen terminal user interface (TUI) | |
872 | --enable-gdbtk enable gdbtk graphical user interface (GUI) | |
873 | --enable-profiling enable profiling of GDB | |
3841debe | 874 | --disable-rpath do not hardcode runtime library paths |
094a342e | 875 | --enable-werror treat compile warnings as errors |
bec39cab AC |
876 | --enable-build-warnings Enable build-time compiler warnings if gcc is used |
877 | --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used | |
878 | --enable-sim Link gdb with simulator | |
879 | --enable-multi-ice build the multi-ice-gdb-server | |
880 | ||
881 | Optional Packages: | |
882 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
883 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
bec39cab AC |
884 | --with-separate-debug-dir=path Look for global separate debug info in this path LIBDIR/debug |
885 | --with-libunwind Use libunwind frame unwinding support | |
cb01cfba JB |
886 | --with-curses use the curses library instead of the termcap |
887 | library | |
c16158bc JM |
888 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
889 | --with-bugurl=URL Direct users to URL to report a bug | |
6c7a06a3 | 890 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib |
6a30b0a5 | 891 | --with-system-readline use installed readline library |
5c39566f | 892 | --with-expat include expat support (auto/yes/no) |
3841debe DJ |
893 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
894 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib | |
895 | --without-libexpat-prefix don't search for libexpat in includedir and libdir | |
d57a3c85 | 896 | --with-python include python support (auto/yes/no/<path>) |
bec39cab AC |
897 | --without-included-regex don't use included regex; this is the default |
898 | on systems with version 2 of the GNU C library | |
899 | (use with caution on other system) | |
900 | --with-sysroot=DIR Search for usr/lib et al within DIR. | |
16e7150e | 901 | --with-system-gdbinit=file Automatically load a system-wide gdbinit file |
5062cc19 KS |
902 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
903 | --with-tk directory containing tk configuration (tkConfig.sh) | |
bec39cab | 904 | --with-x use the X Window System |
bec39cab AC |
905 | |
906 | Some influential environment variables: | |
907 | CC C compiler command | |
908 | CFLAGS C compiler flags | |
909 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
910 | nonstandard directory <lib dir> | |
b4e70030 JB |
911 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have |
912 | headers in a nonstandard directory <include dir> | |
bec39cab AC |
913 | CPP C preprocessor |
914 | ||
915 | Use these variables to override the choices made by `configure' or to help | |
916 | it to find libraries and programs with nonstandard names/locations. | |
917 | ||
918 | _ACEOF | |
919 | fi | |
920 | ||
921 | if test "$ac_init_help" = "recursive"; then | |
922 | # If there are subdirs, report their specific --help. | |
b4e70030 | 923 | ac_popdir=`pwd` |
bec39cab AC |
924 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
925 | test -d $ac_dir || continue | |
926 | ac_builddir=. | |
927 | ||
b4e70030 | 928 | if test "$ac_dir" != .; then |
bec39cab | 929 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
b4e70030 JB |
930 | # A "../" for each directory in $ac_dir_suffix. |
931 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
932 | else | |
933 | ac_dir_suffix= ac_top_builddir= | |
934 | fi | |
bec39cab AC |
935 | |
936 | case $srcdir in | |
b4e70030 | 937 | .) # No --srcdir option. We are building in place. |
bec39cab | 938 | ac_srcdir=. |
b4e70030 JB |
939 | if test -z "$ac_top_builddir"; then |
940 | ac_top_srcdir=. | |
941 | else | |
942 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
943 | fi ;; | |
944 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
bec39cab | 945 | ac_srcdir=$srcdir$ac_dir_suffix; |
b4e70030 JB |
946 | ac_top_srcdir=$srcdir ;; |
947 | *) # Relative path. | |
948 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
949 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
950 | esac | |
951 | ||
952 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
953 | # the directories may not exist. | |
954 | case `pwd` in | |
955 | .) ac_abs_builddir="$ac_dir";; | |
956 | *) | |
957 | case "$ac_dir" in | |
958 | .) ac_abs_builddir=`pwd`;; | |
959 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
960 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
961 | esac;; | |
962 | esac | |
963 | case $ac_abs_builddir in | |
964 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
965 | *) | |
966 | case ${ac_top_builddir}. in | |
967 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
968 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
969 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
970 | esac;; | |
971 | esac | |
972 | case $ac_abs_builddir in | |
973 | .) ac_abs_srcdir=$ac_srcdir;; | |
974 | *) | |
975 | case $ac_srcdir in | |
976 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
977 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
978 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
979 | esac;; | |
980 | esac | |
981 | case $ac_abs_builddir in | |
982 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
983 | *) | |
984 | case $ac_top_srcdir in | |
985 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
986 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
987 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
988 | esac;; | |
bec39cab AC |
989 | esac |
990 | ||
b4e70030 JB |
991 | cd $ac_dir |
992 | # Check for guested configure; otherwise get Cygnus style configure. | |
bec39cab | 993 | if test -f $ac_srcdir/configure.gnu; then |
b4e70030 | 994 | echo |
bec39cab AC |
995 | $SHELL $ac_srcdir/configure.gnu --help=recursive |
996 | elif test -f $ac_srcdir/configure; then | |
b4e70030 | 997 | echo |
bec39cab | 998 | $SHELL $ac_srcdir/configure --help=recursive |
b4e70030 JB |
999 | elif test -f $ac_srcdir/configure.ac || |
1000 | test -f $ac_srcdir/configure.in; then | |
1001 | echo | |
1002 | $ac_configure --help | |
3ace7edb | 1003 | else |
bec39cab | 1004 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
b4e70030 JB |
1005 | fi |
1006 | cd $ac_popdir | |
bec39cab AC |
1007 | done |
1008 | fi | |
1009 | ||
b4e70030 | 1010 | test -n "$ac_init_help" && exit 0 |
bec39cab AC |
1011 | if $ac_init_version; then |
1012 | cat <<\_ACEOF | |
1013 | ||
b4e70030 | 1014 | Copyright (C) 2003 Free Software Foundation, Inc. |
bec39cab AC |
1015 | This configure script is free software; the Free Software Foundation |
1016 | gives unlimited permission to copy, distribute and modify it. | |
1017 | _ACEOF | |
b4e70030 | 1018 | exit 0 |
bec39cab | 1019 | fi |
b4e70030 JB |
1020 | exec 5>config.log |
1021 | cat >&5 <<_ACEOF | |
bec39cab AC |
1022 | This file contains any messages produced by compilers while |
1023 | running configure, to aid debugging if configure makes a mistake. | |
1024 | ||
1025 | It was created by $as_me, which was | |
b4e70030 | 1026 | generated by GNU Autoconf 2.59. Invocation command line was |
bec39cab AC |
1027 | |
1028 | $ $0 $@ | |
1029 | ||
1030 | _ACEOF | |
1031 | { | |
1032 | cat <<_ASUNAME | |
1033 | ## --------- ## | |
1034 | ## Platform. ## | |
1035 | ## --------- ## | |
1036 | ||
1037 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1038 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1039 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1040 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1041 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1042 | ||
1043 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1044 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1045 | ||
1046 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1047 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1048 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
b4e70030 | 1049 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` |
bec39cab AC |
1050 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
1051 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1052 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1053 | ||
1054 | _ASUNAME | |
1055 | ||
1056 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1057 | for as_dir in $PATH | |
1058 | do | |
1059 | IFS=$as_save_IFS | |
1060 | test -z "$as_dir" && as_dir=. | |
1061 | echo "PATH: $as_dir" | |
1062 | done | |
1063 | ||
1064 | } >&5 | |
1065 | ||
1066 | cat >&5 <<_ACEOF | |
1067 | ||
1068 | ||
1069 | ## ----------- ## | |
1070 | ## Core tests. ## | |
1071 | ## ----------- ## | |
1072 | ||
1073 | _ACEOF | |
1074 | ||
1075 | ||
1076 | # Keep a trace of the command line. | |
1077 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1078 | # Strip out --silent because we don't want to record it for future runs. | |
1079 | # Also quote any args containing shell meta-characters. | |
1080 | # Make two passes to allow for proper duplicate-argument suppression. | |
1081 | ac_configure_args= | |
1082 | ac_configure_args0= | |
1083 | ac_configure_args1= | |
1084 | ac_sep= | |
1085 | ac_must_keep_next=false | |
1086 | for ac_pass in 1 2 | |
1087 | do | |
1088 | for ac_arg | |
1089 | do | |
1090 | case $ac_arg in | |
1091 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1092 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1093 | | -silent | --silent | --silen | --sile | --sil) | |
1094 | continue ;; | |
b4e70030 | 1095 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) |
bec39cab AC |
1096 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
1097 | esac | |
1098 | case $ac_pass in | |
1099 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1100 | 2) | |
1101 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1102 | if test $ac_must_keep_next = true; then | |
1103 | ac_must_keep_next=false # Got value, back to normal. | |
1104 | else | |
1105 | case $ac_arg in | |
1106 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1107 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1108 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1109 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1110 | case "$ac_configure_args0 " in | |
1111 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1112 | esac | |
1113 | ;; | |
1114 | -* ) ac_must_keep_next=true ;; | |
1115 | esac | |
1116 | fi | |
1117 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1118 | # Get rid of the leading space. | |
1119 | ac_sep=" " | |
1120 | ;; | |
1121 | esac | |
1122 | done | |
1123 | done | |
1124 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1125 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1126 | ||
1127 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1128 | # config.log. We remove comments because anyway the quotes in there | |
1129 | # would cause problems or look ugly. | |
b4e70030 JB |
1130 | # WARNING: Be sure not to use single quotes in there, as some shells, |
1131 | # such as our DU 5.0 friend, will then `close' the trap. | |
bec39cab AC |
1132 | trap 'exit_status=$? |
1133 | # Save into config.log some information that might help in debugging. | |
1134 | { | |
1135 | echo | |
1136 | ||
1137 | cat <<\_ASBOX | |
1138 | ## ---------------- ## | |
1139 | ## Cache variables. ## | |
1140 | ## ---------------- ## | |
1141 | _ASBOX | |
1142 | echo | |
1143 | # The following way of writing the cache mishandles newlines in values, | |
b4e70030 | 1144 | { |
bec39cab | 1145 | (set) 2>&1 | |
b4e70030 JB |
1146 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in |
1147 | *ac_space=\ *) | |
bec39cab | 1148 | sed -n \ |
b4e70030 JB |
1149 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1150 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
1151 | ;; | |
bec39cab | 1152 | *) |
b4e70030 JB |
1153 | sed -n \ |
1154 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
bec39cab | 1155 | ;; |
b4e70030 JB |
1156 | esac; |
1157 | } | |
bec39cab AC |
1158 | echo |
1159 | ||
1160 | cat <<\_ASBOX | |
1161 | ## ----------------- ## | |
1162 | ## Output variables. ## | |
1163 | ## ----------------- ## | |
1164 | _ASBOX | |
1165 | echo | |
1166 | for ac_var in $ac_subst_vars | |
1167 | do | |
b4e70030 JB |
1168 | eval ac_val=$`echo $ac_var` |
1169 | echo "$ac_var='"'"'$ac_val'"'"'" | |
bec39cab AC |
1170 | done | sort |
1171 | echo | |
1172 | ||
1173 | if test -n "$ac_subst_files"; then | |
1174 | cat <<\_ASBOX | |
b4e70030 JB |
1175 | ## ------------- ## |
1176 | ## Output files. ## | |
1177 | ## ------------- ## | |
bec39cab AC |
1178 | _ASBOX |
1179 | echo | |
1180 | for ac_var in $ac_subst_files | |
1181 | do | |
b4e70030 JB |
1182 | eval ac_val=$`echo $ac_var` |
1183 | echo "$ac_var='"'"'$ac_val'"'"'" | |
bec39cab AC |
1184 | done | sort |
1185 | echo | |
1186 | fi | |
1187 | ||
1188 | if test -s confdefs.h; then | |
1189 | cat <<\_ASBOX | |
1190 | ## ----------- ## | |
1191 | ## confdefs.h. ## | |
1192 | ## ----------- ## | |
1193 | _ASBOX | |
1194 | echo | |
b4e70030 | 1195 | sed "/^$/d" confdefs.h | sort |
bec39cab | 1196 | echo |
3ace7edb | 1197 | fi |
bec39cab AC |
1198 | test "$ac_signal" != 0 && |
1199 | echo "$as_me: caught signal $ac_signal" | |
1200 | echo "$as_me: exit $exit_status" | |
1201 | } >&5 | |
b4e70030 JB |
1202 | rm -f core *.core && |
1203 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && | |
bec39cab | 1204 | exit $exit_status |
b4e70030 | 1205 | ' 0 |
bec39cab AC |
1206 | for ac_signal in 1 2 13 15; do |
1207 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1208 | done | |
1209 | ac_signal=0 | |
1210 | ||
1211 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
b4e70030 JB |
1212 | rm -rf conftest* confdefs.h |
1213 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1214 | echo >confdefs.h | |
bec39cab AC |
1215 | |
1216 | # Predefined preprocessor variables. | |
1217 | ||
1218 | cat >>confdefs.h <<_ACEOF | |
1219 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1220 | _ACEOF | |
1221 | ||
1222 | ||
1223 | cat >>confdefs.h <<_ACEOF | |
1224 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1225 | _ACEOF | |
1226 | ||
1227 | ||
1228 | cat >>confdefs.h <<_ACEOF | |
1229 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1230 | _ACEOF | |
1231 | ||
1232 | ||
1233 | cat >>confdefs.h <<_ACEOF | |
1234 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1235 | _ACEOF | |
1236 | ||
1237 | ||
1238 | cat >>confdefs.h <<_ACEOF | |
1239 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1240 | _ACEOF | |
1241 | ||
1242 | ||
1243 | # Let the site file select an alternate cache file if it wants to. | |
1244 | # Prefer explicitly selected file to automatically selected ones. | |
b4e70030 JB |
1245 | if test -z "$CONFIG_SITE"; then |
1246 | if test "x$prefix" != xNONE; then | |
1247 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1248 | else | |
1249 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1250 | fi | |
c906108c | 1251 | fi |
b4e70030 | 1252 | for ac_site_file in $CONFIG_SITE; do |
c906108c | 1253 | if test -r "$ac_site_file"; then |
bec39cab AC |
1254 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 |
1255 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1256 | sed 's/^/| /' "$ac_site_file" >&5 | |
c906108c SS |
1257 | . "$ac_site_file" |
1258 | fi | |
1259 | done | |
1260 | ||
1261 | if test -r "$cache_file"; then | |
bec39cab AC |
1262 | # Some versions of bash will fail to source /dev/null (special |
1263 | # files actually), so we avoid doing that. | |
1264 | if test -f "$cache_file"; then | |
1265 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1266 | echo "$as_me: loading cache $cache_file" >&6;} | |
1267 | case $cache_file in | |
1268 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1269 | *) . ./$cache_file;; | |
1270 | esac | |
1271 | fi | |
c906108c | 1272 | else |
bec39cab AC |
1273 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 |
1274 | echo "$as_me: creating cache $cache_file" >&6;} | |
1275 | >$cache_file | |
1276 | fi | |
1277 | ||
1278 | # Check that the precious variables saved in the cache have kept the same | |
1279 | # value. | |
1280 | ac_cache_corrupted=false | |
b4e70030 JB |
1281 | for ac_var in `(set) 2>&1 | |
1282 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do | |
bec39cab AC |
1283 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1284 | eval ac_new_set=\$ac_env_${ac_var}_set | |
b4e70030 JB |
1285 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" |
1286 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
bec39cab AC |
1287 | case $ac_old_set,$ac_new_set in |
1288 | set,) | |
1289 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1290 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1291 | ac_cache_corrupted=: ;; | |
1292 | ,set) | |
1293 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1294 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1295 | ac_cache_corrupted=: ;; | |
1296 | ,);; | |
1297 | *) | |
1298 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
fdc59709 PB |
1299 | # differences in whitespace do not lead to failure. |
1300 | ac_old_val_w=`echo x $ac_old_val` | |
1301 | ac_new_val_w=`echo x $ac_new_val` | |
1302 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
1303 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 | |
bec39cab | 1304 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
fdc59709 PB |
1305 | ac_cache_corrupted=: |
1306 | else | |
1307 | { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 | |
1308 | echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} | |
1309 | eval $ac_var=\$ac_old_val | |
1310 | fi | |
1311 | { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 | |
1312 | echo "$as_me: former value: \`$ac_old_val'" >&2;} | |
1313 | { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 | |
1314 | echo "$as_me: current value: \`$ac_new_val'" >&2;} | |
bec39cab AC |
1315 | fi;; |
1316 | esac | |
1317 | # Pass precious variables to config.status. | |
1318 | if test "$ac_new_set" = set; then | |
1319 | case $ac_new_val in | |
b4e70030 JB |
1320 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) |
1321 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
bec39cab AC |
1322 | *) ac_arg=$ac_var=$ac_new_val ;; |
1323 | esac | |
1324 | case " $ac_configure_args " in | |
1325 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1326 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1327 | esac | |
1328 | fi | |
1329 | done | |
1330 | if $ac_cache_corrupted; then | |
d5af19ba DJ |
1331 | { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
1332 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
bec39cab AC |
1333 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 |
1334 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1335 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1336 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1337 | { (exit 1); exit 1; }; } | |
c906108c SS |
1338 | fi |
1339 | ||
b4e70030 JB |
1340 | ac_ext=c |
1341 | ac_cpp='$CPP $CPPFLAGS' | |
1342 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1343 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1344 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c SS |
1345 | |
1346 | ||
783e057b DJ |
1347 | gl_header_list="$gl_header_list stdint.h" |
1348 | gl_header_list="$gl_header_list wchar.h" | |
1349 | gl_header_list="$gl_header_list string.h" | |
bec39cab AC |
1350 | |
1351 | ||
1352 | ||
1353 | ||
1354 | ||
1355 | ||
1356 | ||
1357 | ||
1358 | ||
1359 | ||
1360 | ||
1361 | ||
1362 | ||
1363 | ||
1364 | ||
1365 | ||
bec39cab | 1366 | |
d5af19ba DJ |
1367 | |
1368 | ||
1369 | ||
b4e70030 JB |
1370 | ac_config_headers="$ac_config_headers config.h:config.in" |
1371 | ||
1372 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 | |
1373 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
1374 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. | |
413ccac7 | 1375 | if test "${enable_maintainer_mode+set}" = set; then |
b4e70030 JB |
1376 | enableval="$enable_maintainer_mode" |
1377 | USE_MAINTAINER_MODE=$enableval | |
413ccac7 AC |
1378 | else |
1379 | USE_MAINTAINER_MODE=no | |
b4e70030 JB |
1380 | fi; |
1381 | echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 | |
1382 | echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 | |
413ccac7 | 1383 | |
413ccac7 AC |
1384 | |
1385 | if test $USE_MAINTAINER_MODE = yes; then | |
1386 | MAINTAINER_MODE_TRUE= | |
1387 | MAINTAINER_MODE_FALSE='#' | |
1388 | else | |
1389 | MAINTAINER_MODE_TRUE='#' | |
1390 | MAINTAINER_MODE_FALSE= | |
1391 | fi | |
85981d60 | 1392 | |
413ccac7 | 1393 | MAINT=$MAINTAINER_MODE_TRUE |
413ccac7 | 1394 | |
c906108c | 1395 | |
bec39cab AC |
1396 | |
1397 | ac_ext=c | |
1398 | ac_cpp='$CPP $CPPFLAGS' | |
1399 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1400 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1401 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1402 | if test -n "$ac_tool_prefix"; then | |
1403 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1404 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
b4e70030 JB |
1405 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1406 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
1407 | if test "${ac_cv_prog_CC+set}" = set; then |
1408 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1409 | else | |
1410 | if test -n "$CC"; then | |
1411 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1412 | else | |
1413 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1414 | for as_dir in $PATH | |
1415 | do | |
1416 | IFS=$as_save_IFS | |
1417 | test -z "$as_dir" && as_dir=. | |
1418 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 1419 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
1420 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
1421 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1422 | break 2 | |
1423 | fi | |
1424 | done | |
1425 | done | |
1426 | ||
1427 | fi | |
1428 | fi | |
1429 | CC=$ac_cv_prog_CC | |
1430 | if test -n "$CC"; then | |
b4e70030 JB |
1431 | echo "$as_me:$LINENO: result: $CC" >&5 |
1432 | echo "${ECHO_T}$CC" >&6 | |
bec39cab | 1433 | else |
b4e70030 JB |
1434 | echo "$as_me:$LINENO: result: no" >&5 |
1435 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
1436 | fi |
1437 | ||
1438 | fi | |
1439 | if test -z "$ac_cv_prog_CC"; then | |
1440 | ac_ct_CC=$CC | |
1441 | # Extract the first word of "gcc", so it can be a program name with args. | |
c906108c | 1442 | set dummy gcc; ac_word=$2 |
b4e70030 JB |
1443 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1444 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
1445 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
1446 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1447 | else | |
1448 | if test -n "$ac_ct_CC"; then | |
1449 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1450 | else | |
1451 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1452 | for as_dir in $PATH | |
1453 | do | |
1454 | IFS=$as_save_IFS | |
1455 | test -z "$as_dir" && as_dir=. | |
1456 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 1457 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
1458 | ac_cv_prog_ac_ct_CC="gcc" |
1459 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1460 | break 2 | |
1461 | fi | |
1462 | done | |
1463 | done | |
1464 | ||
1465 | fi | |
1466 | fi | |
1467 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1468 | if test -n "$ac_ct_CC"; then | |
b4e70030 JB |
1469 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
1470 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
bec39cab | 1471 | else |
b4e70030 JB |
1472 | echo "$as_me:$LINENO: result: no" >&5 |
1473 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
1474 | fi |
1475 | ||
b4e70030 | 1476 | CC=$ac_ct_CC |
bec39cab AC |
1477 | else |
1478 | CC="$ac_cv_prog_CC" | |
1479 | fi | |
1480 | ||
1481 | if test -z "$CC"; then | |
b4e70030 JB |
1482 | if test -n "$ac_tool_prefix"; then |
1483 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
bec39cab | 1484 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
b4e70030 JB |
1485 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1486 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
1487 | if test "${ac_cv_prog_CC+set}" = set; then |
1488 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c SS |
1489 | else |
1490 | if test -n "$CC"; then | |
1491 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1492 | else | |
bec39cab AC |
1493 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1494 | for as_dir in $PATH | |
1495 | do | |
1496 | IFS=$as_save_IFS | |
1497 | test -z "$as_dir" && as_dir=. | |
1498 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 1499 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
1500 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
1501 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1502 | break 2 | |
1503 | fi | |
1504 | done | |
1505 | done | |
1506 | ||
c906108c SS |
1507 | fi |
1508 | fi | |
bec39cab | 1509 | CC=$ac_cv_prog_CC |
c906108c | 1510 | if test -n "$CC"; then |
b4e70030 JB |
1511 | echo "$as_me:$LINENO: result: $CC" >&5 |
1512 | echo "${ECHO_T}$CC" >&6 | |
c906108c | 1513 | else |
b4e70030 JB |
1514 | echo "$as_me:$LINENO: result: no" >&5 |
1515 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
1516 | fi |
1517 | ||
b4e70030 JB |
1518 | fi |
1519 | if test -z "$ac_cv_prog_CC"; then | |
1520 | ac_ct_CC=$CC | |
1521 | # Extract the first word of "cc", so it can be a program name with args. | |
1522 | set dummy cc; ac_word=$2 | |
1523 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1524 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1525 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1527 | else | |
1528 | if test -n "$ac_ct_CC"; then | |
1529 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1530 | else | |
1531 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1532 | for as_dir in $PATH | |
1533 | do | |
1534 | IFS=$as_save_IFS | |
1535 | test -z "$as_dir" && as_dir=. | |
1536 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1537 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1538 | ac_cv_prog_ac_ct_CC="cc" | |
1539 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1540 | break 2 | |
4e8d927d | 1541 | fi |
b4e70030 JB |
1542 | done |
1543 | done | |
1544 | ||
1545 | fi | |
1546 | fi | |
1547 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1548 | if test -n "$ac_ct_CC"; then | |
1549 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1550 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1551 | else | |
1552 | echo "$as_me:$LINENO: result: no" >&5 | |
1553 | echo "${ECHO_T}no" >&6 | |
1554 | fi | |
1555 | ||
1556 | CC=$ac_ct_CC | |
1557 | else | |
1558 | CC="$ac_cv_prog_CC" | |
1559 | fi | |
1560 | ||
bec39cab | 1561 | fi |
c906108c SS |
1562 | if test -z "$CC"; then |
1563 | # Extract the first word of "cc", so it can be a program name with args. | |
1564 | set dummy cc; ac_word=$2 | |
b4e70030 JB |
1565 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1566 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
1567 | if test "${ac_cv_prog_CC+set}" = set; then |
1568 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c SS |
1569 | else |
1570 | if test -n "$CC"; then | |
1571 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1572 | else | |
c906108c | 1573 | ac_prog_rejected=no |
bec39cab AC |
1574 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1575 | for as_dir in $PATH | |
1576 | do | |
1577 | IFS=$as_save_IFS | |
1578 | test -z "$as_dir" && as_dir=. | |
1579 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 1580 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
1581 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
1582 | ac_prog_rejected=yes | |
1583 | continue | |
1584 | fi | |
1585 | ac_cv_prog_CC="cc" | |
1586 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1587 | break 2 | |
1588 | fi | |
1589 | done | |
1590 | done | |
1591 | ||
c906108c SS |
1592 | if test $ac_prog_rejected = yes; then |
1593 | # We found a bogon in the path, so make sure we never use it. | |
1594 | set dummy $ac_cv_prog_CC | |
1595 | shift | |
bec39cab | 1596 | if test $# != 0; then |
c906108c SS |
1597 | # We chose a different compiler from the bogus one. |
1598 | # However, it has the same basename, so the bogon will be chosen | |
1599 | # first if we set CC to just the basename; use the full file name. | |
1600 | shift | |
bec39cab | 1601 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
c906108c SS |
1602 | fi |
1603 | fi | |
1604 | fi | |
1605 | fi | |
bec39cab | 1606 | CC=$ac_cv_prog_CC |
c906108c | 1607 | if test -n "$CC"; then |
b4e70030 JB |
1608 | echo "$as_me:$LINENO: result: $CC" >&5 |
1609 | echo "${ECHO_T}$CC" >&6 | |
c906108c | 1610 | else |
b4e70030 JB |
1611 | echo "$as_me:$LINENO: result: no" >&5 |
1612 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
1613 | fi |
1614 | ||
bec39cab AC |
1615 | fi |
1616 | if test -z "$CC"; then | |
1617 | if test -n "$ac_tool_prefix"; then | |
b4e70030 | 1618 | for ac_prog in cl |
bec39cab AC |
1619 | do |
1620 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
1621 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
b4e70030 JB |
1622 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1623 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
1624 | if test "${ac_cv_prog_CC+set}" = set; then |
1625 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c SS |
1626 | else |
1627 | if test -n "$CC"; then | |
1628 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1629 | else | |
bec39cab AC |
1630 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1631 | for as_dir in $PATH | |
1632 | do | |
1633 | IFS=$as_save_IFS | |
1634 | test -z "$as_dir" && as_dir=. | |
1635 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 1636 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
1637 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
1638 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1639 | break 2 | |
1640 | fi | |
1641 | done | |
1642 | done | |
1643 | ||
c906108c SS |
1644 | fi |
1645 | fi | |
bec39cab | 1646 | CC=$ac_cv_prog_CC |
c906108c | 1647 | if test -n "$CC"; then |
b4e70030 JB |
1648 | echo "$as_me:$LINENO: result: $CC" >&5 |
1649 | echo "${ECHO_T}$CC" >&6 | |
c906108c | 1650 | else |
b4e70030 JB |
1651 | echo "$as_me:$LINENO: result: no" >&5 |
1652 | echo "${ECHO_T}no" >&6 | |
c906108c | 1653 | fi |
bec39cab AC |
1654 | |
1655 | test -n "$CC" && break | |
1656 | done | |
1657 | fi | |
1658 | if test -z "$CC"; then | |
1659 | ac_ct_CC=$CC | |
b4e70030 | 1660 | for ac_prog in cl |
bec39cab AC |
1661 | do |
1662 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
1663 | set dummy $ac_prog; ac_word=$2 | |
b4e70030 JB |
1664 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1665 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
1666 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
1667 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1668 | else | |
1669 | if test -n "$ac_ct_CC"; then | |
1670 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1671 | else | |
1672 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1673 | for as_dir in $PATH | |
1674 | do | |
1675 | IFS=$as_save_IFS | |
1676 | test -z "$as_dir" && as_dir=. | |
1677 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 1678 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
1679 | ac_cv_prog_ac_ct_CC="$ac_prog" |
1680 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1681 | break 2 | |
c906108c | 1682 | fi |
bec39cab AC |
1683 | done |
1684 | done | |
1685 | ||
1686 | fi | |
1687 | fi | |
1688 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1689 | if test -n "$ac_ct_CC"; then | |
b4e70030 JB |
1690 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
1691 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
bec39cab | 1692 | else |
b4e70030 JB |
1693 | echo "$as_me:$LINENO: result: no" >&5 |
1694 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
1695 | fi |
1696 | ||
bec39cab AC |
1697 | test -n "$ac_ct_CC" && break |
1698 | done | |
c906108c | 1699 | |
b4e70030 | 1700 | CC=$ac_ct_CC |
bec39cab AC |
1701 | fi |
1702 | ||
1703 | fi | |
1704 | ||
1705 | ||
d5af19ba DJ |
1706 | test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
1707 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
1708 | { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
bec39cab AC |
1709 | See \`config.log' for more details." >&5 |
1710 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
1711 | See \`config.log' for more details." >&2;} | |
d5af19ba | 1712 | { (exit 1); exit 1; }; }; } |
bec39cab AC |
1713 | |
1714 | # Provide some information about the compiler. | |
b4e70030 JB |
1715 | echo "$as_me:$LINENO:" \ |
1716 | "checking for C compiler version" >&5 | |
bec39cab | 1717 | ac_compiler=`set X $ac_compile; echo $2` |
b4e70030 JB |
1718 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 |
1719 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
bec39cab AC |
1720 | ac_status=$? |
1721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1722 | (exit $ac_status); } | |
b4e70030 JB |
1723 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 |
1724 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
bec39cab AC |
1725 | ac_status=$? |
1726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1727 | (exit $ac_status); } | |
b4e70030 JB |
1728 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 |
1729 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
bec39cab AC |
1730 | ac_status=$? |
1731 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1732 | (exit $ac_status); } | |
1733 | ||
1734 | cat >conftest.$ac_ext <<_ACEOF | |
1735 | /* confdefs.h. */ | |
1736 | _ACEOF | |
1737 | cat confdefs.h >>conftest.$ac_ext | |
1738 | cat >>conftest.$ac_ext <<_ACEOF | |
1739 | /* end confdefs.h. */ | |
1740 | ||
1741 | int | |
1742 | main () | |
1743 | { | |
1744 | ||
1745 | ; | |
1746 | return 0; | |
1747 | } | |
1748 | _ACEOF | |
1749 | ac_clean_files_save=$ac_clean_files | |
b4e70030 | 1750 | ac_clean_files="$ac_clean_files a.out a.exe b.out" |
bec39cab AC |
1751 | # Try to create an executable without -o first, disregard a.out. |
1752 | # It will help us diagnose broken compilers, and finding out an intuition | |
1753 | # of exeext. | |
b4e70030 JB |
1754 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
1755 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
bec39cab AC |
1756 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
1757 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
1758 | (eval $ac_link_default) 2>&5 | |
1759 | ac_status=$? | |
1760 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1761 | (exit $ac_status); }; then | |
b4e70030 JB |
1762 | # Find the output, starting from the most likely. This scheme is |
1763 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
1764 | # resort. | |
1765 | ||
1766 | # Be careful to initialize this variable, since it used to be cached. | |
1767 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
1768 | ac_cv_exeext= | |
1769 | # b.out is created by i960 compilers. | |
1770 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
bec39cab AC |
1771 | do |
1772 | test -f "$ac_file" || continue | |
1773 | case $ac_file in | |
b4e70030 JB |
1774 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) |
1775 | ;; | |
1776 | conftest.$ac_ext ) | |
1777 | # This is the source file. | |
1778 | ;; | |
1779 | [ab].out ) | |
1780 | # We found the default executable, but exeext='' is most | |
1781 | # certainly right. | |
1782 | break;; | |
1783 | *.* ) | |
1784 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
1785 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
1786 | # but it would be cool to find out if it's true. Does anybody | |
1787 | # maintain Libtool? --akim. | |
1788 | export ac_cv_exeext | |
1789 | break;; | |
1790 | * ) | |
1791 | break;; | |
bec39cab AC |
1792 | esac |
1793 | done | |
1794 | else | |
1795 | echo "$as_me: failed program was:" >&5 | |
1796 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1797 | ||
d5af19ba DJ |
1798 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
1799 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
bec39cab AC |
1800 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables |
1801 | See \`config.log' for more details." >&5 | |
1802 | echo "$as_me: error: C compiler cannot create executables | |
1803 | See \`config.log' for more details." >&2;} | |
d5af19ba | 1804 | { (exit 77); exit 77; }; }; } |
bec39cab AC |
1805 | fi |
1806 | ||
b4e70030 JB |
1807 | ac_exeext=$ac_cv_exeext |
1808 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
1809 | echo "${ECHO_T}$ac_file" >&6 | |
1810 | ||
1811 | # Check the compiler produces executables we can run. If not, either | |
bec39cab | 1812 | # the compiler is broken, or we cross compile. |
b4e70030 JB |
1813 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 |
1814 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
bec39cab AC |
1815 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 |
1816 | # If not cross compiling, check that we can run a simple program. | |
1817 | if test "$cross_compiling" != yes; then | |
1818 | if { ac_try='./$ac_file' | |
1819 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
1820 | (eval $ac_try) 2>&5 | |
1821 | ac_status=$? | |
1822 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1823 | (exit $ac_status); }; }; then | |
1824 | cross_compiling=no | |
c906108c | 1825 | else |
bec39cab AC |
1826 | if test "$cross_compiling" = maybe; then |
1827 | cross_compiling=yes | |
1828 | else | |
d5af19ba DJ |
1829 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
1830 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
1831 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
bec39cab AC |
1832 | If you meant to cross compile, use \`--host'. |
1833 | See \`config.log' for more details." >&5 | |
1834 | echo "$as_me: error: cannot run C compiled programs. | |
1835 | If you meant to cross compile, use \`--host'. | |
1836 | See \`config.log' for more details." >&2;} | |
d5af19ba | 1837 | { (exit 1); exit 1; }; }; } |
bec39cab | 1838 | fi |
c906108c | 1839 | fi |
bec39cab | 1840 | fi |
b4e70030 JB |
1841 | echo "$as_me:$LINENO: result: yes" >&5 |
1842 | echo "${ECHO_T}yes" >&6 | |
bec39cab | 1843 | |
b4e70030 JB |
1844 | rm -f a.out a.exe conftest$ac_cv_exeext b.out |
1845 | ac_clean_files=$ac_clean_files_save | |
1846 | # Check the compiler produces executables we can run. If not, either | |
1847 | # the compiler is broken, or we cross compile. | |
1848 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
1849 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
1850 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
1851 | echo "${ECHO_T}$cross_compiling" >&6 | |
4e8d927d | 1852 | |
b4e70030 JB |
1853 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 |
1854 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
1855 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
bec39cab AC |
1856 | (eval $ac_link) 2>&5 |
1857 | ac_status=$? | |
1858 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1859 | (exit $ac_status); }; then | |
b4e70030 JB |
1860 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
1861 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
1862 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
1863 | # `rm'. | |
1864 | for ac_file in conftest.exe conftest conftest.*; do | |
1865 | test -f "$ac_file" || continue | |
1866 | case $ac_file in | |
1867 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
1868 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
1869 | export ac_cv_exeext | |
1870 | break;; | |
1871 | * ) break;; | |
1872 | esac | |
1873 | done | |
c906108c | 1874 | else |
d5af19ba DJ |
1875 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
1876 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
1877 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link | |
bec39cab AC |
1878 | See \`config.log' for more details." >&5 |
1879 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
1880 | See \`config.log' for more details." >&2;} | |
d5af19ba | 1881 | { (exit 1); exit 1; }; }; } |
c906108c | 1882 | fi |
c906108c | 1883 | |
b4e70030 JB |
1884 | rm -f conftest$ac_cv_exeext |
1885 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
1886 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
c906108c | 1887 | |
b4e70030 | 1888 | rm -f conftest.$ac_ext |
bec39cab AC |
1889 | EXEEXT=$ac_cv_exeext |
1890 | ac_exeext=$EXEEXT | |
b4e70030 JB |
1891 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 |
1892 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
bec39cab AC |
1893 | if test "${ac_cv_objext+set}" = set; then |
1894 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1895 | else | |
b4e70030 JB |
1896 | cat >conftest.$ac_ext <<_ACEOF |
1897 | /* confdefs.h. */ | |
1898 | _ACEOF | |
1899 | cat confdefs.h >>conftest.$ac_ext | |
1900 | cat >>conftest.$ac_ext <<_ACEOF | |
1901 | /* end confdefs.h. */ | |
1902 | ||
1903 | int | |
1904 | main () | |
1905 | { | |
1906 | ||
1907 | ; | |
1908 | return 0; | |
1909 | } | |
1910 | _ACEOF | |
1911 | rm -f conftest.o conftest.obj | |
bec39cab AC |
1912 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
1913 | (eval $ac_compile) 2>&5 | |
1914 | ac_status=$? | |
1915 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1916 | (exit $ac_status); }; then | |
b4e70030 | 1917 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do |
bec39cab | 1918 | case $ac_file in |
b4e70030 | 1919 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; |
bec39cab AC |
1920 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
1921 | break;; | |
1922 | esac | |
1923 | done | |
c906108c | 1924 | else |
bec39cab AC |
1925 | echo "$as_me: failed program was:" >&5 |
1926 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1927 | ||
d5af19ba DJ |
1928 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
1929 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
bec39cab AC |
1930 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile |
1931 | See \`config.log' for more details." >&5 | |
1932 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
1933 | See \`config.log' for more details." >&2;} | |
d5af19ba | 1934 | { (exit 1); exit 1; }; }; } |
c906108c SS |
1935 | fi |
1936 | ||
b4e70030 | 1937 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
bec39cab | 1938 | fi |
b4e70030 JB |
1939 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 |
1940 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
bec39cab AC |
1941 | OBJEXT=$ac_cv_objext |
1942 | ac_objext=$OBJEXT | |
b4e70030 JB |
1943 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 |
1944 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
bec39cab AC |
1945 | if test "${ac_cv_c_compiler_gnu+set}" = set; then |
1946 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 1947 | else |
bec39cab AC |
1948 | cat >conftest.$ac_ext <<_ACEOF |
1949 | /* confdefs.h. */ | |
1950 | _ACEOF | |
1951 | cat confdefs.h >>conftest.$ac_ext | |
1952 | cat >>conftest.$ac_ext <<_ACEOF | |
1953 | /* end confdefs.h. */ | |
1954 | ||
1955 | int | |
1956 | main () | |
1957 | { | |
1958 | #ifndef __GNUC__ | |
1959 | choke me | |
1960 | #endif | |
1961 | ||
1962 | ; | |
1963 | return 0; | |
1964 | } | |
1965 | _ACEOF | |
1966 | rm -f conftest.$ac_objext | |
1967 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
1968 | (eval $ac_compile) 2>conftest.er1 | |
1969 | ac_status=$? | |
1970 | grep -v '^ *+' conftest.er1 >conftest.err | |
1971 | rm -f conftest.er1 | |
1972 | cat conftest.err >&5 | |
1973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1974 | (exit $ac_status); } && | |
b4e70030 JB |
1975 | { ac_try='test -z "$ac_c_werror_flag" |
1976 | || test ! -s conftest.err' | |
bec39cab AC |
1977 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
1978 | (eval $ac_try) 2>&5 | |
1979 | ac_status=$? | |
1980 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1981 | (exit $ac_status); }; } && | |
1982 | { ac_try='test -s conftest.$ac_objext' | |
1983 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
1984 | (eval $ac_try) 2>&5 | |
1985 | ac_status=$? | |
1986 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
1987 | (exit $ac_status); }; }; then | |
1988 | ac_compiler_gnu=yes | |
1989 | else | |
1990 | echo "$as_me: failed program was:" >&5 | |
1991 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1992 | ||
b4e70030 | 1993 | ac_compiler_gnu=no |
bec39cab AC |
1994 | fi |
1995 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
1996 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
1997 | ||
1998 | fi | |
b4e70030 JB |
1999 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 |
2000 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
bec39cab AC |
2001 | GCC=`test $ac_compiler_gnu = yes && echo yes` |
2002 | ac_test_CFLAGS=${CFLAGS+set} | |
2003 | ac_save_CFLAGS=$CFLAGS | |
b4e70030 JB |
2004 | CFLAGS="-g" |
2005 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2006 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
bec39cab AC |
2007 | if test "${ac_cv_prog_cc_g+set}" = set; then |
2008 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2009 | else | |
b4e70030 | 2010 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
2011 | /* confdefs.h. */ |
2012 | _ACEOF | |
2013 | cat confdefs.h >>conftest.$ac_ext | |
2014 | cat >>conftest.$ac_ext <<_ACEOF | |
2015 | /* end confdefs.h. */ | |
2016 | ||
2017 | int | |
2018 | main () | |
2019 | { | |
2020 | ||
2021 | ; | |
2022 | return 0; | |
2023 | } | |
2024 | _ACEOF | |
2025 | rm -f conftest.$ac_objext | |
2026 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2027 | (eval $ac_compile) 2>conftest.er1 | |
2028 | ac_status=$? | |
2029 | grep -v '^ *+' conftest.er1 >conftest.err | |
2030 | rm -f conftest.er1 | |
2031 | cat conftest.err >&5 | |
2032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2033 | (exit $ac_status); } && | |
b4e70030 JB |
2034 | { ac_try='test -z "$ac_c_werror_flag" |
2035 | || test ! -s conftest.err' | |
bec39cab AC |
2036 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2037 | (eval $ac_try) 2>&5 | |
2038 | ac_status=$? | |
2039 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2040 | (exit $ac_status); }; } && | |
2041 | { ac_try='test -s conftest.$ac_objext' | |
2042 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2043 | (eval $ac_try) 2>&5 | |
2044 | ac_status=$? | |
2045 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2046 | (exit $ac_status); }; }; then | |
c906108c SS |
2047 | ac_cv_prog_cc_g=yes |
2048 | else | |
bec39cab AC |
2049 | echo "$as_me: failed program was:" >&5 |
2050 | sed 's/^/| /' conftest.$ac_ext >&5 | |
c906108c | 2051 | |
b4e70030 | 2052 | ac_cv_prog_cc_g=no |
4e8d927d | 2053 | fi |
bec39cab AC |
2054 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2055 | fi | |
b4e70030 JB |
2056 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 |
2057 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
c906108c | 2058 | if test "$ac_test_CFLAGS" = set; then |
bec39cab | 2059 | CFLAGS=$ac_save_CFLAGS |
c906108c SS |
2060 | elif test $ac_cv_prog_cc_g = yes; then |
2061 | if test "$GCC" = yes; then | |
2062 | CFLAGS="-g -O2" | |
2063 | else | |
2064 | CFLAGS="-g" | |
2065 | fi | |
2066 | else | |
2067 | if test "$GCC" = yes; then | |
2068 | CFLAGS="-O2" | |
2069 | else | |
2070 | CFLAGS= | |
2071 | fi | |
2072 | fi | |
b4e70030 JB |
2073 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2074 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2075 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
bec39cab AC |
2076 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
2077 | else | |
b4e70030 | 2078 | ac_cv_prog_cc_stdc=no |
bec39cab AC |
2079 | ac_save_CC=$CC |
2080 | cat >conftest.$ac_ext <<_ACEOF | |
2081 | /* confdefs.h. */ | |
2082 | _ACEOF | |
2083 | cat confdefs.h >>conftest.$ac_ext | |
2084 | cat >>conftest.$ac_ext <<_ACEOF | |
2085 | /* end confdefs.h. */ | |
c906108c SS |
2086 | #include <stdarg.h> |
2087 | #include <stdio.h> | |
2088 | #include <sys/types.h> | |
2089 | #include <sys/stat.h> | |
2090 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2091 | struct buf { int x; }; | |
2092 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2093 | static char *e (p, i) | |
2094 | char **p; | |
2095 | int i; | |
2096 | { | |
2097 | return p[i]; | |
2098 | } | |
2099 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2100 | { | |
2101 | char *s; | |
2102 | va_list v; | |
2103 | va_start (v,p); | |
2104 | s = g (p, va_arg (v,int)); | |
2105 | va_end (v); | |
2106 | return s; | |
2107 | } | |
bec39cab AC |
2108 | |
2109 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2110 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2111 | These don't provoke an error unfortunately, instead are silently treated | |
b4e70030 | 2112 | as 'x'. The following induces an error, until -std1 is added to get |
bec39cab AC |
2113 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
2114 | array size at least. It's necessary to write '\x00'==0 to get something | |
b4e70030 | 2115 | that's true only with -std1. */ |
bec39cab AC |
2116 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
2117 | ||
c906108c SS |
2118 | int test (int i, double x); |
2119 | struct s1 {int (*f) (int a);}; | |
2120 | struct s2 {int (*f) (double a);}; | |
2121 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2122 | int argc; | |
2123 | char **argv; | |
bec39cab AC |
2124 | int |
2125 | main () | |
2126 | { | |
c906108c | 2127 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
bec39cab AC |
2128 | ; |
2129 | return 0; | |
2130 | } | |
2131 | _ACEOF | |
b4e70030 JB |
2132 | # Don't try gcc -ansi; that turns off useful extensions and |
2133 | # breaks some systems' header files. | |
2134 | # AIX -qlanglvl=ansi | |
2135 | # Ultrix and OSF/1 -std1 | |
2136 | # HP-UX 10.20 and later -Ae | |
2137 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2138 | # SVR4 -Xc -D__EXTENSIONS__ | |
2139 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
bec39cab AC |
2140 | do |
2141 | CC="$ac_save_CC $ac_arg" | |
2142 | rm -f conftest.$ac_objext | |
2143 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2144 | (eval $ac_compile) 2>conftest.er1 | |
2145 | ac_status=$? | |
2146 | grep -v '^ *+' conftest.er1 >conftest.err | |
2147 | rm -f conftest.er1 | |
2148 | cat conftest.err >&5 | |
2149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2150 | (exit $ac_status); } && | |
b4e70030 JB |
2151 | { ac_try='test -z "$ac_c_werror_flag" |
2152 | || test ! -s conftest.err' | |
bec39cab AC |
2153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2154 | (eval $ac_try) 2>&5 | |
2155 | ac_status=$? | |
2156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2157 | (exit $ac_status); }; } && | |
2158 | { ac_try='test -s conftest.$ac_objext' | |
2159 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2160 | (eval $ac_try) 2>&5 | |
2161 | ac_status=$? | |
2162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2163 | (exit $ac_status); }; }; then | |
b4e70030 JB |
2164 | ac_cv_prog_cc_stdc=$ac_arg |
2165 | break | |
c906108c | 2166 | else |
bec39cab AC |
2167 | echo "$as_me: failed program was:" >&5 |
2168 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2169 | ||
c906108c | 2170 | fi |
bec39cab | 2171 | rm -f conftest.err conftest.$ac_objext |
c906108c | 2172 | done |
b4e70030 | 2173 | rm -f conftest.$ac_ext conftest.$ac_objext |
bec39cab | 2174 | CC=$ac_save_CC |
c906108c SS |
2175 | |
2176 | fi | |
b4e70030 JB |
2177 | |
2178 | case "x$ac_cv_prog_cc_stdc" in | |
2179 | x|xno) | |
2180 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2181 | echo "${ECHO_T}none needed" >&6 ;; | |
bec39cab | 2182 | *) |
b4e70030 JB |
2183 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 |
2184 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2185 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
c906108c SS |
2186 | esac |
2187 | ||
b4e70030 JB |
2188 | # Some people use a C++ compiler to compile C. Since we use `exit', |
2189 | # in C++ we need to declare it. In case someone uses the same compiler | |
2190 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2191 | # the declaration of exit, since it's the most demanding environment. | |
2192 | cat >conftest.$ac_ext <<_ACEOF | |
2193 | #ifndef __cplusplus | |
2194 | choke me | |
2195 | #endif | |
2196 | _ACEOF | |
2197 | rm -f conftest.$ac_objext | |
2198 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2199 | (eval $ac_compile) 2>conftest.er1 | |
2200 | ac_status=$? | |
2201 | grep -v '^ *+' conftest.er1 >conftest.err | |
2202 | rm -f conftest.er1 | |
2203 | cat conftest.err >&5 | |
2204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2205 | (exit $ac_status); } && | |
2206 | { ac_try='test -z "$ac_c_werror_flag" | |
2207 | || test ! -s conftest.err' | |
2208 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2209 | (eval $ac_try) 2>&5 | |
2210 | ac_status=$? | |
2211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2212 | (exit $ac_status); }; } && | |
2213 | { ac_try='test -s conftest.$ac_objext' | |
2214 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2215 | (eval $ac_try) 2>&5 | |
2216 | ac_status=$? | |
2217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2218 | (exit $ac_status); }; }; then | |
2219 | for ac_declaration in \ | |
2220 | '' \ | |
2221 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ | |
2222 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2223 | 'extern "C" void exit (int) throw ();' \ | |
2224 | 'extern "C" void exit (int);' \ | |
2225 | 'void exit (int);' | |
2226 | do | |
2227 | cat >conftest.$ac_ext <<_ACEOF | |
2228 | /* confdefs.h. */ | |
2229 | _ACEOF | |
2230 | cat confdefs.h >>conftest.$ac_ext | |
2231 | cat >>conftest.$ac_ext <<_ACEOF | |
2232 | /* end confdefs.h. */ | |
2233 | $ac_declaration | |
2234 | #include <stdlib.h> | |
2235 | int | |
2236 | main () | |
2237 | { | |
2238 | exit (42); | |
2239 | ; | |
2240 | return 0; | |
2241 | } | |
2242 | _ACEOF | |
2243 | rm -f conftest.$ac_objext | |
2244 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2245 | (eval $ac_compile) 2>conftest.er1 | |
2246 | ac_status=$? | |
2247 | grep -v '^ *+' conftest.er1 >conftest.err | |
2248 | rm -f conftest.er1 | |
2249 | cat conftest.err >&5 | |
2250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2251 | (exit $ac_status); } && | |
2252 | { ac_try='test -z "$ac_c_werror_flag" | |
2253 | || test ! -s conftest.err' | |
2254 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2255 | (eval $ac_try) 2>&5 | |
2256 | ac_status=$? | |
2257 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2258 | (exit $ac_status); }; } && | |
2259 | { ac_try='test -s conftest.$ac_objext' | |
2260 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2261 | (eval $ac_try) 2>&5 | |
2262 | ac_status=$? | |
2263 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2264 | (exit $ac_status); }; }; then | |
2265 | : | |
2266 | else | |
2267 | echo "$as_me: failed program was:" >&5 | |
2268 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2269 | ||
2270 | continue | |
2271 | fi | |
2272 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2273 | cat >conftest.$ac_ext <<_ACEOF | |
2274 | /* confdefs.h. */ | |
2275 | _ACEOF | |
2276 | cat confdefs.h >>conftest.$ac_ext | |
2277 | cat >>conftest.$ac_ext <<_ACEOF | |
2278 | /* end confdefs.h. */ | |
2279 | $ac_declaration | |
2280 | int | |
2281 | main () | |
2282 | { | |
2283 | exit (42); | |
2284 | ; | |
2285 | return 0; | |
2286 | } | |
2287 | _ACEOF | |
2288 | rm -f conftest.$ac_objext | |
2289 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2290 | (eval $ac_compile) 2>conftest.er1 | |
2291 | ac_status=$? | |
2292 | grep -v '^ *+' conftest.er1 >conftest.err | |
2293 | rm -f conftest.er1 | |
2294 | cat conftest.err >&5 | |
2295 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2296 | (exit $ac_status); } && | |
2297 | { ac_try='test -z "$ac_c_werror_flag" | |
2298 | || test ! -s conftest.err' | |
2299 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2300 | (eval $ac_try) 2>&5 | |
2301 | ac_status=$? | |
2302 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2303 | (exit $ac_status); }; } && | |
2304 | { ac_try='test -s conftest.$ac_objext' | |
2305 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2306 | (eval $ac_try) 2>&5 | |
2307 | ac_status=$? | |
2308 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2309 | (exit $ac_status); }; }; then | |
2310 | break | |
2311 | else | |
2312 | echo "$as_me: failed program was:" >&5 | |
2313 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2314 | ||
2315 | fi | |
2316 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2317 | done | |
2318 | rm -f conftest* | |
2319 | if test -n "$ac_declaration"; then | |
2320 | echo '#ifdef __cplusplus' >>confdefs.h | |
2321 | echo $ac_declaration >>confdefs.h | |
2322 | echo '#endif' >>confdefs.h | |
2323 | fi | |
2324 | ||
2325 | else | |
2326 | echo "$as_me: failed program was:" >&5 | |
2327 | sed 's/^/| /' conftest.$ac_ext >&5 | |
c906108c | 2328 | |
b4e70030 JB |
2329 | fi |
2330 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
bec39cab AC |
2331 | ac_ext=c |
2332 | ac_cpp='$CPP $CPPFLAGS' | |
2333 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2334 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2335 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
c906108c | 2336 | |
60ca704f | 2337 | |
bec39cab AC |
2338 | cat >>confdefs.h <<\_ACEOF |
2339 | #define _GNU_SOURCE 1 | |
2340 | _ACEOF | |
c906108c SS |
2341 | |
2342 | ||
8bb2c122 | 2343 | |
bec39cab AC |
2344 | ac_ext=c |
2345 | ac_cpp='$CPP $CPPFLAGS' | |
2346 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2347 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2348 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
b4e70030 JB |
2349 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 |
2350 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
bec39cab AC |
2351 | # On Suns, sometimes $CPP names a directory. |
2352 | if test -n "$CPP" && test -d "$CPP"; then | |
2353 | CPP= | |
8bb2c122 | 2354 | fi |
bec39cab AC |
2355 | if test -z "$CPP"; then |
2356 | if test "${ac_cv_prog_CPP+set}" = set; then | |
2357 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2358 | else | |
2359 | # Double quotes because CPP needs to be expanded | |
2360 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2361 | do | |
2362 | ac_preproc_ok=false | |
2363 | for ac_c_preproc_warn_flag in '' yes | |
2364 | do | |
2365 | # Use a header file that comes with gcc, so configuring glibc | |
2366 | # with a fresh cross-compiler works. | |
2367 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2368 | # <limits.h> exists even on freestanding compilers. | |
2369 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2370 | # not just through cpp. "Syntax error" is here to catch this case. | |
2371 | cat >conftest.$ac_ext <<_ACEOF | |
2372 | /* confdefs.h. */ | |
2373 | _ACEOF | |
2374 | cat confdefs.h >>conftest.$ac_ext | |
2375 | cat >>conftest.$ac_ext <<_ACEOF | |
2376 | /* end confdefs.h. */ | |
2377 | #ifdef __STDC__ | |
2378 | # include <limits.h> | |
2379 | #else | |
2380 | # include <assert.h> | |
2381 | #endif | |
2382 | Syntax error | |
2383 | _ACEOF | |
2384 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2385 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2386 | ac_status=$? | |
2387 | grep -v '^ *+' conftest.er1 >conftest.err | |
2388 | rm -f conftest.er1 | |
2389 | cat conftest.err >&5 | |
2390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2391 | (exit $ac_status); } >/dev/null; then | |
2392 | if test -s conftest.err; then | |
2393 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2394 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2395 | else | |
2396 | ac_cpp_err= | |
2397 | fi | |
8bb2c122 | 2398 | else |
bec39cab | 2399 | ac_cpp_err=yes |
8bb2c122 | 2400 | fi |
bec39cab AC |
2401 | if test -z "$ac_cpp_err"; then |
2402 | : | |
8bb2c122 | 2403 | else |
bec39cab AC |
2404 | echo "$as_me: failed program was:" >&5 |
2405 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2406 | ||
2407 | # Broken: fails on valid input. | |
2408 | continue | |
2409 | fi | |
2410 | rm -f conftest.err conftest.$ac_ext | |
2411 | ||
b4e70030 | 2412 | # OK, works on sane cases. Now check whether non-existent headers |
bec39cab AC |
2413 | # can be detected and how. |
2414 | cat >conftest.$ac_ext <<_ACEOF | |
2415 | /* confdefs.h. */ | |
2416 | _ACEOF | |
2417 | cat confdefs.h >>conftest.$ac_ext | |
2418 | cat >>conftest.$ac_ext <<_ACEOF | |
2419 | /* end confdefs.h. */ | |
2420 | #include <ac_nonexistent.h> | |
2421 | _ACEOF | |
2422 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2423 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2424 | ac_status=$? | |
2425 | grep -v '^ *+' conftest.er1 >conftest.err | |
2426 | rm -f conftest.er1 | |
2427 | cat conftest.err >&5 | |
2428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2429 | (exit $ac_status); } >/dev/null; then | |
2430 | if test -s conftest.err; then | |
2431 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2432 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2433 | else | |
2434 | ac_cpp_err= | |
2435 | fi | |
8bb2c122 | 2436 | else |
bec39cab | 2437 | ac_cpp_err=yes |
8bb2c122 | 2438 | fi |
bec39cab AC |
2439 | if test -z "$ac_cpp_err"; then |
2440 | # Broken: success on invalid input. | |
2441 | continue | |
8bb2c122 | 2442 | else |
bec39cab AC |
2443 | echo "$as_me: failed program was:" >&5 |
2444 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8bb2c122 | 2445 | |
bec39cab AC |
2446 | # Passes both tests. |
2447 | ac_preproc_ok=: | |
2448 | break | |
8bb2c122 | 2449 | fi |
bec39cab | 2450 | rm -f conftest.err conftest.$ac_ext |
8bb2c122 | 2451 | |
bec39cab AC |
2452 | done |
2453 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2454 | rm -f conftest.err conftest.$ac_ext | |
2455 | if $ac_preproc_ok; then | |
2456 | break | |
2457 | fi | |
8bb2c122 | 2458 | |
bec39cab AC |
2459 | done |
2460 | ac_cv_prog_CPP=$CPP | |
ddc9cd0f | 2461 | |
c906108c | 2462 | fi |
bec39cab AC |
2463 | CPP=$ac_cv_prog_CPP |
2464 | else | |
2465 | ac_cv_prog_CPP=$CPP | |
c906108c | 2466 | fi |
b4e70030 JB |
2467 | echo "$as_me:$LINENO: result: $CPP" >&5 |
2468 | echo "${ECHO_T}$CPP" >&6 | |
bec39cab AC |
2469 | ac_preproc_ok=false |
2470 | for ac_c_preproc_warn_flag in '' yes | |
2471 | do | |
2472 | # Use a header file that comes with gcc, so configuring glibc | |
2473 | # with a fresh cross-compiler works. | |
2474 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2475 | # <limits.h> exists even on freestanding compilers. | |
2476 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2477 | # not just through cpp. "Syntax error" is here to catch this case. | |
2478 | cat >conftest.$ac_ext <<_ACEOF | |
2479 | /* confdefs.h. */ | |
2480 | _ACEOF | |
2481 | cat confdefs.h >>conftest.$ac_ext | |
2482 | cat >>conftest.$ac_ext <<_ACEOF | |
2483 | /* end confdefs.h. */ | |
2484 | #ifdef __STDC__ | |
2485 | # include <limits.h> | |
2486 | #else | |
2487 | # include <assert.h> | |
2488 | #endif | |
2489 | Syntax error | |
2490 | _ACEOF | |
2491 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2492 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2493 | ac_status=$? | |
2494 | grep -v '^ *+' conftest.er1 >conftest.err | |
2495 | rm -f conftest.er1 | |
2496 | cat conftest.err >&5 | |
2497 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2498 | (exit $ac_status); } >/dev/null; then | |
2499 | if test -s conftest.err; then | |
2500 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2501 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2502 | else | |
2503 | ac_cpp_err= | |
2504 | fi | |
c906108c | 2505 | else |
bec39cab | 2506 | ac_cpp_err=yes |
c906108c | 2507 | fi |
bec39cab AC |
2508 | if test -z "$ac_cpp_err"; then |
2509 | : | |
c906108c | 2510 | else |
bec39cab AC |
2511 | echo "$as_me: failed program was:" >&5 |
2512 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2513 | ||
2514 | # Broken: fails on valid input. | |
2515 | continue | |
2516 | fi | |
2517 | rm -f conftest.err conftest.$ac_ext | |
2518 | ||
b4e70030 | 2519 | # OK, works on sane cases. Now check whether non-existent headers |
bec39cab AC |
2520 | # can be detected and how. |
2521 | cat >conftest.$ac_ext <<_ACEOF | |
2522 | /* confdefs.h. */ | |
2523 | _ACEOF | |
2524 | cat confdefs.h >>conftest.$ac_ext | |
2525 | cat >>conftest.$ac_ext <<_ACEOF | |
2526 | /* end confdefs.h. */ | |
2527 | #include <ac_nonexistent.h> | |
2528 | _ACEOF | |
2529 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2530 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2531 | ac_status=$? | |
2532 | grep -v '^ *+' conftest.er1 >conftest.err | |
2533 | rm -f conftest.er1 | |
2534 | cat conftest.err >&5 | |
2535 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2536 | (exit $ac_status); } >/dev/null; then | |
2537 | if test -s conftest.err; then | |
2538 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2539 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2540 | else | |
2541 | ac_cpp_err= | |
2542 | fi | |
c906108c | 2543 | else |
bec39cab | 2544 | ac_cpp_err=yes |
c906108c | 2545 | fi |
bec39cab AC |
2546 | if test -z "$ac_cpp_err"; then |
2547 | # Broken: success on invalid input. | |
2548 | continue | |
c906108c | 2549 | else |
bec39cab AC |
2550 | echo "$as_me: failed program was:" >&5 |
2551 | sed 's/^/| /' conftest.$ac_ext >&5 | |
c906108c | 2552 | |
bec39cab AC |
2553 | # Passes both tests. |
2554 | ac_preproc_ok=: | |
2555 | break | |
c906108c | 2556 | fi |
bec39cab | 2557 | rm -f conftest.err conftest.$ac_ext |
c906108c | 2558 | |
bec39cab AC |
2559 | done |
2560 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2561 | rm -f conftest.err conftest.$ac_ext | |
2562 | if $ac_preproc_ok; then | |
c906108c SS |
2563 | : |
2564 | else | |
d5af19ba DJ |
2565 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
2566 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
2567 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check | |
bec39cab AC |
2568 | See \`config.log' for more details." >&5 |
2569 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
2570 | See \`config.log' for more details." >&2;} | |
d5af19ba | 2571 | { (exit 1); exit 1; }; }; } |
c906108c | 2572 | fi |
c906108c | 2573 | |
bec39cab AC |
2574 | ac_ext=c |
2575 | ac_cpp='$CPP $CPPFLAGS' | |
2576 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2577 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2578 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2579 | ||
2580 | ||
b4e70030 JB |
2581 | echo "$as_me:$LINENO: checking for egrep" >&5 |
2582 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
2583 | if test "${ac_cv_prog_egrep+set}" = set; then | |
4e8d927d DJ |
2584 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
2585 | else | |
b4e70030 JB |
2586 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 |
2587 | then ac_cv_prog_egrep='grep -E' | |
2588 | else ac_cv_prog_egrep='egrep' | |
bec39cab | 2589 | fi |
4e8d927d | 2590 | fi |
b4e70030 JB |
2591 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 |
2592 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
2593 | EGREP=$ac_cv_prog_egrep | |
c906108c | 2594 | |
bec39cab AC |
2595 | |
2596 | ||
b4e70030 JB |
2597 | echo "$as_me:$LINENO: checking for AIX" >&5 |
2598 | echo $ECHO_N "checking for AIX... $ECHO_C" >&6 | |
bec39cab AC |
2599 | cat >conftest.$ac_ext <<_ACEOF |
2600 | /* confdefs.h. */ | |
2601 | _ACEOF | |
2602 | cat confdefs.h >>conftest.$ac_ext | |
2603 | cat >>conftest.$ac_ext <<_ACEOF | |
2604 | /* end confdefs.h. */ | |
2605 | #ifdef _AIX | |
2606 | yes | |
2607 | #endif | |
2608 | ||
2609 | _ACEOF | |
c906108c | 2610 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
bec39cab | 2611 | $EGREP "yes" >/dev/null 2>&1; then |
b4e70030 JB |
2612 | echo "$as_me:$LINENO: result: yes" >&5 |
2613 | echo "${ECHO_T}yes" >&6 | |
bec39cab AC |
2614 | cat >>confdefs.h <<\_ACEOF |
2615 | #define _ALL_SOURCE 1 | |
2616 | _ACEOF | |
2617 | ||
c906108c | 2618 | else |
b4e70030 JB |
2619 | echo "$as_me:$LINENO: result: no" >&5 |
2620 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
2621 | fi |
2622 | rm -f conftest* | |
2623 | ||
c906108c | 2624 | |
b4e70030 JB |
2625 | echo "$as_me:$LINENO: checking for library containing strerror" >&5 |
2626 | echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 | |
bec39cab AC |
2627 | if test "${ac_cv_search_strerror+set}" = set; then |
2628 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 2629 | else |
bec39cab | 2630 | ac_func_search_save_LIBS=$LIBS |
b4e70030 | 2631 | ac_cv_search_strerror=no |
bec39cab AC |
2632 | cat >conftest.$ac_ext <<_ACEOF |
2633 | /* confdefs.h. */ | |
2634 | _ACEOF | |
2635 | cat confdefs.h >>conftest.$ac_ext | |
2636 | cat >>conftest.$ac_ext <<_ACEOF | |
2637 | /* end confdefs.h. */ | |
c906108c | 2638 | |
b4e70030 | 2639 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
2640 | #ifdef __cplusplus |
2641 | extern "C" | |
2642 | #endif | |
b4e70030 JB |
2643 | /* We use char because int might match the return type of a gcc2 |
2644 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
2645 | char strerror (); |
2646 | int | |
2647 | main () | |
2648 | { | |
b4e70030 | 2649 | strerror (); |
bec39cab AC |
2650 | ; |
2651 | return 0; | |
2652 | } | |
2653 | _ACEOF | |
b4e70030 | 2654 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
2655 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
2656 | (eval $ac_link) 2>conftest.er1 | |
2657 | ac_status=$? | |
2658 | grep -v '^ *+' conftest.er1 >conftest.err | |
2659 | rm -f conftest.er1 | |
2660 | cat conftest.err >&5 | |
2661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2662 | (exit $ac_status); } && | |
b4e70030 JB |
2663 | { ac_try='test -z "$ac_c_werror_flag" |
2664 | || test ! -s conftest.err' | |
bec39cab AC |
2665 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2666 | (eval $ac_try) 2>&5 | |
2667 | ac_status=$? | |
2668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2669 | (exit $ac_status); }; } && | |
2670 | { ac_try='test -s conftest$ac_exeext' | |
2671 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2672 | (eval $ac_try) 2>&5 | |
2673 | ac_status=$? | |
2674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2675 | (exit $ac_status); }; }; then | |
b4e70030 | 2676 | ac_cv_search_strerror="none required" |
c906108c | 2677 | else |
bec39cab AC |
2678 | echo "$as_me: failed program was:" >&5 |
2679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
c906108c SS |
2680 | |
2681 | fi | |
bec39cab | 2682 | rm -f conftest.err conftest.$ac_objext \ |
b4e70030 JB |
2683 | conftest$ac_exeext conftest.$ac_ext |
2684 | if test "$ac_cv_search_strerror" = no; then | |
2685 | for ac_lib in cposix; do | |
2686 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
2687 | cat >conftest.$ac_ext <<_ACEOF | |
2688 | /* confdefs.h. */ | |
2689 | _ACEOF | |
2690 | cat confdefs.h >>conftest.$ac_ext | |
2691 | cat >>conftest.$ac_ext <<_ACEOF | |
2692 | /* end confdefs.h. */ | |
2693 | ||
2694 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2695 | #ifdef __cplusplus | |
2696 | extern "C" | |
2697 | #endif | |
2698 | /* We use char because int might match the return type of a gcc2 | |
2699 | builtin and then its argument prototype would still apply. */ | |
2700 | char strerror (); | |
2701 | int | |
2702 | main () | |
2703 | { | |
2704 | strerror (); | |
2705 | ; | |
2706 | return 0; | |
2707 | } | |
2708 | _ACEOF | |
2709 | rm -f conftest.$ac_objext conftest$ac_exeext | |
2710 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2711 | (eval $ac_link) 2>conftest.er1 | |
2712 | ac_status=$? | |
2713 | grep -v '^ *+' conftest.er1 >conftest.err | |
2714 | rm -f conftest.er1 | |
2715 | cat conftest.err >&5 | |
2716 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2717 | (exit $ac_status); } && | |
2718 | { ac_try='test -z "$ac_c_werror_flag" | |
2719 | || test ! -s conftest.err' | |
2720 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2721 | (eval $ac_try) 2>&5 | |
2722 | ac_status=$? | |
2723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2724 | (exit $ac_status); }; } && | |
2725 | { ac_try='test -s conftest$ac_exeext' | |
2726 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2727 | (eval $ac_try) 2>&5 | |
2728 | ac_status=$? | |
2729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2730 | (exit $ac_status); }; }; then | |
2731 | ac_cv_search_strerror="-l$ac_lib" | |
2732 | break | |
4e8d927d | 2733 | else |
b4e70030 JB |
2734 | echo "$as_me: failed program was:" >&5 |
2735 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2736 | ||
2737 | fi | |
2738 | rm -f conftest.err conftest.$ac_objext \ | |
2739 | conftest$ac_exeext conftest.$ac_ext | |
2740 | done | |
c906108c | 2741 | fi |
bec39cab | 2742 | LIBS=$ac_func_search_save_LIBS |
c906108c | 2743 | fi |
b4e70030 JB |
2744 | echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 |
2745 | echo "${ECHO_T}$ac_cv_search_strerror" >&6 | |
2746 | if test "$ac_cv_search_strerror" != no; then | |
2747 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
bec39cab | 2748 | |
c906108c SS |
2749 | fi |
2750 | ||
783e057b DJ |
2751 | if test -n "$ac_tool_prefix"; then |
2752 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
2753 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
2754 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2755 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2756 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
2757 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2758 | else | |
2759 | if test -n "$RANLIB"; then | |
2760 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2761 | else | |
2762 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2763 | for as_dir in $PATH | |
2764 | do | |
2765 | IFS=$as_save_IFS | |
2766 | test -z "$as_dir" && as_dir=. | |
2767 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2768 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2769 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
2770 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2771 | break 2 | |
2772 | fi | |
2773 | done | |
2774 | done | |
c906108c | 2775 | |
783e057b DJ |
2776 | fi |
2777 | fi | |
2778 | RANLIB=$ac_cv_prog_RANLIB | |
2779 | if test -n "$RANLIB"; then | |
2780 | echo "$as_me:$LINENO: result: $RANLIB" >&5 | |
2781 | echo "${ECHO_T}$RANLIB" >&6 | |
2782 | else | |
2783 | echo "$as_me:$LINENO: result: no" >&5 | |
2784 | echo "${ECHO_T}no" >&6 | |
2785 | fi | |
bec39cab | 2786 | |
783e057b DJ |
2787 | fi |
2788 | if test -z "$ac_cv_prog_RANLIB"; then | |
2789 | ac_ct_RANLIB=$RANLIB | |
2790 | # Extract the first word of "ranlib", so it can be a program name with args. | |
2791 | set dummy ranlib; ac_word=$2 | |
2792 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2793 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2794 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
bec39cab | 2795 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
c906108c | 2796 | else |
783e057b DJ |
2797 | if test -n "$ac_ct_RANLIB"; then |
2798 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
2799 | else | |
2800 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2801 | for as_dir in $PATH | |
bec39cab | 2802 | do |
783e057b DJ |
2803 | IFS=$as_save_IFS |
2804 | test -z "$as_dir" && as_dir=. | |
2805 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2806 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2807 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
2808 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2809 | break 2 | |
2810 | fi | |
2811 | done | |
2812 | done | |
2813 | ||
2814 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
2815 | fi | |
2816 | fi | |
2817 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
2818 | if test -n "$ac_ct_RANLIB"; then | |
2819 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
2820 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
2821 | else | |
2822 | echo "$as_me:$LINENO: result: no" >&5 | |
2823 | echo "${ECHO_T}no" >&6 | |
2824 | fi | |
2825 | ||
2826 | RANLIB=$ac_ct_RANLIB | |
2827 | else | |
2828 | RANLIB="$ac_cv_prog_RANLIB" | |
2829 | fi | |
2830 | ||
2831 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
2832 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
2833 | if test "${ac_cv_header_stdc+set}" = set; then | |
2834 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2835 | else | |
bec39cab AC |
2836 | cat >conftest.$ac_ext <<_ACEOF |
2837 | /* confdefs.h. */ | |
2838 | _ACEOF | |
2839 | cat confdefs.h >>conftest.$ac_ext | |
2840 | cat >>conftest.$ac_ext <<_ACEOF | |
2841 | /* end confdefs.h. */ | |
783e057b | 2842 | #include <stdlib.h> |
bec39cab | 2843 | #include <stdarg.h> |
783e057b DJ |
2844 | #include <string.h> |
2845 | #include <float.h> | |
c906108c | 2846 | |
bec39cab AC |
2847 | int |
2848 | main () | |
2849 | { | |
c906108c | 2850 | |
bec39cab AC |
2851 | ; |
2852 | return 0; | |
2853 | } | |
2854 | _ACEOF | |
2855 | rm -f conftest.$ac_objext | |
2856 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2857 | (eval $ac_compile) 2>conftest.er1 | |
2858 | ac_status=$? | |
2859 | grep -v '^ *+' conftest.er1 >conftest.err | |
2860 | rm -f conftest.er1 | |
2861 | cat conftest.err >&5 | |
2862 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2863 | (exit $ac_status); } && | |
b4e70030 JB |
2864 | { ac_try='test -z "$ac_c_werror_flag" |
2865 | || test ! -s conftest.err' | |
bec39cab AC |
2866 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2867 | (eval $ac_try) 2>&5 | |
2868 | ac_status=$? | |
2869 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2870 | (exit $ac_status); }; } && | |
2871 | { ac_try='test -s conftest.$ac_objext' | |
2872 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2873 | (eval $ac_try) 2>&5 | |
2874 | ac_status=$? | |
2875 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2876 | (exit $ac_status); }; }; then | |
783e057b | 2877 | ac_cv_header_stdc=yes |
c906108c | 2878 | else |
bec39cab AC |
2879 | echo "$as_me: failed program was:" >&5 |
2880 | sed 's/^/| /' conftest.$ac_ext >&5 | |
c906108c | 2881 | |
783e057b | 2882 | ac_cv_header_stdc=no |
c906108c | 2883 | fi |
bec39cab | 2884 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 2885 | |
783e057b DJ |
2886 | if test $ac_cv_header_stdc = yes; then |
2887 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2888 | cat >conftest.$ac_ext <<_ACEOF | |
2889 | /* confdefs.h. */ | |
2890 | _ACEOF | |
2891 | cat confdefs.h >>conftest.$ac_ext | |
2892 | cat >>conftest.$ac_ext <<_ACEOF | |
2893 | /* end confdefs.h. */ | |
2894 | #include <string.h> | |
c906108c | 2895 | |
783e057b DJ |
2896 | _ACEOF |
2897 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2898 | $EGREP "memchr" >/dev/null 2>&1; then | |
2899 | : | |
c906108c | 2900 | else |
783e057b | 2901 | ac_cv_header_stdc=no |
c906108c | 2902 | fi |
783e057b | 2903 | rm -f conftest* |
c906108c SS |
2904 | |
2905 | fi | |
2906 | ||
783e057b DJ |
2907 | if test $ac_cv_header_stdc = yes; then |
2908 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2909 | cat >conftest.$ac_ext <<_ACEOF | |
2910 | /* confdefs.h. */ | |
2911 | _ACEOF | |
2912 | cat confdefs.h >>conftest.$ac_ext | |
2913 | cat >>conftest.$ac_ext <<_ACEOF | |
2914 | /* end confdefs.h. */ | |
2915 | #include <stdlib.h> | |
bec39cab | 2916 | |
783e057b DJ |
2917 | _ACEOF |
2918 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2919 | $EGREP "free" >/dev/null 2>&1; then | |
2920 | : | |
bec39cab | 2921 | else |
783e057b | 2922 | ac_cv_header_stdc=no |
bec39cab | 2923 | fi |
783e057b | 2924 | rm -f conftest* |
bec39cab AC |
2925 | |
2926 | fi | |
bec39cab | 2927 | |
783e057b DJ |
2928 | if test $ac_cv_header_stdc = yes; then |
2929 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
2930 | if test "$cross_compiling" = yes; then | |
2931 | : | |
bec39cab | 2932 | else |
783e057b DJ |
2933 | cat >conftest.$ac_ext <<_ACEOF |
2934 | /* confdefs.h. */ | |
2935 | _ACEOF | |
2936 | cat confdefs.h >>conftest.$ac_ext | |
2937 | cat >>conftest.$ac_ext <<_ACEOF | |
2938 | /* end confdefs.h. */ | |
2939 | #include <ctype.h> | |
2940 | #if ((' ' & 0x0FF) == 0x020) | |
2941 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
2942 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
2943 | #else | |
2944 | # define ISLOWER(c) \ | |
2945 | (('a' <= (c) && (c) <= 'i') \ | |
2946 | || ('j' <= (c) && (c) <= 'r') \ | |
2947 | || ('s' <= (c) && (c) <= 'z')) | |
2948 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
2949 | #endif | |
2950 | ||
2951 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
2952 | int | |
2953 | main () | |
2954 | { | |
2955 | int i; | |
2956 | for (i = 0; i < 256; i++) | |
2957 | if (XOR (islower (i), ISLOWER (i)) | |
2958 | || toupper (i) != TOUPPER (i)) | |
2959 | exit(2); | |
2960 | exit (0); | |
2961 | } | |
2962 | _ACEOF | |
2963 | rm -f conftest$ac_exeext | |
2964 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2965 | (eval $ac_link) 2>&5 | |
2966 | ac_status=$? | |
2967 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2968 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
2969 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2970 | (eval $ac_try) 2>&5 | |
2971 | ac_status=$? | |
2972 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2973 | (exit $ac_status); }; }; then | |
2974 | : | |
2975 | else | |
2976 | echo "$as_me: program exited with status $ac_status" >&5 | |
2977 | echo "$as_me: failed program was:" >&5 | |
2978 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2979 | ||
2980 | ( exit $ac_status ) | |
2981 | ac_cv_header_stdc=no | |
2982 | fi | |
2983 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
2984 | fi | |
2985 | fi | |
2986 | fi | |
2987 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
2988 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
2989 | if test $ac_cv_header_stdc = yes; then | |
2990 | ||
2991 | cat >>confdefs.h <<\_ACEOF | |
2992 | #define STDC_HEADERS 1 | |
2993 | _ACEOF | |
2994 | ||
2995 | fi | |
2996 | ||
2997 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
2998 | ||
2999 | ||
3000 | ||
3001 | ||
3002 | ||
3003 | ||
3004 | ||
3005 | ||
3006 | ||
3007 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3008 | inttypes.h stdint.h unistd.h | |
3009 | do | |
3010 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3011 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3012 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3013 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3014 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3015 | else | |
3016 | cat >conftest.$ac_ext <<_ACEOF | |
3017 | /* confdefs.h. */ | |
3018 | _ACEOF | |
3019 | cat confdefs.h >>conftest.$ac_ext | |
3020 | cat >>conftest.$ac_ext <<_ACEOF | |
3021 | /* end confdefs.h. */ | |
3022 | $ac_includes_default | |
3023 | ||
3024 | #include <$ac_header> | |
3025 | _ACEOF | |
3026 | rm -f conftest.$ac_objext | |
3027 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3028 | (eval $ac_compile) 2>conftest.er1 | |
3029 | ac_status=$? | |
3030 | grep -v '^ *+' conftest.er1 >conftest.err | |
3031 | rm -f conftest.er1 | |
3032 | cat conftest.err >&5 | |
3033 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3034 | (exit $ac_status); } && | |
3035 | { ac_try='test -z "$ac_c_werror_flag" | |
3036 | || test ! -s conftest.err' | |
3037 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3038 | (eval $ac_try) 2>&5 | |
3039 | ac_status=$? | |
3040 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3041 | (exit $ac_status); }; } && | |
3042 | { ac_try='test -s conftest.$ac_objext' | |
3043 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3044 | (eval $ac_try) 2>&5 | |
3045 | ac_status=$? | |
3046 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3047 | (exit $ac_status); }; }; then | |
3048 | eval "$as_ac_Header=yes" | |
3049 | else | |
3050 | echo "$as_me: failed program was:" >&5 | |
3051 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3052 | ||
3053 | eval "$as_ac_Header=no" | |
3054 | fi | |
3055 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3056 | fi | |
3057 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3058 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3059 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3060 | cat >>confdefs.h <<_ACEOF | |
3061 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3062 | _ACEOF | |
3063 | ||
3064 | fi | |
3065 | ||
3066 | done | |
3067 | ||
3068 | ||
3069 | ||
3070 | if test "${ac_cv_header_minix_config_h+set}" = set; then | |
3071 | echo "$as_me:$LINENO: checking for minix/config.h" >&5 | |
3072 | echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 | |
3073 | if test "${ac_cv_header_minix_config_h+set}" = set; then | |
3074 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3075 | fi | |
3076 | echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 | |
3077 | echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 | |
3078 | else | |
3079 | # Is the header compilable? | |
3080 | echo "$as_me:$LINENO: checking minix/config.h usability" >&5 | |
3081 | echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6 | |
3082 | cat >conftest.$ac_ext <<_ACEOF | |
3083 | /* confdefs.h. */ | |
3084 | _ACEOF | |
3085 | cat confdefs.h >>conftest.$ac_ext | |
3086 | cat >>conftest.$ac_ext <<_ACEOF | |
3087 | /* end confdefs.h. */ | |
3088 | $ac_includes_default | |
3089 | #include <minix/config.h> | |
3090 | _ACEOF | |
3091 | rm -f conftest.$ac_objext | |
3092 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3093 | (eval $ac_compile) 2>conftest.er1 | |
3094 | ac_status=$? | |
3095 | grep -v '^ *+' conftest.er1 >conftest.err | |
3096 | rm -f conftest.er1 | |
3097 | cat conftest.err >&5 | |
3098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3099 | (exit $ac_status); } && | |
3100 | { ac_try='test -z "$ac_c_werror_flag" | |
3101 | || test ! -s conftest.err' | |
3102 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3103 | (eval $ac_try) 2>&5 | |
3104 | ac_status=$? | |
3105 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3106 | (exit $ac_status); }; } && | |
3107 | { ac_try='test -s conftest.$ac_objext' | |
3108 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3109 | (eval $ac_try) 2>&5 | |
3110 | ac_status=$? | |
3111 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3112 | (exit $ac_status); }; }; then | |
3113 | ac_header_compiler=yes | |
3114 | else | |
3115 | echo "$as_me: failed program was:" >&5 | |
3116 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3117 | ||
3118 | ac_header_compiler=no | |
3119 | fi | |
3120 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3121 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
3122 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
3123 | ||
3124 | # Is the header present? | |
3125 | echo "$as_me:$LINENO: checking minix/config.h presence" >&5 | |
3126 | echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6 | |
3127 | cat >conftest.$ac_ext <<_ACEOF | |
3128 | /* confdefs.h. */ | |
3129 | _ACEOF | |
3130 | cat confdefs.h >>conftest.$ac_ext | |
3131 | cat >>conftest.$ac_ext <<_ACEOF | |
3132 | /* end confdefs.h. */ | |
3133 | #include <minix/config.h> | |
3134 | _ACEOF | |
3135 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3136 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3137 | ac_status=$? | |
3138 | grep -v '^ *+' conftest.er1 >conftest.err | |
3139 | rm -f conftest.er1 | |
3140 | cat conftest.err >&5 | |
3141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3142 | (exit $ac_status); } >/dev/null; then | |
3143 | if test -s conftest.err; then | |
3144 | ac_cpp_err=$ac_c_preproc_warn_flag | |
3145 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3146 | else | |
3147 | ac_cpp_err= | |
3148 | fi | |
3149 | else | |
3150 | ac_cpp_err=yes | |
3151 | fi | |
3152 | if test -z "$ac_cpp_err"; then | |
3153 | ac_header_preproc=yes | |
3154 | else | |
3155 | echo "$as_me: failed program was:" >&5 | |
3156 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3157 | ||
3158 | ac_header_preproc=no | |
3159 | fi | |
3160 | rm -f conftest.err conftest.$ac_ext | |
3161 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
3162 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
3163 | ||
3164 | # So? What about this header? | |
3165 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
3166 | yes:no: ) | |
3167 | { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 | |
3168 | echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
3169 | { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 | |
3170 | echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} | |
3171 | ac_header_preproc=yes | |
3172 | ;; | |
3173 | no:yes:* ) | |
3174 | { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 | |
3175 | echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} | |
3176 | { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 | |
3177 | echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} | |
3178 | { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 | |
3179 | echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} | |
3180 | { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 | |
3181 | echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
3182 | { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 | |
3183 | echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} | |
3184 | { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 | |
3185 | echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} | |
3186 | ( | |
3187 | cat <<\_ASBOX | |
3188 | ## ------------------------------------------ ## | |
3189 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
3190 | ## ------------------------------------------ ## | |
3191 | _ASBOX | |
3192 | ) | | |
3193 | sed "s/^/$as_me: WARNING: /" >&2 | |
3194 | ;; | |
3195 | esac | |
3196 | echo "$as_me:$LINENO: checking for minix/config.h" >&5 | |
3197 | echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 | |
3198 | if test "${ac_cv_header_minix_config_h+set}" = set; then | |
3199 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3200 | else | |
3201 | ac_cv_header_minix_config_h=$ac_header_preproc | |
3202 | fi | |
3203 | echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 | |
3204 | echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 | |
3205 | ||
3206 | fi | |
3207 | if test $ac_cv_header_minix_config_h = yes; then | |
3208 | MINIX=yes | |
3209 | else | |
3210 | MINIX= | |
3211 | fi | |
3212 | ||
3213 | ||
3214 | if test "$MINIX" = yes; then | |
3215 | ||
3216 | cat >>confdefs.h <<\_ACEOF | |
3217 | #define _POSIX_SOURCE 1 | |
3218 | _ACEOF | |
3219 | ||
3220 | ||
3221 | cat >>confdefs.h <<\_ACEOF | |
3222 | #define _POSIX_1_SOURCE 2 | |
3223 | _ACEOF | |
3224 | ||
3225 | ||
3226 | cat >>confdefs.h <<\_ACEOF | |
3227 | #define _MINIX 1 | |
3228 | _ACEOF | |
3229 | ||
3230 | fi | |
3231 | ||
3232 | ||
3233 | ||
3234 | echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 | |
3235 | echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6 | |
3236 | if test "${ac_cv_safe_to_define___extensions__+set}" = set; then | |
3237 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3238 | else | |
3239 | cat >conftest.$ac_ext <<_ACEOF | |
3240 | /* confdefs.h. */ | |
3241 | _ACEOF | |
3242 | cat confdefs.h >>conftest.$ac_ext | |
3243 | cat >>conftest.$ac_ext <<_ACEOF | |
3244 | /* end confdefs.h. */ | |
3245 | ||
3246 | # define __EXTENSIONS__ 1 | |
3247 | $ac_includes_default | |
3248 | int | |
3249 | main () | |
3250 | { | |
3251 | ||
3252 | ; | |
3253 | return 0; | |
3254 | } | |
3255 | _ACEOF | |
3256 | rm -f conftest.$ac_objext | |
3257 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3258 | (eval $ac_compile) 2>conftest.er1 | |
3259 | ac_status=$? | |
3260 | grep -v '^ *+' conftest.er1 >conftest.err | |
3261 | rm -f conftest.er1 | |
3262 | cat conftest.err >&5 | |
3263 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3264 | (exit $ac_status); } && | |
3265 | { ac_try='test -z "$ac_c_werror_flag" | |
3266 | || test ! -s conftest.err' | |
3267 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3268 | (eval $ac_try) 2>&5 | |
3269 | ac_status=$? | |
3270 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3271 | (exit $ac_status); }; } && | |
3272 | { ac_try='test -s conftest.$ac_objext' | |
3273 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3274 | (eval $ac_try) 2>&5 | |
3275 | ac_status=$? | |
3276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3277 | (exit $ac_status); }; }; then | |
3278 | ac_cv_safe_to_define___extensions__=yes | |
3279 | else | |
3280 | echo "$as_me: failed program was:" >&5 | |
3281 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3282 | ||
3283 | ac_cv_safe_to_define___extensions__=no | |
3284 | fi | |
3285 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3286 | fi | |
3287 | echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 | |
3288 | echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6 | |
3289 | test $ac_cv_safe_to_define___extensions__ = yes && | |
3290 | cat >>confdefs.h <<\_ACEOF | |
3291 | #define __EXTENSIONS__ 1 | |
3292 | _ACEOF | |
3293 | ||
3294 | cat >>confdefs.h <<\_ACEOF | |
3295 | #define _ALL_SOURCE 1 | |
3296 | _ACEOF | |
3297 | ||
3298 | cat >>confdefs.h <<\_ACEOF | |
3299 | #define _GNU_SOURCE 1 | |
3300 | _ACEOF | |
3301 | ||
3302 | cat >>confdefs.h <<\_ACEOF | |
3303 | #define _POSIX_PTHREAD_SEMANTICS 1 | |
3304 | _ACEOF | |
3305 | ||
3306 | cat >>confdefs.h <<\_ACEOF | |
3307 | #define _TANDEM_SOURCE 1 | |
3308 | _ACEOF | |
3309 | ||
3310 | ||
3311 | ||
3312 | ||
3313 | ||
3314 | ||
3315 | ||
3316 | ||
3317 | ||
3318 | ||
3319 | echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 | |
3320 | echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 | |
3321 | if test "${am_cv_prog_cc_stdc+set}" = set; then | |
3322 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3323 | else | |
3324 | am_cv_prog_cc_stdc=no | |
3325 | ac_save_CC="$CC" | |
3326 | # Don't try gcc -ansi; that turns off useful extensions and | |
3327 | # breaks some systems' header files. | |
3328 | # AIX -qlanglvl=ansi | |
3329 | # Ultrix and OSF/1 -std1 | |
3330 | # HP-UX 10.20 and later -Ae | |
3331 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
3332 | # SVR4 -Xc -D__EXTENSIONS__ | |
3333 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
3334 | do | |
3335 | CC="$ac_save_CC $ac_arg" | |
3336 | cat >conftest.$ac_ext <<_ACEOF | |
3337 | /* confdefs.h. */ | |
3338 | _ACEOF | |
3339 | cat confdefs.h >>conftest.$ac_ext | |
3340 | cat >>conftest.$ac_ext <<_ACEOF | |
3341 | /* end confdefs.h. */ | |
3342 | #include <stdarg.h> | |
3343 | #include <stdio.h> | |
3344 | #include <sys/types.h> | |
3345 | #include <sys/stat.h> | |
3346 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3347 | struct buf { int x; }; | |
3348 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3349 | static char *e (p, i) | |
3350 | char **p; | |
3351 | int i; | |
3352 | { | |
3353 | return p[i]; | |
3354 | } | |
3355 | static char *f (char * (*g) (char **, int), char **p, ...) | |
3356 | { | |
3357 | char *s; | |
3358 | va_list v; | |
3359 | va_start (v,p); | |
3360 | s = g (p, va_arg (v,int)); | |
3361 | va_end (v); | |
3362 | return s; | |
3363 | } | |
3364 | int test (int i, double x); | |
3365 | struct s1 {int (*f) (int a);}; | |
3366 | struct s2 {int (*f) (double a);}; | |
3367 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3368 | int argc; | |
3369 | char **argv; | |
3370 | ||
3371 | int | |
3372 | main () | |
3373 | { | |
3374 | ||
3375 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3376 | ||
3377 | ; | |
3378 | return 0; | |
3379 | } | |
3380 | _ACEOF | |
3381 | rm -f conftest.$ac_objext | |
3382 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3383 | (eval $ac_compile) 2>conftest.er1 | |
3384 | ac_status=$? | |
3385 | grep -v '^ *+' conftest.er1 >conftest.err | |
3386 | rm -f conftest.er1 | |
3387 | cat conftest.err >&5 | |
3388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3389 | (exit $ac_status); } && | |
3390 | { ac_try='test -z "$ac_c_werror_flag" | |
3391 | || test ! -s conftest.err' | |
3392 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3393 | (eval $ac_try) 2>&5 | |
3394 | ac_status=$? | |
3395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3396 | (exit $ac_status); }; } && | |
3397 | { ac_try='test -s conftest.$ac_objext' | |
3398 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3399 | (eval $ac_try) 2>&5 | |
3400 | ac_status=$? | |
3401 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3402 | (exit $ac_status); }; }; then | |
3403 | am_cv_prog_cc_stdc="$ac_arg"; break | |
3404 | else | |
3405 | echo "$as_me: failed program was:" >&5 | |
3406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3407 | ||
3408 | fi | |
3409 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3410 | done | |
3411 | CC="$ac_save_CC" | |
3412 | ||
3413 | fi | |
3414 | ||
3415 | if test -z "$am_cv_prog_cc_stdc"; then | |
3416 | echo "$as_me:$LINENO: result: none needed" >&5 | |
3417 | echo "${ECHO_T}none needed" >&6 | |
3418 | else | |
3419 | echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 | |
3420 | echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 | |
3421 | fi | |
3422 | case "x$am_cv_prog_cc_stdc" in | |
3423 | x|xno) ;; | |
3424 | *) CC="$CC $am_cv_prog_cc_stdc" ;; | |
3425 | esac | |
3426 | ||
3427 | ||
3428 | ac_aux_dir= | |
3429 | for ac_dir in .. $srcdir/..; do | |
3430 | if test -f $ac_dir/install-sh; then | |
3431 | ac_aux_dir=$ac_dir | |
3432 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
3433 | break | |
3434 | elif test -f $ac_dir/install.sh; then | |
3435 | ac_aux_dir=$ac_dir | |
3436 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
3437 | break | |
3438 | elif test -f $ac_dir/shtool; then | |
3439 | ac_aux_dir=$ac_dir | |
3440 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
3441 | break | |
3442 | fi | |
3443 | done | |
3444 | if test -z "$ac_aux_dir"; then | |
3445 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in .. $srcdir/.." >&5 | |
3446 | echo "$as_me: error: cannot find install-sh or install.sh in .. $srcdir/.." >&2;} | |
3447 | { (exit 1); exit 1; }; } | |
3448 | fi | |
3449 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
3450 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
3451 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
3452 | ||
3453 | # Make sure we can run config.sub. | |
3454 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
3455 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
3456 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
3457 | { (exit 1); exit 1; }; } | |
3458 | ||
3459 | echo "$as_me:$LINENO: checking build system type" >&5 | |
3460 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
3461 | if test "${ac_cv_build+set}" = set; then | |
3462 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3463 | else | |
3464 | ac_cv_build_alias=$build_alias | |
3465 | test -z "$ac_cv_build_alias" && | |
3466 | ac_cv_build_alias=`$ac_config_guess` | |
3467 | test -z "$ac_cv_build_alias" && | |
3468 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
3469 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
3470 | { (exit 1); exit 1; }; } | |
3471 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
3472 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
3473 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
3474 | { (exit 1); exit 1; }; } | |
3475 | ||
3476 | fi | |
3477 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
3478 | echo "${ECHO_T}$ac_cv_build" >&6 | |
3479 | build=$ac_cv_build | |
3480 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
3481 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3482 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
3483 | ||
3484 | ||
3485 | echo "$as_me:$LINENO: checking host system type" >&5 | |
3486 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
3487 | if test "${ac_cv_host+set}" = set; then | |
3488 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3489 | else | |
3490 | ac_cv_host_alias=$host_alias | |
3491 | test -z "$ac_cv_host_alias" && | |
3492 | ac_cv_host_alias=$ac_cv_build_alias | |
3493 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
3494 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
3495 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
3496 | { (exit 1); exit 1; }; } | |
3497 | ||
3498 | fi | |
3499 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
3500 | echo "${ECHO_T}$ac_cv_host" >&6 | |
3501 | host=$ac_cv_host | |
3502 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
3503 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3504 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
3505 | ||
3506 | ||
3507 | echo "$as_me:$LINENO: checking target system type" >&5 | |
3508 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
3509 | if test "${ac_cv_target+set}" = set; then | |
3510 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3511 | else | |
3512 | ac_cv_target_alias=$target_alias | |
3513 | test "x$ac_cv_target_alias" = "x" && | |
b4e70030 JB |
3514 | ac_cv_target_alias=$ac_cv_host_alias |
3515 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
3516 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
3517 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
bec39cab AC |
3518 | { (exit 1); exit 1; }; } |
3519 | ||
3520 | fi | |
783e057b DJ |
3521 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 |
3522 | echo "${ECHO_T}$ac_cv_target" >&6 | |
3523 | target=$ac_cv_target | |
3524 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
3525 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3526 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
3527 | ||
3528 | ||
3529 | # The aliases save the names the user supplied, while $host etc. | |
3530 | # will get canonicalized. | |
3531 | test -n "$target_alias" && | |
3532 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
3533 | NONENONEs,x,x, && | |
3534 | program_prefix=${target_alias}- | |
3535 | ||
a417dc56 RW |
3536 | # Dependency checking. |
3537 | rm -rf .tst 2>/dev/null | |
3538 | mkdir .tst 2>/dev/null | |
3539 | if test -d .tst; then | |
3540 | am__leading_dot=. | |
3541 | else | |
3542 | am__leading_dot=_ | |
3543 | fi | |
3544 | rmdir .tst 2>/dev/null | |
3545 | ||
3546 | DEPDIR="${am__leading_dot}deps" | |
3547 | ||
3548 | ac_config_commands="$ac_config_commands depdir" | |
3549 | ||
3550 | ||
3551 | depcc="$CC" am_compiler_list= | |
3552 | ||
3553 | am_depcomp=$ac_aux_dir/depcomp | |
3554 | echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 | |
3555 | echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 | |
3556 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then | |
3557 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3558 | else | |
3559 | if test -f "$am_depcomp"; then | |
3560 | # We make a subdir and do the tests there. Otherwise we can end up | |
3561 | # making bogus files that we don't know about and never remove. For | |
3562 | # instance it was reported that on HP-UX the gcc test will end up | |
3563 | # making a dummy file named `D' -- because `-MD' means `put the output | |
3564 | # in D'. | |
3565 | mkdir conftest.dir | |
3566 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
3567 | # using a relative directory. | |
3568 | cp "$am_depcomp" conftest.dir | |
3569 | cd conftest.dir | |
3570 | # We will build objects and dependencies in a subdirectory because | |
3571 | # it helps to detect inapplicable dependency modes. For instance | |
3572 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
3573 | # side effect of compilation, but ICC will put the dependencies in | |
3574 | # the current directory while Tru64 will put them in the object | |
3575 | # directory. | |
3576 | mkdir sub | |
3577 | ||
3578 | am_cv_CC_dependencies_compiler_type=none | |
3579 | if test "$am_compiler_list" = ""; then | |
3580 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
3581 | fi | |
3582 | for depmode in $am_compiler_list; do | |
3583 | if test $depmode = none; then break; fi | |
3584 | ||
3585 | echo "$as_me:$LINENO: trying $depmode" >&5 | |
3586 | # Setup a source with many dependencies, because some compilers | |
3587 | # like to wrap large dependency lists on column 80 (with \), and | |
3588 | # we should not choose a depcomp mode which is confused by this. | |
3589 | # | |
3590 | # We need to recreate these files for each test, as the compiler may | |
3591 | # overwrite some of them when testing with obscure command lines. | |
3592 | # This happens at least with the AIX C compiler. | |
3593 | : > sub/conftest.c | |
3594 | for i in 1 2 3 4 5 6; do | |
3595 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
3596 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
3597 | # Solaris 8's {/usr,}/bin/sh. | |
3598 | touch sub/conftst$i.h | |
3599 | done | |
3600 | echo "include sub/conftest.Po" > confmf | |
3601 | ||
3602 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
3603 | # mode. It turns out that the SunPro C++ compiler does not properly | |
3604 | # handle `-M -o', and we need to detect this. | |
3605 | depcmd="depmode=$depmode \ | |
3606 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
3607 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
3608 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" | |
3609 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 | |
3610 | if env $depcmd > conftest.err 2>&1 && | |
3611 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && | |
3612 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && | |
3613 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then | |
3614 | # icc doesn't choke on unknown options, it will just issue warnings | |
3615 | # or remarks (even with -Werror). So we grep stderr for any message | |
3616 | # that says an option was ignored or not supported. | |
3617 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
3618 | # icc: Command line warning: ignoring option '-M'; no argument required | |
3619 | # The diagnosis changed in icc 8.0: | |
3620 | # icc: Command line remark: option '-MP' not supported | |
3621 | if (grep 'ignoring option' conftest.err || | |
3622 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
3623 | am_cv_CC_dependencies_compiler_type=$depmode | |
3624 | echo "$as_me:$LINENO: success" >&5 | |
3625 | break | |
3626 | fi | |
3627 | fi | |
3628 | echo "$as_me:$LINENO: failure, diagnostics are:" >&5 | |
3629 | sed -e 's/^/| /' < conftest.err >&5 | |
3630 | done | |
3631 | ||
3632 | cd .. | |
3633 | rm -rf conftest.dir | |
3634 | else | |
3635 | am_cv_CC_dependencies_compiler_type=none | |
3636 | fi | |
3637 | ||
3638 | fi | |
3639 | echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
3640 | echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 | |
3641 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone | |
3642 | then { { echo "$as_me:$LINENO: error: no usable dependency style found" >&5 | |
3643 | echo "$as_me: error: no usable dependency style found" >&2;} | |
3644 | { (exit 1); exit 1; }; } | |
3645 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
3646 | ||
3647 | fi | |
3648 | ||
3649 | ||
3650 | # Check for the 'make' the user wants to use. | |
3651 | for ac_prog in make | |
3652 | do | |
3653 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3654 | set dummy $ac_prog; ac_word=$2 | |
3655 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3656 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3657 | if test "${ac_cv_prog_MAKE+set}" = set; then | |
3658 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3659 | else | |
3660 | if test -n "$MAKE"; then | |
3661 | ac_cv_prog_MAKE="$MAKE" # Let the user override the test. | |
3662 | else | |
3663 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3664 | for as_dir in $PATH | |
3665 | do | |
3666 | IFS=$as_save_IFS | |
3667 | test -z "$as_dir" && as_dir=. | |
3668 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3669 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3670 | ac_cv_prog_MAKE="$ac_prog" | |
3671 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3672 | break 2 | |
3673 | fi | |
3674 | done | |
3675 | done | |
3676 | ||
3677 | fi | |
3678 | fi | |
3679 | MAKE=$ac_cv_prog_MAKE | |
3680 | if test -n "$MAKE"; then | |
3681 | echo "$as_me:$LINENO: result: $MAKE" >&5 | |
3682 | echo "${ECHO_T}$MAKE" >&6 | |
3683 | else | |
3684 | echo "$as_me:$LINENO: result: no" >&5 | |
3685 | echo "${ECHO_T}no" >&6 | |
3686 | fi | |
3687 | ||
3688 | test -n "$MAKE" && break | |
3689 | done | |
3690 | ||
3691 | MAKE_IS_GNU= | |
3692 | case "`$MAKE --version 2>&1 | sed 1q`" in | |
3693 | *GNU*) | |
3694 | MAKE_IS_GNU=yes | |
3695 | ;; | |
3696 | esac | |
3697 | ||
3698 | ||
3699 | if test "$MAKE_IS_GNU" = yes; then | |
3700 | GMAKE_TRUE= | |
3701 | GMAKE_FALSE='#' | |
3702 | else | |
3703 | GMAKE_TRUE='#' | |
3704 | GMAKE_FALSE= | |
3705 | fi | |
3706 | ||
3707 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
3708 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
3709 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` | |
3710 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then | |
3711 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3712 | else | |
3713 | cat >conftest.make <<\_ACEOF | |
3714 | all: | |
3715 | @echo 'ac_maketemp="$(MAKE)"' | |
3716 | _ACEOF | |
3717 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
3718 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` | |
3719 | if test -n "$ac_maketemp"; then | |
3720 | eval ac_cv_prog_make_${ac_make}_set=yes | |
3721 | else | |
3722 | eval ac_cv_prog_make_${ac_make}_set=no | |
3723 | fi | |
3724 | rm -f conftest.make | |
3725 | fi | |
3726 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
3727 | echo "$as_me:$LINENO: result: yes" >&5 | |
3728 | echo "${ECHO_T}yes" >&6 | |
3729 | SET_MAKE= | |
3730 | else | |
3731 | echo "$as_me:$LINENO: result: no" >&5 | |
3732 | echo "${ECHO_T}no" >&6 | |
3733 | SET_MAKE="MAKE=${MAKE-make}" | |
3734 | fi | |
3735 | ||
3736 | ||
783e057b DJ |
3737 | |
3738 | CONFIG_OBS= | |
3739 | CONFIG_DEPS= | |
3740 | CONFIG_SRCS= | |
3741 | ENABLE_CFLAGS= | |
3742 | ||
3743 | CONFIG_ALL= | |
3744 | CONFIG_CLEAN= | |
3745 | CONFIG_INSTALL= | |
3746 | CONFIG_UNINSTALL= | |
3747 | ||
3748 | # If we haven't got the data from the intl directory, | |
3749 | # assume NLS is disabled. | |
3750 | USE_NLS=no | |
3751 | LIBINTL= | |
3752 | LIBINTL_DEP= | |
3753 | INCINTL= | |
3754 | XGETTEXT= | |
3755 | GMSGFMT= | |
3756 | POSUB= | |
3757 | ||
3758 | if test -f ../intl/config.intl; then | |
3759 | . ../intl/config.intl | |
3760 | fi | |
3761 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 | |
3762 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
3763 | if test x"$USE_NLS" != xyes; then | |
3764 | echo "$as_me:$LINENO: result: no" >&5 | |
3765 | echo "${ECHO_T}no" >&6 | |
3766 | else | |
3767 | echo "$as_me:$LINENO: result: yes" >&5 | |
3768 | echo "${ECHO_T}yes" >&6 | |
3769 | ||
3770 | cat >>confdefs.h <<\_ACEOF | |
3771 | #define ENABLE_NLS 1 | |
3772 | _ACEOF | |
3773 | ||
3774 | ||
3775 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 | |
3776 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
3777 | # Look for .po and .gmo files in the source directory. | |
3778 | CATALOGS= | |
3779 | XLINGUAS= | |
3780 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
3781 | # If there aren't any .gmo files the shell will give us the | |
3782 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
3783 | # weeded out. | |
3784 | case "$cat" in *\**) | |
3785 | continue;; | |
3786 | esac | |
3787 | # The quadruple backslash is collapsed to a double backslash | |
3788 | # by the backticks, then collapsed again by the double quotes, | |
3789 | # leaving us with one backslash in the sed expression (right | |
3790 | # before the dot that mustn't act as a wildcard). | |
3791 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
3792 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
3793 | # The user is allowed to set LINGUAS to a list of languages to | |
3794 | # install catalogs for. If it's empty that means "all of them." | |
3795 | if test "x$LINGUAS" = x; then | |
3796 | CATALOGS="$CATALOGS $cat" | |
3797 | XLINGUAS="$XLINGUAS $lang" | |
3798 | else | |
3799 | case "$LINGUAS" in *$lang*) | |
3800 | CATALOGS="$CATALOGS $cat" | |
3801 | XLINGUAS="$XLINGUAS $lang" | |
3802 | ;; | |
3803 | esac | |
3804 | fi | |
3805 | done | |
3806 | LINGUAS="$XLINGUAS" | |
3807 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 | |
3808 | echo "${ECHO_T}$LINGUAS" >&6 | |
3809 | ||
3810 | ||
3811 | DATADIRNAME=share | |
3812 | ||
3813 | INSTOBJEXT=.mo | |
3814 | ||
3815 | GENCAT=gencat | |
3816 | ||
3817 | CATOBJEXT=.gmo | |
3818 | ||
3819 | fi | |
3820 | ||
3821 | localedir='${datadir}/locale' | |
3822 | ||
3823 | ||
3824 | if test x"$USE_NLS" = xyes; then | |
3825 | CONFIG_ALL="$CONFIG_ALL all-po" | |
3826 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" | |
3827 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" | |
3828 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" | |
3829 | fi | |
3830 | ||
3831 | ||
3832 | GNULIB_MEMMEM=0; | |
3833 | GNULIB_MEMPCPY=0; | |
3834 | GNULIB_MEMRCHR=0; | |
3835 | GNULIB_STPCPY=0; | |
3836 | GNULIB_STPNCPY=0; | |
3837 | GNULIB_STRCHRNUL=0; | |
3838 | GNULIB_STRDUP=0; | |
3839 | GNULIB_STRNDUP=0; | |
3840 | GNULIB_STRNLEN=0; | |
3841 | GNULIB_STRPBRK=0; | |
3842 | GNULIB_STRSEP=0; | |
3843 | GNULIB_STRSTR=0; | |
3844 | GNULIB_STRCASESTR=0; | |
3845 | GNULIB_STRTOK_R=0; | |
3846 | GNULIB_MBSLEN=0; | |
3847 | GNULIB_MBSNLEN=0; | |
3848 | GNULIB_MBSCHR=0; | |
3849 | GNULIB_MBSRCHR=0; | |
3850 | GNULIB_MBSSTR=0; | |
3851 | GNULIB_MBSCASECMP=0; | |
3852 | GNULIB_MBSNCASECMP=0; | |
3853 | GNULIB_MBSPCASECMP=0; | |
3854 | GNULIB_MBSCASESTR=0; | |
3855 | GNULIB_MBSCSPN=0; | |
3856 | GNULIB_MBSPBRK=0; | |
3857 | GNULIB_MBSSPN=0; | |
3858 | GNULIB_MBSSEP=0; | |
3859 | GNULIB_MBSTOK_R=0; | |
3860 | GNULIB_STRERROR=0; | |
3861 | GNULIB_STRSIGNAL=0; | |
3862 | HAVE_DECL_MEMMEM=1; | |
3863 | HAVE_MEMPCPY=1; | |
3864 | HAVE_DECL_MEMRCHR=1; | |
3865 | HAVE_STPCPY=1; | |
3866 | HAVE_STPNCPY=1; | |
3867 | HAVE_STRCHRNUL=1; | |
3868 | HAVE_DECL_STRDUP=1; | |
3869 | HAVE_STRNDUP=1; | |
3870 | HAVE_DECL_STRNDUP=1; | |
3871 | HAVE_DECL_STRNLEN=1; | |
3872 | HAVE_STRPBRK=1; | |
3873 | HAVE_STRSEP=1; | |
3874 | HAVE_STRCASESTR=1; | |
3875 | HAVE_DECL_STRTOK_R=1; | |
3876 | HAVE_DECL_STRERROR=1; | |
3877 | HAVE_DECL_STRSIGNAL=1; | |
3878 | REPLACE_STRERROR=0; | |
3879 | REPLACE_STRSIGNAL=0; | |
3880 | REPLACE_MEMMEM=0; | |
3881 | REPLACE_STRCASESTR=0; | |
3882 | REPLACE_STRSTR=0; | |
3883 | ||
3884 | ||
3885 | echo "$as_me:$LINENO: checking whether memmem is declared" >&5 | |
3886 | echo $ECHO_N "checking whether memmem is declared... $ECHO_C" >&6 | |
3887 | if test "${ac_cv_have_decl_memmem+set}" = set; then | |
3888 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3889 | else | |
3890 | cat >conftest.$ac_ext <<_ACEOF | |
3891 | /* confdefs.h. */ | |
3892 | _ACEOF | |
3893 | cat confdefs.h >>conftest.$ac_ext | |
3894 | cat >>conftest.$ac_ext <<_ACEOF | |
3895 | /* end confdefs.h. */ | |
3896 | $ac_includes_default | |
3897 | int | |
3898 | main () | |
3899 | { | |
3900 | #ifndef memmem | |
3901 | char *p = (char *) memmem; | |
3902 | #endif | |
3903 | ||
3904 | ; | |
3905 | return 0; | |
3906 | } | |
3907 | _ACEOF | |
3908 | rm -f conftest.$ac_objext | |
3909 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3910 | (eval $ac_compile) 2>conftest.er1 | |
3911 | ac_status=$? | |
3912 | grep -v '^ *+' conftest.er1 >conftest.err | |
3913 | rm -f conftest.er1 | |
3914 | cat conftest.err >&5 | |
3915 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3916 | (exit $ac_status); } && | |
3917 | { ac_try='test -z "$ac_c_werror_flag" | |
3918 | || test ! -s conftest.err' | |
3919 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3920 | (eval $ac_try) 2>&5 | |
3921 | ac_status=$? | |
3922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3923 | (exit $ac_status); }; } && | |
3924 | { ac_try='test -s conftest.$ac_objext' | |
3925 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3926 | (eval $ac_try) 2>&5 | |
3927 | ac_status=$? | |
3928 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3929 | (exit $ac_status); }; }; then | |
3930 | ac_cv_have_decl_memmem=yes | |
3931 | else | |
3932 | echo "$as_me: failed program was:" >&5 | |
3933 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3934 | ||
3935 | ac_cv_have_decl_memmem=no | |
3936 | fi | |
3937 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3938 | fi | |
3939 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_memmem" >&5 | |
3940 | echo "${ECHO_T}$ac_cv_have_decl_memmem" >&6 | |
3941 | if test $ac_cv_have_decl_memmem = yes; then | |
3942 | ||
3943 | cat >>confdefs.h <<_ACEOF | |
3944 | #define HAVE_DECL_MEMMEM 1 | |
3945 | _ACEOF | |
3946 | ||
3947 | ||
3948 | else | |
3949 | cat >>confdefs.h <<_ACEOF | |
3950 | #define HAVE_DECL_MEMMEM 0 | |
3951 | _ACEOF | |
3952 | ||
3953 | ||
3954 | fi | |
3955 | ||
3956 | ||
3957 | ||
3958 | ||
3959 | ||
3960 | ||
3961 | ||
3962 | ||
3963 | ||
3964 | ||
3965 | ||
3966 | ||
3967 | ||
3968 | ||
3969 | ||
3970 | for ac_func in memmem | |
3971 | do | |
3972 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
3973 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
3974 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
3975 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
3976 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3977 | else | |
3978 | cat >conftest.$ac_ext <<_ACEOF | |
3979 | /* confdefs.h. */ | |
3980 | _ACEOF | |
3981 | cat confdefs.h >>conftest.$ac_ext | |
3982 | cat >>conftest.$ac_ext <<_ACEOF | |
3983 | /* end confdefs.h. */ | |
3984 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
3985 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
3986 | #define $ac_func innocuous_$ac_func | |
3987 | ||
3988 | /* System header to define __stub macros and hopefully few prototypes, | |
3989 | which can conflict with char $ac_func (); below. | |
3990 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3991 | <limits.h> exists even on freestanding compilers. */ | |
3992 | ||
3993 | #ifdef __STDC__ | |
3994 | # include <limits.h> | |
3995 | #else | |
3996 | # include <assert.h> | |
3997 | #endif | |
3998 | ||
3999 | #undef $ac_func | |
4000 | ||
4001 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4002 | #ifdef __cplusplus | |
4003 | extern "C" | |
4004 | { | |
4005 | #endif | |
4006 | /* We use char because int might match the return type of a gcc2 | |
4007 | builtin and then its argument prototype would still apply. */ | |
4008 | char $ac_func (); | |
4009 | /* The GNU C library defines this for functions which it implements | |
4010 | to always fail with ENOSYS. Some functions are actually named | |
4011 | something starting with __ and the normal name is an alias. */ | |
4012 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4013 | choke me | |
4014 | #else | |
4015 | char (*f) () = $ac_func; | |
4016 | #endif | |
4017 | #ifdef __cplusplus | |
4018 | } | |
4019 | #endif | |
4020 | ||
4021 | int | |
4022 | main () | |
4023 | { | |
4024 | return f != $ac_func; | |
4025 | ; | |
4026 | return 0; | |
4027 | } | |
4028 | _ACEOF | |
4029 | rm -f conftest.$ac_objext conftest$ac_exeext | |
4030 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4031 | (eval $ac_link) 2>conftest.er1 | |
4032 | ac_status=$? | |
4033 | grep -v '^ *+' conftest.er1 >conftest.err | |
4034 | rm -f conftest.er1 | |
4035 | cat conftest.err >&5 | |
4036 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4037 | (exit $ac_status); } && | |
4038 | { ac_try='test -z "$ac_c_werror_flag" | |
4039 | || test ! -s conftest.err' | |
4040 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4041 | (eval $ac_try) 2>&5 | |
4042 | ac_status=$? | |
4043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4044 | (exit $ac_status); }; } && | |
4045 | { ac_try='test -s conftest$ac_exeext' | |
4046 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4047 | (eval $ac_try) 2>&5 | |
4048 | ac_status=$? | |
4049 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4050 | (exit $ac_status); }; }; then | |
4051 | eval "$as_ac_var=yes" | |
4052 | else | |
4053 | echo "$as_me: failed program was:" >&5 | |
4054 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4055 | ||
4056 | eval "$as_ac_var=no" | |
4057 | fi | |
4058 | rm -f conftest.err conftest.$ac_objext \ | |
4059 | conftest$ac_exeext conftest.$ac_ext | |
4060 | fi | |
4061 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
4062 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
4063 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
4064 | cat >>confdefs.h <<_ACEOF | |
4065 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
4066 | _ACEOF | |
4067 | ||
4068 | else | |
4069 | ||
4070 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
4071 | ||
4072 | fi | |
4073 | done | |
4074 | ||
4075 | ||
4076 | ||
4077 | : | |
4078 | ||
4079 | ||
4080 | ||
4081 | ||
4082 | ||
4083 | if test $ac_cv_have_decl_memmem = no; then | |
4084 | HAVE_DECL_MEMMEM=0 | |
4085 | fi | |
4086 | : | |
4087 | ||
4088 | ||
4089 | echo "$as_me:$LINENO: checking for long long int" >&5 | |
4090 | echo $ECHO_N "checking for long long int... $ECHO_C" >&6 | |
4091 | if test "${ac_cv_type_long_long_int+set}" = set; then | |
4092 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4093 | else | |
4094 | cat >conftest.$ac_ext <<_ACEOF | |
4095 | ||
4096 | /* confdefs.h. */ | |
4097 | _ACEOF | |
4098 | cat confdefs.h >>conftest.$ac_ext | |
4099 | cat >>conftest.$ac_ext <<_ACEOF | |
4100 | /* end confdefs.h. */ | |
4101 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
4102 | implementations with broken preprocessors. Perhaps this can | |
4103 | be revisited in 2012. In the meantime, code should not expect | |
4104 | #if to work with literals wider than 32 bits. */ | |
4105 | /* Test literals. */ | |
4106 | long long int ll = 9223372036854775807ll; | |
4107 | long long int nll = -9223372036854775807LL; | |
4108 | unsigned long long int ull = 18446744073709551615ULL; | |
4109 | /* Test constant expressions. */ | |
4110 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
4111 | ? 1 : -1)]; | |
4112 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
4113 | ? 1 : -1)]; | |
4114 | int i = 63; | |
4115 | int | |
4116 | main () | |
4117 | { | |
4118 | /* Test availability of runtime routines for shift and division. */ | |
4119 | long long int llmax = 9223372036854775807ll; | |
4120 | unsigned long long int ullmax = 18446744073709551615ull; | |
4121 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
4122 | | (llmax / ll) | (llmax % ll) | |
4123 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
4124 | | (ullmax / ull) | (ullmax % ull)); | |
4125 | ; | |
4126 | return 0; | |
4127 | } | |
4128 | ||
4129 | _ACEOF | |
4130 | rm -f conftest.$ac_objext conftest$ac_exeext | |
4131 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4132 | (eval $ac_link) 2>conftest.er1 | |
4133 | ac_status=$? | |
4134 | grep -v '^ *+' conftest.er1 >conftest.err | |
4135 | rm -f conftest.er1 | |
4136 | cat conftest.err >&5 | |
4137 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4138 | (exit $ac_status); } && | |
4139 | { ac_try='test -z "$ac_c_werror_flag" | |
4140 | || test ! -s conftest.err' | |
4141 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4142 | (eval $ac_try) 2>&5 | |
4143 | ac_status=$? | |
4144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4145 | (exit $ac_status); }; } && | |
4146 | { ac_try='test -s conftest$ac_exeext' | |
4147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4148 | (eval $ac_try) 2>&5 | |
4149 | ac_status=$? | |
4150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4151 | (exit $ac_status); }; }; then | |
4152 | if test "$cross_compiling" = yes; then | |
4153 | ac_cv_type_long_long_int=yes | |
4154 | else | |
4155 | cat >conftest.$ac_ext <<_ACEOF | |
4156 | /* confdefs.h. */ | |
4157 | _ACEOF | |
4158 | cat confdefs.h >>conftest.$ac_ext | |
4159 | cat >>conftest.$ac_ext <<_ACEOF | |
4160 | /* end confdefs.h. */ | |
4161 | #include <limits.h> | |
4162 | #ifndef LLONG_MAX | |
4163 | # define HALF \ | |
4164 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
4165 | # define LLONG_MAX (HALF - 1 + HALF) | |
4166 | #endif | |
4167 | int | |
4168 | main () | |
4169 | { | |
4170 | long long int n = 1; | |
4171 | int i; | |
4172 | for (i = 0; ; i++) | |
4173 | { | |
4174 | long long int m = n << i; | |
4175 | if (m >> i != n) | |
4176 | return 1; | |
4177 | if (LLONG_MAX / 2 < m) | |
4178 | break; | |
4179 | } | |
4180 | return 0; | |
4181 | ; | |
4182 | return 0; | |
4183 | } | |
4184 | _ACEOF | |
4185 | rm -f conftest$ac_exeext | |
4186 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4187 | (eval $ac_link) 2>&5 | |
4188 | ac_status=$? | |
4189 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4190 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4192 | (eval $ac_try) 2>&5 | |
4193 | ac_status=$? | |
4194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4195 | (exit $ac_status); }; }; then | |
4196 | ac_cv_type_long_long_int=yes | |
4197 | else | |
4198 | echo "$as_me: program exited with status $ac_status" >&5 | |
4199 | echo "$as_me: failed program was:" >&5 | |
4200 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4201 | ||
4202 | ( exit $ac_status ) | |
4203 | ac_cv_type_long_long_int=no | |
4204 | fi | |
4205 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4206 | fi | |
4207 | else | |
4208 | echo "$as_me: failed program was:" >&5 | |
4209 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4210 | ||
4211 | ac_cv_type_long_long_int=no | |
4212 | fi | |
4213 | rm -f conftest.err conftest.$ac_objext \ | |
4214 | conftest$ac_exeext conftest.$ac_ext | |
4215 | fi | |
4216 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 | |
4217 | echo "${ECHO_T}$ac_cv_type_long_long_int" >&6 | |
4218 | if test $ac_cv_type_long_long_int = yes; then | |
4219 | ||
4220 | cat >>confdefs.h <<\_ACEOF | |
4221 | #define HAVE_LONG_LONG_INT 1 | |
4222 | _ACEOF | |
4223 | ||
4224 | fi | |
4225 | ||
4226 | ||
4227 | echo "$as_me:$LINENO: checking for unsigned long long int" >&5 | |
4228 | echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6 | |
4229 | if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then | |
4230 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4231 | else | |
4232 | cat >conftest.$ac_ext <<_ACEOF | |
4233 | ||
4234 | /* confdefs.h. */ | |
4235 | _ACEOF | |
4236 | cat confdefs.h >>conftest.$ac_ext | |
4237 | cat >>conftest.$ac_ext <<_ACEOF | |
4238 | /* end confdefs.h. */ | |
4239 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
4240 | implementations with broken preprocessors. Perhaps this can | |
4241 | be revisited in 2012. In the meantime, code should not expect | |
4242 | #if to work with literals wider than 32 bits. */ | |
4243 | /* Test literals. */ | |
4244 | long long int ll = 9223372036854775807ll; | |
4245 | long long int nll = -9223372036854775807LL; | |
4246 | unsigned long long int ull = 18446744073709551615ULL; | |
4247 | /* Test constant expressions. */ | |
4248 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
4249 | ? 1 : -1)]; | |
4250 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
4251 | ? 1 : -1)]; | |
4252 | int i = 63; | |
4253 | int | |
4254 | main () | |
4255 | { | |
4256 | /* Test availability of runtime routines for shift and division. */ | |
4257 | long long int llmax = 9223372036854775807ll; | |
4258 | unsigned long long int ullmax = 18446744073709551615ull; | |
4259 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
4260 | | (llmax / ll) | (llmax % ll) | |
4261 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
4262 | | (ullmax / ull) | (ullmax % ull)); | |
4263 | ; | |
4264 | return 0; | |
4265 | } | |
4266 | ||
4267 | _ACEOF | |
4268 | rm -f conftest.$ac_objext conftest$ac_exeext | |
4269 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4270 | (eval $ac_link) 2>conftest.er1 | |
4271 | ac_status=$? | |
4272 | grep -v '^ *+' conftest.er1 >conftest.err | |
4273 | rm -f conftest.er1 | |
4274 | cat conftest.err >&5 | |
4275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4276 | (exit $ac_status); } && | |
4277 | { ac_try='test -z "$ac_c_werror_flag" | |
4278 | || test ! -s conftest.err' | |
4279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4280 | (eval $ac_try) 2>&5 | |
4281 | ac_status=$? | |
4282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4283 | (exit $ac_status); }; } && | |
4284 | { ac_try='test -s conftest$ac_exeext' | |
4285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4286 | (eval $ac_try) 2>&5 | |
4287 | ac_status=$? | |
4288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4289 | (exit $ac_status); }; }; then | |
4290 | ac_cv_type_unsigned_long_long_int=yes | |
4291 | else | |
4292 | echo "$as_me: failed program was:" >&5 | |
4293 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4294 | ||
4295 | ac_cv_type_unsigned_long_long_int=no | |
4296 | fi | |
4297 | rm -f conftest.err conftest.$ac_objext \ | |
4298 | conftest$ac_exeext conftest.$ac_ext | |
4299 | fi | |
4300 | echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
4301 | echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6 | |
4302 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
4303 | ||
4304 | cat >>confdefs.h <<\_ACEOF | |
4305 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | |
4306 | _ACEOF | |
4307 | ||
4308 | fi | |
4309 | ||
4310 | ||
4311 | ||
4312 | echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 | |
4313 | echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6 | |
4314 | if test "${gl_cv_have_include_next+set}" = set; then | |
4315 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4316 | else | |
4317 | rm -rf conftestd1 conftestd2 | |
4318 | mkdir conftestd1 conftestd2 | |
4319 | cat <<EOF > conftestd1/conftest.h | |
4320 | #define DEFINED_IN_CONFTESTD1 | |
4321 | #include_next <conftest.h> | |
4322 | #ifdef DEFINED_IN_CONFTESTD2 | |
4323 | int foo; | |
4324 | #else | |
4325 | #error "include_next doesn't work" | |
4326 | #endif | |
4327 | EOF | |
4328 | cat <<EOF > conftestd2/conftest.h | |
4329 | #ifndef DEFINED_IN_CONFTESTD1 | |
4330 | #error "include_next test doesn't work" | |
4331 | #endif | |
4332 | #define DEFINED_IN_CONFTESTD2 | |
4333 | EOF | |
4334 | save_CPPFLAGS="$CPPFLAGS" | |
4335 | CPPFLAGS="$CPPFLAGS -Iconftestd1 -Iconftestd2" | |
4336 | cat >conftest.$ac_ext <<_ACEOF | |
4337 | #include <conftest.h> | |
4338 | _ACEOF | |
4339 | rm -f conftest.$ac_objext | |
4340 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4341 | (eval $ac_compile) 2>conftest.er1 | |
4342 | ac_status=$? | |
4343 | grep -v '^ *+' conftest.er1 >conftest.err | |
4344 | rm -f conftest.er1 | |
4345 | cat conftest.err >&5 | |
4346 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4347 | (exit $ac_status); } && | |
4348 | { ac_try='test -z "$ac_c_werror_flag" | |
4349 | || test ! -s conftest.err' | |
4350 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4351 | (eval $ac_try) 2>&5 | |
4352 | ac_status=$? | |
4353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4354 | (exit $ac_status); }; } && | |
4355 | { ac_try='test -s conftest.$ac_objext' | |
4356 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4357 | (eval $ac_try) 2>&5 | |
4358 | ac_status=$? | |
4359 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4360 | (exit $ac_status); }; }; then | |
4361 | gl_cv_have_include_next=yes | |
4362 | else | |
4363 | echo "$as_me: failed program was:" >&5 | |
4364 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4365 | ||
4366 | gl_cv_have_include_next=no | |
4367 | fi | |
4368 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4369 | CPPFLAGS="$save_CPPFLAGS" | |
4370 | rm -rf conftestd1 conftestd2 | |
4371 | ||
4372 | fi | |
4373 | echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 | |
4374 | echo "${ECHO_T}$gl_cv_have_include_next" >&6 | |
4375 | if test $gl_cv_have_include_next = yes; then | |
4376 | ||
4377 | ||
4378 | cat >>confdefs.h <<\_ACEOF | |
4379 | #define HAVE_INCLUDE_NEXT 1 | |
4380 | _ACEOF | |
4381 | ||
4382 | ||
4383 | INCLUDE_NEXT=include_next | |
4384 | else | |
4385 | INCLUDE_NEXT=include | |
4386 | fi | |
4387 | ||
4388 | ||
4389 | ||
4390 | ||
4391 | ||
4392 | ||
4393 | ||
4394 | for ac_header in $gl_header_list | |
4395 | do | |
4396 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4397 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4398 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4399 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4400 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4401 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4402 | fi | |
4403 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4404 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4405 | else | |
4406 | # Is the header compilable? | |
4407 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
4408 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
4409 | cat >conftest.$ac_ext <<_ACEOF | |
4410 | /* confdefs.h. */ | |
4411 | _ACEOF | |
4412 | cat confdefs.h >>conftest.$ac_ext | |
4413 | cat >>conftest.$ac_ext <<_ACEOF | |
4414 | /* end confdefs.h. */ | |
4415 | $ac_includes_default | |
4416 | #include <$ac_header> | |
4417 | _ACEOF | |
4418 | rm -f conftest.$ac_objext | |
4419 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4420 | (eval $ac_compile) 2>conftest.er1 | |
4421 | ac_status=$? | |
4422 | grep -v '^ *+' conftest.er1 >conftest.err | |
4423 | rm -f conftest.er1 | |
4424 | cat conftest.err >&5 | |
4425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4426 | (exit $ac_status); } && | |
4427 | { ac_try='test -z "$ac_c_werror_flag" | |
4428 | || test ! -s conftest.err' | |
4429 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4430 | (eval $ac_try) 2>&5 | |
4431 | ac_status=$? | |
4432 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4433 | (exit $ac_status); }; } && | |
4434 | { ac_try='test -s conftest.$ac_objext' | |
4435 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4436 | (eval $ac_try) 2>&5 | |
4437 | ac_status=$? | |
4438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4439 | (exit $ac_status); }; }; then | |
4440 | ac_header_compiler=yes | |
4441 | else | |
4442 | echo "$as_me: failed program was:" >&5 | |
4443 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4444 | ||
4445 | ac_header_compiler=no | |
4446 | fi | |
4447 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4448 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
4449 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
4450 | ||
4451 | # Is the header present? | |
4452 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
4453 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
4454 | cat >conftest.$ac_ext <<_ACEOF | |
4455 | /* confdefs.h. */ | |
4456 | _ACEOF | |
4457 | cat confdefs.h >>conftest.$ac_ext | |
4458 | cat >>conftest.$ac_ext <<_ACEOF | |
4459 | /* end confdefs.h. */ | |
4460 | #include <$ac_header> | |
4461 | _ACEOF | |
4462 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4463 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4464 | ac_status=$? | |
4465 | grep -v '^ *+' conftest.er1 >conftest.err | |
4466 | rm -f conftest.er1 | |
4467 | cat conftest.err >&5 | |
4468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4469 | (exit $ac_status); } >/dev/null; then | |
4470 | if test -s conftest.err; then | |
4471 | ac_cpp_err=$ac_c_preproc_warn_flag | |
4472 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
4473 | else | |
4474 | ac_cpp_err= | |
4475 | fi | |
4476 | else | |
4477 | ac_cpp_err=yes | |
4478 | fi | |
4479 | if test -z "$ac_cpp_err"; then | |
4480 | ac_header_preproc=yes | |
4481 | else | |
4482 | echo "$as_me: failed program was:" >&5 | |
4483 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4484 | ||
4485 | ac_header_preproc=no | |
4486 | fi | |
4487 | rm -f conftest.err conftest.$ac_ext | |
4488 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4489 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
4490 | ||
4491 | # So? What about this header? | |
4492 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
4493 | yes:no: ) | |
4494 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
4495 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
4496 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
4497 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
4498 | ac_header_preproc=yes | |
4499 | ;; | |
4500 | no:yes:* ) | |
4501 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
4502 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
4503 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
4504 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
4505 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
4506 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
4507 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
4508 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
4509 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
4510 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
4511 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
4512 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
4513 | ( | |
4514 | cat <<\_ASBOX | |
4515 | ## ------------------------------------------ ## | |
4516 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
4517 | ## ------------------------------------------ ## | |
4518 | _ASBOX | |
4519 | ) | | |
4520 | sed "s/^/$as_me: WARNING: /" >&2 | |
4521 | ;; | |
4522 | esac | |
4523 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4524 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4525 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4527 | else | |
4528 | eval "$as_ac_Header=\$ac_header_preproc" | |
4529 | fi | |
4530 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4531 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4532 | ||
4533 | fi | |
4534 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4535 | cat >>confdefs.h <<_ACEOF | |
4536 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4537 | _ACEOF | |
4538 | ||
4539 | fi | |
4540 | ||
4541 | done | |
4542 | ||
4543 | ||
4544 | ||
4545 | ||
4546 | ||
4547 | ||
4548 | ||
4549 | ||
4550 | ||
4551 | ||
4552 | ||
4553 | ||
4554 | echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 | |
4555 | echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6 | |
4556 | if test "${ac_cv_c_restrict+set}" = set; then | |
4557 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4558 | else | |
4559 | ac_cv_c_restrict=no | |
4560 | # The order here caters to the fact that C++ does not require restrict. | |
4561 | for ac_kw in __restrict __restrict__ _Restrict restrict; do | |
4562 | cat >conftest.$ac_ext <<_ACEOF | |
4563 | /* confdefs.h. */ | |
4564 | _ACEOF | |
4565 | cat confdefs.h >>conftest.$ac_ext | |
4566 | cat >>conftest.$ac_ext <<_ACEOF | |
4567 | /* end confdefs.h. */ | |
4568 | typedef int * int_ptr; | |
4569 | int foo (int_ptr $ac_kw ip) { | |
4570 | return ip[0]; | |
4571 | } | |
4572 | int | |
4573 | main () | |
4574 | { | |
4575 | int s[1]; | |
4576 | int * $ac_kw t = s; | |
4577 | t[0] = 0; | |
4578 | return foo(t) | |
4579 | ; | |
4580 | return 0; | |
4581 | } | |
4582 | _ACEOF | |
4583 | rm -f conftest.$ac_objext | |
4584 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4585 | (eval $ac_compile) 2>conftest.er1 | |
4586 | ac_status=$? | |
4587 | grep -v '^ *+' conftest.er1 >conftest.err | |
4588 | rm -f conftest.er1 | |
4589 | cat conftest.err >&5 | |
4590 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4591 | (exit $ac_status); } && | |
4592 | { ac_try='test -z "$ac_c_werror_flag" | |
4593 | || test ! -s conftest.err' | |
4594 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4595 | (eval $ac_try) 2>&5 | |
4596 | ac_status=$? | |
4597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4598 | (exit $ac_status); }; } && | |
4599 | { ac_try='test -s conftest.$ac_objext' | |
4600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4601 | (eval $ac_try) 2>&5 | |
4602 | ac_status=$? | |
4603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4604 | (exit $ac_status); }; }; then | |
4605 | ac_cv_c_restrict=$ac_kw | |
4606 | else | |
4607 | echo "$as_me: failed program was:" >&5 | |
4608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4609 | ||
4610 | fi | |
4611 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4612 | test "$ac_cv_c_restrict" != no && break | |
4613 | done | |
4614 | ||
4615 | fi | |
4616 | echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 | |
4617 | echo "${ECHO_T}$ac_cv_c_restrict" >&6 | |
4618 | ||
4619 | ||
4620 | case $ac_cv_c_restrict in | |
4621 | restrict) ;; | |
4622 | no) cat >>confdefs.h <<\_ACEOF | |
4623 | #define restrict | |
4624 | _ACEOF | |
4625 | ;; | |
4626 | *) cat >>confdefs.h <<_ACEOF | |
4627 | #define restrict $ac_cv_c_restrict | |
4628 | _ACEOF | |
4629 | ;; | |
4630 | esac | |
4631 | ||
4632 | ||
4633 | ||
4634 | ||
4635 | ||
4636 | ||
4637 | ||
4638 | ||
4639 | ||
4640 | ||
4641 | ||
4642 | ||
4643 | ||
4644 | : | |
4645 | ||
4646 | ||
4647 | ||
4648 | ||
4649 | ||
4650 | ||
4651 | ||
4652 | if test $gl_cv_have_include_next = yes; then | |
4653 | gl_cv_next_string_h='<'string.h'>' | |
4654 | else | |
4655 | echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5 | |
4656 | echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6 | |
4657 | if test "${gl_cv_next_string_h+set}" = set; then | |
4658 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4659 | else | |
4660 | ||
4661 | if test $ac_cv_header_string_h = yes; then | |
4662 | cat >conftest.$ac_ext <<_ACEOF | |
4663 | /* confdefs.h. */ | |
4664 | _ACEOF | |
4665 | cat confdefs.h >>conftest.$ac_ext | |
4666 | cat >>conftest.$ac_ext <<_ACEOF | |
4667 | /* end confdefs.h. */ | |
4668 | #include <string.h> | |
4669 | ||
4670 | _ACEOF | |
4671 | gl_cv_next_string_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4672 | sed -n '\#/string.h#{ | |
4673 | s#.*"\(.*/string.h\)".*#\1# | |
4674 | s#^/[^/]#//&# | |
4675 | p | |
4676 | q | |
4677 | }'`'"' | |
4678 | else | |
4679 | gl_cv_next_string_h='<'string.h'>' | |
4680 | fi | |
4681 | ||
4682 | fi | |
4683 | echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5 | |
4684 | echo "${ECHO_T}$gl_cv_next_string_h" >&6 | |
4685 | fi | |
4686 | NEXT_STRING_H=$gl_cv_next_string_h | |
4687 | ||
4688 | ||
4689 | ||
4690 | ||
4691 | ||
4692 | GNULIB_WCWIDTH=0; | |
4693 | HAVE_DECL_WCWIDTH=1; | |
4694 | REPLACE_WCWIDTH=0; | |
4695 | WCHAR_H= | |
4696 | ||
4697 | ||
4698 | ||
4699 | ||
4700 | ||
4701 | if false; then | |
4702 | GL_COND_LIBTOOL_TRUE= | |
4703 | GL_COND_LIBTOOL_FALSE='#' | |
4704 | else | |
4705 | GL_COND_LIBTOOL_TRUE='#' | |
4706 | GL_COND_LIBTOOL_FALSE= | |
4707 | fi | |
4708 | ||
4709 | gl_cond_libtool=false | |
4710 | gl_libdeps= | |
4711 | gl_ltlibdeps= | |
4712 | ||
4713 | ||
4714 | ||
4715 | gl_source_base='gnulib' | |
4716 | ||
4717 | ||
4718 | ||
4719 | ||
4720 | ||
4721 | ||
4722 | ||
4723 | ||
4724 | ||
4725 | for ac_func in memchr | |
4726 | do | |
4727 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
4728 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
4729 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
4730 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
4731 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4732 | else | |
4733 | cat >conftest.$ac_ext <<_ACEOF | |
4734 | /* confdefs.h. */ | |
4735 | _ACEOF | |
4736 | cat confdefs.h >>conftest.$ac_ext | |
4737 | cat >>conftest.$ac_ext <<_ACEOF | |
4738 | /* end confdefs.h. */ | |
4739 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
4740 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
4741 | #define $ac_func innocuous_$ac_func | |
4742 | ||
4743 | /* System header to define __stub macros and hopefully few prototypes, | |
4744 | which can conflict with char $ac_func (); below. | |
4745 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4746 | <limits.h> exists even on freestanding compilers. */ | |
4747 | ||
4748 | #ifdef __STDC__ | |
4749 | # include <limits.h> | |
4750 | #else | |
4751 | # include <assert.h> | |
4752 | #endif | |
4753 | ||
4754 | #undef $ac_func | |
4755 | ||
4756 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4757 | #ifdef __cplusplus | |
4758 | extern "C" | |
4759 | { | |
4760 | #endif | |
4761 | /* We use char because int might match the return type of a gcc2 | |
4762 | builtin and then its argument prototype would still apply. */ | |
4763 | char $ac_func (); | |
4764 | /* The GNU C library defines this for functions which it implements | |
4765 | to always fail with ENOSYS. Some functions are actually named | |
4766 | something starting with __ and the normal name is an alias. */ | |
4767 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4768 | choke me | |
4769 | #else | |
4770 | char (*f) () = $ac_func; | |
4771 | #endif | |
4772 | #ifdef __cplusplus | |
4773 | } | |
4774 | #endif | |
4775 | ||
4776 | int | |
4777 | main () | |
4778 | { | |
4779 | return f != $ac_func; | |
4780 | ; | |
4781 | return 0; | |
4782 | } | |
4783 | _ACEOF | |
4784 | rm -f conftest.$ac_objext conftest$ac_exeext | |
4785 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4786 | (eval $ac_link) 2>conftest.er1 | |
4787 | ac_status=$? | |
4788 | grep -v '^ *+' conftest.er1 >conftest.err | |
4789 | rm -f conftest.er1 | |
4790 | cat conftest.err >&5 | |
4791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4792 | (exit $ac_status); } && | |
4793 | { ac_try='test -z "$ac_c_werror_flag" | |
4794 | || test ! -s conftest.err' | |
4795 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4796 | (eval $ac_try) 2>&5 | |
4797 | ac_status=$? | |
4798 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4799 | (exit $ac_status); }; } && | |
4800 | { ac_try='test -s conftest$ac_exeext' | |
4801 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4802 | (eval $ac_try) 2>&5 | |
4803 | ac_status=$? | |
4804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4805 | (exit $ac_status); }; }; then | |
4806 | eval "$as_ac_var=yes" | |
4807 | else | |
4808 | echo "$as_me: failed program was:" >&5 | |
4809 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4810 | ||
4811 | eval "$as_ac_var=no" | |
4812 | fi | |
4813 | rm -f conftest.err conftest.$ac_objext \ | |
4814 | conftest$ac_exeext conftest.$ac_ext | |
4815 | fi | |
4816 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
4817 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
4818 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
4819 | cat >>confdefs.h <<_ACEOF | |
4820 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
4821 | _ACEOF | |
4822 | ||
4823 | else | |
4824 | ||
4825 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
4826 | ||
4827 | fi | |
4828 | done | |
4829 | ||
4830 | ||
4831 | if test $ac_cv_func_memchr = no; then | |
4832 | ||
4833 | ||
4834 | for ac_header in bp-sym.h | |
4835 | do | |
4836 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4837 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4838 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4839 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4840 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4841 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4842 | fi | |
4843 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4844 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4845 | else | |
4846 | # Is the header compilable? | |
4847 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
4848 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
4849 | cat >conftest.$ac_ext <<_ACEOF | |
4850 | /* confdefs.h. */ | |
4851 | _ACEOF | |
4852 | cat confdefs.h >>conftest.$ac_ext | |
4853 | cat >>conftest.$ac_ext <<_ACEOF | |
4854 | /* end confdefs.h. */ | |
4855 | $ac_includes_default | |
4856 | #include <$ac_header> | |
4857 | _ACEOF | |
4858 | rm -f conftest.$ac_objext | |
4859 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4860 | (eval $ac_compile) 2>conftest.er1 | |
4861 | ac_status=$? | |
4862 | grep -v '^ *+' conftest.er1 >conftest.err | |
4863 | rm -f conftest.er1 | |
4864 | cat conftest.err >&5 | |
4865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4866 | (exit $ac_status); } && | |
4867 | { ac_try='test -z "$ac_c_werror_flag" | |
4868 | || test ! -s conftest.err' | |
4869 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4870 | (eval $ac_try) 2>&5 | |
4871 | ac_status=$? | |
4872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4873 | (exit $ac_status); }; } && | |
4874 | { ac_try='test -s conftest.$ac_objext' | |
4875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4876 | (eval $ac_try) 2>&5 | |
4877 | ac_status=$? | |
4878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4879 | (exit $ac_status); }; }; then | |
4880 | ac_header_compiler=yes | |
4881 | else | |
4882 | echo "$as_me: failed program was:" >&5 | |
4883 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4884 | ||
4885 | ac_header_compiler=no | |
4886 | fi | |
4887 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4888 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
4889 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
4890 | ||
4891 | # Is the header present? | |
4892 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
4893 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
4894 | cat >conftest.$ac_ext <<_ACEOF | |
4895 | /* confdefs.h. */ | |
4896 | _ACEOF | |
4897 | cat confdefs.h >>conftest.$ac_ext | |
4898 | cat >>conftest.$ac_ext <<_ACEOF | |
4899 | /* end confdefs.h. */ | |
4900 | #include <$ac_header> | |
4901 | _ACEOF | |
4902 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4903 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4904 | ac_status=$? | |
4905 | grep -v '^ *+' conftest.er1 >conftest.err | |
4906 | rm -f conftest.er1 | |
4907 | cat conftest.err >&5 | |
4908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4909 | (exit $ac_status); } >/dev/null; then | |
4910 | if test -s conftest.err; then | |
4911 | ac_cpp_err=$ac_c_preproc_warn_flag | |
4912 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
4913 | else | |
4914 | ac_cpp_err= | |
4915 | fi | |
4916 | else | |
4917 | ac_cpp_err=yes | |
4918 | fi | |
4919 | if test -z "$ac_cpp_err"; then | |
4920 | ac_header_preproc=yes | |
4921 | else | |
4922 | echo "$as_me: failed program was:" >&5 | |
4923 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4924 | ||
4925 | ac_header_preproc=no | |
4926 | fi | |
4927 | rm -f conftest.err conftest.$ac_ext | |
4928 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4929 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
4930 | ||
4931 | # So? What about this header? | |
4932 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
4933 | yes:no: ) | |
4934 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
4935 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
4936 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
4937 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
4938 | ac_header_preproc=yes | |
4939 | ;; | |
4940 | no:yes:* ) | |
4941 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
4942 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
4943 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
4944 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
4945 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
4946 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
4947 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
4948 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
4949 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
4950 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
4951 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
4952 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
4953 | ( | |
4954 | cat <<\_ASBOX | |
4955 | ## ------------------------------------------ ## | |
4956 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
4957 | ## ------------------------------------------ ## | |
4958 | _ASBOX | |
4959 | ) | | |
4960 | sed "s/^/$as_me: WARNING: /" >&2 | |
4961 | ;; | |
4962 | esac | |
4963 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4964 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4965 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4967 | else | |
4968 | eval "$as_ac_Header=\$ac_header_preproc" | |
4969 | fi | |
4970 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4971 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4972 | ||
4973 | fi | |
4974 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4975 | cat >>confdefs.h <<_ACEOF | |
4976 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4977 | _ACEOF | |
4978 | ||
4979 | fi | |
4980 | ||
4981 | done | |
4982 | ||
4983 | ||
4984 | fi | |
4985 | ||
4986 | ||
4987 | echo "$as_me:$LINENO: checking for working memcmp" >&5 | |
4988 | echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6 | |
4989 | if test "${ac_cv_func_memcmp_working+set}" = set; then | |
4990 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4991 | else | |
4992 | if test "$cross_compiling" = yes; then | |
4993 | ac_cv_func_memcmp_working=no | |
4994 | else | |
4995 | cat >conftest.$ac_ext <<_ACEOF | |
4996 | /* confdefs.h. */ | |
4997 | _ACEOF | |
4998 | cat confdefs.h >>conftest.$ac_ext | |
4999 | cat >>conftest.$ac_ext <<_ACEOF | |
5000 | /* end confdefs.h. */ | |
5001 | $ac_includes_default | |
5002 | int | |
5003 | main () | |
5004 | { | |
5005 | ||
5006 | /* Some versions of memcmp are not 8-bit clean. */ | |
5007 | char c0 = 0x40, c1 = 0x80, c2 = 0x81; | |
5008 | if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) | |
5009 | exit (1); | |
5010 | ||
5011 | /* The Next x86 OpenStep bug shows up only when comparing 16 bytes | |
5012 | or more and with at least one buffer not starting on a 4-byte boundary. | |
5013 | William Lewis provided this test program. */ | |
5014 | { | |
5015 | char foo[21]; | |
5016 | char bar[21]; | |
5017 | int i; | |
5018 | for (i = 0; i < 4; i++) | |
5019 | { | |
5020 | char *a = foo + i; | |
5021 | char *b = bar + i; | |
5022 | strcpy (a, "--------01111111"); | |
5023 | strcpy (b, "--------10000000"); | |
5024 | if (memcmp (a, b, 16) >= 0) | |
5025 | exit (1); | |
5026 | } | |
5027 | exit (0); | |
5028 | } | |
5029 | ||
5030 | ; | |
5031 | return 0; | |
5032 | } | |
5033 | _ACEOF | |
5034 | rm -f conftest$ac_exeext | |
5035 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5036 | (eval $ac_link) 2>&5 | |
5037 | ac_status=$? | |
5038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5039 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5040 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5041 | (eval $ac_try) 2>&5 | |
5042 | ac_status=$? | |
5043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5044 | (exit $ac_status); }; }; then | |
5045 | ac_cv_func_memcmp_working=yes | |
5046 | else | |
5047 | echo "$as_me: program exited with status $ac_status" >&5 | |
5048 | echo "$as_me: failed program was:" >&5 | |
5049 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5050 | ||
5051 | ( exit $ac_status ) | |
5052 | ac_cv_func_memcmp_working=no | |
5053 | fi | |
5054 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5055 | fi | |
5056 | fi | |
5057 | echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 | |
5058 | echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6 | |
5059 | test $ac_cv_func_memcmp_working = no && | |
5060 | ||
5061 | ||
5062 | ||
5063 | ||
5064 | ||
5065 | ||
5066 | gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext" | |
5067 | ||
5068 | ||
5069 | if test $ac_cv_func_memcmp_working = no; then | |
5070 | ||
5071 | cat >>confdefs.h <<\_ACEOF | |
5072 | #define memcmp rpl_memcmp | |
5073 | _ACEOF | |
5074 | ||
5075 | : | |
5076 | fi | |
5077 | ||
5078 | ||
5079 | ||
5080 | if test $ac_cv_have_decl_memmem = yes; then | |
5081 | echo "$as_me:$LINENO: checking whether memmem works in linear time" >&5 | |
5082 | echo $ECHO_N "checking whether memmem works in linear time... $ECHO_C" >&6 | |
5083 | if test "${gl_cv_func_memmem_works+set}" = set; then | |
5084 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5085 | else | |
5086 | if test "$cross_compiling" = yes; then | |
5087 | gl_cv_func_memmem_works="guessing no" | |
5088 | else | |
5089 | cat >conftest.$ac_ext <<_ACEOF | |
5090 | /* confdefs.h. */ | |
5091 | _ACEOF | |
5092 | cat confdefs.h >>conftest.$ac_ext | |
5093 | cat >>conftest.$ac_ext <<_ACEOF | |
5094 | /* end confdefs.h. */ | |
5095 | ||
5096 | #include <string.h> /* for memmem */ | |
5097 | #include <stdlib.h> /* for malloc */ | |
5098 | #include <unistd.h> /* for alarm */ | |
5099 | ||
5100 | int | |
5101 | main () | |
5102 | { | |
5103 | size_t m = 1000000; | |
5104 | char *haystack = (char *) malloc (2 * m + 1); | |
5105 | char *needle = (char *) malloc (m + 1); | |
5106 | void *result = 0; | |
5107 | /* Failure to compile this test due to missing alarm is okay, | |
5108 | since all such platforms (mingw) also lack memmem. */ | |
5109 | alarm (5); | |
5110 | /* Check for quadratic performance. */ | |
5111 | if (haystack && needle) | |
5112 | { | |
5113 | memset (haystack, 'A', 2 * m); | |
5114 | haystack[2 * m] = 'B'; | |
5115 | memset (needle, 'A', m); | |
5116 | needle[m] = 'B'; | |
5117 | result = memmem (haystack, 2 * m + 1, needle, m + 1); | |
5118 | } | |
5119 | /* Check for empty needle behavior. */ | |
5120 | return !result || !memmem ("a", 1, 0, 0); | |
5121 | ; | |
5122 | return 0; | |
5123 | } | |
5124 | _ACEOF | |
5125 | rm -f conftest$ac_exeext | |
5126 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5127 | (eval $ac_link) 2>&5 | |
5128 | ac_status=$? | |
5129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5130 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5131 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5132 | (eval $ac_try) 2>&5 | |
5133 | ac_status=$? | |
5134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5135 | (exit $ac_status); }; }; then | |
5136 | gl_cv_func_memmem_works=yes | |
5137 | else | |
5138 | echo "$as_me: program exited with status $ac_status" >&5 | |
5139 | echo "$as_me: failed program was:" >&5 | |
5140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5141 | ||
5142 | ( exit $ac_status ) | |
5143 | gl_cv_func_memmem_works=no | |
5144 | fi | |
5145 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5146 | fi | |
5147 | fi | |
5148 | echo "$as_me:$LINENO: result: $gl_cv_func_memmem_works" >&5 | |
5149 | echo "${ECHO_T}$gl_cv_func_memmem_works" >&6 | |
5150 | if test "$gl_cv_func_memmem_works" != yes; then | |
5151 | REPLACE_MEMMEM=1 | |
5152 | ||
5153 | ||
5154 | ||
5155 | ||
5156 | ||
5157 | ||
5158 | ||
5159 | gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" | |
5160 | ||
5161 | fi | |
5162 | fi | |
5163 | ||
5164 | ||
5165 | ||
5166 | ||
5167 | ||
5168 | ||
5169 | ||
5170 | ||
5171 | ||
5172 | ||
5173 | ||
5174 | ||
5175 | ||
5176 | for ac_func in memmem | |
5177 | do | |
5178 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
5179 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
5180 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
5181 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
5182 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5183 | else | |
5184 | cat >conftest.$ac_ext <<_ACEOF | |
5185 | /* confdefs.h. */ | |
5186 | _ACEOF | |
5187 | cat confdefs.h >>conftest.$ac_ext | |
5188 | cat >>conftest.$ac_ext <<_ACEOF | |
5189 | /* end confdefs.h. */ | |
5190 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
5191 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
5192 | #define $ac_func innocuous_$ac_func | |
5193 | ||
5194 | /* System header to define __stub macros and hopefully few prototypes, | |
5195 | which can conflict with char $ac_func (); below. | |
5196 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
5197 | <limits.h> exists even on freestanding compilers. */ | |
5198 | ||
5199 | #ifdef __STDC__ | |
5200 | # include <limits.h> | |
5201 | #else | |
5202 | # include <assert.h> | |
5203 | #endif | |
5204 | ||
5205 | #undef $ac_func | |
5206 | ||
5207 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5208 | #ifdef __cplusplus | |
5209 | extern "C" | |
5210 | { | |
5211 | #endif | |
5212 | /* We use char because int might match the return type of a gcc2 | |
5213 | builtin and then its argument prototype would still apply. */ | |
5214 | char $ac_func (); | |
5215 | /* The GNU C library defines this for functions which it implements | |
5216 | to always fail with ENOSYS. Some functions are actually named | |
5217 | something starting with __ and the normal name is an alias. */ | |
5218 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5219 | choke me | |
5220 | #else | |
5221 | char (*f) () = $ac_func; | |
5222 | #endif | |
5223 | #ifdef __cplusplus | |
5224 | } | |
5225 | #endif | |
5226 | ||
5227 | int | |
5228 | main () | |
5229 | { | |
5230 | return f != $ac_func; | |
5231 | ; | |
5232 | return 0; | |
5233 | } | |
5234 | _ACEOF | |
5235 | rm -f conftest.$ac_objext conftest$ac_exeext | |
5236 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5237 | (eval $ac_link) 2>conftest.er1 | |
5238 | ac_status=$? | |
5239 | grep -v '^ *+' conftest.er1 >conftest.err | |
5240 | rm -f conftest.er1 | |
5241 | cat conftest.err >&5 | |
5242 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5243 | (exit $ac_status); } && | |
5244 | { ac_try='test -z "$ac_c_werror_flag" | |
5245 | || test ! -s conftest.err' | |
5246 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5247 | (eval $ac_try) 2>&5 | |
5248 | ac_status=$? | |
5249 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5250 | (exit $ac_status); }; } && | |
5251 | { ac_try='test -s conftest$ac_exeext' | |
5252 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5253 | (eval $ac_try) 2>&5 | |
5254 | ac_status=$? | |
5255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5256 | (exit $ac_status); }; }; then | |
5257 | eval "$as_ac_var=yes" | |
5258 | else | |
5259 | echo "$as_me: failed program was:" >&5 | |
5260 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5261 | ||
5262 | eval "$as_ac_var=no" | |
5263 | fi | |
5264 | rm -f conftest.err conftest.$ac_objext \ | |
5265 | conftest$ac_exeext conftest.$ac_ext | |
5266 | fi | |
5267 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
5268 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
5269 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
5270 | cat >>confdefs.h <<_ACEOF | |
5271 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
5272 | _ACEOF | |
5273 | ||
5274 | else | |
5275 | ||
5276 | gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" | |
5277 | ||
5278 | fi | |
5279 | done | |
5280 | ||
5281 | ||
5282 | ||
5283 | : | |
5284 | ||
5285 | ||
5286 | ||
5287 | ||
5288 | ||
5289 | if test $ac_cv_have_decl_memmem = no; then | |
5290 | HAVE_DECL_MEMMEM=0 | |
5291 | fi | |
5292 | : | |
5293 | ||
5294 | ||
5295 | ||
5296 | GNULIB_MEMMEM=1 | |
5297 | ||
5298 | ||
5299 | ||
5300 | ||
5301 | if test $ac_cv_type_long_long_int = yes; then | |
5302 | HAVE_LONG_LONG_INT=1 | |
5303 | else | |
5304 | HAVE_LONG_LONG_INT=0 | |
5305 | fi | |
5306 | ||
5307 | ||
5308 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
5309 | HAVE_UNSIGNED_LONG_LONG_INT=1 | |
5310 | else | |
5311 | HAVE_UNSIGNED_LONG_LONG_INT=0 | |
5312 | fi | |
5313 | ||
5314 | ||
5315 | if test $ac_cv_header_inttypes_h = yes; then | |
5316 | HAVE_INTTYPES_H=1 | |
5317 | else | |
5318 | HAVE_INTTYPES_H=0 | |
5319 | fi | |
5320 | ||
5321 | ||
5322 | if test $ac_cv_header_sys_types_h = yes; then | |
5323 | HAVE_SYS_TYPES_H=1 | |
5324 | else | |
5325 | HAVE_SYS_TYPES_H=0 | |
5326 | fi | |
5327 | ||
5328 | ||
5329 | ||
5330 | ||
5331 | ||
5332 | : | |
5333 | ||
5334 | ||
5335 | ||
5336 | ||
5337 | ||
5338 | ||
5339 | ||
5340 | if test $gl_cv_have_include_next = yes; then | |
5341 | gl_cv_next_stdint_h='<'stdint.h'>' | |
5342 | else | |
5343 | echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5 | |
5344 | echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6 | |
5345 | if test "${gl_cv_next_stdint_h+set}" = set; then | |
5346 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5347 | else | |
5348 | ||
5349 | if test $ac_cv_header_stdint_h = yes; then | |
5350 | cat >conftest.$ac_ext <<_ACEOF | |
5351 | /* confdefs.h. */ | |
5352 | _ACEOF | |
5353 | cat confdefs.h >>conftest.$ac_ext | |
5354 | cat >>conftest.$ac_ext <<_ACEOF | |
5355 | /* end confdefs.h. */ | |
5356 | #include <stdint.h> | |
5357 | ||
5358 | _ACEOF | |
5359 | gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5360 | sed -n '\#/stdint.h#{ | |
5361 | s#.*"\(.*/stdint.h\)".*#\1# | |
5362 | s#^/[^/]#//&# | |
5363 | p | |
5364 | q | |
5365 | }'`'"' | |
5366 | else | |
5367 | gl_cv_next_stdint_h='<'stdint.h'>' | |
5368 | fi | |
5369 | ||
5370 | fi | |
5371 | echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 | |
5372 | echo "${ECHO_T}$gl_cv_next_stdint_h" >&6 | |
5373 | fi | |
5374 | NEXT_STDINT_H=$gl_cv_next_stdint_h | |
5375 | ||
5376 | ||
5377 | ||
5378 | if test $ac_cv_header_stdint_h = yes; then | |
5379 | HAVE_STDINT_H=1 | |
5380 | else | |
5381 | HAVE_STDINT_H=0 | |
5382 | fi | |
5383 | ||
5384 | ||
5385 | if test $ac_cv_header_stdint_h = yes; then | |
5386 | echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 | |
5387 | echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6 | |
5388 | if test "${gl_cv_header_working_stdint_h+set}" = set; then | |
5389 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5390 | else | |
5391 | gl_cv_header_working_stdint_h=no | |
5392 | cat >conftest.$ac_ext <<_ACEOF | |
5393 | ||
5394 | /* confdefs.h. */ | |
5395 | _ACEOF | |
5396 | cat confdefs.h >>conftest.$ac_ext | |
5397 | cat >>conftest.$ac_ext <<_ACEOF | |
5398 | /* end confdefs.h. */ | |
5399 | ||
5400 | #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ | |
5401 | #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ | |
5402 | #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ | |
5403 | #include <stdint.h> | |
5404 | /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ | |
5405 | #if !(defined WCHAR_MIN && defined WCHAR_MAX) | |
5406 | #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" | |
5407 | #endif | |
5408 | ||
5409 | ||
5410 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5411 | included before <wchar.h>. */ | |
5412 | #include <stddef.h> | |
5413 | #include <signal.h> | |
5414 | #if HAVE_WCHAR_H | |
5415 | # include <stdio.h> | |
5416 | # include <time.h> | |
5417 | # include <wchar.h> | |
5418 | #endif | |
5419 | ||
5420 | ||
5421 | #ifdef INT8_MAX | |
5422 | int8_t a1 = INT8_MAX; | |
5423 | int8_t a1min = INT8_MIN; | |
5424 | #endif | |
5425 | #ifdef INT16_MAX | |
5426 | int16_t a2 = INT16_MAX; | |
5427 | int16_t a2min = INT16_MIN; | |
5428 | #endif | |
5429 | #ifdef INT32_MAX | |
5430 | int32_t a3 = INT32_MAX; | |
5431 | int32_t a3min = INT32_MIN; | |
5432 | #endif | |
5433 | #ifdef INT64_MAX | |
5434 | int64_t a4 = INT64_MAX; | |
5435 | int64_t a4min = INT64_MIN; | |
5436 | #endif | |
5437 | #ifdef UINT8_MAX | |
5438 | uint8_t b1 = UINT8_MAX; | |
5439 | #else | |
5440 | typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; | |
5441 | #endif | |
5442 | #ifdef UINT16_MAX | |
5443 | uint16_t b2 = UINT16_MAX; | |
5444 | #endif | |
5445 | #ifdef UINT32_MAX | |
5446 | uint32_t b3 = UINT32_MAX; | |
5447 | #endif | |
5448 | #ifdef UINT64_MAX | |
5449 | uint64_t b4 = UINT64_MAX; | |
5450 | #endif | |
5451 | int_least8_t c1 = INT8_C (0x7f); | |
5452 | int_least8_t c1max = INT_LEAST8_MAX; | |
5453 | int_least8_t c1min = INT_LEAST8_MIN; | |
5454 | int_least16_t c2 = INT16_C (0x7fff); | |
5455 | int_least16_t c2max = INT_LEAST16_MAX; | |
5456 | int_least16_t c2min = INT_LEAST16_MIN; | |
5457 | int_least32_t c3 = INT32_C (0x7fffffff); | |
5458 | int_least32_t c3max = INT_LEAST32_MAX; | |
5459 | int_least32_t c3min = INT_LEAST32_MIN; | |
5460 | int_least64_t c4 = INT64_C (0x7fffffffffffffff); | |
5461 | int_least64_t c4max = INT_LEAST64_MAX; | |
5462 | int_least64_t c4min = INT_LEAST64_MIN; | |
5463 | uint_least8_t d1 = UINT8_C (0xff); | |
5464 | uint_least8_t d1max = UINT_LEAST8_MAX; | |
5465 | uint_least16_t d2 = UINT16_C (0xffff); | |
5466 | uint_least16_t d2max = UINT_LEAST16_MAX; | |
5467 | uint_least32_t d3 = UINT32_C (0xffffffff); | |
5468 | uint_least32_t d3max = UINT_LEAST32_MAX; | |
5469 | uint_least64_t d4 = UINT64_C (0xffffffffffffffff); | |
5470 | uint_least64_t d4max = UINT_LEAST64_MAX; | |
5471 | int_fast8_t e1 = INT_FAST8_MAX; | |
5472 | int_fast8_t e1min = INT_FAST8_MIN; | |
5473 | int_fast16_t e2 = INT_FAST16_MAX; | |
5474 | int_fast16_t e2min = INT_FAST16_MIN; | |
5475 | int_fast32_t e3 = INT_FAST32_MAX; | |
5476 | int_fast32_t e3min = INT_FAST32_MIN; | |
5477 | int_fast64_t e4 = INT_FAST64_MAX; | |
5478 | int_fast64_t e4min = INT_FAST64_MIN; | |
5479 | uint_fast8_t f1 = UINT_FAST8_MAX; | |
5480 | uint_fast16_t f2 = UINT_FAST16_MAX; | |
5481 | uint_fast32_t f3 = UINT_FAST32_MAX; | |
5482 | uint_fast64_t f4 = UINT_FAST64_MAX; | |
5483 | #ifdef INTPTR_MAX | |
5484 | intptr_t g = INTPTR_MAX; | |
5485 | intptr_t gmin = INTPTR_MIN; | |
5486 | #endif | |
5487 | #ifdef UINTPTR_MAX | |
5488 | uintptr_t h = UINTPTR_MAX; | |
5489 | #endif | |
5490 | intmax_t i = INTMAX_MAX; | |
5491 | uintmax_t j = UINTMAX_MAX; | |
5492 | ||
5493 | #include <limits.h> /* for CHAR_BIT */ | |
5494 | #define TYPE_MINIMUM(t) \ | |
5495 | ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) | |
5496 | #define TYPE_MAXIMUM(t) \ | |
5497 | ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) | |
5498 | struct s { | |
5499 | int check_PTRDIFF: | |
5500 | PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) | |
5501 | && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) | |
5502 | ? 1 : -1; | |
5503 | /* Detect bug in FreeBSD 6.0 / ia64. */ | |
5504 | int check_SIG_ATOMIC: | |
5505 | SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) | |
5506 | && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) | |
5507 | ? 1 : -1; | |
5508 | int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; | |
5509 | int check_WCHAR: | |
5510 | WCHAR_MIN == TYPE_MINIMUM (wchar_t) | |
5511 | && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) | |
5512 | ? 1 : -1; | |
5513 | /* Detect bug in mingw. */ | |
5514 | int check_WINT: | |
5515 | WINT_MIN == TYPE_MINIMUM (wint_t) | |
5516 | && WINT_MAX == TYPE_MAXIMUM (wint_t) | |
5517 | ? 1 : -1; | |
5518 | ||
5519 | /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ | |
5520 | int check_UINT8_C: | |
5521 | (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; | |
5522 | int check_UINT16_C: | |
5523 | (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; | |
5524 | ||
5525 | /* Detect bugs in OpenBSD 3.9 stdint.h. */ | |
5526 | #ifdef UINT8_MAX | |
5527 | int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; | |
5528 | #endif | |
5529 | #ifdef UINT16_MAX | |
5530 | int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; | |
5531 | #endif | |
5532 | #ifdef UINT32_MAX | |
5533 | int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; | |
5534 | #endif | |
5535 | #ifdef UINT64_MAX | |
5536 | int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; | |
5537 | #endif | |
5538 | int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; | |
5539 | int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; | |
5540 | int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; | |
5541 | int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; | |
5542 | int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; | |
5543 | int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; | |
5544 | int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; | |
5545 | int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; | |
5546 | int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; | |
5547 | int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; | |
5548 | int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; | |
5549 | }; | |
5550 | ||
5551 | int | |
5552 | main () | |
5553 | { | |
5554 | ||
5555 | ; | |
5556 | return 0; | |
5557 | } | |
5558 | _ACEOF | |
5559 | rm -f conftest.$ac_objext | |
5560 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5561 | (eval $ac_compile) 2>conftest.er1 | |
5562 | ac_status=$? | |
5563 | grep -v '^ *+' conftest.er1 >conftest.err | |
5564 | rm -f conftest.er1 | |
5565 | cat conftest.err >&5 | |
5566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5567 | (exit $ac_status); } && | |
5568 | { ac_try='test -z "$ac_c_werror_flag" | |
5569 | || test ! -s conftest.err' | |
5570 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5571 | (eval $ac_try) 2>&5 | |
5572 | ac_status=$? | |
5573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5574 | (exit $ac_status); }; } && | |
5575 | { ac_try='test -s conftest.$ac_objext' | |
5576 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5577 | (eval $ac_try) 2>&5 | |
5578 | ac_status=$? | |
5579 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5580 | (exit $ac_status); }; }; then | |
5581 | gl_cv_header_working_stdint_h=yes | |
5582 | else | |
5583 | echo "$as_me: failed program was:" >&5 | |
5584 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5585 | ||
5586 | fi | |
5587 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5588 | fi | |
5589 | echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 | |
5590 | echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6 | |
5591 | fi | |
5592 | if test "$gl_cv_header_working_stdint_h" = yes; then | |
5593 | STDINT_H= | |
5594 | else | |
5595 | ||
5596 | ||
5597 | for ac_header in sys/inttypes.h sys/bitypes.h | |
5598 | do | |
5599 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5600 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5601 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
5602 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
5603 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5604 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5605 | fi | |
5606 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
5607 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
5608 | else | |
5609 | # Is the header compilable? | |
5610 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
5611 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
5612 | cat >conftest.$ac_ext <<_ACEOF | |
5613 | /* confdefs.h. */ | |
5614 | _ACEOF | |
5615 | cat confdefs.h >>conftest.$ac_ext | |
5616 | cat >>conftest.$ac_ext <<_ACEOF | |
5617 | /* end confdefs.h. */ | |
5618 | $ac_includes_default | |
5619 | #include <$ac_header> | |
5620 | _ACEOF | |
5621 | rm -f conftest.$ac_objext | |
5622 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5623 | (eval $ac_compile) 2>conftest.er1 | |
5624 | ac_status=$? | |
5625 | grep -v '^ *+' conftest.er1 >conftest.err | |
5626 | rm -f conftest.er1 | |
5627 | cat conftest.err >&5 | |
5628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5629 | (exit $ac_status); } && | |
5630 | { ac_try='test -z "$ac_c_werror_flag" | |
5631 | || test ! -s conftest.err' | |
5632 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5633 | (eval $ac_try) 2>&5 | |
5634 | ac_status=$? | |
5635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5636 | (exit $ac_status); }; } && | |
5637 | { ac_try='test -s conftest.$ac_objext' | |
5638 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5639 | (eval $ac_try) 2>&5 | |
5640 | ac_status=$? | |
5641 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5642 | (exit $ac_status); }; }; then | |
5643 | ac_header_compiler=yes | |
5644 | else | |
5645 | echo "$as_me: failed program was:" >&5 | |
5646 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5647 | ||
5648 | ac_header_compiler=no | |
5649 | fi | |
5650 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5651 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
5652 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
5653 | ||
5654 | # Is the header present? | |
5655 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
5656 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
5657 | cat >conftest.$ac_ext <<_ACEOF | |
5658 | /* confdefs.h. */ | |
5659 | _ACEOF | |
5660 | cat confdefs.h >>conftest.$ac_ext | |
5661 | cat >>conftest.$ac_ext <<_ACEOF | |
5662 | /* end confdefs.h. */ | |
5663 | #include <$ac_header> | |
5664 | _ACEOF | |
5665 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5666 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5667 | ac_status=$? | |
5668 | grep -v '^ *+' conftest.er1 >conftest.err | |
5669 | rm -f conftest.er1 | |
5670 | cat conftest.err >&5 | |
5671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5672 | (exit $ac_status); } >/dev/null; then | |
5673 | if test -s conftest.err; then | |
5674 | ac_cpp_err=$ac_c_preproc_warn_flag | |
5675 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
5676 | else | |
5677 | ac_cpp_err= | |
5678 | fi | |
5679 | else | |
5680 | ac_cpp_err=yes | |
5681 | fi | |
5682 | if test -z "$ac_cpp_err"; then | |
5683 | ac_header_preproc=yes | |
5684 | else | |
5685 | echo "$as_me: failed program was:" >&5 | |
5686 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5687 | ||
5688 | ac_header_preproc=no | |
5689 | fi | |
5690 | rm -f conftest.err conftest.$ac_ext | |
5691 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
5692 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
5693 | ||
5694 | # So? What about this header? | |
5695 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
5696 | yes:no: ) | |
5697 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
5698 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
5699 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
5700 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
5701 | ac_header_preproc=yes | |
5702 | ;; | |
5703 | no:yes:* ) | |
5704 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
5705 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
5706 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
5707 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
5708 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
5709 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
5710 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
5711 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
5712 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
5713 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
5714 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
5715 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
5716 | ( | |
5717 | cat <<\_ASBOX | |
5718 | ## ------------------------------------------ ## | |
5719 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
5720 | ## ------------------------------------------ ## | |
5721 | _ASBOX | |
5722 | ) | | |
5723 | sed "s/^/$as_me: WARNING: /" >&2 | |
5724 | ;; | |
5725 | esac | |
5726 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
5727 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
5728 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5730 | else | |
5731 | eval "$as_ac_Header=\$ac_header_preproc" | |
5732 | fi | |
5733 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
5734 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
5735 | ||
5736 | fi | |
5737 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
5738 | cat >>confdefs.h <<_ACEOF | |
5739 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5740 | _ACEOF | |
5741 | ||
5742 | fi | |
5743 | ||
5744 | done | |
5745 | ||
5746 | if test $ac_cv_header_sys_inttypes_h = yes; then | |
5747 | HAVE_SYS_INTTYPES_H=1 | |
5748 | else | |
5749 | HAVE_SYS_INTTYPES_H=0 | |
5750 | fi | |
5751 | ||
5752 | if test $ac_cv_header_sys_bitypes_h = yes; then | |
5753 | HAVE_SYS_BITYPES_H=1 | |
5754 | else | |
5755 | HAVE_SYS_BITYPES_H=0 | |
5756 | fi | |
5757 | ||
5758 | ||
5759 | ||
5760 | : | |
5761 | ||
5762 | ||
5763 | ||
5764 | ||
5765 | ||
5766 | ||
5767 | ||
5768 | ||
5769 | ||
5770 | ||
5771 | ||
5772 | ||
5773 | ||
5774 | ||
5775 | for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do | |
5776 | echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 | |
5777 | echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6 | |
5778 | if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\" = set"; then | |
5779 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5780 | else | |
5781 | if test "$cross_compiling" = yes; then | |
5782 | # Depending upon the size, compute the lo and hi bounds. | |
5783 | cat >conftest.$ac_ext <<_ACEOF | |
5784 | /* confdefs.h. */ | |
5785 | _ACEOF | |
5786 | cat confdefs.h >>conftest.$ac_ext | |
5787 | cat >>conftest.$ac_ext <<_ACEOF | |
5788 | /* end confdefs.h. */ | |
5789 | ||
5790 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5791 | included before <wchar.h>. */ | |
5792 | #include <stddef.h> | |
5793 | #include <signal.h> | |
5794 | #if HAVE_WCHAR_H | |
5795 | # include <stdio.h> | |
5796 | # include <time.h> | |
5797 | # include <wchar.h> | |
5798 | #endif | |
5799 | ||
5800 | #include <limits.h> | |
5801 | int | |
5802 | main () | |
5803 | { | |
5804 | static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; | |
5805 | test_array [0] = 0 | |
5806 | ||
5807 | ; | |
5808 | return 0; | |
5809 | } | |
5810 | _ACEOF | |
5811 | rm -f conftest.$ac_objext | |
5812 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5813 | (eval $ac_compile) 2>conftest.er1 | |
5814 | ac_status=$? | |
5815 | grep -v '^ *+' conftest.er1 >conftest.err | |
5816 | rm -f conftest.er1 | |
5817 | cat conftest.err >&5 | |
5818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5819 | (exit $ac_status); } && | |
5820 | { ac_try='test -z "$ac_c_werror_flag" | |
5821 | || test ! -s conftest.err' | |
5822 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5823 | (eval $ac_try) 2>&5 | |
5824 | ac_status=$? | |
5825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5826 | (exit $ac_status); }; } && | |
5827 | { ac_try='test -s conftest.$ac_objext' | |
5828 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5829 | (eval $ac_try) 2>&5 | |
5830 | ac_status=$? | |
5831 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5832 | (exit $ac_status); }; }; then | |
5833 | ac_lo=0 ac_mid=0 | |
5834 | while :; do | |
5835 | cat >conftest.$ac_ext <<_ACEOF | |
5836 | /* confdefs.h. */ | |
5837 | _ACEOF | |
5838 | cat confdefs.h >>conftest.$ac_ext | |
5839 | cat >>conftest.$ac_ext <<_ACEOF | |
5840 | /* end confdefs.h. */ | |
5841 | ||
5842 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5843 | included before <wchar.h>. */ | |
5844 | #include <stddef.h> | |
5845 | #include <signal.h> | |
5846 | #if HAVE_WCHAR_H | |
5847 | # include <stdio.h> | |
5848 | # include <time.h> | |
5849 | # include <wchar.h> | |
5850 | #endif | |
5851 | ||
5852 | #include <limits.h> | |
5853 | int | |
5854 | main () | |
5855 | { | |
5856 | static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; | |
5857 | test_array [0] = 0 | |
5858 | ||
5859 | ; | |
5860 | return 0; | |
5861 | } | |
5862 | _ACEOF | |
5863 | rm -f conftest.$ac_objext | |
5864 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5865 | (eval $ac_compile) 2>conftest.er1 | |
5866 | ac_status=$? | |
5867 | grep -v '^ *+' conftest.er1 >conftest.err | |
5868 | rm -f conftest.er1 | |
5869 | cat conftest.err >&5 | |
5870 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5871 | (exit $ac_status); } && | |
5872 | { ac_try='test -z "$ac_c_werror_flag" | |
5873 | || test ! -s conftest.err' | |
5874 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5875 | (eval $ac_try) 2>&5 | |
5876 | ac_status=$? | |
5877 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5878 | (exit $ac_status); }; } && | |
5879 | { ac_try='test -s conftest.$ac_objext' | |
5880 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5881 | (eval $ac_try) 2>&5 | |
5882 | ac_status=$? | |
5883 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5884 | (exit $ac_status); }; }; then | |
5885 | ac_hi=$ac_mid; break | |
5886 | else | |
5887 | echo "$as_me: failed program was:" >&5 | |
5888 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5889 | ||
5890 | ac_lo=`expr $ac_mid + 1` | |
5891 | if test $ac_lo -le $ac_mid; then | |
5892 | ac_lo= ac_hi= | |
5893 | break | |
5894 | fi | |
5895 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5896 | fi | |
5897 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5898 | done | |
5899 | else | |
5900 | echo "$as_me: failed program was:" >&5 | |
5901 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5902 | ||
5903 | cat >conftest.$ac_ext <<_ACEOF | |
5904 | /* confdefs.h. */ | |
5905 | _ACEOF | |
5906 | cat confdefs.h >>conftest.$ac_ext | |
5907 | cat >>conftest.$ac_ext <<_ACEOF | |
5908 | /* end confdefs.h. */ | |
5909 | ||
5910 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5911 | included before <wchar.h>. */ | |
5912 | #include <stddef.h> | |
5913 | #include <signal.h> | |
5914 | #if HAVE_WCHAR_H | |
5915 | # include <stdio.h> | |
5916 | # include <time.h> | |
5917 | # include <wchar.h> | |
5918 | #endif | |
5919 | ||
5920 | #include <limits.h> | |
5921 | int | |
5922 | main () | |
5923 | { | |
5924 | static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; | |
5925 | test_array [0] = 0 | |
5926 | ||
5927 | ; | |
5928 | return 0; | |
5929 | } | |
5930 | _ACEOF | |
5931 | rm -f conftest.$ac_objext | |
5932 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5933 | (eval $ac_compile) 2>conftest.er1 | |
5934 | ac_status=$? | |
5935 | grep -v '^ *+' conftest.er1 >conftest.err | |
5936 | rm -f conftest.er1 | |
5937 | cat conftest.err >&5 | |
5938 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5939 | (exit $ac_status); } && | |
5940 | { ac_try='test -z "$ac_c_werror_flag" | |
5941 | || test ! -s conftest.err' | |
5942 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5943 | (eval $ac_try) 2>&5 | |
5944 | ac_status=$? | |
5945 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5946 | (exit $ac_status); }; } && | |
5947 | { ac_try='test -s conftest.$ac_objext' | |
5948 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5949 | (eval $ac_try) 2>&5 | |
5950 | ac_status=$? | |
5951 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5952 | (exit $ac_status); }; }; then | |
5953 | ac_hi=-1 ac_mid=-1 | |
5954 | while :; do | |
5955 | cat >conftest.$ac_ext <<_ACEOF | |
5956 | /* confdefs.h. */ | |
5957 | _ACEOF | |
5958 | cat confdefs.h >>conftest.$ac_ext | |
5959 | cat >>conftest.$ac_ext <<_ACEOF | |
5960 | /* end confdefs.h. */ | |
5961 | ||
5962 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
5963 | included before <wchar.h>. */ | |
5964 | #include <stddef.h> | |
5965 | #include <signal.h> | |
5966 | #if HAVE_WCHAR_H | |
5967 | # include <stdio.h> | |
5968 | # include <time.h> | |
5969 | # include <wchar.h> | |
5970 | #endif | |
5971 | ||
5972 | #include <limits.h> | |
5973 | int | |
5974 | main () | |
5975 | { | |
5976 | static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; | |
5977 | test_array [0] = 0 | |
5978 | ||
5979 | ; | |
5980 | return 0; | |
5981 | } | |
5982 | _ACEOF | |
5983 | rm -f conftest.$ac_objext | |
5984 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5985 | (eval $ac_compile) 2>conftest.er1 | |
5986 | ac_status=$? | |
5987 | grep -v '^ *+' conftest.er1 >conftest.err | |
5988 | rm -f conftest.er1 | |
5989 | cat conftest.err >&5 | |
5990 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5991 | (exit $ac_status); } && | |
5992 | { ac_try='test -z "$ac_c_werror_flag" | |
5993 | || test ! -s conftest.err' | |
5994 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5995 | (eval $ac_try) 2>&5 | |
5996 | ac_status=$? | |
5997 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5998 | (exit $ac_status); }; } && | |
5999 | { ac_try='test -s conftest.$ac_objext' | |
6000 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6001 | (eval $ac_try) 2>&5 | |
6002 | ac_status=$? | |
6003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6004 | (exit $ac_status); }; }; then | |
6005 | ac_lo=$ac_mid; break | |
6006 | else | |
6007 | echo "$as_me: failed program was:" >&5 | |
6008 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6009 | ||
6010 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
6011 | if test $ac_mid -le $ac_hi; then | |
6012 | ac_lo= ac_hi= | |
6013 | break | |
6014 | fi | |
6015 | ac_mid=`expr 2 '*' $ac_mid` | |
6016 | fi | |
6017 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6018 | done | |
6019 | else | |
6020 | echo "$as_me: failed program was:" >&5 | |
6021 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6022 | ||
6023 | ac_lo= ac_hi= | |
6024 | fi | |
6025 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6026 | fi | |
6027 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6028 | # Binary search between lo and hi bounds. | |
6029 | while test "x$ac_lo" != "x$ac_hi"; do | |
6030 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
6031 | cat >conftest.$ac_ext <<_ACEOF | |
6032 | /* confdefs.h. */ | |
6033 | _ACEOF | |
6034 | cat confdefs.h >>conftest.$ac_ext | |
6035 | cat >>conftest.$ac_ext <<_ACEOF | |
6036 | /* end confdefs.h. */ | |
6037 | ||
6038 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6039 | included before <wchar.h>. */ | |
6040 | #include <stddef.h> | |
6041 | #include <signal.h> | |
6042 | #if HAVE_WCHAR_H | |
6043 | # include <stdio.h> | |
6044 | # include <time.h> | |
6045 | # include <wchar.h> | |
6046 | #endif | |
6047 | ||
6048 | #include <limits.h> | |
6049 | int | |
6050 | main () | |
6051 | { | |
6052 | static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; | |
6053 | test_array [0] = 0 | |
6054 | ||
6055 | ; | |
6056 | return 0; | |
6057 | } | |
6058 | _ACEOF | |
6059 | rm -f conftest.$ac_objext | |
6060 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6061 | (eval $ac_compile) 2>conftest.er1 | |
6062 | ac_status=$? | |
6063 | grep -v '^ *+' conftest.er1 >conftest.err | |
6064 | rm -f conftest.er1 | |
6065 | cat conftest.err >&5 | |
6066 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6067 | (exit $ac_status); } && | |
6068 | { ac_try='test -z "$ac_c_werror_flag" | |
6069 | || test ! -s conftest.err' | |
6070 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6071 | (eval $ac_try) 2>&5 | |
6072 | ac_status=$? | |
6073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6074 | (exit $ac_status); }; } && | |
6075 | { ac_try='test -s conftest.$ac_objext' | |
6076 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6077 | (eval $ac_try) 2>&5 | |
6078 | ac_status=$? | |
6079 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6080 | (exit $ac_status); }; }; then | |
6081 | ac_hi=$ac_mid | |
6082 | else | |
6083 | echo "$as_me: failed program was:" >&5 | |
6084 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6085 | ||
6086 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
6087 | fi | |
6088 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6089 | done | |
6090 | case $ac_lo in | |
6091 | ?*) result=$ac_lo;; | |
6092 | '') result=unknown ;; | |
6093 | esac | |
6094 | else | |
6095 | if test "$cross_compiling" = yes; then | |
d5af19ba DJ |
6096 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
6097 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6098 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
783e057b DJ |
6099 | See \`config.log' for more details." >&5 |
6100 | echo "$as_me: error: cannot run test program while cross compiling | |
6101 | See \`config.log' for more details." >&2;} | |
d5af19ba | 6102 | { (exit 1); exit 1; }; }; } |
783e057b DJ |
6103 | else |
6104 | cat >conftest.$ac_ext <<_ACEOF | |
6105 | /* confdefs.h. */ | |
6106 | _ACEOF | |
6107 | cat confdefs.h >>conftest.$ac_ext | |
6108 | cat >>conftest.$ac_ext <<_ACEOF | |
6109 | /* end confdefs.h. */ | |
6110 | ||
6111 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6112 | included before <wchar.h>. */ | |
6113 | #include <stddef.h> | |
6114 | #include <signal.h> | |
6115 | #if HAVE_WCHAR_H | |
6116 | # include <stdio.h> | |
6117 | # include <time.h> | |
6118 | # include <wchar.h> | |
6119 | #endif | |
6120 | ||
6121 | #include <limits.h> | |
6122 | long longval () { return sizeof ($gltype) * CHAR_BIT; } | |
6123 | unsigned long ulongval () { return sizeof ($gltype) * CHAR_BIT; } | |
6124 | #include <stdio.h> | |
6125 | #include <stdlib.h> | |
6126 | int | |
6127 | main () | |
6128 | { | |
6129 | ||
6130 | FILE *f = fopen ("conftest.val", "w"); | |
6131 | if (! f) | |
6132 | exit (1); | |
6133 | if ((sizeof ($gltype) * CHAR_BIT) < 0) | |
6134 | { | |
6135 | long i = longval (); | |
6136 | if (i != (sizeof ($gltype) * CHAR_BIT)) | |
6137 | exit (1); | |
6138 | fprintf (f, "%ld\n", i); | |
6139 | } | |
6140 | else | |
6141 | { | |
6142 | unsigned long i = ulongval (); | |
6143 | if (i != (sizeof ($gltype) * CHAR_BIT)) | |
6144 | exit (1); | |
6145 | fprintf (f, "%lu\n", i); | |
6146 | } | |
6147 | exit (ferror (f) || fclose (f) != 0); | |
6148 | ||
6149 | ; | |
6150 | return 0; | |
6151 | } | |
6152 | _ACEOF | |
6153 | rm -f conftest$ac_exeext | |
6154 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6155 | (eval $ac_link) 2>&5 | |
6156 | ac_status=$? | |
6157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6158 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6159 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6160 | (eval $ac_try) 2>&5 | |
6161 | ac_status=$? | |
6162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6163 | (exit $ac_status); }; }; then | |
6164 | result=`cat conftest.val` | |
6165 | else | |
6166 | echo "$as_me: program exited with status $ac_status" >&5 | |
6167 | echo "$as_me: failed program was:" >&5 | |
6168 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6169 | ||
6170 | ( exit $ac_status ) | |
6171 | result=unknown | |
6172 | fi | |
6173 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
6174 | fi | |
6175 | fi | |
6176 | rm -f conftest.val | |
6177 | eval gl_cv_bitsizeof_${gltype}=\$result | |
c906108c | 6178 | |
783e057b DJ |
6179 | fi |
6180 | echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&5 | |
6181 | echo "${ECHO_T}`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`" >&6 | |
6182 | eval result=\$gl_cv_bitsizeof_${gltype} | |
6183 | if test $result = unknown; then | |
6184 | result=0 | |
6185 | fi | |
6186 | GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6187 | cat >>confdefs.h <<_ACEOF | |
6188 | #define BITSIZEOF_${GLTYPE} $result | |
6189 | _ACEOF | |
c906108c | 6190 | |
783e057b DJ |
6191 | eval BITSIZEOF_${GLTYPE}=\$result |
6192 | done | |
c906108c | 6193 | |
c906108c | 6194 | |
c906108c | 6195 | |
bec39cab | 6196 | |
3841debe | 6197 | |
783e057b DJ |
6198 | |
6199 | ||
6200 | for gltype in sig_atomic_t wchar_t wint_t ; do | |
6201 | echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 | |
6202 | echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6 | |
6203 | if eval "test \"\${gl_cv_type_${gltype}_signed+set}\" = set"; then | |
6204 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6205 | else | |
6206 | cat >conftest.$ac_ext <<_ACEOF | |
6207 | /* confdefs.h. */ | |
6208 | _ACEOF | |
6209 | cat confdefs.h >>conftest.$ac_ext | |
6210 | cat >>conftest.$ac_ext <<_ACEOF | |
6211 | /* end confdefs.h. */ | |
6212 | ||
6213 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6214 | included before <wchar.h>. */ | |
6215 | #include <stddef.h> | |
6216 | #include <signal.h> | |
6217 | #if HAVE_WCHAR_H | |
6218 | # include <stdio.h> | |
6219 | # include <time.h> | |
6220 | # include <wchar.h> | |
6221 | #endif | |
6222 | ||
6223 | int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; | |
6224 | int | |
6225 | main () | |
6226 | { | |
6227 | ||
6228 | ; | |
6229 | return 0; | |
6230 | } | |
6231 | _ACEOF | |
6232 | rm -f conftest.$ac_objext | |
6233 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6234 | (eval $ac_compile) 2>conftest.er1 | |
6235 | ac_status=$? | |
6236 | grep -v '^ *+' conftest.er1 >conftest.err | |
6237 | rm -f conftest.er1 | |
6238 | cat conftest.err >&5 | |
6239 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6240 | (exit $ac_status); } && | |
6241 | { ac_try='test -z "$ac_c_werror_flag" | |
6242 | || test ! -s conftest.err' | |
6243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6244 | (eval $ac_try) 2>&5 | |
6245 | ac_status=$? | |
6246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6247 | (exit $ac_status); }; } && | |
6248 | { ac_try='test -s conftest.$ac_objext' | |
6249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6250 | (eval $ac_try) 2>&5 | |
6251 | ac_status=$? | |
6252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6253 | (exit $ac_status); }; }; then | |
6254 | result=yes | |
6255 | else | |
6256 | echo "$as_me: failed program was:" >&5 | |
6257 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6258 | ||
6259 | result=no | |
20e95c23 | 6260 | fi |
783e057b DJ |
6261 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
6262 | eval gl_cv_type_${gltype}_signed=\$result | |
6263 | ||
6264 | fi | |
6265 | echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&5 | |
6266 | echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_signed'}'`" >&6 | |
6267 | eval result=\$gl_cv_type_${gltype}_signed | |
6268 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6269 | if test "$result" = yes; then | |
6270 | cat >>confdefs.h <<_ACEOF | |
6271 | #define HAVE_SIGNED_${GLTYPE} 1 | |
6272 | _ACEOF | |
6273 | ||
6274 | eval HAVE_SIGNED_${GLTYPE}=1 | |
6275 | else | |
6276 | eval HAVE_SIGNED_${GLTYPE}=0 | |
6277 | fi | |
6278 | done | |
6279 | ||
6280 | ||
6281 | gl_cv_type_ptrdiff_t_signed=yes | |
6282 | gl_cv_type_size_t_signed=no | |
6283 | ||
6284 | ||
6285 | ||
6286 | ||
6287 | ||
6288 | ||
6289 | ||
6290 | for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do | |
6291 | echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 | |
6292 | echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6 | |
6293 | if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\" = set"; then | |
6294 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 6295 | else |
783e057b DJ |
6296 | eval gl_cv_type_${gltype}_suffix=no |
6297 | eval result=\$gl_cv_type_${gltype}_signed | |
6298 | if test "$result" = yes; then | |
6299 | glsufu= | |
6300 | else | |
6301 | glsufu=u | |
6302 | fi | |
6303 | for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do | |
6304 | case $glsuf in | |
6305 | '') gltype1='int';; | |
6306 | l) gltype1='long int';; | |
6307 | ll) gltype1='long long int';; | |
6308 | i64) gltype1='__int64';; | |
6309 | u) gltype1='unsigned int';; | |
6310 | ul) gltype1='unsigned long int';; | |
6311 | ull) gltype1='unsigned long long int';; | |
6312 | ui64)gltype1='unsigned __int64';; | |
6313 | esac | |
6314 | cat >conftest.$ac_ext <<_ACEOF | |
6315 | /* confdefs.h. */ | |
6316 | _ACEOF | |
6317 | cat confdefs.h >>conftest.$ac_ext | |
6318 | cat >>conftest.$ac_ext <<_ACEOF | |
6319 | /* end confdefs.h. */ | |
6320 | ||
6321 | /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | |
6322 | included before <wchar.h>. */ | |
6323 | #include <stddef.h> | |
6324 | #include <signal.h> | |
6325 | #if HAVE_WCHAR_H | |
6326 | # include <stdio.h> | |
6327 | # include <time.h> | |
6328 | # include <wchar.h> | |
6329 | #endif | |
6330 | ||
6331 | extern $gltype foo; | |
6332 | extern $gltype1 foo; | |
6333 | int | |
6334 | main () | |
6335 | { | |
6336 | ||
6337 | ; | |
6338 | return 0; | |
6339 | } | |
6340 | _ACEOF | |
6341 | rm -f conftest.$ac_objext | |
6342 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6343 | (eval $ac_compile) 2>conftest.er1 | |
6344 | ac_status=$? | |
6345 | grep -v '^ *+' conftest.er1 >conftest.err | |
6346 | rm -f conftest.er1 | |
6347 | cat conftest.err >&5 | |
6348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6349 | (exit $ac_status); } && | |
6350 | { ac_try='test -z "$ac_c_werror_flag" | |
6351 | || test ! -s conftest.err' | |
6352 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6353 | (eval $ac_try) 2>&5 | |
6354 | ac_status=$? | |
6355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6356 | (exit $ac_status); }; } && | |
6357 | { ac_try='test -s conftest.$ac_objext' | |
6358 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6359 | (eval $ac_try) 2>&5 | |
6360 | ac_status=$? | |
6361 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6362 | (exit $ac_status); }; }; then | |
6363 | eval gl_cv_type_${gltype}_suffix=\$glsuf | |
6364 | else | |
6365 | echo "$as_me: failed program was:" >&5 | |
6366 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6367 | ||
6368 | fi | |
6369 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6370 | eval result=\$gl_cv_type_${gltype}_suffix | |
6371 | test "$result" != no && break | |
6372 | done | |
6373 | fi | |
6374 | echo "$as_me:$LINENO: result: `eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&5 | |
6375 | echo "${ECHO_T}`eval echo '${'gl_cv_type_${gltype}_suffix'}'`" >&6 | |
6376 | GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` | |
6377 | eval result=\$gl_cv_type_${gltype}_suffix | |
6378 | test "$result" = no && result= | |
6379 | eval ${GLTYPE}_SUFFIX=\$result | |
6380 | cat >>confdefs.h <<_ACEOF | |
6381 | #define ${GLTYPE}_SUFFIX $result | |
6382 | _ACEOF | |
6383 | ||
6384 | done | |
6385 | ||
6386 | ||
6387 | ||
6388 | STDINT_H=stdint.h | |
6389 | fi | |
6390 | ||
6391 | ||
6392 | ||
6393 | ||
6394 | ||
6395 | ||
6396 | ||
6397 | echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5 | |
6398 | echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6 | |
6399 | if test "${gl_cv_header_wchar_h_standalone+set}" = set; then | |
6400 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6401 | else | |
6402 | cat >conftest.$ac_ext <<_ACEOF | |
6403 | #include <wchar.h> | |
6404 | wchar_t w; | |
6405 | _ACEOF | |
6406 | rm -f conftest.$ac_objext | |
6407 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6408 | (eval $ac_compile) 2>conftest.er1 | |
6409 | ac_status=$? | |
6410 | grep -v '^ *+' conftest.er1 >conftest.err | |
6411 | rm -f conftest.er1 | |
6412 | cat conftest.err >&5 | |
6413 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6414 | (exit $ac_status); } && | |
6415 | { ac_try='test -z "$ac_c_werror_flag" | |
6416 | || test ! -s conftest.err' | |
6417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6418 | (eval $ac_try) 2>&5 | |
6419 | ac_status=$? | |
6420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6421 | (exit $ac_status); }; } && | |
6422 | { ac_try='test -s conftest.$ac_objext' | |
6423 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6424 | (eval $ac_try) 2>&5 | |
6425 | ac_status=$? | |
6426 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6427 | (exit $ac_status); }; }; then | |
6428 | gl_cv_header_wchar_h_standalone=yes | |
6429 | else | |
6430 | echo "$as_me: failed program was:" >&5 | |
6431 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6432 | ||
6433 | gl_cv_header_wchar_h_standalone=no | |
6434 | fi | |
6435 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6436 | fi | |
6437 | echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5 | |
6438 | echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6 | |
6439 | if test $gl_cv_header_wchar_h_standalone != yes; then | |
6440 | WCHAR_H=wchar.h | |
6441 | fi | |
6442 | ||
6443 | ||
6444 | : | |
6445 | ||
6446 | ||
6447 | ||
6448 | ||
6449 | ||
6450 | if test $ac_cv_header_wchar_h = yes; then | |
6451 | HAVE_WCHAR_H=1 | |
6452 | else | |
6453 | HAVE_WCHAR_H=0 | |
6454 | fi | |
6455 | ||
6456 | ||
6457 | ||
6458 | ||
6459 | : | |
6460 | ||
6461 | ||
6462 | ||
6463 | ||
6464 | ||
6465 | ||
6466 | ||
6467 | if test $gl_cv_have_include_next = yes; then | |
6468 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6469 | else | |
6470 | echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5 | |
6471 | echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6 | |
6472 | if test "${gl_cv_next_wchar_h+set}" = set; then | |
6473 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6474 | else | |
6475 | ||
6476 | if test $ac_cv_header_wchar_h = yes; then | |
6477 | cat >conftest.$ac_ext <<_ACEOF | |
6478 | /* confdefs.h. */ | |
6479 | _ACEOF | |
6480 | cat confdefs.h >>conftest.$ac_ext | |
6481 | cat >>conftest.$ac_ext <<_ACEOF | |
6482 | /* end confdefs.h. */ | |
6483 | #include <wchar.h> | |
6484 | ||
6485 | _ACEOF | |
6486 | gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
6487 | sed -n '\#/wchar.h#{ | |
6488 | s#.*"\(.*/wchar.h\)".*#\1# | |
6489 | s#^/[^/]#//&# | |
6490 | p | |
6491 | q | |
6492 | }'`'"' | |
6493 | else | |
6494 | gl_cv_next_wchar_h='<'wchar.h'>' | |
6495 | fi | |
6496 | ||
6497 | fi | |
6498 | echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 | |
6499 | echo "${ECHO_T}$gl_cv_next_wchar_h" >&6 | |
6500 | fi | |
6501 | NEXT_WCHAR_H=$gl_cv_next_wchar_h | |
6502 | ||
c906108c | 6503 | |
c906108c | 6504 | |
c906108c | 6505 | |
c906108c | 6506 | |
c906108c | 6507 | |
c906108c | 6508 | |
c906108c | 6509 | |
783e057b DJ |
6510 | gltests_libdeps= |
6511 | gltests_ltlibdeps= | |
20e95c23 | 6512 | |
20e95c23 | 6513 | |
20e95c23 | 6514 | |
783e057b | 6515 | gl_source_base='tests' |
c906108c | 6516 | |
bec39cab | 6517 | |
bec39cab | 6518 | |
783e057b DJ |
6519 | |
6520 | LIBGNU_LIBDEPS="$gl_libdeps" | |
6521 | ||
6522 | LIBGNU_LTLIBDEPS="$gl_ltlibdeps" | |
6523 | ||
6524 | ||
e28b3332 | 6525 | |
d5af19ba DJ |
6526 | # For Makefile dependencies. |
6527 | GNULIB_STDINT_H= | |
6528 | if test x"$STDINT_H" != x; then | |
6529 | GNULIB_STDINT_H=gnulib/$STDINT_H | |
6530 | fi | |
6531 | ||
6532 | ||
bec39cab AC |
6533 | PACKAGE=gdb |
6534 | ||
6535 | cat >>confdefs.h <<_ACEOF | |
6536 | #define PACKAGE "$PACKAGE" | |
6537 | _ACEOF | |
6538 | ||
6539 | ||
6540 | ||
e28b3332 DJ |
6541 | # GDB does not use automake, but gnulib does. This line lets us |
6542 | # generate its Makefile.in. | |
6543 | am__api_version="1.9" | |
6544 | # Find a good install program. We prefer a C program (faster), | |
6545 | # so one script is as good as another. But avoid the broken or | |
6546 | # incompatible versions: | |
6547 | # SysV /etc/install, /usr/sbin/install | |
6548 | # SunOS /usr/etc/install | |
6549 | # IRIX /sbin/install | |
6550 | # AIX /bin/install | |
6551 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
6552 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
6553 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
6554 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
6555 | # OS/2's system install, which has a completely different semantic | |
6556 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 6557 | # Reject install programs that cannot install multiple files. |
e28b3332 DJ |
6558 | echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 |
6559 | echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 | |
6560 | if test -z "$INSTALL"; then | |
6561 | if test "${ac_cv_path_install+set}" = set; then | |
6562 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6563 | else | |
6564 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6565 | for as_dir in $PATH | |
6566 | do | |
6567 | IFS=$as_save_IFS | |
6568 | test -z "$as_dir" && as_dir=. | |
6569 | # Account for people who put trailing slashes in PATH elements. | |
6570 | case $as_dir/ in | |
6571 | ./ | .// | /cC/* | \ | |
6572 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
6573 | ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ | |
6574 | /usr/ucb/* ) ;; | |
6575 | *) | |
6576 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
6577 | # Don't use installbsd from OSF since it installs stuff as root | |
6578 | # by default. | |
6579 | for ac_prog in ginstall scoinst install; do | |
6580 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6581 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | |
6582 | if test $ac_prog = install && | |
6583 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
6584 | # AIX install. It has an incompatible calling convention. | |
6585 | : | |
6586 | elif test $ac_prog = install && | |
6587 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
6588 | # program-specific install script used by HP pwplus--don't use. | |
6589 | : | |
6590 | else | |
85541719 DE |
6591 | rm -rf conftest.one conftest.two conftest.dir |
6592 | echo one > conftest.one | |
6593 | echo two > conftest.two | |
6594 | mkdir conftest.dir | |
6595 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
6596 | test -s conftest.one && test -s conftest.two && | |
6597 | test -s conftest.dir/conftest.one && | |
6598 | test -s conftest.dir/conftest.two | |
6599 | then | |
6600 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
6601 | break 3 | |
6602 | fi | |
e28b3332 DJ |
6603 | fi |
6604 | fi | |
6605 | done | |
6606 | done | |
6607 | ;; | |
6608 | esac | |
6609 | done | |
6610 | ||
85541719 | 6611 | rm -rf conftest.one conftest.two conftest.dir |
e28b3332 DJ |
6612 | |
6613 | fi | |
6614 | if test "${ac_cv_path_install+set}" = set; then | |
6615 | INSTALL=$ac_cv_path_install | |
6616 | else | |
85541719 DE |
6617 | # As a last resort, use the slow shell script. Don't cache a |
6618 | # value for INSTALL within a source directory, because that will | |
e28b3332 | 6619 | # break other packages using the cache if that directory is |
85541719 | 6620 | # removed, or if the value is a relative name. |
e28b3332 DJ |
6621 | INSTALL=$ac_install_sh |
6622 | fi | |
6623 | fi | |
6624 | echo "$as_me:$LINENO: result: $INSTALL" >&5 | |
6625 | echo "${ECHO_T}$INSTALL" >&6 | |
6626 | ||
6627 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
6628 | # It thinks the first close brace ends the variable substitution. | |
6629 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
6630 | ||
6631 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
6632 | ||
6633 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
6634 | ||
6635 | echo "$as_me:$LINENO: checking whether build environment is sane" >&5 | |
6636 | echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 | |
6637 | # Just in case | |
6638 | sleep 1 | |
6639 | echo timestamp > conftest.file | |
6640 | # Do `set' in a subshell so we don't clobber the current shell's | |
6641 | # arguments. Must try -L first in case configure is actually a | |
6642 | # symlink; some systems play weird games with the mod time of symlinks | |
6643 | # (eg FreeBSD returns the mod time of the symlink's containing | |
6644 | # directory). | |
6645 | if ( | |
6646 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` | |
6647 | if test "$*" = "X"; then | |
6648 | # -L didn't work. | |
6649 | set X `ls -t $srcdir/configure conftest.file` | |
6650 | fi | |
6651 | rm -f conftest.file | |
6652 | if test "$*" != "X $srcdir/configure conftest.file" \ | |
6653 | && test "$*" != "X conftest.file $srcdir/configure"; then | |
6654 | ||
6655 | # If neither matched, then we have a broken ls. This can happen | |
6656 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
6657 | # broken ls alias from the environment. This has actually | |
6658 | # happened. Such a system could not be considered "sane". | |
6659 | { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken | |
6660 | alias in your environment" >&5 | |
6661 | echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken | |
6662 | alias in your environment" >&2;} | |
6663 | { (exit 1); exit 1; }; } | |
6664 | fi | |
6665 | ||
6666 | test "$2" = conftest.file | |
6667 | ) | |
6668 | then | |
6669 | # Ok. | |
6670 | : | |
6671 | else | |
6672 | { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! | |
6673 | Check your system clock" >&5 | |
6674 | echo "$as_me: error: newly created file is older than distributed files! | |
6675 | Check your system clock" >&2;} | |
6676 | { (exit 1); exit 1; }; } | |
6677 | fi | |
6678 | echo "$as_me:$LINENO: result: yes" >&5 | |
6679 | echo "${ECHO_T}yes" >&6 | |
6680 | test "$program_prefix" != NONE && | |
6681 | program_transform_name="s,^,$program_prefix,;$program_transform_name" | |
6682 | # Use a double $ so make ignores it. | |
6683 | test "$program_suffix" != NONE && | |
6684 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" | |
6685 | # Double any \ or $. echo might interpret backslashes. | |
6686 | # By default was `s,x,x', remove it if useless. | |
6687 | cat <<\_ACEOF >conftest.sed | |
6688 | s/[\\$]/&&/g;s/;s,x,x,$// | |
6689 | _ACEOF | |
6690 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
6691 | rm conftest.sed | |
6692 | ||
6693 | # expand $ac_aux_dir to an absolute path | |
6694 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
6695 | ||
6696 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" | |
6697 | # Use eval to expand $SHELL | |
6698 | if eval "$MISSING --run true"; then | |
6699 | am_missing_run="$MISSING --run " | |
6700 | else | |
6701 | am_missing_run= | |
6702 | { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 | |
6703 | echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | |
6704 | fi | |
6705 | ||
6706 | if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then | |
6707 | # We used to keeping the `.' as first argument, in order to | |
6708 | # allow $(mkdir_p) to be used without argument. As in | |
6709 | # $(mkdir_p) $(somedir) | |
6710 | # where $(somedir) is conditionally defined. However this is wrong | |
6711 | # for two reasons: | |
6712 | # 1. if the package is installed by a user who cannot write `.' | |
6713 | # make install will fail, | |
6714 | # 2. the above comment should most certainly read | |
6715 | # $(mkdir_p) $(DESTDIR)$(somedir) | |
6716 | # so it does not work when $(somedir) is undefined and | |
6717 | # $(DESTDIR) is not. | |
6718 | # To support the latter case, we have to write | |
6719 | # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), | |
6720 | # so the `.' trick is pointless. | |
6721 | mkdir_p='mkdir -p --' | |
6722 | else | |
6723 | # On NextStep and OpenStep, the `mkdir' command does not | |
6724 | # recognize any option. It will interpret all options as | |
6725 | # directories to create, and then abort because `.' already | |
6726 | # exists. | |
6727 | for d in ./-p ./--version; | |
6728 | do | |
6729 | test -d $d && rmdir $d | |
6730 | done | |
6731 | # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. | |
6732 | if test -f "$ac_aux_dir/mkinstalldirs"; then | |
6733 | mkdir_p='$(mkinstalldirs)' | |
6734 | else | |
6735 | mkdir_p='$(install_sh) -d' | |
6736 | fi | |
6737 | fi | |
6738 | ||
6739 | for ac_prog in gawk mawk nawk awk | |
6740 | do | |
6741 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
6742 | set dummy $ac_prog; ac_word=$2 | |
6743 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
6744 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6745 | if test "${ac_cv_prog_AWK+set}" = set; then | |
6746 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6747 | else | |
6748 | if test -n "$AWK"; then | |
6749 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
6750 | else | |
6751 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6752 | for as_dir in $PATH | |
6753 | do | |
6754 | IFS=$as_save_IFS | |
6755 | test -z "$as_dir" && as_dir=. | |
6756 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6757 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6758 | ac_cv_prog_AWK="$ac_prog" | |
6759 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6760 | break 2 | |
6761 | fi | |
6762 | done | |
6763 | done | |
6764 | ||
6765 | fi | |
6766 | fi | |
6767 | AWK=$ac_cv_prog_AWK | |
6768 | if test -n "$AWK"; then | |
6769 | echo "$as_me:$LINENO: result: $AWK" >&5 | |
6770 | echo "${ECHO_T}$AWK" >&6 | |
6771 | else | |
6772 | echo "$as_me:$LINENO: result: no" >&5 | |
6773 | echo "${ECHO_T}no" >&6 | |
6774 | fi | |
6775 | ||
6776 | test -n "$AWK" && break | |
6777 | done | |
6778 | ||
e28b3332 DJ |
6779 | ac_config_commands="$ac_config_commands depfiles" |
6780 | ||
6781 | ||
6782 | am_make=${MAKE-make} | |
6783 | cat > confinc << 'END' | |
6784 | am__doit: | |
6785 | @echo done | |
6786 | .PHONY: am__doit | |
6787 | END | |
6788 | # If we don't find an include directive, just comment out the code. | |
6789 | echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 | |
6790 | echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 | |
6791 | am__include="#" | |
6792 | am__quote= | |
6793 | _am_result=none | |
6794 | # First try GNU make style include. | |
6795 | echo "include confinc" > confmf | |
6796 | # We grep out `Entering directory' and `Leaving directory' | |
6797 | # messages which can occur if `w' ends up in MAKEFLAGS. | |
6798 | # In particular we don't look at `^make:' because GNU make might | |
6799 | # be invoked under some other name (usually "gmake"), in which | |
6800 | # case it prints its new name instead of `make'. | |
6801 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then | |
6802 | am__include=include | |
6803 | am__quote= | |
6804 | _am_result=GNU | |
6805 | fi | |
6806 | # Now try BSD make style include. | |
6807 | if test "$am__include" = "#"; then | |
6808 | echo '.include "confinc"' > confmf | |
6809 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then | |
6810 | am__include=.include | |
6811 | am__quote="\"" | |
6812 | _am_result=BSD | |
6813 | fi | |
6814 | fi | |
6815 | ||
6816 | ||
6817 | echo "$as_me:$LINENO: result: $_am_result" >&5 | |
6818 | echo "${ECHO_T}$_am_result" >&6 | |
6819 | rm -f confinc confmf | |
6820 | ||
6821 | # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. | |
6822 | if test "${enable_dependency_tracking+set}" = set; then | |
6823 | enableval="$enable_dependency_tracking" | |
6824 | ||
6825 | fi; | |
6826 | if test "x$enable_dependency_tracking" != xno; then | |
6827 | am_depcomp="$ac_aux_dir/depcomp" | |
6828 | AMDEPBACKSLASH='\' | |
6829 | fi | |
6830 | ||
6831 | ||
6832 | if test "x$enable_dependency_tracking" != xno; then | |
6833 | AMDEP_TRUE= | |
6834 | AMDEP_FALSE='#' | |
6835 | else | |
6836 | AMDEP_TRUE='#' | |
6837 | AMDEP_FALSE= | |
6838 | fi | |
6839 | ||
6840 | ||
6841 | ||
6842 | # test to see if srcdir already configured | |
6843 | if test "`cd $srcdir && pwd`" != "`pwd`" && | |
6844 | test -f $srcdir/config.status; then | |
6845 | { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 | |
6846 | echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} | |
6847 | { (exit 1); exit 1; }; } | |
6848 | fi | |
6849 | ||
6850 | # test whether we have cygpath | |
6851 | if test -z "$CYGPATH_W"; then | |
6852 | if (cygpath --version) >/dev/null 2>/dev/null; then | |
6853 | CYGPATH_W='cygpath -w' | |
6854 | else | |
6855 | CYGPATH_W=echo | |
6856 | fi | |
6857 | fi | |
6858 | ||
6859 | ||
6860 | # Define the identity of the package. | |
6861 | PACKAGE=gdb | |
6862 | VERSION=UNUSED-VERSION | |
6863 | ||
6864 | ||
6865 | # Some tools Automake needs. | |
6866 | ||
6867 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | |
6868 | ||
6869 | ||
6870 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | |
6871 | ||
6872 | ||
6873 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | |
6874 | ||
6875 | ||
6876 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | |
6877 | ||
6878 | ||
6879 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | |
6880 | ||
6881 | install_sh=${install_sh-"$am_aux_dir/install-sh"} | |
6882 | ||
6883 | # Installed binaries are usually stripped using `strip' when the user | |
6884 | # run `make install-strip'. However `strip' might not be the right | |
6885 | # tool to use in cross-compilation environments, therefore Automake | |
6886 | # will honor the `STRIP' environment variable to overrule this program. | |
6887 | if test "$cross_compiling" != no; then | |
6888 | if test -n "$ac_tool_prefix"; then | |
6889 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
6890 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
6891 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
6892 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6893 | if test "${ac_cv_prog_STRIP+set}" = set; then | |
6894 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6895 | else | |
6896 | if test -n "$STRIP"; then | |
6897 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
6898 | else | |
6899 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6900 | for as_dir in $PATH | |
6901 | do | |
6902 | IFS=$as_save_IFS | |
6903 | test -z "$as_dir" && as_dir=. | |
6904 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6905 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6906 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
6907 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6908 | break 2 | |
6909 | fi | |
6910 | done | |
6911 | done | |
6912 | ||
6913 | fi | |
6914 | fi | |
6915 | STRIP=$ac_cv_prog_STRIP | |
6916 | if test -n "$STRIP"; then | |
6917 | echo "$as_me:$LINENO: result: $STRIP" >&5 | |
6918 | echo "${ECHO_T}$STRIP" >&6 | |
6919 | else | |
6920 | echo "$as_me:$LINENO: result: no" >&5 | |
6921 | echo "${ECHO_T}no" >&6 | |
6922 | fi | |
6923 | ||
6924 | fi | |
6925 | if test -z "$ac_cv_prog_STRIP"; then | |
6926 | ac_ct_STRIP=$STRIP | |
6927 | # Extract the first word of "strip", so it can be a program name with args. | |
6928 | set dummy strip; ac_word=$2 | |
6929 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
6930 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6931 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then | |
6932 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6933 | else | |
6934 | if test -n "$ac_ct_STRIP"; then | |
6935 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
6936 | else | |
6937 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6938 | for as_dir in $PATH | |
6939 | do | |
6940 | IFS=$as_save_IFS | |
6941 | test -z "$as_dir" && as_dir=. | |
6942 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6943 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
6944 | ac_cv_prog_ac_ct_STRIP="strip" | |
6945 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
6946 | break 2 | |
6947 | fi | |
6948 | done | |
6949 | done | |
6950 | ||
6951 | test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" | |
6952 | fi | |
6953 | fi | |
6954 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
6955 | if test -n "$ac_ct_STRIP"; then | |
6956 | echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 | |
6957 | echo "${ECHO_T}$ac_ct_STRIP" >&6 | |
6958 | else | |
6959 | echo "$as_me:$LINENO: result: no" >&5 | |
6960 | echo "${ECHO_T}no" >&6 | |
6961 | fi | |
6962 | ||
6963 | STRIP=$ac_ct_STRIP | |
6964 | else | |
6965 | STRIP="$ac_cv_prog_STRIP" | |
6966 | fi | |
6967 | ||
6968 | fi | |
6969 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" | |
6970 | ||
6971 | # We need awk for the "check" target. The system "awk" is bad on | |
6972 | # some platforms. | |
6973 | # Always define AMTAR for backward compatibility. | |
6974 | ||
6975 | AMTAR=${AMTAR-"${am_missing_run}tar"} | |
6976 | ||
6977 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | |
6978 | ||
6979 | ||
6980 | ||
6981 | ||
6982 | depcc="$CC" am_compiler_list= | |
6983 | ||
6984 | echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 | |
6985 | echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 | |
6986 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then | |
6987 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6988 | else | |
6989 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
6990 | # We make a subdir and do the tests there. Otherwise we can end up | |
6991 | # making bogus files that we don't know about and never remove. For | |
6992 | # instance it was reported that on HP-UX the gcc test will end up | |
6993 | # making a dummy file named `D' -- because `-MD' means `put the output | |
6994 | # in D'. | |
6995 | mkdir conftest.dir | |
6996 | # Copy depcomp to subdir because otherwise we won't find it if we're | |
6997 | # using a relative directory. | |
6998 | cp "$am_depcomp" conftest.dir | |
6999 | cd conftest.dir | |
7000 | # We will build objects and dependencies in a subdirectory because | |
7001 | # it helps to detect inapplicable dependency modes. For instance | |
7002 | # both Tru64's cc and ICC support -MD to output dependencies as a | |
7003 | # side effect of compilation, but ICC will put the dependencies in | |
7004 | # the current directory while Tru64 will put them in the object | |
7005 | # directory. | |
7006 | mkdir sub | |
7007 | ||
7008 | am_cv_CC_dependencies_compiler_type=none | |
7009 | if test "$am_compiler_list" = ""; then | |
7010 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
7011 | fi | |
7012 | for depmode in $am_compiler_list; do | |
7013 | # Setup a source with many dependencies, because some compilers | |
7014 | # like to wrap large dependency lists on column 80 (with \), and | |
7015 | # we should not choose a depcomp mode which is confused by this. | |
7016 | # | |
7017 | # We need to recreate these files for each test, as the compiler may | |
7018 | # overwrite some of them when testing with obscure command lines. | |
7019 | # This happens at least with the AIX C compiler. | |
7020 | : > sub/conftest.c | |
7021 | for i in 1 2 3 4 5 6; do | |
7022 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
7023 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | |
7024 | # Solaris 8's {/usr,}/bin/sh. | |
7025 | touch sub/conftst$i.h | |
7026 | done | |
7027 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
7028 | ||
7029 | case $depmode in | |
7030 | nosideeffect) | |
7031 | # after this tag, mechanisms are not by side-effect, so they'll | |
7032 | # only be used when explicitly requested | |
7033 | if test "x$enable_dependency_tracking" = xyes; then | |
7034 | continue | |
7035 | else | |
7036 | break | |
7037 | fi | |
7038 | ;; | |
7039 | none) break ;; | |
7040 | esac | |
7041 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | |
7042 | # mode. It turns out that the SunPro C++ compiler does not properly | |
7043 | # handle `-M -o', and we need to detect this. | |
7044 | if depmode=$depmode \ | |
7045 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | |
7046 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
7047 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ | |
7048 | >/dev/null 2>conftest.err && | |
7049 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
7050 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && | |
7051 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
7052 | # icc doesn't choke on unknown options, it will just issue warnings | |
7053 | # or remarks (even with -Werror). So we grep stderr for any message | |
7054 | # that says an option was ignored or not supported. | |
7055 | # When given -MP, icc 7.0 and 7.1 complain thusly: | |
7056 | # icc: Command line warning: ignoring option '-M'; no argument required | |
7057 | # The diagnosis changed in icc 8.0: | |
7058 | # icc: Command line remark: option '-MP' not supported | |
7059 | if (grep 'ignoring option' conftest.err || | |
7060 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
7061 | am_cv_CC_dependencies_compiler_type=$depmode | |
7062 | break | |
7063 | fi | |
7064 | fi | |
7065 | done | |
7066 | ||
7067 | cd .. | |
7068 | rm -rf conftest.dir | |
7069 | else | |
7070 | am_cv_CC_dependencies_compiler_type=none | |
7071 | fi | |
7072 | ||
7073 | fi | |
7074 | echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
7075 | echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 | |
7076 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
7077 | ||
7078 | ||
7079 | ||
7080 | if | |
7081 | test "x$enable_dependency_tracking" != xno \ | |
7082 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
7083 | am__fastdepCC_TRUE= | |
7084 | am__fastdepCC_FALSE='#' | |
7085 | else | |
7086 | am__fastdepCC_TRUE='#' | |
7087 | am__fastdepCC_FALSE= | |
7088 | fi | |
7089 | ||
7090 | ||
7091 | ||
7092 | ||
bec39cab AC |
7093 | debugdir=${libdir}/debug |
7094 | ||
7095 | ||
b4e70030 | 7096 | # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. |
bec39cab | 7097 | if test "${with_separate_debug_dir+set}" = set; then |
783e057b DJ |
7098 | withval="$with_separate_debug_dir" |
7099 | debugdir="${withval}" | |
7100 | fi; | |
20e95c23 | 7101 | |
20e95c23 | 7102 | |
783e057b DJ |
7103 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
7104 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
7105 | ac_define_dir=`eval echo $debugdir` | |
7106 | ac_define_dir=`eval echo $ac_define_dir` | |
20e95c23 | 7107 | |
783e057b DJ |
7108 | cat >>confdefs.h <<_ACEOF |
7109 | #define DEBUGDIR "$ac_define_dir" | |
20e95c23 | 7110 | _ACEOF |
20e95c23 | 7111 | |
20e95c23 | 7112 | |
783e057b | 7113 | #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"), |
20e95c23 | 7114 | |
783e057b DJ |
7115 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
7116 | if test "x$prefix" = xNONE; then | |
7117 | test_prefix=/usr/local | |
7118 | else | |
7119 | test_prefix=$prefix | |
7120 | fi | |
20e95c23 | 7121 | else |
783e057b | 7122 | test_prefix=$exec_prefix |
20e95c23 | 7123 | fi |
783e057b DJ |
7124 | case ${debugdir} in |
7125 | "${test_prefix}"|"${test_prefix}/"*|\ | |
7126 | '${exec_prefix}'|'${exec_prefix}/'*) | |
20e95c23 DJ |
7127 | |
7128 | cat >>confdefs.h <<\_ACEOF | |
783e057b | 7129 | #define DEBUGDIR_RELOCATABLE 1 |
20e95c23 DJ |
7130 | _ACEOF |
7131 | ||
783e057b DJ |
7132 | ;; |
7133 | esac | |
7134 | ||
20e95c23 | 7135 | |
20e95c23 | 7136 | |
783e057b | 7137 | subdirs="$subdirs doc testsuite" |
20e95c23 DJ |
7138 | |
7139 | ||
783e057b DJ |
7140 | # Check whether to support alternative target configurations |
7141 | # Check whether --enable-targets or --disable-targets was given. | |
7142 | if test "${enable_targets+set}" = set; then | |
7143 | enableval="$enable_targets" | |
7144 | case "${enableval}" in | |
7145 | yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5 | |
7146 | echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;} | |
7147 | { (exit 1); exit 1; }; } | |
7148 | ;; | |
7149 | no) enable_targets= ;; | |
7150 | *) enable_targets=$enableval ;; | |
7151 | esac | |
7152 | fi; | |
20e95c23 | 7153 | |
783e057b DJ |
7154 | # Check whether to enable 64-bit support on 32-bit hosts |
7155 | # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. | |
7156 | if test "${enable_64_bit_bfd+set}" = set; then | |
7157 | enableval="$enable_64_bit_bfd" | |
7158 | case "${enableval}" in | |
7159 | yes) want64=true ;; | |
7160 | no) want64=false ;; | |
7161 | *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5 | |
7162 | echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;} | |
7163 | { (exit 1); exit 1; }; } ;; | |
7164 | esac | |
7165 | else | |
7166 | want64=false | |
7167 | fi; | |
7168 | # Provide defaults for some variables set by the per-host and per-target | |
7169 | # configuration. | |
7170 | gdb_host_obs=posix-hdep.o | |
20e95c23 | 7171 | |
783e057b DJ |
7172 | if test "${target}" = "${host}"; then |
7173 | gdb_native=yes | |
7174 | else | |
7175 | gdb_native=no | |
7176 | fi | |
20e95c23 | 7177 | |
783e057b | 7178 | . $srcdir/configure.host |
20e95c23 | 7179 | |
783e057b | 7180 | # Accumulate some settings from configure.tgt over all enabled targets |
20e95c23 | 7181 | |
783e057b DJ |
7182 | TARGET_OBS= |
7183 | all_targets= | |
20e95c23 | 7184 | |
783e057b | 7185 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
20e95c23 | 7186 | do |
783e057b DJ |
7187 | if test "$targ_alias" = "all"; then |
7188 | all_targets=true | |
7189 | else | |
7190 | # Canonicalize the secondary target names. | |
7191 | result=`$ac_config_sub $targ_alias 2>/dev/null` | |
7192 | if test -n "$result"; then | |
7193 | targ=$result | |
7194 | else | |
7195 | targ=$targ_alias | |
7196 | fi | |
20e95c23 | 7197 | |
783e057b | 7198 | . ${srcdir}/configure.tgt |
20e95c23 | 7199 | |
783e057b DJ |
7200 | # Target-specific object files |
7201 | for i in ${gdb_target_obs}; do | |
7202 | case " $TARGET_OBS " in | |
7203 | *" ${i} "*) ;; | |
7204 | *) | |
7205 | TARGET_OBS="$TARGET_OBS ${i}" | |
7206 | ;; | |
7207 | esac | |
7208 | done | |
20e95c23 | 7209 | |
783e057b DJ |
7210 | # Check whether this target needs 64-bit CORE_ADDR |
7211 | if test x${want64} = xfalse; then | |
7212 | . ${srcdir}/../bfd/config.bfd | |
7213 | fi | |
7214 | fi | |
20e95c23 DJ |
7215 | done |
7216 | ||
783e057b DJ |
7217 | if test x${all_targets} = xtrue; then |
7218 | ||
7219 | # We want all 64-bit targets if we either: | |
7220 | # - run on a 64-bit host or | |
7221 | # - already require 64-bit support for some other target or | |
7222 | # - the --enable-64-bit-bfd option was supplied | |
7223 | # Otherwise we only support all 32-bit targets. | |
7224 | # | |
7225 | # NOTE: This test must be in sync with the corresponding | |
7226 | # tests in BFD! | |
20e95c23 | 7227 | |
783e057b DJ |
7228 | if test x${want64} = xfalse; then |
7229 | echo "$as_me:$LINENO: checking for long" >&5 | |
c0993dbe UW |
7230 | echo $ECHO_N "checking for long... $ECHO_C" >&6 |
7231 | if test "${ac_cv_type_long+set}" = set; then | |
7232 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7233 | else | |
7234 | cat >conftest.$ac_ext <<_ACEOF | |
7235 | /* confdefs.h. */ | |
7236 | _ACEOF | |
7237 | cat confdefs.h >>conftest.$ac_ext | |
7238 | cat >>conftest.$ac_ext <<_ACEOF | |
7239 | /* end confdefs.h. */ | |
7240 | $ac_includes_default | |
7241 | int | |
7242 | main () | |
7243 | { | |
7244 | if ((long *) 0) | |
7245 | return 0; | |
7246 | if (sizeof (long)) | |
7247 | return 0; | |
7248 | ; | |
7249 | return 0; | |
7250 | } | |
7251 | _ACEOF | |
7252 | rm -f conftest.$ac_objext | |
7253 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7254 | (eval $ac_compile) 2>conftest.er1 | |
7255 | ac_status=$? | |
7256 | grep -v '^ *+' conftest.er1 >conftest.err | |
7257 | rm -f conftest.er1 | |
7258 | cat conftest.err >&5 | |
7259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7260 | (exit $ac_status); } && | |
7261 | { ac_try='test -z "$ac_c_werror_flag" | |
7262 | || test ! -s conftest.err' | |
7263 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7264 | (eval $ac_try) 2>&5 | |
7265 | ac_status=$? | |
7266 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7267 | (exit $ac_status); }; } && | |
7268 | { ac_try='test -s conftest.$ac_objext' | |
7269 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7270 | (eval $ac_try) 2>&5 | |
7271 | ac_status=$? | |
7272 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7273 | (exit $ac_status); }; }; then | |
7274 | ac_cv_type_long=yes | |
7275 | else | |
7276 | echo "$as_me: failed program was:" >&5 | |
7277 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7278 | ||
7279 | ac_cv_type_long=no | |
7280 | fi | |
7281 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7282 | fi | |
7283 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
7284 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
7285 | ||
7286 | echo "$as_me:$LINENO: checking size of long" >&5 | |
7287 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
7288 | if test "${ac_cv_sizeof_long+set}" = set; then | |
7289 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7290 | else | |
7291 | if test "$ac_cv_type_long" = yes; then | |
7292 | # The cast to unsigned long works around a bug in the HP C Compiler | |
7293 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
7294 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
7295 | # This bug is HP SR number 8606223364. | |
7296 | if test "$cross_compiling" = yes; then | |
7297 | # Depending upon the size, compute the lo and hi bounds. | |
7298 | cat >conftest.$ac_ext <<_ACEOF | |
7299 | /* confdefs.h. */ | |
7300 | _ACEOF | |
7301 | cat confdefs.h >>conftest.$ac_ext | |
7302 | cat >>conftest.$ac_ext <<_ACEOF | |
7303 | /* end confdefs.h. */ | |
7304 | $ac_includes_default | |
7305 | int | |
7306 | main () | |
7307 | { | |
7308 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
7309 | test_array [0] = 0 | |
7310 | ||
7311 | ; | |
7312 | return 0; | |
7313 | } | |
7314 | _ACEOF | |
7315 | rm -f conftest.$ac_objext | |
7316 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7317 | (eval $ac_compile) 2>conftest.er1 | |
7318 | ac_status=$? | |
7319 | grep -v '^ *+' conftest.er1 >conftest.err | |
7320 | rm -f conftest.er1 | |
7321 | cat conftest.err >&5 | |
7322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7323 | (exit $ac_status); } && | |
7324 | { ac_try='test -z "$ac_c_werror_flag" | |
7325 | || test ! -s conftest.err' | |
7326 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7327 | (eval $ac_try) 2>&5 | |
7328 | ac_status=$? | |
7329 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7330 | (exit $ac_status); }; } && | |
7331 | { ac_try='test -s conftest.$ac_objext' | |
7332 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7333 | (eval $ac_try) 2>&5 | |
7334 | ac_status=$? | |
7335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7336 | (exit $ac_status); }; }; then | |
7337 | ac_lo=0 ac_mid=0 | |
7338 | while :; do | |
7339 | cat >conftest.$ac_ext <<_ACEOF | |
7340 | /* confdefs.h. */ | |
7341 | _ACEOF | |
7342 | cat confdefs.h >>conftest.$ac_ext | |
7343 | cat >>conftest.$ac_ext <<_ACEOF | |
7344 | /* end confdefs.h. */ | |
7345 | $ac_includes_default | |
7346 | int | |
7347 | main () | |
7348 | { | |
7349 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
7350 | test_array [0] = 0 | |
7351 | ||
7352 | ; | |
7353 | return 0; | |
7354 | } | |
7355 | _ACEOF | |
7356 | rm -f conftest.$ac_objext | |
7357 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7358 | (eval $ac_compile) 2>conftest.er1 | |
7359 | ac_status=$? | |
7360 | grep -v '^ *+' conftest.er1 >conftest.err | |
7361 | rm -f conftest.er1 | |
7362 | cat conftest.err >&5 | |
7363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7364 | (exit $ac_status); } && | |
7365 | { ac_try='test -z "$ac_c_werror_flag" | |
7366 | || test ! -s conftest.err' | |
7367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7368 | (eval $ac_try) 2>&5 | |
7369 | ac_status=$? | |
7370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7371 | (exit $ac_status); }; } && | |
7372 | { ac_try='test -s conftest.$ac_objext' | |
7373 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7374 | (eval $ac_try) 2>&5 | |
7375 | ac_status=$? | |
7376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7377 | (exit $ac_status); }; }; then | |
7378 | ac_hi=$ac_mid; break | |
7379 | else | |
7380 | echo "$as_me: failed program was:" >&5 | |
7381 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7382 | ||
7383 | ac_lo=`expr $ac_mid + 1` | |
7384 | if test $ac_lo -le $ac_mid; then | |
7385 | ac_lo= ac_hi= | |
7386 | break | |
7387 | fi | |
7388 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
7389 | fi | |
7390 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7391 | done | |
7392 | else | |
7393 | echo "$as_me: failed program was:" >&5 | |
7394 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7395 | ||
7396 | cat >conftest.$ac_ext <<_ACEOF | |
7397 | /* confdefs.h. */ | |
7398 | _ACEOF | |
7399 | cat confdefs.h >>conftest.$ac_ext | |
7400 | cat >>conftest.$ac_ext <<_ACEOF | |
7401 | /* end confdefs.h. */ | |
7402 | $ac_includes_default | |
7403 | int | |
7404 | main () | |
7405 | { | |
7406 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
7407 | test_array [0] = 0 | |
7408 | ||
7409 | ; | |
7410 | return 0; | |
7411 | } | |
7412 | _ACEOF | |
7413 | rm -f conftest.$ac_objext | |
7414 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7415 | (eval $ac_compile) 2>conftest.er1 | |
7416 | ac_status=$? | |
7417 | grep -v '^ *+' conftest.er1 >conftest.err | |
7418 | rm -f conftest.er1 | |
7419 | cat conftest.err >&5 | |
7420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7421 | (exit $ac_status); } && | |
7422 | { ac_try='test -z "$ac_c_werror_flag" | |
7423 | || test ! -s conftest.err' | |
7424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7425 | (eval $ac_try) 2>&5 | |
7426 | ac_status=$? | |
7427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7428 | (exit $ac_status); }; } && | |
7429 | { ac_try='test -s conftest.$ac_objext' | |
7430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7431 | (eval $ac_try) 2>&5 | |
7432 | ac_status=$? | |
7433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7434 | (exit $ac_status); }; }; then | |
7435 | ac_hi=-1 ac_mid=-1 | |
7436 | while :; do | |
7437 | cat >conftest.$ac_ext <<_ACEOF | |
7438 | /* confdefs.h. */ | |
7439 | _ACEOF | |
7440 | cat confdefs.h >>conftest.$ac_ext | |
7441 | cat >>conftest.$ac_ext <<_ACEOF | |
7442 | /* end confdefs.h. */ | |
7443 | $ac_includes_default | |
7444 | int | |
7445 | main () | |
7446 | { | |
7447 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
7448 | test_array [0] = 0 | |
7449 | ||
7450 | ; | |
7451 | return 0; | |
7452 | } | |
7453 | _ACEOF | |
7454 | rm -f conftest.$ac_objext | |
7455 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7456 | (eval $ac_compile) 2>conftest.er1 | |
7457 | ac_status=$? | |
7458 | grep -v '^ *+' conftest.er1 >conftest.err | |
7459 | rm -f conftest.er1 | |
7460 | cat conftest.err >&5 | |
7461 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7462 | (exit $ac_status); } && | |
7463 | { ac_try='test -z "$ac_c_werror_flag" | |
7464 | || test ! -s conftest.err' | |
7465 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7466 | (eval $ac_try) 2>&5 | |
7467 | ac_status=$? | |
7468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7469 | (exit $ac_status); }; } && | |
7470 | { ac_try='test -s conftest.$ac_objext' | |
7471 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7472 | (eval $ac_try) 2>&5 | |
7473 | ac_status=$? | |
7474 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7475 | (exit $ac_status); }; }; then | |
7476 | ac_lo=$ac_mid; break | |
7477 | else | |
7478 | echo "$as_me: failed program was:" >&5 | |
7479 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7480 | ||
7481 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
7482 | if test $ac_mid -le $ac_hi; then | |
7483 | ac_lo= ac_hi= | |
7484 | break | |
7485 | fi | |
7486 | ac_mid=`expr 2 '*' $ac_mid` | |
7487 | fi | |
7488 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7489 | done | |
7490 | else | |
7491 | echo "$as_me: failed program was:" >&5 | |
7492 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7493 | ||
7494 | ac_lo= ac_hi= | |
7495 | fi | |
7496 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7497 | fi | |
7498 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7499 | # Binary search between lo and hi bounds. | |
7500 | while test "x$ac_lo" != "x$ac_hi"; do | |
7501 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
7502 | cat >conftest.$ac_ext <<_ACEOF | |
7503 | /* confdefs.h. */ | |
7504 | _ACEOF | |
7505 | cat confdefs.h >>conftest.$ac_ext | |
7506 | cat >>conftest.$ac_ext <<_ACEOF | |
7507 | /* end confdefs.h. */ | |
7508 | $ac_includes_default | |
7509 | int | |
7510 | main () | |
7511 | { | |
7512 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
7513 | test_array [0] = 0 | |
7514 | ||
7515 | ; | |
7516 | return 0; | |
7517 | } | |
7518 | _ACEOF | |
7519 | rm -f conftest.$ac_objext | |
7520 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7521 | (eval $ac_compile) 2>conftest.er1 | |
7522 | ac_status=$? | |
7523 | grep -v '^ *+' conftest.er1 >conftest.err | |
7524 | rm -f conftest.er1 | |
7525 | cat conftest.err >&5 | |
7526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7527 | (exit $ac_status); } && | |
7528 | { ac_try='test -z "$ac_c_werror_flag" | |
7529 | || test ! -s conftest.err' | |
7530 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7531 | (eval $ac_try) 2>&5 | |
7532 | ac_status=$? | |
7533 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7534 | (exit $ac_status); }; } && | |
7535 | { ac_try='test -s conftest.$ac_objext' | |
7536 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7537 | (eval $ac_try) 2>&5 | |
7538 | ac_status=$? | |
7539 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7540 | (exit $ac_status); }; }; then | |
7541 | ac_hi=$ac_mid | |
7542 | else | |
7543 | echo "$as_me: failed program was:" >&5 | |
7544 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7545 | ||
7546 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
7547 | fi | |
7548 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7549 | done | |
7550 | case $ac_lo in | |
7551 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
d5af19ba DJ |
7552 | '') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
7553 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7554 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
c0993dbe UW |
7555 | See \`config.log' for more details." >&5 |
7556 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
7557 | See \`config.log' for more details." >&2;} | |
d5af19ba | 7558 | { (exit 1); exit 1; }; }; } ;; |
c0993dbe UW |
7559 | esac |
7560 | else | |
7561 | if test "$cross_compiling" = yes; then | |
d5af19ba DJ |
7562 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
7563 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
7564 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
c0993dbe UW |
7565 | See \`config.log' for more details." >&5 |
7566 | echo "$as_me: error: cannot run test program while cross compiling | |
7567 | See \`config.log' for more details." >&2;} | |
d5af19ba | 7568 | { (exit 1); exit 1; }; }; } |
c0993dbe UW |
7569 | else |
7570 | cat >conftest.$ac_ext <<_ACEOF | |
7571 | /* confdefs.h. */ | |
7572 | _ACEOF | |
7573 | cat confdefs.h >>conftest.$ac_ext | |
7574 | cat >>conftest.$ac_ext <<_ACEOF | |
7575 | /* end confdefs.h. */ | |
7576 | $ac_includes_default | |
7577 | long longval () { return (long) (sizeof (long)); } | |
7578 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
7579 | #include <stdio.h> | |
7580 | #include <stdlib.h> | |
7581 | int | |
7582 | main () | |
7583 | { | |
7584 | ||
7585 | FILE *f = fopen ("conftest.val", "w"); | |
7586 | if (! f) | |
7587 | exit (1); | |
7588 | if (((long) (sizeof (long))) < 0) | |
7589 | { | |
7590 | long i = longval (); | |
7591 | if (i != ((long) (sizeof (long)))) | |
7592 | exit (1); | |
7593 | fprintf (f, "%ld\n", i); | |
7594 | } | |
7595 | else | |
7596 | { | |
7597 | unsigned long i = ulongval (); | |
7598 | if (i != ((long) (sizeof (long)))) | |
7599 | exit (1); | |
7600 | fprintf (f, "%lu\n", i); | |
7601 | } | |
7602 | exit (ferror (f) || fclose (f) != 0); | |
7603 | ||
7604 | ; | |
7605 | return 0; | |
7606 | } | |
7607 | _ACEOF | |
7608 | rm -f conftest$ac_exeext | |
7609 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7610 | (eval $ac_link) 2>&5 | |
7611 | ac_status=$? | |
7612 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7613 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7614 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7615 | (eval $ac_try) 2>&5 | |
7616 | ac_status=$? | |
7617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7618 | (exit $ac_status); }; }; then | |
7619 | ac_cv_sizeof_long=`cat conftest.val` | |
7620 | else | |
7621 | echo "$as_me: program exited with status $ac_status" >&5 | |
7622 | echo "$as_me: failed program was:" >&5 | |
7623 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7624 | ||
7625 | ( exit $ac_status ) | |
d5af19ba DJ |
7626 | { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 |
7627 | echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
c0993dbe UW |
7628 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 |
7629 | See \`config.log' for more details." >&5 | |
7630 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
7631 | See \`config.log' for more details." >&2;} | |
d5af19ba | 7632 | { (exit 1); exit 1; }; }; } |
c0993dbe UW |
7633 | fi |
7634 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
7635 | fi | |
7636 | fi | |
7637 | rm -f conftest.val | |
7638 | else | |
7639 | ac_cv_sizeof_long=0 | |
7640 | fi | |
7641 | fi | |
7642 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
7643 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
7644 | cat >>confdefs.h <<_ACEOF | |
7645 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
7646 | _ACEOF | |
7647 | ||
7648 | ||
7649 | if test "x${ac_cv_sizeof_long}" = "x8"; then | |
7650 | want64=true | |
7651 | fi | |
7652 | fi | |
7653 | if test x${want64} = xtrue; then | |
7654 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' | |
7655 | else | |
7656 | TARGET_OBS='$(ALL_TARGET_OBS)' | |
7657 | fi | |
7658 | fi | |
7659 | ||
7660 | ||
7661 | ||
7662 | # For other settings, only the main target counts. | |
7663 | gdb_sim= | |
7664 | gdb_osabi= | |
7665 | build_gdbserver= | |
7666 | targ=$target; . ${srcdir}/configure.tgt | |
7667 | ||
7668 | # Fetch the default architecture and default target vector from BFD. | |
7669 | targ=$target; . $srcdir/../bfd/config.bfd | |
7670 | ||
7671 | # We only want the first architecture, so strip off the others if | |
7672 | # there is more than one. | |
7673 | targ_archs=`echo $targ_archs | sed 's/ .*//'` | |
7674 | ||
7675 | if test "x$targ_archs" != x; then | |
7676 | ||
7677 | cat >>confdefs.h <<_ACEOF | |
7678 | #define DEFAULT_BFD_ARCH $targ_archs | |
7679 | _ACEOF | |
7680 | ||
7681 | fi | |
7682 | if test "x$targ_defvec" != x; then | |
7683 | ||
7684 | cat >>confdefs.h <<_ACEOF | |
7685 | #define DEFAULT_BFD_VEC $targ_defvec | |
7686 | _ACEOF | |
7687 | ||
7688 | fi | |
7689 | ||
c0993dbe UW |
7690 | # The CLI cannot be disabled yet, but may be in the future. |
7691 | ||
7692 | # Enable CLI. | |
7693 | # Check whether --enable-gdbcli or --disable-gdbcli was given. | |
7694 | if test "${enable_gdbcli+set}" = set; then | |
7695 | enableval="$enable_gdbcli" | |
7696 | case $enableval in | |
7697 | yes) | |
7698 | ;; | |
7699 | no) | |
7700 | { { echo "$as_me:$LINENO: error: the command-line interface cannot be disabled yet" >&5 | |
7701 | echo "$as_me: error: the command-line interface cannot be disabled yet" >&2;} | |
7702 | { (exit 1); exit 1; }; } ;; | |
7703 | *) | |
7704 | { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbcli" >&5 | |
7705 | echo "$as_me: error: bad value $enableval for --enable-gdbcli" >&2;} | |
7706 | { (exit 1); exit 1; }; } ;; | |
7707 | esac | |
7708 | else | |
7709 | enable_gdbcli=yes | |
7710 | fi; | |
7711 | if test x"$enable_gdbcli" = xyes; then | |
7712 | if test -d $srcdir/cli; then | |
7713 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)" | |
7714 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)" | |
7715 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)" | |
7716 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)" | |
7717 | fi | |
7718 | fi | |
7719 | ||
7720 | # Enable MI. | |
7721 | # Check whether --enable-gdbmi or --disable-gdbmi was given. | |
7722 | if test "${enable_gdbmi+set}" = set; then | |
7723 | enableval="$enable_gdbmi" | |
7724 | case $enableval in | |
7725 | yes | no) | |
7726 | ;; | |
7727 | *) | |
7728 | { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbmi" >&5 | |
7729 | echo "$as_me: error: bad value $enableval for --enable-gdbmi" >&2;} | |
7730 | { (exit 1); exit 1; }; } ;; | |
7731 | esac | |
7732 | else | |
7733 | enable_gdbmi=yes | |
7734 | fi; | |
7735 | if test x"$enable_gdbmi" = xyes; then | |
7736 | if test -d $srcdir/mi; then | |
7737 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" | |
7738 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" | |
7739 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" | |
7740 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" | |
7741 | fi | |
7742 | fi | |
7743 | ||
7744 | # Enable TUI. | |
7745 | # Check whether --enable-tui or --disable-tui was given. | |
7746 | if test "${enable_tui+set}" = set; then | |
7747 | enableval="$enable_tui" | |
7748 | case $enableval in | |
3ca64bd3 | 7749 | yes | no | auto) |
c0993dbe UW |
7750 | ;; |
7751 | *) | |
7752 | { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tui" >&5 | |
7753 | echo "$as_me: error: bad value $enableval for --enable-tui" >&2;} | |
7754 | { (exit 1); exit 1; }; } ;; | |
7755 | esac | |
7756 | else | |
3ca64bd3 | 7757 | enable_tui=auto |
c0993dbe UW |
7758 | fi; |
7759 | ||
7760 | # Enable gdbtk. | |
7761 | # Check whether --enable-gdbtk or --disable-gdbtk was given. | |
7762 | if test "${enable_gdbtk+set}" = set; then | |
7763 | enableval="$enable_gdbtk" | |
7764 | case $enableval in | |
7765 | yes | no) | |
7766 | ;; | |
7767 | *) | |
7768 | { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-gdbtk" >&5 | |
7769 | echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;} | |
7770 | { (exit 1); exit 1; }; } ;; | |
7771 | esac | |
7772 | else | |
5062cc19 | 7773 | if test -d $srcdir/gdbtk; then |
c0993dbe UW |
7774 | enable_gdbtk=yes |
7775 | else | |
7776 | enable_gdbtk=no | |
7777 | fi | |
7778 | fi; | |
7779 | # We unconditionally disable gdbtk tests on selected platforms. | |
7780 | case $host_os in | |
7781 | go32* | windows*) | |
7782 | { echo "$as_me:$LINENO: WARNING: gdbtk isn't supported on $host; disabling" >&5 | |
7783 | echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} | |
7784 | enable_gdbtk=no ;; | |
7785 | esac | |
7786 | ||
7787 | # Libunwind support. | |
bec39cab | 7788 | |
b4e70030 | 7789 | # Check whether --with-libunwind or --without-libunwind was given. |
bec39cab | 7790 | if test "${with_libunwind+set}" = set; then |
b4e70030 JB |
7791 | withval="$with_libunwind" |
7792 | case "${withval}" in | |
bec39cab AC |
7793 | yes) enable_libunwind=yes ;; |
7794 | no) enable_libunwind=no ;; | |
7795 | *) { { echo "$as_me:$LINENO: error: bad value ${withval} for GDB with-libunwind option" >&5 | |
7796 | echo "$as_me: error: bad value ${withval} for GDB with-libunwind option" >&2;} | |
7797 | { (exit 1); exit 1; }; } ;; | |
7798 | esac | |
7799 | else | |
7800 | ||
7801 | ||
a9322a30 TT |
7802 | |
7803 | for ac_header in libunwind.h libunwind-ia64.h | |
bec39cab AC |
7804 | do |
7805 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b4e70030 JB |
7806 | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
7807 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
7808 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
7809 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
7810 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
7811 | fi | |
b4e70030 JB |
7812 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7813 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
7814 | else |
7815 | # Is the header compilable? | |
b4e70030 JB |
7816 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 |
7817 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
bec39cab AC |
7818 | cat >conftest.$ac_ext <<_ACEOF |
7819 | /* confdefs.h. */ | |
7820 | _ACEOF | |
7821 | cat confdefs.h >>conftest.$ac_ext | |
7822 | cat >>conftest.$ac_ext <<_ACEOF | |
7823 | /* end confdefs.h. */ | |
7824 | $ac_includes_default | |
7825 | #include <$ac_header> | |
7826 | _ACEOF | |
7827 | rm -f conftest.$ac_objext | |
7828 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7829 | (eval $ac_compile) 2>conftest.er1 | |
7830 | ac_status=$? | |
7831 | grep -v '^ *+' conftest.er1 >conftest.err | |
7832 | rm -f conftest.er1 | |
7833 | cat conftest.err >&5 | |
7834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7835 | (exit $ac_status); } && | |
b4e70030 JB |
7836 | { ac_try='test -z "$ac_c_werror_flag" |
7837 | || test ! -s conftest.err' | |
bec39cab AC |
7838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7839 | (eval $ac_try) 2>&5 | |
7840 | ac_status=$? | |
7841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7842 | (exit $ac_status); }; } && | |
7843 | { ac_try='test -s conftest.$ac_objext' | |
7844 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7845 | (eval $ac_try) 2>&5 | |
7846 | ac_status=$? | |
7847 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7848 | (exit $ac_status); }; }; then | |
7849 | ac_header_compiler=yes | |
7850 | else | |
7851 | echo "$as_me: failed program was:" >&5 | |
7852 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7853 | ||
b4e70030 | 7854 | ac_header_compiler=no |
bec39cab AC |
7855 | fi |
7856 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
b4e70030 JB |
7857 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
7858 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
bec39cab AC |
7859 | |
7860 | # Is the header present? | |
b4e70030 JB |
7861 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 |
7862 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
bec39cab AC |
7863 | cat >conftest.$ac_ext <<_ACEOF |
7864 | /* confdefs.h. */ | |
7865 | _ACEOF | |
7866 | cat confdefs.h >>conftest.$ac_ext | |
7867 | cat >>conftest.$ac_ext <<_ACEOF | |
7868 | /* end confdefs.h. */ | |
7869 | #include <$ac_header> | |
7870 | _ACEOF | |
7871 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7872 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7873 | ac_status=$? | |
7874 | grep -v '^ *+' conftest.er1 >conftest.err | |
7875 | rm -f conftest.er1 | |
7876 | cat conftest.err >&5 | |
7877 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7878 | (exit $ac_status); } >/dev/null; then | |
7879 | if test -s conftest.err; then | |
7880 | ac_cpp_err=$ac_c_preproc_warn_flag | |
7881 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
7882 | else | |
7883 | ac_cpp_err= | |
7884 | fi | |
7885 | else | |
7886 | ac_cpp_err=yes | |
7887 | fi | |
7888 | if test -z "$ac_cpp_err"; then | |
7889 | ac_header_preproc=yes | |
7890 | else | |
7891 | echo "$as_me: failed program was:" >&5 | |
7892 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7893 | ||
7894 | ac_header_preproc=no | |
7895 | fi | |
7896 | rm -f conftest.err conftest.$ac_ext | |
b4e70030 JB |
7897 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
7898 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
bec39cab AC |
7899 | |
7900 | # So? What about this header? | |
7901 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
7902 | yes:no: ) | |
7903 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
7904 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
7905 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
7906 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
7907 | ac_header_preproc=yes | |
7908 | ;; | |
7909 | no:yes:* ) | |
7910 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
7911 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
7912 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
7913 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
7914 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
7915 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
7916 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
7917 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
7918 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
7919 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
7920 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
7921 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
b4e70030 JB |
7922 | ( |
7923 | cat <<\_ASBOX | |
7924 | ## ------------------------------------------ ## | |
7925 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
7926 | ## ------------------------------------------ ## | |
7927 | _ASBOX | |
7928 | ) | | |
7929 | sed "s/^/$as_me: WARNING: /" >&2 | |
bec39cab AC |
7930 | ;; |
7931 | esac | |
b4e70030 JB |
7932 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
7933 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
7934 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
7935 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
7936 | else | |
7937 | eval "$as_ac_Header=\$ac_header_preproc" | |
7938 | fi | |
b4e70030 JB |
7939 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7940 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
7941 | |
7942 | fi | |
7943 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
7944 | cat >>confdefs.h <<_ACEOF | |
7945 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7946 | _ACEOF | |
7947 | ||
7948 | fi | |
7949 | ||
7950 | done | |
7951 | ||
a9322a30 TT |
7952 | if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then |
7953 | enable_libunwind=yes; | |
7954 | fi | |
7955 | ||
7956 | fi; | |
7957 | ||
7958 | if test x"$enable_libunwind" = xyes; then | |
7959 | ||
bec39cab | 7960 | |
a9322a30 | 7961 | for ac_header in libunwind.h libunwind-ia64.h |
bec39cab AC |
7962 | do |
7963 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b4e70030 JB |
7964 | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
7965 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
7966 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
7967 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
7968 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
7969 | fi | |
b4e70030 JB |
7970 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7971 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
7972 | else |
7973 | # Is the header compilable? | |
b4e70030 JB |
7974 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 |
7975 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
bec39cab AC |
7976 | cat >conftest.$ac_ext <<_ACEOF |
7977 | /* confdefs.h. */ | |
7978 | _ACEOF | |
7979 | cat confdefs.h >>conftest.$ac_ext | |
7980 | cat >>conftest.$ac_ext <<_ACEOF | |
7981 | /* end confdefs.h. */ | |
7982 | $ac_includes_default | |
7983 | #include <$ac_header> | |
7984 | _ACEOF | |
7985 | rm -f conftest.$ac_objext | |
7986 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7987 | (eval $ac_compile) 2>conftest.er1 | |
7988 | ac_status=$? | |
7989 | grep -v '^ *+' conftest.er1 >conftest.err | |
7990 | rm -f conftest.er1 | |
7991 | cat conftest.err >&5 | |
7992 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7993 | (exit $ac_status); } && | |
b4e70030 JB |
7994 | { ac_try='test -z "$ac_c_werror_flag" |
7995 | || test ! -s conftest.err' | |
bec39cab AC |
7996 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7997 | (eval $ac_try) 2>&5 | |
7998 | ac_status=$? | |
7999 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8000 | (exit $ac_status); }; } && | |
8001 | { ac_try='test -s conftest.$ac_objext' | |
8002 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8003 | (eval $ac_try) 2>&5 | |
8004 | ac_status=$? | |
8005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8006 | (exit $ac_status); }; }; then | |
8007 | ac_header_compiler=yes | |
8008 | else | |
8009 | echo "$as_me: failed program was:" >&5 | |
8010 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8011 | ||
b4e70030 | 8012 | ac_header_compiler=no |
bec39cab AC |
8013 | fi |
8014 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
b4e70030 JB |
8015 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
8016 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
bec39cab AC |
8017 | |
8018 | # Is the header present? | |
b4e70030 JB |
8019 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 |
8020 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
bec39cab AC |
8021 | cat >conftest.$ac_ext <<_ACEOF |
8022 | /* confdefs.h. */ | |
8023 | _ACEOF | |
8024 | cat confdefs.h >>conftest.$ac_ext | |
8025 | cat >>conftest.$ac_ext <<_ACEOF | |
8026 | /* end confdefs.h. */ | |
8027 | #include <$ac_header> | |
8028 | _ACEOF | |
8029 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8030 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8031 | ac_status=$? | |
8032 | grep -v '^ *+' conftest.er1 >conftest.err | |
8033 | rm -f conftest.er1 | |
8034 | cat conftest.err >&5 | |
8035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8036 | (exit $ac_status); } >/dev/null; then | |
8037 | if test -s conftest.err; then | |
8038 | ac_cpp_err=$ac_c_preproc_warn_flag | |
8039 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
8040 | else | |
8041 | ac_cpp_err= | |
8042 | fi | |
8043 | else | |
8044 | ac_cpp_err=yes | |
8045 | fi | |
8046 | if test -z "$ac_cpp_err"; then | |
8047 | ac_header_preproc=yes | |
8048 | else | |
8049 | echo "$as_me: failed program was:" >&5 | |
8050 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8051 | ||
8052 | ac_header_preproc=no | |
8053 | fi | |
8054 | rm -f conftest.err conftest.$ac_ext | |
b4e70030 JB |
8055 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
8056 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
bec39cab AC |
8057 | |
8058 | # So? What about this header? | |
8059 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
8060 | yes:no: ) | |
8061 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
8062 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
8063 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
8064 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
8065 | ac_header_preproc=yes | |
8066 | ;; | |
8067 | no:yes:* ) | |
8068 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
8069 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
8070 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
8071 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
8072 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
8073 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
8074 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
8075 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
8076 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
8077 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
8078 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
8079 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
b4e70030 JB |
8080 | ( |
8081 | cat <<\_ASBOX | |
8082 | ## ------------------------------------------ ## | |
8083 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
8084 | ## ------------------------------------------ ## | |
8085 | _ASBOX | |
8086 | ) | | |
8087 | sed "s/^/$as_me: WARNING: /" >&2 | |
bec39cab AC |
8088 | ;; |
8089 | esac | |
b4e70030 JB |
8090 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
8091 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
8092 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
8093 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
8094 | else | |
8095 | eval "$as_ac_Header=\$ac_header_preproc" | |
8096 | fi | |
b4e70030 JB |
8097 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8098 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
8099 | |
8100 | fi | |
8101 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
8102 | cat >>confdefs.h <<_ACEOF | |
8103 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8104 | _ACEOF | |
8105 | ||
8106 | fi | |
8107 | ||
8108 | done | |
8109 | ||
bec39cab | 8110 | |
a9322a30 TT |
8111 | cat >>confdefs.h <<\_ACEOF |
8112 | #define HAVE_LIBUNWIND 1 | |
8113 | _ACEOF | |
8114 | ||
8115 | CONFIG_OBS="$CONFIG_OBS libunwind-frame.o" | |
8116 | CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o" | |
8117 | CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c" | |
8118 | fi | |
8119 | ||
cb01cfba JB |
8120 | opt_curses=no |
8121 | ||
8122 | # Check whether --with-curses or --without-curses was given. | |
8123 | if test "${with_curses+set}" = set; then | |
8124 | withval="$with_curses" | |
8125 | opt_curses=$withval | |
8126 | fi; | |
8127 | ||
76a39ba7 | 8128 | prefer_curses=no |
cb01cfba | 8129 | if test "$opt_curses" = "yes"; then |
76a39ba7 | 8130 | prefer_curses=yes |
cb01cfba JB |
8131 | fi |
8132 | ||
a9322a30 TT |
8133 | # Profiling support. |
8134 | # Check whether --enable-profiling or --disable-profiling was given. | |
8135 | if test "${enable_profiling+set}" = set; then | |
8136 | enableval="$enable_profiling" | |
8137 | case $enableval in | |
8138 | yes | no) | |
8139 | ;; | |
8140 | *) | |
8141 | { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-profile" >&5 | |
8142 | echo "$as_me: error: bad value $enableval for --enable-profile" >&2;} | |
8143 | { (exit 1); exit 1; }; } ;; | |
8144 | esac | |
8145 | else | |
8146 | enable_profiling=no | |
b4e70030 | 8147 | fi; |
bec39cab | 8148 | |
bec39cab | 8149 | |
a9322a30 TT |
8150 | |
8151 | for ac_func in monstartup _mcleanup | |
bec39cab | 8152 | do |
a9322a30 TT |
8153 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
8154 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
8155 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
8156 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
bec39cab | 8157 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 8158 | else |
a9322a30 | 8159 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
8160 | /* confdefs.h. */ |
8161 | _ACEOF | |
8162 | cat confdefs.h >>conftest.$ac_ext | |
8163 | cat >>conftest.$ac_ext <<_ACEOF | |
8164 | /* end confdefs.h. */ | |
a9322a30 TT |
8165 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
8166 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
8167 | #define $ac_func innocuous_$ac_func | |
8168 | ||
8169 | /* System header to define __stub macros and hopefully few prototypes, | |
8170 | which can conflict with char $ac_func (); below. | |
8171 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
8172 | <limits.h> exists even on freestanding compilers. */ | |
8173 | ||
8174 | #ifdef __STDC__ | |
8175 | # include <limits.h> | |
8176 | #else | |
8177 | # include <assert.h> | |
8178 | #endif | |
8179 | ||
8180 | #undef $ac_func | |
8181 | ||
8182 | /* Override any gcc2 internal prototype to avoid an error. */ | |
8183 | #ifdef __cplusplus | |
8184 | extern "C" | |
8185 | { | |
8186 | #endif | |
8187 | /* We use char because int might match the return type of a gcc2 | |
8188 | builtin and then its argument prototype would still apply. */ | |
8189 | char $ac_func (); | |
8190 | /* The GNU C library defines this for functions which it implements | |
8191 | to always fail with ENOSYS. Some functions are actually named | |
8192 | something starting with __ and the normal name is an alias. */ | |
8193 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
8194 | choke me | |
8195 | #else | |
8196 | char (*f) () = $ac_func; | |
8197 | #endif | |
8198 | #ifdef __cplusplus | |
8199 | } | |
8200 | #endif | |
8201 | ||
8202 | int | |
8203 | main () | |
8204 | { | |
8205 | return f != $ac_func; | |
8206 | ; | |
8207 | return 0; | |
8208 | } | |
bec39cab | 8209 | _ACEOF |
a9322a30 TT |
8210 | rm -f conftest.$ac_objext conftest$ac_exeext |
8211 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8212 | (eval $ac_link) 2>conftest.er1 | |
bec39cab AC |
8213 | ac_status=$? |
8214 | grep -v '^ *+' conftest.er1 >conftest.err | |
8215 | rm -f conftest.er1 | |
8216 | cat conftest.err >&5 | |
8217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8218 | (exit $ac_status); } && | |
b4e70030 JB |
8219 | { ac_try='test -z "$ac_c_werror_flag" |
8220 | || test ! -s conftest.err' | |
bec39cab AC |
8221 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8222 | (eval $ac_try) 2>&5 | |
8223 | ac_status=$? | |
8224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8225 | (exit $ac_status); }; } && | |
a9322a30 | 8226 | { ac_try='test -s conftest$ac_exeext' |
bec39cab AC |
8227 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8228 | (eval $ac_try) 2>&5 | |
8229 | ac_status=$? | |
8230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8231 | (exit $ac_status); }; }; then | |
a9322a30 | 8232 | eval "$as_ac_var=yes" |
bec39cab AC |
8233 | else |
8234 | echo "$as_me: failed program was:" >&5 | |
8235 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8236 | ||
a9322a30 | 8237 | eval "$as_ac_var=no" |
bec39cab | 8238 | fi |
a9322a30 TT |
8239 | rm -f conftest.err conftest.$ac_objext \ |
8240 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8241 | fi |
a9322a30 TT |
8242 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 |
8243 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
8244 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
bec39cab | 8245 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 8246 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
bec39cab AC |
8247 | _ACEOF |
8248 | ||
8249 | fi | |
bec39cab AC |
8250 | done |
8251 | ||
a9322a30 TT |
8252 | echo "$as_me:$LINENO: checking for _etext" >&5 |
8253 | echo $ECHO_N "checking for _etext... $ECHO_C" >&6 | |
8254 | if test "${ac_cv_var__etext+set}" = set; then | |
bec39cab | 8255 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 8256 | else |
a9322a30 | 8257 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
8258 | /* confdefs.h. */ |
8259 | _ACEOF | |
8260 | cat confdefs.h >>conftest.$ac_ext | |
8261 | cat >>conftest.$ac_ext <<_ACEOF | |
8262 | /* end confdefs.h. */ | |
a9322a30 TT |
8263 | #include <stdlib.h> |
8264 | extern char _etext; | |
8265 | ||
8266 | int | |
8267 | main () | |
8268 | { | |
8269 | free (&_etext); | |
8270 | ; | |
8271 | return 0; | |
8272 | } | |
bec39cab | 8273 | _ACEOF |
a9322a30 TT |
8274 | rm -f conftest.$ac_objext conftest$ac_exeext |
8275 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8276 | (eval $ac_link) 2>conftest.er1 | |
bec39cab AC |
8277 | ac_status=$? |
8278 | grep -v '^ *+' conftest.er1 >conftest.err | |
8279 | rm -f conftest.er1 | |
8280 | cat conftest.err >&5 | |
8281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8282 | (exit $ac_status); } && | |
b4e70030 JB |
8283 | { ac_try='test -z "$ac_c_werror_flag" |
8284 | || test ! -s conftest.err' | |
bec39cab AC |
8285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8286 | (eval $ac_try) 2>&5 | |
8287 | ac_status=$? | |
8288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8289 | (exit $ac_status); }; } && | |
a9322a30 | 8290 | { ac_try='test -s conftest$ac_exeext' |
bec39cab AC |
8291 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8292 | (eval $ac_try) 2>&5 | |
8293 | ac_status=$? | |
8294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8295 | (exit $ac_status); }; }; then | |
a9322a30 | 8296 | ac_cv_var__etext=yes |
bec39cab AC |
8297 | else |
8298 | echo "$as_me: failed program was:" >&5 | |
8299 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8300 | ||
a9322a30 | 8301 | ac_cv_var__etext=no |
bec39cab | 8302 | fi |
a9322a30 TT |
8303 | rm -f conftest.err conftest.$ac_objext \ |
8304 | conftest$ac_exeext conftest.$ac_ext | |
bec39cab | 8305 | fi |
a9322a30 TT |
8306 | echo "$as_me:$LINENO: result: $ac_cv_var__etext" >&5 |
8307 | echo "${ECHO_T}$ac_cv_var__etext" >&6 | |
8308 | if test $ac_cv_var__etext = yes; then | |
60ca704f SE |
8309 | |
8310 | cat >>confdefs.h <<\_ACEOF | |
a9322a30 | 8311 | #define HAVE__ETEXT 1 |
bec39cab AC |
8312 | _ACEOF |
8313 | ||
bec39cab | 8314 | fi |
a9322a30 TT |
8315 | echo "$as_me:$LINENO: checking for etext" >&5 |
8316 | echo $ECHO_N "checking for etext... $ECHO_C" >&6 | |
8317 | if test "${ac_cv_var_etext+set}" = set; then | |
bec39cab AC |
8318 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
8319 | else | |
8320 | cat >conftest.$ac_ext <<_ACEOF | |
8321 | /* confdefs.h. */ | |
8322 | _ACEOF | |
8323 | cat confdefs.h >>conftest.$ac_ext | |
8324 | cat >>conftest.$ac_ext <<_ACEOF | |
8325 | /* end confdefs.h. */ | |
a9322a30 TT |
8326 | #include <stdlib.h> |
8327 | extern char etext; | |
bec39cab AC |
8328 | |
8329 | int | |
8330 | main () | |
8331 | { | |
a9322a30 | 8332 | free (&etext); |
bec39cab AC |
8333 | ; |
8334 | return 0; | |
8335 | } | |
8336 | _ACEOF | |
8337 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8338 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8339 | (eval $ac_link) 2>conftest.er1 | |
8340 | ac_status=$? | |
8341 | grep -v '^ *+' conftest.er1 >conftest.err | |
8342 | rm -f conftest.er1 | |
8343 | cat conftest.err >&5 | |
8344 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8345 | (exit $ac_status); } && | |
b4e70030 JB |
8346 | { ac_try='test -z "$ac_c_werror_flag" |
8347 | || test ! -s conftest.err' | |
bec39cab AC |
8348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8349 | (eval $ac_try) 2>&5 | |
8350 | ac_status=$? | |
8351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8352 | (exit $ac_status); }; } && | |
8353 | { ac_try='test -s conftest$ac_exeext' | |
8354 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8355 | (eval $ac_try) 2>&5 | |
8356 | ac_status=$? | |
8357 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8358 | (exit $ac_status); }; }; then | |
a9322a30 | 8359 | ac_cv_var_etext=yes |
bec39cab AC |
8360 | else |
8361 | echo "$as_me: failed program was:" >&5 | |
8362 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8363 | ||
a9322a30 | 8364 | ac_cv_var_etext=no |
bec39cab AC |
8365 | fi |
8366 | rm -f conftest.err conftest.$ac_objext \ | |
8367 | conftest$ac_exeext conftest.$ac_ext | |
8368 | fi | |
a9322a30 TT |
8369 | echo "$as_me:$LINENO: result: $ac_cv_var_etext" >&5 |
8370 | echo "${ECHO_T}$ac_cv_var_etext" >&6 | |
8371 | if test $ac_cv_var_etext = yes; then | |
8372 | ||
8373 | cat >>confdefs.h <<\_ACEOF | |
8374 | #define HAVE_ETEXT 1 | |
bec39cab AC |
8375 | _ACEOF |
8376 | ||
8377 | fi | |
a9322a30 TT |
8378 | if test "$enable_profiling" = yes ; then |
8379 | if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then | |
8380 | { { echo "$as_me:$LINENO: error: --enable-profiling requires monstartup and _mcleanup" >&5 | |
8381 | echo "$as_me: error: --enable-profiling requires monstartup and _mcleanup" >&2;} | |
8382 | { (exit 1); exit 1; }; } | |
8383 | fi | |
8384 | PROFILE_CFLAGS=-pg | |
8385 | OLD_CFLAGS="$CFLAGS" | |
8386 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" | |
bec39cab | 8387 | |
a9322a30 TT |
8388 | echo "$as_me:$LINENO: checking whether $CC supports -pg" >&5 |
8389 | echo $ECHO_N "checking whether $CC supports -pg... $ECHO_C" >&6 | |
8390 | if test "${ac_cv_cc_supports_pg+set}" = set; then | |
bec39cab AC |
8391 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
8392 | else | |
8393 | cat >conftest.$ac_ext <<_ACEOF | |
8394 | /* confdefs.h. */ | |
8395 | _ACEOF | |
8396 | cat confdefs.h >>conftest.$ac_ext | |
8397 | cat >>conftest.$ac_ext <<_ACEOF | |
8398 | /* end confdefs.h. */ | |
bec39cab AC |
8399 | |
8400 | int | |
8401 | main () | |
8402 | { | |
a9322a30 | 8403 | int x; |
bec39cab AC |
8404 | ; |
8405 | return 0; | |
8406 | } | |
8407 | _ACEOF | |
a9322a30 TT |
8408 | rm -f conftest.$ac_objext |
8409 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8410 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
8411 | ac_status=$? |
8412 | grep -v '^ *+' conftest.er1 >conftest.err | |
8413 | rm -f conftest.er1 | |
8414 | cat conftest.err >&5 | |
8415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8416 | (exit $ac_status); } && | |
b4e70030 JB |
8417 | { ac_try='test -z "$ac_c_werror_flag" |
8418 | || test ! -s conftest.err' | |
bec39cab AC |
8419 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8420 | (eval $ac_try) 2>&5 | |
8421 | ac_status=$? | |
8422 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8423 | (exit $ac_status); }; } && | |
a9322a30 | 8424 | { ac_try='test -s conftest.$ac_objext' |
bec39cab AC |
8425 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8426 | (eval $ac_try) 2>&5 | |
8427 | ac_status=$? | |
8428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8429 | (exit $ac_status); }; }; then | |
a9322a30 | 8430 | ac_cv_cc_supports_pg=yes |
bec39cab AC |
8431 | else |
8432 | echo "$as_me: failed program was:" >&5 | |
8433 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8434 | ||
a9322a30 | 8435 | ac_cv_cc_supports_pg=no |
bec39cab | 8436 | fi |
a9322a30 | 8437 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 8438 | fi |
a9322a30 TT |
8439 | echo "$as_me:$LINENO: result: $ac_cv_cc_supports_pg" >&5 |
8440 | echo "${ECHO_T}$ac_cv_cc_supports_pg" >&6 | |
bec39cab | 8441 | |
a9322a30 TT |
8442 | if test $ac_cv_cc_supports_pg = no; then |
8443 | { { echo "$as_me:$LINENO: error: --enable-profiling requires a compiler which supports -pg" >&5 | |
8444 | echo "$as_me: error: --enable-profiling requires a compiler which supports -pg" >&2;} | |
8445 | { (exit 1); exit 1; }; } | |
8446 | fi | |
bec39cab | 8447 | |
a9322a30 | 8448 | CFLAGS="$OLD_CFLAGS" |
bec39cab AC |
8449 | fi |
8450 | ||
c16158bc JM |
8451 | |
8452 | ||
8453 | # Check whether --with-pkgversion or --without-pkgversion was given. | |
8454 | if test "${with_pkgversion+set}" = set; then | |
8455 | withval="$with_pkgversion" | |
8456 | case "$withval" in | |
8457 | yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5 | |
8458 | echo "$as_me: error: package version not specified" >&2;} | |
8459 | { (exit 1); exit 1; }; } ;; | |
8460 | no) PKGVERSION= ;; | |
8461 | *) PKGVERSION="($withval) " ;; | |
8462 | esac | |
8463 | else | |
8464 | PKGVERSION="(GDB) " | |
8465 | ||
8466 | fi; | |
8467 | ||
8468 | ||
8469 | ||
8470 | ||
8471 | # Check whether --with-bugurl or --without-bugurl was given. | |
8472 | if test "${with_bugurl+set}" = set; then | |
8473 | withval="$with_bugurl" | |
8474 | case "$withval" in | |
8475 | yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5 | |
8476 | echo "$as_me: error: bug URL not specified" >&2;} | |
8477 | { (exit 1); exit 1; }; } ;; | |
8478 | no) BUGURL= | |
8479 | ;; | |
8480 | *) BUGURL="$withval" | |
8481 | ;; | |
8482 | esac | |
8483 | else | |
8484 | BUGURL="http://www.gnu.org/software/gdb/bugs/" | |
8485 | ||
8486 | fi; | |
8487 | case ${BUGURL} in | |
8488 | "") | |
8489 | REPORT_BUGS_TO= | |
8490 | REPORT_BUGS_TEXI= | |
8491 | ;; | |
8492 | *) | |
8493 | REPORT_BUGS_TO="<$BUGURL>" | |
8494 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
8495 | ;; | |
8496 | esac; | |
8497 | ||
8498 | ||
8499 | ||
8500 | ||
8501 | cat >>confdefs.h <<_ACEOF | |
8502 | #define PKGVERSION "$PKGVERSION" | |
8503 | _ACEOF | |
8504 | ||
8505 | ||
8506 | cat >>confdefs.h <<_ACEOF | |
8507 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" | |
8508 | _ACEOF | |
8509 | ||
8510 | ||
bec39cab AC |
8511 | # --------------------- # |
8512 | # Checks for programs. # | |
8513 | # --------------------- # | |
8514 | ||
8515 | for ac_prog in gawk mawk nawk awk | |
8516 | do | |
8517 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8518 | set dummy $ac_prog; ac_word=$2 | |
b4e70030 JB |
8519 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8520 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8521 | if test "${ac_cv_prog_AWK+set}" = set; then |
8522 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8523 | else | |
8524 | if test -n "$AWK"; then | |
8525 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
8526 | else | |
8527 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8528 | for as_dir in $PATH | |
8529 | do | |
8530 | IFS=$as_save_IFS | |
8531 | test -z "$as_dir" && as_dir=. | |
8532 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8533 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8534 | ac_cv_prog_AWK="$ac_prog" |
8535 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8536 | break 2 | |
8537 | fi | |
8538 | done | |
8539 | done | |
8540 | ||
8541 | fi | |
8542 | fi | |
8543 | AWK=$ac_cv_prog_AWK | |
8544 | if test -n "$AWK"; then | |
b4e70030 JB |
8545 | echo "$as_me:$LINENO: result: $AWK" >&5 |
8546 | echo "${ECHO_T}$AWK" >&6 | |
bec39cab | 8547 | else |
b4e70030 JB |
8548 | echo "$as_me:$LINENO: result: no" >&5 |
8549 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8550 | fi |
8551 | ||
8552 | test -n "$AWK" && break | |
8553 | done | |
8554 | ||
8555 | # Find a good install program. We prefer a C program (faster), | |
8556 | # so one script is as good as another. But avoid the broken or | |
8557 | # incompatible versions: | |
8558 | # SysV /etc/install, /usr/sbin/install | |
8559 | # SunOS /usr/etc/install | |
8560 | # IRIX /sbin/install | |
8561 | # AIX /bin/install | |
8562 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
8563 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
8564 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
8565 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
8566 | # OS/2's system install, which has a completely different semantic | |
8567 | # ./install, which can be erroneously created by make from ./install.sh. | |
85541719 | 8568 | # Reject install programs that cannot install multiple files. |
b4e70030 JB |
8569 | echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 |
8570 | echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 | |
bec39cab AC |
8571 | if test -z "$INSTALL"; then |
8572 | if test "${ac_cv_path_install+set}" = set; then | |
8573 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8574 | else | |
8575 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8576 | for as_dir in $PATH | |
8577 | do | |
8578 | IFS=$as_save_IFS | |
8579 | test -z "$as_dir" && as_dir=. | |
8580 | # Account for people who put trailing slashes in PATH elements. | |
8581 | case $as_dir/ in | |
8582 | ./ | .// | /cC/* | \ | |
8583 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
8584 | ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ | |
8585 | /usr/ucb/* ) ;; | |
c906108c | 8586 | *) |
bec39cab AC |
8587 | # OSF1 and SCO ODT 3.0 have their own names for install. |
8588 | # Don't use installbsd from OSF since it installs stuff as root | |
8589 | # by default. | |
8590 | for ac_prog in ginstall scoinst install; do | |
8591 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8592 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
bec39cab AC |
8593 | if test $ac_prog = install && |
8594 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
8595 | # AIX install. It has an incompatible calling convention. | |
8596 | : | |
8597 | elif test $ac_prog = install && | |
8598 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
8599 | # program-specific install script used by HP pwplus--don't use. | |
8600 | : | |
8601 | else | |
85541719 DE |
8602 | rm -rf conftest.one conftest.two conftest.dir |
8603 | echo one > conftest.one | |
8604 | echo two > conftest.two | |
8605 | mkdir conftest.dir | |
8606 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && | |
8607 | test -s conftest.one && test -s conftest.two && | |
8608 | test -s conftest.dir/conftest.one && | |
8609 | test -s conftest.dir/conftest.two | |
8610 | then | |
8611 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
8612 | break 3 | |
8613 | fi | |
bec39cab AC |
8614 | fi |
8615 | fi | |
8616 | done | |
8617 | done | |
8618 | ;; | |
c906108c | 8619 | esac |
bec39cab AC |
8620 | done |
8621 | ||
85541719 | 8622 | rm -rf conftest.one conftest.two conftest.dir |
bec39cab AC |
8623 | |
8624 | fi | |
8625 | if test "${ac_cv_path_install+set}" = set; then | |
8626 | INSTALL=$ac_cv_path_install | |
8627 | else | |
85541719 DE |
8628 | # As a last resort, use the slow shell script. Don't cache a |
8629 | # value for INSTALL within a source directory, because that will | |
bec39cab | 8630 | # break other packages using the cache if that directory is |
85541719 | 8631 | # removed, or if the value is a relative name. |
bec39cab AC |
8632 | INSTALL=$ac_install_sh |
8633 | fi | |
8634 | fi | |
b4e70030 JB |
8635 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
8636 | echo "${ECHO_T}$INSTALL" >&6 | |
bec39cab AC |
8637 | |
8638 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
8639 | # It thinks the first close brace ends the variable substitution. | |
8640 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
8641 | ||
8642 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
8643 | ||
8644 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
8645 | ||
b4e70030 JB |
8646 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
8647 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
bec39cab AC |
8648 | LN_S=$as_ln_s |
8649 | if test "$LN_S" = "ln -s"; then | |
b4e70030 JB |
8650 | echo "$as_me:$LINENO: result: yes" >&5 |
8651 | echo "${ECHO_T}yes" >&6 | |
bec39cab | 8652 | else |
b4e70030 JB |
8653 | echo "$as_me:$LINENO: result: no, using $LN_S" >&5 |
8654 | echo "${ECHO_T}no, using $LN_S" >&6 | |
bec39cab AC |
8655 | fi |
8656 | ||
8657 | if test -n "$ac_tool_prefix"; then | |
8658 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
8659 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
b4e70030 JB |
8660 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8661 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8662 | if test "${ac_cv_prog_RANLIB+set}" = set; then |
8663 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8664 | else | |
8665 | if test -n "$RANLIB"; then | |
8666 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
8667 | else | |
8668 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8669 | for as_dir in $PATH | |
8670 | do | |
8671 | IFS=$as_save_IFS | |
8672 | test -z "$as_dir" && as_dir=. | |
8673 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8674 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8675 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
8676 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8677 | break 2 | |
8678 | fi | |
8679 | done | |
8680 | done | |
8681 | ||
8682 | fi | |
8683 | fi | |
8684 | RANLIB=$ac_cv_prog_RANLIB | |
8685 | if test -n "$RANLIB"; then | |
b4e70030 JB |
8686 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
8687 | echo "${ECHO_T}$RANLIB" >&6 | |
bec39cab | 8688 | else |
b4e70030 JB |
8689 | echo "$as_me:$LINENO: result: no" >&5 |
8690 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8691 | fi |
8692 | ||
8693 | fi | |
8694 | if test -z "$ac_cv_prog_RANLIB"; then | |
8695 | ac_ct_RANLIB=$RANLIB | |
8696 | # Extract the first word of "ranlib", so it can be a program name with args. | |
8697 | set dummy ranlib; ac_word=$2 | |
b4e70030 JB |
8698 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8699 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8700 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then |
8701 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8702 | else | |
8703 | if test -n "$ac_ct_RANLIB"; then | |
8704 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
8705 | else | |
8706 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8707 | for as_dir in $PATH | |
8708 | do | |
8709 | IFS=$as_save_IFS | |
8710 | test -z "$as_dir" && as_dir=. | |
8711 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8712 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8713 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
8714 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8715 | break 2 | |
8716 | fi | |
8717 | done | |
8718 | done | |
8719 | ||
b4e70030 | 8720 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" |
bec39cab AC |
8721 | fi |
8722 | fi | |
8723 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
8724 | if test -n "$ac_ct_RANLIB"; then | |
b4e70030 JB |
8725 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 |
8726 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
bec39cab | 8727 | else |
b4e70030 JB |
8728 | echo "$as_me:$LINENO: result: no" >&5 |
8729 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8730 | fi |
8731 | ||
b4e70030 | 8732 | RANLIB=$ac_ct_RANLIB |
bec39cab AC |
8733 | else |
8734 | RANLIB="$ac_cv_prog_RANLIB" | |
8735 | fi | |
8736 | ||
8737 | for ac_prog in 'bison -y' byacc | |
8738 | do | |
8739 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
8740 | set dummy $ac_prog; ac_word=$2 | |
b4e70030 JB |
8741 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8742 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8743 | if test "${ac_cv_prog_YACC+set}" = set; then |
8744 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8745 | else | |
8746 | if test -n "$YACC"; then | |
8747 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
8748 | else | |
8749 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8750 | for as_dir in $PATH | |
8751 | do | |
8752 | IFS=$as_save_IFS | |
8753 | test -z "$as_dir" && as_dir=. | |
8754 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8755 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8756 | ac_cv_prog_YACC="$ac_prog" |
8757 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8758 | break 2 | |
8759 | fi | |
8760 | done | |
8761 | done | |
8762 | ||
8763 | fi | |
8764 | fi | |
8765 | YACC=$ac_cv_prog_YACC | |
8766 | if test -n "$YACC"; then | |
b4e70030 JB |
8767 | echo "$as_me:$LINENO: result: $YACC" >&5 |
8768 | echo "${ECHO_T}$YACC" >&6 | |
bec39cab | 8769 | else |
b4e70030 JB |
8770 | echo "$as_me:$LINENO: result: no" >&5 |
8771 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8772 | fi |
8773 | ||
8774 | test -n "$YACC" && break | |
8775 | done | |
8776 | test -n "$YACC" || YACC="yacc" | |
8777 | ||
8778 | ||
8779 | if test -n "$ac_tool_prefix"; then | |
8780 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
8781 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
b4e70030 JB |
8782 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8783 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8784 | if test "${ac_cv_prog_AR+set}" = set; then |
8785 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8786 | else | |
8787 | if test -n "$AR"; then | |
8788 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
8789 | else | |
8790 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8791 | for as_dir in $PATH | |
8792 | do | |
8793 | IFS=$as_save_IFS | |
8794 | test -z "$as_dir" && as_dir=. | |
8795 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8796 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8797 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
8798 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8799 | break 2 | |
8800 | fi | |
8801 | done | |
8802 | done | |
8803 | ||
8804 | fi | |
8805 | fi | |
8806 | AR=$ac_cv_prog_AR | |
8807 | if test -n "$AR"; then | |
b4e70030 JB |
8808 | echo "$as_me:$LINENO: result: $AR" >&5 |
8809 | echo "${ECHO_T}$AR" >&6 | |
bec39cab | 8810 | else |
b4e70030 JB |
8811 | echo "$as_me:$LINENO: result: no" >&5 |
8812 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8813 | fi |
8814 | ||
8815 | fi | |
8816 | if test -z "$ac_cv_prog_AR"; then | |
8817 | ac_ct_AR=$AR | |
8818 | # Extract the first word of "ar", so it can be a program name with args. | |
8819 | set dummy ar; ac_word=$2 | |
b4e70030 JB |
8820 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8821 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8822 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then |
8823 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8824 | else | |
8825 | if test -n "$ac_ct_AR"; then | |
8826 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
8827 | else | |
8828 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8829 | for as_dir in $PATH | |
8830 | do | |
8831 | IFS=$as_save_IFS | |
8832 | test -z "$as_dir" && as_dir=. | |
8833 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8834 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8835 | ac_cv_prog_ac_ct_AR="ar" |
8836 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8837 | break 2 | |
8838 | fi | |
8839 | done | |
8840 | done | |
8841 | ||
8842 | fi | |
8843 | fi | |
8844 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
8845 | if test -n "$ac_ct_AR"; then | |
b4e70030 JB |
8846 | echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 |
8847 | echo "${ECHO_T}$ac_ct_AR" >&6 | |
bec39cab | 8848 | else |
b4e70030 JB |
8849 | echo "$as_me:$LINENO: result: no" >&5 |
8850 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8851 | fi |
8852 | ||
b4e70030 | 8853 | AR=$ac_ct_AR |
bec39cab AC |
8854 | else |
8855 | AR="$ac_cv_prog_AR" | |
8856 | fi | |
8857 | ||
8858 | if test -n "$ac_tool_prefix"; then | |
8859 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | |
8860 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | |
b4e70030 JB |
8861 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8862 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8863 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then |
8864 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8865 | else | |
8866 | if test -n "$DLLTOOL"; then | |
8867 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | |
8868 | else | |
8869 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8870 | for as_dir in $PATH | |
8871 | do | |
8872 | IFS=$as_save_IFS | |
8873 | test -z "$as_dir" && as_dir=. | |
8874 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8875 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8876 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
8877 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8878 | break 2 | |
8879 | fi | |
8880 | done | |
8881 | done | |
8882 | ||
8883 | fi | |
8884 | fi | |
8885 | DLLTOOL=$ac_cv_prog_DLLTOOL | |
8886 | if test -n "$DLLTOOL"; then | |
b4e70030 JB |
8887 | echo "$as_me:$LINENO: result: $DLLTOOL" >&5 |
8888 | echo "${ECHO_T}$DLLTOOL" >&6 | |
bec39cab | 8889 | else |
b4e70030 JB |
8890 | echo "$as_me:$LINENO: result: no" >&5 |
8891 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8892 | fi |
8893 | ||
8894 | fi | |
8895 | if test -z "$ac_cv_prog_DLLTOOL"; then | |
8896 | ac_ct_DLLTOOL=$DLLTOOL | |
8897 | # Extract the first word of "dlltool", so it can be a program name with args. | |
8898 | set dummy dlltool; ac_word=$2 | |
b4e70030 JB |
8899 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8900 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8901 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then |
8902 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8903 | else | |
8904 | if test -n "$ac_ct_DLLTOOL"; then | |
8905 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | |
8906 | else | |
8907 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8908 | for as_dir in $PATH | |
8909 | do | |
8910 | IFS=$as_save_IFS | |
8911 | test -z "$as_dir" && as_dir=. | |
8912 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8913 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8914 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
8915 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8916 | break 2 | |
8917 | fi | |
8918 | done | |
8919 | done | |
8920 | ||
8921 | fi | |
8922 | fi | |
8923 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | |
8924 | if test -n "$ac_ct_DLLTOOL"; then | |
b4e70030 JB |
8925 | echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 |
8926 | echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 | |
bec39cab | 8927 | else |
b4e70030 JB |
8928 | echo "$as_me:$LINENO: result: no" >&5 |
8929 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8930 | fi |
8931 | ||
b4e70030 | 8932 | DLLTOOL=$ac_ct_DLLTOOL |
bec39cab AC |
8933 | else |
8934 | DLLTOOL="$ac_cv_prog_DLLTOOL" | |
8935 | fi | |
8936 | ||
8937 | if test -n "$ac_tool_prefix"; then | |
8938 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
8939 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
b4e70030 JB |
8940 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8941 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8942 | if test "${ac_cv_prog_WINDRES+set}" = set; then |
8943 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8944 | else | |
8945 | if test -n "$WINDRES"; then | |
8946 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
8947 | else | |
8948 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8949 | for as_dir in $PATH | |
8950 | do | |
8951 | IFS=$as_save_IFS | |
8952 | test -z "$as_dir" && as_dir=. | |
8953 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8954 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8955 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
8956 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8957 | break 2 | |
8958 | fi | |
8959 | done | |
8960 | done | |
8961 | ||
8962 | fi | |
8963 | fi | |
8964 | WINDRES=$ac_cv_prog_WINDRES | |
8965 | if test -n "$WINDRES"; then | |
b4e70030 JB |
8966 | echo "$as_me:$LINENO: result: $WINDRES" >&5 |
8967 | echo "${ECHO_T}$WINDRES" >&6 | |
bec39cab | 8968 | else |
b4e70030 JB |
8969 | echo "$as_me:$LINENO: result: no" >&5 |
8970 | echo "${ECHO_T}no" >&6 | |
bec39cab AC |
8971 | fi |
8972 | ||
8973 | fi | |
8974 | if test -z "$ac_cv_prog_WINDRES"; then | |
8975 | ac_ct_WINDRES=$WINDRES | |
8976 | # Extract the first word of "windres", so it can be a program name with args. | |
8977 | set dummy windres; ac_word=$2 | |
b4e70030 JB |
8978 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
8979 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
8980 | if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then |
8981 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8982 | else | |
8983 | if test -n "$ac_ct_WINDRES"; then | |
8984 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
8985 | else | |
8986 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
8987 | for as_dir in $PATH | |
8988 | do | |
8989 | IFS=$as_save_IFS | |
8990 | test -z "$as_dir" && as_dir=. | |
8991 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 8992 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
8993 | ac_cv_prog_ac_ct_WINDRES="windres" |
8994 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
8995 | break 2 | |
8996 | fi | |
8997 | done | |
8998 | done | |
8999 | ||
9000 | fi | |
9001 | fi | |
9002 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
9003 | if test -n "$ac_ct_WINDRES"; then | |
b4e70030 JB |
9004 | echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5 |
9005 | echo "${ECHO_T}$ac_ct_WINDRES" >&6 | |
bec39cab | 9006 | else |
b4e70030 JB |
9007 | echo "$as_me:$LINENO: result: no" >&5 |
9008 | echo "${ECHO_T}no" >&6 | |
c906108c | 9009 | fi |
bec39cab | 9010 | |
b4e70030 | 9011 | WINDRES=$ac_ct_WINDRES |
c906108c | 9012 | else |
bec39cab | 9013 | WINDRES="$ac_cv_prog_WINDRES" |
c906108c SS |
9014 | fi |
9015 | ||
bec39cab AC |
9016 | |
9017 | # Needed for GNU/Hurd. | |
9018 | if test -n "$ac_tool_prefix"; then | |
9019 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. | |
9020 | set dummy ${ac_tool_prefix}mig; ac_word=$2 | |
b4e70030 JB |
9021 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
9022 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
9023 | if test "${ac_cv_prog_MIG+set}" = set; then |
9024 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 9025 | else |
bec39cab AC |
9026 | if test -n "$MIG"; then |
9027 | ac_cv_prog_MIG="$MIG" # Let the user override the test. | |
9028 | else | |
9029 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9030 | for as_dir in $PATH | |
9031 | do | |
9032 | IFS=$as_save_IFS | |
9033 | test -z "$as_dir" && as_dir=. | |
9034 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 9035 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
9036 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
9037 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9038 | break 2 | |
9039 | fi | |
9040 | done | |
9041 | done | |
9042 | ||
c906108c | 9043 | fi |
bec39cab AC |
9044 | fi |
9045 | MIG=$ac_cv_prog_MIG | |
9046 | if test -n "$MIG"; then | |
b4e70030 JB |
9047 | echo "$as_me:$LINENO: result: $MIG" >&5 |
9048 | echo "${ECHO_T}$MIG" >&6 | |
c906108c | 9049 | else |
b4e70030 JB |
9050 | echo "$as_me:$LINENO: result: no" >&5 |
9051 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
9052 | fi |
9053 | ||
bec39cab AC |
9054 | fi |
9055 | if test -z "$ac_cv_prog_MIG"; then | |
9056 | ac_ct_MIG=$MIG | |
9057 | # Extract the first word of "mig", so it can be a program name with args. | |
9058 | set dummy mig; ac_word=$2 | |
b4e70030 JB |
9059 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
9060 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
bec39cab AC |
9061 | if test "${ac_cv_prog_ac_ct_MIG+set}" = set; then |
9062 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9063 | else | |
9064 | if test -n "$ac_ct_MIG"; then | |
9065 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. | |
9066 | else | |
9067 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
9068 | for as_dir in $PATH | |
9069 | do | |
9070 | IFS=$as_save_IFS | |
9071 | test -z "$as_dir" && as_dir=. | |
9072 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b4e70030 | 9073 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
bec39cab AC |
9074 | ac_cv_prog_ac_ct_MIG="mig" |
9075 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
9076 | break 2 | |
9077 | fi | |
9078 | done | |
9079 | done | |
c906108c | 9080 | |
bec39cab AC |
9081 | fi |
9082 | fi | |
9083 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG | |
9084 | if test -n "$ac_ct_MIG"; then | |
b4e70030 JB |
9085 | echo "$as_me:$LINENO: result: $ac_ct_MIG" >&5 |
9086 | echo "${ECHO_T}$ac_ct_MIG" >&6 | |
bec39cab | 9087 | else |
b4e70030 JB |
9088 | echo "$as_me:$LINENO: result: no" >&5 |
9089 | echo "${ECHO_T}no" >&6 | |
bec39cab | 9090 | fi |
c906108c | 9091 | |
b4e70030 | 9092 | MIG=$ac_ct_MIG |
bec39cab AC |
9093 | else |
9094 | MIG="$ac_cv_prog_MIG" | |
9095 | fi | |
c906108c | 9096 | |
c906108c | 9097 | |
bec39cab AC |
9098 | # ---------------------- # |
9099 | # Checks for libraries. # | |
9100 | # ---------------------- # | |
c906108c | 9101 | |
bec39cab | 9102 | # We might need to link with -lm; most simulators need it. |
c906108c | 9103 | |
b4e70030 JB |
9104 | echo "$as_me:$LINENO: checking for main in -lm" >&5 |
9105 | echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6 | |
bec39cab AC |
9106 | if test "${ac_cv_lib_m_main+set}" = set; then |
9107 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9108 | else | |
9109 | ac_check_lib_save_LIBS=$LIBS | |
9110 | LIBS="-lm $LIBS" | |
9111 | cat >conftest.$ac_ext <<_ACEOF | |
9112 | /* confdefs.h. */ | |
9113 | _ACEOF | |
9114 | cat confdefs.h >>conftest.$ac_ext | |
9115 | cat >>conftest.$ac_ext <<_ACEOF | |
9116 | /* end confdefs.h. */ | |
c906108c | 9117 | |
c906108c | 9118 | |
bec39cab AC |
9119 | int |
9120 | main () | |
9121 | { | |
b4e70030 | 9122 | main (); |
bec39cab AC |
9123 | ; |
9124 | return 0; | |
9125 | } | |
9126 | _ACEOF | |
9127 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9128 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9129 | (eval $ac_link) 2>conftest.er1 | |
9130 | ac_status=$? | |
9131 | grep -v '^ *+' conftest.er1 >conftest.err | |
9132 | rm -f conftest.er1 | |
9133 | cat conftest.err >&5 | |
9134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9135 | (exit $ac_status); } && | |
b4e70030 JB |
9136 | { ac_try='test -z "$ac_c_werror_flag" |
9137 | || test ! -s conftest.err' | |
bec39cab AC |
9138 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9139 | (eval $ac_try) 2>&5 | |
9140 | ac_status=$? | |
9141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9142 | (exit $ac_status); }; } && | |
9143 | { ac_try='test -s conftest$ac_exeext' | |
9144 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9145 | (eval $ac_try) 2>&5 | |
9146 | ac_status=$? | |
9147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9148 | (exit $ac_status); }; }; then | |
9149 | ac_cv_lib_m_main=yes | |
9150 | else | |
9151 | echo "$as_me: failed program was:" >&5 | |
9152 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9153 | ||
b4e70030 | 9154 | ac_cv_lib_m_main=no |
bec39cab AC |
9155 | fi |
9156 | rm -f conftest.err conftest.$ac_objext \ | |
9157 | conftest$ac_exeext conftest.$ac_ext | |
9158 | LIBS=$ac_check_lib_save_LIBS | |
9159 | fi | |
b4e70030 JB |
9160 | echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 |
9161 | echo "${ECHO_T}$ac_cv_lib_m_main" >&6 | |
bec39cab AC |
9162 | if test $ac_cv_lib_m_main = yes; then |
9163 | cat >>confdefs.h <<_ACEOF | |
9164 | #define HAVE_LIBM 1 | |
9165 | _ACEOF | |
9166 | ||
9167 | LIBS="-lm $LIBS" | |
c906108c | 9168 | |
c906108c | 9169 | fi |
bec39cab AC |
9170 | |
9171 | ||
9172 | # We need to link with -lw to get `wctype' on Solaris before Solaris | |
9173 | # 2.6. Solaris 2.6 and beyond have this function in libc, and have a | |
9174 | # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1 | |
9175 | # is known to have this problem). Therefore we avoid libw if we can. | |
b4e70030 JB |
9176 | echo "$as_me:$LINENO: checking for wctype" >&5 |
9177 | echo $ECHO_N "checking for wctype... $ECHO_C" >&6 | |
bec39cab AC |
9178 | if test "${ac_cv_func_wctype+set}" = set; then |
9179 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9180 | else | |
9181 | cat >conftest.$ac_ext <<_ACEOF | |
9182 | /* confdefs.h. */ | |
9183 | _ACEOF | |
9184 | cat confdefs.h >>conftest.$ac_ext | |
9185 | cat >>conftest.$ac_ext <<_ACEOF | |
9186 | /* end confdefs.h. */ | |
9187 | /* Define wctype to an innocuous variant, in case <limits.h> declares wctype. | |
9188 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9189 | #define wctype innocuous_wctype | |
9190 | ||
9191 | /* System header to define __stub macros and hopefully few prototypes, | |
9192 | which can conflict with char wctype (); below. | |
9193 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9194 | <limits.h> exists even on freestanding compilers. */ | |
9195 | ||
9196 | #ifdef __STDC__ | |
9197 | # include <limits.h> | |
9198 | #else | |
9199 | # include <assert.h> | |
9200 | #endif | |
9201 | ||
9202 | #undef wctype | |
9203 | ||
b4e70030 | 9204 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
9205 | #ifdef __cplusplus |
9206 | extern "C" | |
b4e70030 | 9207 | { |
bec39cab | 9208 | #endif |
b4e70030 JB |
9209 | /* We use char because int might match the return type of a gcc2 |
9210 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9211 | char wctype (); |
9212 | /* The GNU C library defines this for functions which it implements | |
9213 | to always fail with ENOSYS. Some functions are actually named | |
9214 | something starting with __ and the normal name is an alias. */ | |
b4e70030 | 9215 | #if defined (__stub_wctype) || defined (__stub___wctype) |
bec39cab | 9216 | choke me |
b4e70030 JB |
9217 | #else |
9218 | char (*f) () = wctype; | |
9219 | #endif | |
9220 | #ifdef __cplusplus | |
9221 | } | |
bec39cab AC |
9222 | #endif |
9223 | ||
9224 | int | |
9225 | main () | |
9226 | { | |
b4e70030 | 9227 | return f != wctype; |
bec39cab AC |
9228 | ; |
9229 | return 0; | |
9230 | } | |
9231 | _ACEOF | |
9232 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9233 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9234 | (eval $ac_link) 2>conftest.er1 | |
9235 | ac_status=$? | |
9236 | grep -v '^ *+' conftest.er1 >conftest.err | |
9237 | rm -f conftest.er1 | |
9238 | cat conftest.err >&5 | |
9239 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9240 | (exit $ac_status); } && | |
b4e70030 JB |
9241 | { ac_try='test -z "$ac_c_werror_flag" |
9242 | || test ! -s conftest.err' | |
bec39cab AC |
9243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9244 | (eval $ac_try) 2>&5 | |
9245 | ac_status=$? | |
9246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9247 | (exit $ac_status); }; } && | |
9248 | { ac_try='test -s conftest$ac_exeext' | |
9249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9250 | (eval $ac_try) 2>&5 | |
9251 | ac_status=$? | |
9252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9253 | (exit $ac_status); }; }; then | |
9254 | ac_cv_func_wctype=yes | |
9255 | else | |
9256 | echo "$as_me: failed program was:" >&5 | |
9257 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9258 | ||
b4e70030 | 9259 | ac_cv_func_wctype=no |
bec39cab AC |
9260 | fi |
9261 | rm -f conftest.err conftest.$ac_objext \ | |
9262 | conftest$ac_exeext conftest.$ac_ext | |
9263 | fi | |
b4e70030 JB |
9264 | echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5 |
9265 | echo "${ECHO_T}$ac_cv_func_wctype" >&6 | |
bec39cab AC |
9266 | if test $ac_cv_func_wctype = yes; then |
9267 | : | |
c906108c | 9268 | else |
c906108c | 9269 | |
b4e70030 JB |
9270 | echo "$as_me:$LINENO: checking for wctype in -lw" >&5 |
9271 | echo $ECHO_N "checking for wctype in -lw... $ECHO_C" >&6 | |
bec39cab AC |
9272 | if test "${ac_cv_lib_w_wctype+set}" = set; then |
9273 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9274 | else | |
9275 | ac_check_lib_save_LIBS=$LIBS | |
9276 | LIBS="-lw $LIBS" | |
9277 | cat >conftest.$ac_ext <<_ACEOF | |
9278 | /* confdefs.h. */ | |
9279 | _ACEOF | |
9280 | cat confdefs.h >>conftest.$ac_ext | |
9281 | cat >>conftest.$ac_ext <<_ACEOF | |
9282 | /* end confdefs.h. */ | |
c906108c | 9283 | |
b4e70030 | 9284 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
9285 | #ifdef __cplusplus |
9286 | extern "C" | |
9287 | #endif | |
b4e70030 JB |
9288 | /* We use char because int might match the return type of a gcc2 |
9289 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9290 | char wctype (); |
9291 | int | |
9292 | main () | |
9293 | { | |
b4e70030 | 9294 | wctype (); |
bec39cab AC |
9295 | ; |
9296 | return 0; | |
9297 | } | |
9298 | _ACEOF | |
9299 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9300 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9301 | (eval $ac_link) 2>conftest.er1 | |
9302 | ac_status=$? | |
9303 | grep -v '^ *+' conftest.er1 >conftest.err | |
9304 | rm -f conftest.er1 | |
9305 | cat conftest.err >&5 | |
9306 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9307 | (exit $ac_status); } && | |
b4e70030 JB |
9308 | { ac_try='test -z "$ac_c_werror_flag" |
9309 | || test ! -s conftest.err' | |
bec39cab AC |
9310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9311 | (eval $ac_try) 2>&5 | |
9312 | ac_status=$? | |
9313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9314 | (exit $ac_status); }; } && | |
9315 | { ac_try='test -s conftest$ac_exeext' | |
9316 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9317 | (eval $ac_try) 2>&5 | |
9318 | ac_status=$? | |
9319 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9320 | (exit $ac_status); }; }; then | |
9321 | ac_cv_lib_w_wctype=yes | |
9322 | else | |
9323 | echo "$as_me: failed program was:" >&5 | |
9324 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9325 | ||
b4e70030 | 9326 | ac_cv_lib_w_wctype=no |
bec39cab AC |
9327 | fi |
9328 | rm -f conftest.err conftest.$ac_objext \ | |
9329 | conftest$ac_exeext conftest.$ac_ext | |
9330 | LIBS=$ac_check_lib_save_LIBS | |
9331 | fi | |
b4e70030 JB |
9332 | echo "$as_me:$LINENO: result: $ac_cv_lib_w_wctype" >&5 |
9333 | echo "${ECHO_T}$ac_cv_lib_w_wctype" >&6 | |
bec39cab AC |
9334 | if test $ac_cv_lib_w_wctype = yes; then |
9335 | cat >>confdefs.h <<_ACEOF | |
9336 | #define HAVE_LIBW 1 | |
9337 | _ACEOF | |
c906108c | 9338 | |
bec39cab | 9339 | LIBS="-lw $LIBS" |
c906108c | 9340 | |
bec39cab | 9341 | fi |
c906108c | 9342 | |
bec39cab | 9343 | fi |
c906108c | 9344 | |
ddc9cd0f | 9345 | |
bec39cab | 9346 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
b4e70030 JB |
9347 | echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 |
9348 | echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 | |
bec39cab AC |
9349 | if test "${ac_cv_search_gethostbyname+set}" = set; then |
9350 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9351 | else | |
9352 | ac_func_search_save_LIBS=$LIBS | |
b4e70030 | 9353 | ac_cv_search_gethostbyname=no |
bec39cab AC |
9354 | cat >conftest.$ac_ext <<_ACEOF |
9355 | /* confdefs.h. */ | |
9356 | _ACEOF | |
9357 | cat confdefs.h >>conftest.$ac_ext | |
9358 | cat >>conftest.$ac_ext <<_ACEOF | |
9359 | /* end confdefs.h. */ | |
ddc9cd0f | 9360 | |
b4e70030 | 9361 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
9362 | #ifdef __cplusplus |
9363 | extern "C" | |
9364 | #endif | |
b4e70030 JB |
9365 | /* We use char because int might match the return type of a gcc2 |
9366 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
9367 | char gethostbyname (); |
9368 | int | |
9369 | main () | |
9370 | { | |
b4e70030 | 9371 | gethostbyname (); |
bec39cab AC |
9372 | ; |
9373 | return 0; | |
9374 | } | |
9375 | _ACEOF | |
b4e70030 | 9376 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
9377 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9378 | (eval $ac_link) 2>conftest.er1 | |
9379 | ac_status=$? | |
9380 | grep -v '^ *+' conftest.er1 >conftest.err | |
9381 | rm -f conftest.er1 | |
9382 | cat conftest.err >&5 | |
9383 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9384 | (exit $ac_status); } && | |
b4e70030 JB |
9385 | { ac_try='test -z "$ac_c_werror_flag" |
9386 | || test ! -s conftest.err' | |
bec39cab AC |
9387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9388 | (eval $ac_try) 2>&5 | |
9389 | ac_status=$? | |
9390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9391 | (exit $ac_status); }; } && | |
9392 | { ac_try='test -s conftest$ac_exeext' | |
9393 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9394 | (eval $ac_try) 2>&5 | |
9395 | ac_status=$? | |
9396 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9397 | (exit $ac_status); }; }; then | |
b4e70030 | 9398 | ac_cv_search_gethostbyname="none required" |
bec39cab AC |
9399 | else |
9400 | echo "$as_me: failed program was:" >&5 | |
9401 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ddc9cd0f | 9402 | |
bec39cab AC |
9403 | fi |
9404 | rm -f conftest.err conftest.$ac_objext \ | |
b4e70030 JB |
9405 | conftest$ac_exeext conftest.$ac_ext |
9406 | if test "$ac_cv_search_gethostbyname" = no; then | |
9407 | for ac_lib in nsl; do | |
9408 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9409 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
9410 | /* confdefs.h. */ |
9411 | _ACEOF | |
9412 | cat confdefs.h >>conftest.$ac_ext | |
9413 | cat >>conftest.$ac_ext <<_ACEOF | |
9414 | /* end confdefs.h. */ | |
ddc9cd0f | 9415 | |
b4e70030 | 9416 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
9417 | #ifdef __cplusplus |
9418 | extern "C" | |
9419 | #endif | |
b4e70030 JB |
9420 | /* We use char because int might match the return type of a gcc2 |
9421 | builtin and then its argument prototype would still apply. */ | |
9422 | char gethostbyname (); | |
bec39cab AC |
9423 | int |
9424 | main () | |
9425 | { | |
b4e70030 | 9426 | gethostbyname (); |
bec39cab AC |
9427 | ; |
9428 | return 0; | |
9429 | } | |
9430 | _ACEOF | |
b4e70030 | 9431 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
9432 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9433 | (eval $ac_link) 2>conftest.er1 | |
9434 | ac_status=$? | |
9435 | grep -v '^ *+' conftest.er1 >conftest.err | |
9436 | rm -f conftest.er1 | |
9437 | cat conftest.err >&5 | |
9438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9439 | (exit $ac_status); } && | |
b4e70030 JB |
9440 | { ac_try='test -z "$ac_c_werror_flag" |
9441 | || test ! -s conftest.err' | |
bec39cab AC |
9442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9443 | (eval $ac_try) 2>&5 | |
9444 | ac_status=$? | |
9445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9446 | (exit $ac_status); }; } && | |
9447 | { ac_try='test -s conftest$ac_exeext' | |
9448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9449 | (eval $ac_try) 2>&5 | |
9450 | ac_status=$? | |
9451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9452 | (exit $ac_status); }; }; then | |
b4e70030 JB |
9453 | ac_cv_search_gethostbyname="-l$ac_lib" |
9454 | break | |
bec39cab AC |
9455 | else |
9456 | echo "$as_me: failed program was:" >&5 | |
9457 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9458 | ||
9459 | fi | |
9460 | rm -f conftest.err conftest.$ac_objext \ | |
b4e70030 JB |
9461 | conftest$ac_exeext conftest.$ac_ext |
9462 | done | |
bec39cab AC |
9463 | fi |
9464 | LIBS=$ac_func_search_save_LIBS | |
9465 | fi | |
b4e70030 JB |
9466 | echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 |
9467 | echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 | |
9468 | if test "$ac_cv_search_gethostbyname" != no; then | |
9469 | test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" | |
96baa820 | 9470 | |
bec39cab | 9471 | fi |
96baa820 | 9472 | |
c906108c | 9473 | |
b4e70030 JB |
9474 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
9475 | echo "$as_me:$LINENO: checking for library containing socketpair" >&5 | |
9476 | echo $ECHO_N "checking for library containing socketpair... $ECHO_C" >&6 | |
9477 | if test "${ac_cv_search_socketpair+set}" = set; then | |
9478 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9479 | else | |
9480 | ac_func_search_save_LIBS=$LIBS | |
9481 | ac_cv_search_socketpair=no | |
9482 | cat >conftest.$ac_ext <<_ACEOF | |
9483 | /* confdefs.h. */ | |
9484 | _ACEOF | |
9485 | cat confdefs.h >>conftest.$ac_ext | |
9486 | cat >>conftest.$ac_ext <<_ACEOF | |
9487 | /* end confdefs.h. */ | |
9488 | ||
9489 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9490 | #ifdef __cplusplus | |
9491 | extern "C" | |
9492 | #endif | |
9493 | /* We use char because int might match the return type of a gcc2 | |
9494 | builtin and then its argument prototype would still apply. */ | |
9495 | char socketpair (); | |
9496 | int | |
9497 | main () | |
9498 | { | |
9499 | socketpair (); | |
9500 | ; | |
9501 | return 0; | |
9502 | } | |
9503 | _ACEOF | |
9504 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9505 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9506 | (eval $ac_link) 2>conftest.er1 | |
9507 | ac_status=$? | |
9508 | grep -v '^ *+' conftest.er1 >conftest.err | |
9509 | rm -f conftest.er1 | |
9510 | cat conftest.err >&5 | |
9511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9512 | (exit $ac_status); } && | |
9513 | { ac_try='test -z "$ac_c_werror_flag" | |
9514 | || test ! -s conftest.err' | |
9515 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9516 | (eval $ac_try) 2>&5 | |
9517 | ac_status=$? | |
9518 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9519 | (exit $ac_status); }; } && | |
9520 | { ac_try='test -s conftest$ac_exeext' | |
9521 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9522 | (eval $ac_try) 2>&5 | |
9523 | ac_status=$? | |
9524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9525 | (exit $ac_status); }; }; then | |
9526 | ac_cv_search_socketpair="none required" | |
9527 | else | |
9528 | echo "$as_me: failed program was:" >&5 | |
9529 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9530 | ||
9531 | fi | |
9532 | rm -f conftest.err conftest.$ac_objext \ | |
9533 | conftest$ac_exeext conftest.$ac_ext | |
9534 | if test "$ac_cv_search_socketpair" = no; then | |
9535 | for ac_lib in socket; do | |
9536 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9537 | cat >conftest.$ac_ext <<_ACEOF | |
9538 | /* confdefs.h. */ | |
9539 | _ACEOF | |
9540 | cat confdefs.h >>conftest.$ac_ext | |
9541 | cat >>conftest.$ac_ext <<_ACEOF | |
9542 | /* end confdefs.h. */ | |
9543 | ||
9544 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9545 | #ifdef __cplusplus | |
9546 | extern "C" | |
9547 | #endif | |
9548 | /* We use char because int might match the return type of a gcc2 | |
9549 | builtin and then its argument prototype would still apply. */ | |
9550 | char socketpair (); | |
9551 | int | |
9552 | main () | |
9553 | { | |
9554 | socketpair (); | |
9555 | ; | |
9556 | return 0; | |
9557 | } | |
9558 | _ACEOF | |
9559 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9560 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9561 | (eval $ac_link) 2>conftest.er1 | |
9562 | ac_status=$? | |
9563 | grep -v '^ *+' conftest.er1 >conftest.err | |
9564 | rm -f conftest.er1 | |
9565 | cat conftest.err >&5 | |
9566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9567 | (exit $ac_status); } && | |
9568 | { ac_try='test -z "$ac_c_werror_flag" | |
9569 | || test ! -s conftest.err' | |
9570 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9571 | (eval $ac_try) 2>&5 | |
9572 | ac_status=$? | |
9573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9574 | (exit $ac_status); }; } && | |
9575 | { ac_try='test -s conftest$ac_exeext' | |
9576 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9577 | (eval $ac_try) 2>&5 | |
9578 | ac_status=$? | |
9579 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9580 | (exit $ac_status); }; }; then | |
9581 | ac_cv_search_socketpair="-l$ac_lib" | |
9582 | break | |
9583 | else | |
9584 | echo "$as_me: failed program was:" >&5 | |
9585 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9586 | ||
9587 | fi | |
9588 | rm -f conftest.err conftest.$ac_objext \ | |
9589 | conftest$ac_exeext conftest.$ac_ext | |
9590 | done | |
9591 | fi | |
9592 | LIBS=$ac_func_search_save_LIBS | |
9593 | fi | |
9594 | echo "$as_me:$LINENO: result: $ac_cv_search_socketpair" >&5 | |
9595 | echo "${ECHO_T}$ac_cv_search_socketpair" >&6 | |
9596 | if test "$ac_cv_search_socketpair" != no; then | |
9597 | test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS" | |
9598 | ||
9599 | fi | |
9600 | ||
9601 | ||
233a11ab CS |
9602 | # Link in zlib if we can. This allows us to read compressed debug sections. |
9603 | echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5 | |
9604 | echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6 | |
9605 | if test "${ac_cv_search_zlibVersion+set}" = set; then | |
9606 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9607 | else | |
9608 | ac_func_search_save_LIBS=$LIBS | |
9609 | ac_cv_search_zlibVersion=no | |
9610 | cat >conftest.$ac_ext <<_ACEOF | |
9611 | /* confdefs.h. */ | |
9612 | _ACEOF | |
9613 | cat confdefs.h >>conftest.$ac_ext | |
9614 | cat >>conftest.$ac_ext <<_ACEOF | |
9615 | /* end confdefs.h. */ | |
9616 | ||
9617 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9618 | #ifdef __cplusplus | |
9619 | extern "C" | |
9620 | #endif | |
9621 | /* We use char because int might match the return type of a gcc2 | |
9622 | builtin and then its argument prototype would still apply. */ | |
9623 | char zlibVersion (); | |
9624 | int | |
9625 | main () | |
9626 | { | |
9627 | zlibVersion (); | |
9628 | ; | |
9629 | return 0; | |
9630 | } | |
9631 | _ACEOF | |
9632 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9633 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9634 | (eval $ac_link) 2>conftest.er1 | |
9635 | ac_status=$? | |
9636 | grep -v '^ *+' conftest.er1 >conftest.err | |
9637 | rm -f conftest.er1 | |
9638 | cat conftest.err >&5 | |
9639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9640 | (exit $ac_status); } && | |
9641 | { ac_try='test -z "$ac_c_werror_flag" | |
9642 | || test ! -s conftest.err' | |
9643 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9644 | (eval $ac_try) 2>&5 | |
9645 | ac_status=$? | |
9646 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9647 | (exit $ac_status); }; } && | |
9648 | { ac_try='test -s conftest$ac_exeext' | |
9649 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9650 | (eval $ac_try) 2>&5 | |
9651 | ac_status=$? | |
9652 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9653 | (exit $ac_status); }; }; then | |
9654 | ac_cv_search_zlibVersion="none required" | |
9655 | else | |
9656 | echo "$as_me: failed program was:" >&5 | |
9657 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9658 | ||
9659 | fi | |
9660 | rm -f conftest.err conftest.$ac_objext \ | |
9661 | conftest$ac_exeext conftest.$ac_ext | |
9662 | if test "$ac_cv_search_zlibVersion" = no; then | |
9663 | for ac_lib in z; do | |
9664 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9665 | cat >conftest.$ac_ext <<_ACEOF | |
9666 | /* confdefs.h. */ | |
9667 | _ACEOF | |
9668 | cat confdefs.h >>conftest.$ac_ext | |
9669 | cat >>conftest.$ac_ext <<_ACEOF | |
9670 | /* end confdefs.h. */ | |
9671 | ||
9672 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9673 | #ifdef __cplusplus | |
9674 | extern "C" | |
9675 | #endif | |
9676 | /* We use char because int might match the return type of a gcc2 | |
9677 | builtin and then its argument prototype would still apply. */ | |
9678 | char zlibVersion (); | |
9679 | int | |
9680 | main () | |
9681 | { | |
9682 | zlibVersion (); | |
9683 | ; | |
9684 | return 0; | |
9685 | } | |
9686 | _ACEOF | |
9687 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9688 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9689 | (eval $ac_link) 2>conftest.er1 | |
9690 | ac_status=$? | |
9691 | grep -v '^ *+' conftest.er1 >conftest.err | |
9692 | rm -f conftest.er1 | |
9693 | cat conftest.err >&5 | |
9694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9695 | (exit $ac_status); } && | |
9696 | { ac_try='test -z "$ac_c_werror_flag" | |
9697 | || test ! -s conftest.err' | |
9698 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9699 | (eval $ac_try) 2>&5 | |
9700 | ac_status=$? | |
9701 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9702 | (exit $ac_status); }; } && | |
9703 | { ac_try='test -s conftest$ac_exeext' | |
9704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9705 | (eval $ac_try) 2>&5 | |
9706 | ac_status=$? | |
9707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9708 | (exit $ac_status); }; }; then | |
9709 | ac_cv_search_zlibVersion="-l$ac_lib" | |
9710 | break | |
9711 | else | |
9712 | echo "$as_me: failed program was:" >&5 | |
9713 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9714 | ||
9715 | fi | |
9716 | rm -f conftest.err conftest.$ac_objext \ | |
9717 | conftest$ac_exeext conftest.$ac_ext | |
9718 | done | |
9719 | fi | |
9720 | LIBS=$ac_func_search_save_LIBS | |
9721 | fi | |
9722 | echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5 | |
9723 | echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6 | |
9724 | if test "$ac_cv_search_zlibVersion" != no; then | |
9725 | test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS" | |
9726 | ||
9727 | for ac_header in zlib.h | |
9728 | do | |
9729 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
9730 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9731 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
9732 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
9733 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9734 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9735 | fi | |
9736 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
9737 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
9738 | else | |
9739 | # Is the header compilable? | |
9740 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
9741 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
9742 | cat >conftest.$ac_ext <<_ACEOF | |
9743 | /* confdefs.h. */ | |
9744 | _ACEOF | |
9745 | cat confdefs.h >>conftest.$ac_ext | |
9746 | cat >>conftest.$ac_ext <<_ACEOF | |
9747 | /* end confdefs.h. */ | |
9748 | $ac_includes_default | |
9749 | #include <$ac_header> | |
9750 | _ACEOF | |
9751 | rm -f conftest.$ac_objext | |
9752 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
9753 | (eval $ac_compile) 2>conftest.er1 | |
9754 | ac_status=$? | |
9755 | grep -v '^ *+' conftest.er1 >conftest.err | |
9756 | rm -f conftest.er1 | |
9757 | cat conftest.err >&5 | |
9758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9759 | (exit $ac_status); } && | |
9760 | { ac_try='test -z "$ac_c_werror_flag" | |
9761 | || test ! -s conftest.err' | |
9762 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9763 | (eval $ac_try) 2>&5 | |
9764 | ac_status=$? | |
9765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9766 | (exit $ac_status); }; } && | |
9767 | { ac_try='test -s conftest.$ac_objext' | |
9768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9769 | (eval $ac_try) 2>&5 | |
9770 | ac_status=$? | |
9771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9772 | (exit $ac_status); }; }; then | |
9773 | ac_header_compiler=yes | |
9774 | else | |
9775 | echo "$as_me: failed program was:" >&5 | |
9776 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9777 | ||
9778 | ac_header_compiler=no | |
9779 | fi | |
9780 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
9781 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
9782 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
9783 | ||
9784 | # Is the header present? | |
9785 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
9786 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
9787 | cat >conftest.$ac_ext <<_ACEOF | |
9788 | /* confdefs.h. */ | |
9789 | _ACEOF | |
9790 | cat confdefs.h >>conftest.$ac_ext | |
9791 | cat >>conftest.$ac_ext <<_ACEOF | |
9792 | /* end confdefs.h. */ | |
9793 | #include <$ac_header> | |
9794 | _ACEOF | |
9795 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9796 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9797 | ac_status=$? | |
9798 | grep -v '^ *+' conftest.er1 >conftest.err | |
9799 | rm -f conftest.er1 | |
9800 | cat conftest.err >&5 | |
9801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9802 | (exit $ac_status); } >/dev/null; then | |
9803 | if test -s conftest.err; then | |
9804 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9805 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9806 | else | |
9807 | ac_cpp_err= | |
9808 | fi | |
9809 | else | |
9810 | ac_cpp_err=yes | |
9811 | fi | |
9812 | if test -z "$ac_cpp_err"; then | |
9813 | ac_header_preproc=yes | |
9814 | else | |
9815 | echo "$as_me: failed program was:" >&5 | |
9816 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9817 | ||
9818 | ac_header_preproc=no | |
9819 | fi | |
9820 | rm -f conftest.err conftest.$ac_ext | |
9821 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
9822 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
9823 | ||
9824 | # So? What about this header? | |
9825 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
9826 | yes:no: ) | |
9827 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
9828 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
9829 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
9830 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
9831 | ac_header_preproc=yes | |
9832 | ;; | |
9833 | no:yes:* ) | |
9834 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
9835 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
9836 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
9837 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
9838 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
9839 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
9840 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
9841 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
9842 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
9843 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
9844 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
9845 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
9846 | ( | |
9847 | cat <<\_ASBOX | |
9848 | ## ------------------------------------------ ## | |
9849 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
9850 | ## ------------------------------------------ ## | |
9851 | _ASBOX | |
9852 | ) | | |
9853 | sed "s/^/$as_me: WARNING: /" >&2 | |
9854 | ;; | |
9855 | esac | |
9856 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
9857 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
9858 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
9859 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9860 | else | |
9861 | eval "$as_ac_Header=\$ac_header_preproc" | |
9862 | fi | |
9863 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
9864 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
9865 | ||
9866 | fi | |
9867 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
9868 | cat >>confdefs.h <<_ACEOF | |
9869 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
9870 | _ACEOF | |
9871 | ||
9872 | fi | |
9873 | ||
9874 | done | |
9875 | ||
9876 | fi | |
9877 | ||
9878 | ||
77f120bf JB |
9879 | # On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c). |
9880 | echo "$as_me:$LINENO: checking for library containing dlgetmodinfo" >&5 | |
9881 | echo $ECHO_N "checking for library containing dlgetmodinfo... $ECHO_C" >&6 | |
9882 | if test "${ac_cv_search_dlgetmodinfo+set}" = set; then | |
bec39cab AC |
9883 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9884 | else | |
9885 | ac_func_search_save_LIBS=$LIBS | |
77f120bf | 9886 | ac_cv_search_dlgetmodinfo=no |
bec39cab AC |
9887 | cat >conftest.$ac_ext <<_ACEOF |
9888 | /* confdefs.h. */ | |
9889 | _ACEOF | |
9890 | cat confdefs.h >>conftest.$ac_ext | |
9891 | cat >>conftest.$ac_ext <<_ACEOF | |
9892 | /* end confdefs.h. */ | |
c906108c | 9893 | |
b4e70030 | 9894 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
9895 | #ifdef __cplusplus |
9896 | extern "C" | |
9897 | #endif | |
b4e70030 JB |
9898 | /* We use char because int might match the return type of a gcc2 |
9899 | builtin and then its argument prototype would still apply. */ | |
77f120bf | 9900 | char dlgetmodinfo (); |
bec39cab AC |
9901 | int |
9902 | main () | |
9903 | { | |
77f120bf | 9904 | dlgetmodinfo (); |
bec39cab AC |
9905 | ; |
9906 | return 0; | |
9907 | } | |
9908 | _ACEOF | |
b4e70030 | 9909 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
9910 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9911 | (eval $ac_link) 2>conftest.er1 | |
9912 | ac_status=$? | |
9913 | grep -v '^ *+' conftest.er1 >conftest.err | |
9914 | rm -f conftest.er1 | |
9915 | cat conftest.err >&5 | |
9916 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9917 | (exit $ac_status); } && | |
b4e70030 JB |
9918 | { ac_try='test -z "$ac_c_werror_flag" |
9919 | || test ! -s conftest.err' | |
bec39cab AC |
9920 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9921 | (eval $ac_try) 2>&5 | |
9922 | ac_status=$? | |
9923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9924 | (exit $ac_status); }; } && | |
9925 | { ac_try='test -s conftest$ac_exeext' | |
9926 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9927 | (eval $ac_try) 2>&5 | |
9928 | ac_status=$? | |
9929 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9930 | (exit $ac_status); }; }; then | |
77f120bf | 9931 | ac_cv_search_dlgetmodinfo="none required" |
bec39cab AC |
9932 | else |
9933 | echo "$as_me: failed program was:" >&5 | |
9934 | sed 's/^/| /' conftest.$ac_ext >&5 | |
1ba607ad AC |
9935 | |
9936 | fi | |
bec39cab | 9937 | rm -f conftest.err conftest.$ac_objext \ |
b4e70030 | 9938 | conftest$ac_exeext conftest.$ac_ext |
77f120bf JB |
9939 | if test "$ac_cv_search_dlgetmodinfo" = no; then |
9940 | for ac_lib in dl xpdl; do | |
b4e70030 JB |
9941 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
9942 | cat >conftest.$ac_ext <<_ACEOF | |
9943 | /* confdefs.h. */ | |
9944 | _ACEOF | |
9945 | cat confdefs.h >>conftest.$ac_ext | |
9946 | cat >>conftest.$ac_ext <<_ACEOF | |
9947 | /* end confdefs.h. */ | |
9948 | ||
9949 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9950 | #ifdef __cplusplus | |
9951 | extern "C" | |
9952 | #endif | |
9953 | /* We use char because int might match the return type of a gcc2 | |
9954 | builtin and then its argument prototype would still apply. */ | |
77f120bf | 9955 | char dlgetmodinfo (); |
b4e70030 JB |
9956 | int |
9957 | main () | |
9958 | { | |
77f120bf | 9959 | dlgetmodinfo (); |
b4e70030 JB |
9960 | ; |
9961 | return 0; | |
9962 | } | |
9963 | _ACEOF | |
9964 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9965 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9966 | (eval $ac_link) 2>conftest.er1 | |
9967 | ac_status=$? | |
9968 | grep -v '^ *+' conftest.er1 >conftest.err | |
9969 | rm -f conftest.er1 | |
9970 | cat conftest.err >&5 | |
9971 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9972 | (exit $ac_status); } && | |
9973 | { ac_try='test -z "$ac_c_werror_flag" | |
9974 | || test ! -s conftest.err' | |
9975 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9976 | (eval $ac_try) 2>&5 | |
9977 | ac_status=$? | |
9978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9979 | (exit $ac_status); }; } && | |
9980 | { ac_try='test -s conftest$ac_exeext' | |
9981 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9982 | (eval $ac_try) 2>&5 | |
9983 | ac_status=$? | |
9984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9985 | (exit $ac_status); }; }; then | |
77f120bf | 9986 | ac_cv_search_dlgetmodinfo="-l$ac_lib" |
b4e70030 | 9987 | break |
4e8d927d | 9988 | else |
b4e70030 JB |
9989 | echo "$as_me: failed program was:" >&5 |
9990 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9991 | ||
9992 | fi | |
9993 | rm -f conftest.err conftest.$ac_objext \ | |
9994 | conftest$ac_exeext conftest.$ac_ext | |
9995 | done | |
1ba607ad | 9996 | fi |
bec39cab AC |
9997 | LIBS=$ac_func_search_save_LIBS |
9998 | fi | |
77f120bf JB |
9999 | echo "$as_me:$LINENO: result: $ac_cv_search_dlgetmodinfo" >&5 |
10000 | echo "${ECHO_T}$ac_cv_search_dlgetmodinfo" >&6 | |
10001 | if test "$ac_cv_search_dlgetmodinfo" != no; then | |
10002 | test "$ac_cv_search_dlgetmodinfo" = "none required" || LIBS="$ac_cv_search_dlgetmodinfo $LIBS" | |
c906108c | 10003 | |
8bb2c122 | 10004 | fi |
8bb2c122 | 10005 | |
8bb2c122 | 10006 | |
77f120bf | 10007 | |
77f120bf | 10008 | |
6c7a06a3 TT |
10009 | |
10010 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10011 | if test "${with_libiconv_prefix+set}" = set; then | |
10012 | withval="$with_libiconv_prefix" | |
10013 | ||
10014 | for dir in `echo "$withval" | tr : ' '`; do | |
10015 | if test -d $dir/include; then LIBICONV_INCLUDE="-I$dir/include"; CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
10016 | if test -d $dir/lib; then LIBICONV_LIBDIR="-L$dir/lib"; LDFLAGS="$LDFLAGS -L$dir/lib"; fi | |
10017 | done | |
10018 | ||
10019 | fi; | |
10020 | ||
10021 | BUILD_LIBICONV_LIBDIR="-L../libiconv/lib/.libs -L../libiconv/lib/_libs" | |
10022 | BUILD_LIBICONV_INCLUDE="-I../libiconv/include" | |
10023 | ||
10024 | echo "$as_me:$LINENO: checking for iconv" >&5 | |
10025 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10026 | if test "${am_cv_func_iconv+set}" = set; then | |
d542061a UW |
10027 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
10028 | else | |
6c7a06a3 TT |
10029 | |
10030 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
10031 | am_cv_lib_iconv=no | |
10032 | am_cv_use_build_libiconv=no | |
10033 | cat >conftest.$ac_ext <<_ACEOF | |
d542061a UW |
10034 | /* confdefs.h. */ |
10035 | _ACEOF | |
10036 | cat confdefs.h >>conftest.$ac_ext | |
10037 | cat >>conftest.$ac_ext <<_ACEOF | |
10038 | /* end confdefs.h. */ | |
6c7a06a3 TT |
10039 | #include <stdlib.h> |
10040 | #include <iconv.h> | |
d542061a UW |
10041 | int |
10042 | main () | |
10043 | { | |
6c7a06a3 TT |
10044 | iconv_t cd = iconv_open("",""); |
10045 | iconv(cd,NULL,NULL,NULL,NULL); | |
10046 | iconv_close(cd); | |
d542061a UW |
10047 | ; |
10048 | return 0; | |
10049 | } | |
10050 | _ACEOF | |
10051 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10052 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10053 | (eval $ac_link) 2>conftest.er1 | |
10054 | ac_status=$? | |
10055 | grep -v '^ *+' conftest.er1 >conftest.err | |
10056 | rm -f conftest.er1 | |
10057 | cat conftest.err >&5 | |
10058 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10059 | (exit $ac_status); } && | |
10060 | { ac_try='test -z "$ac_c_werror_flag" | |
10061 | || test ! -s conftest.err' | |
10062 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10063 | (eval $ac_try) 2>&5 | |
10064 | ac_status=$? | |
10065 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10066 | (exit $ac_status); }; } && | |
10067 | { ac_try='test -s conftest$ac_exeext' | |
10068 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10069 | (eval $ac_try) 2>&5 | |
10070 | ac_status=$? | |
10071 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10072 | (exit $ac_status); }; }; then | |
6c7a06a3 | 10073 | am_cv_func_iconv=yes |
d542061a UW |
10074 | else |
10075 | echo "$as_me: failed program was:" >&5 | |
10076 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10077 | ||
10078 | fi | |
10079 | rm -f conftest.err conftest.$ac_objext \ | |
10080 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 TT |
10081 | if test "$am_cv_func_iconv" != yes; then |
10082 | am_save_LIBS="$LIBS" | |
10083 | LIBS="$LIBS -liconv" | |
10084 | cat >conftest.$ac_ext <<_ACEOF | |
d542061a UW |
10085 | /* confdefs.h. */ |
10086 | _ACEOF | |
10087 | cat confdefs.h >>conftest.$ac_ext | |
10088 | cat >>conftest.$ac_ext <<_ACEOF | |
10089 | /* end confdefs.h. */ | |
6c7a06a3 TT |
10090 | #include <stdlib.h> |
10091 | #include <iconv.h> | |
d542061a UW |
10092 | int |
10093 | main () | |
10094 | { | |
6c7a06a3 TT |
10095 | iconv_t cd = iconv_open("",""); |
10096 | iconv(cd,NULL,NULL,NULL,NULL); | |
10097 | iconv_close(cd); | |
d542061a UW |
10098 | ; |
10099 | return 0; | |
10100 | } | |
10101 | _ACEOF | |
10102 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10103 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10104 | (eval $ac_link) 2>conftest.er1 | |
10105 | ac_status=$? | |
10106 | grep -v '^ *+' conftest.er1 >conftest.err | |
10107 | rm -f conftest.er1 | |
10108 | cat conftest.err >&5 | |
10109 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10110 | (exit $ac_status); } && | |
10111 | { ac_try='test -z "$ac_c_werror_flag" | |
10112 | || test ! -s conftest.err' | |
10113 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10114 | (eval $ac_try) 2>&5 | |
10115 | ac_status=$? | |
10116 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10117 | (exit $ac_status); }; } && | |
10118 | { ac_try='test -s conftest$ac_exeext' | |
10119 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10120 | (eval $ac_try) 2>&5 | |
10121 | ac_status=$? | |
10122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10123 | (exit $ac_status); }; }; then | |
6c7a06a3 TT |
10124 | am_cv_lib_iconv=yes |
10125 | am_cv_func_iconv=yes | |
d542061a UW |
10126 | else |
10127 | echo "$as_me: failed program was:" >&5 | |
10128 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10129 | ||
10130 | fi | |
10131 | rm -f conftest.err conftest.$ac_objext \ | |
10132 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 10133 | LIBS="$am_save_LIBS" |
77f120bf | 10134 | fi |
6c7a06a3 TT |
10135 | # Look for libiconv in the build tree. |
10136 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then | |
10137 | am_save_LIBS="$LIBS" | |
10138 | am_save_CPPFLAGS="$CPPFLAGS" | |
10139 | LIBS="$LIBS $BUILD_LIBICONV_LIBDIR -liconv" | |
10140 | CPPFLAGS="$CPPFLAGS $BUILD_LIBICONV_INCLUDE" | |
10141 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
10142 | /* confdefs.h. */ |
10143 | _ACEOF | |
10144 | cat confdefs.h >>conftest.$ac_ext | |
10145 | cat >>conftest.$ac_ext <<_ACEOF | |
10146 | /* end confdefs.h. */ | |
6c7a06a3 TT |
10147 | #include <stdlib.h> |
10148 | #include <iconv.h> | |
bec39cab AC |
10149 | int |
10150 | main () | |
10151 | { | |
6c7a06a3 TT |
10152 | iconv_t cd = iconv_open("",""); |
10153 | iconv(cd,NULL,NULL,NULL,NULL); | |
10154 | iconv_close(cd); | |
bec39cab AC |
10155 | ; |
10156 | return 0; | |
10157 | } | |
10158 | _ACEOF | |
b4e70030 | 10159 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
10160 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
10161 | (eval $ac_link) 2>conftest.er1 | |
10162 | ac_status=$? | |
10163 | grep -v '^ *+' conftest.er1 >conftest.err | |
10164 | rm -f conftest.er1 | |
10165 | cat conftest.err >&5 | |
10166 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10167 | (exit $ac_status); } && | |
b4e70030 JB |
10168 | { ac_try='test -z "$ac_c_werror_flag" |
10169 | || test ! -s conftest.err' | |
bec39cab AC |
10170 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10171 | (eval $ac_try) 2>&5 | |
10172 | ac_status=$? | |
10173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10174 | (exit $ac_status); }; } && | |
10175 | { ac_try='test -s conftest$ac_exeext' | |
10176 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10177 | (eval $ac_try) 2>&5 | |
10178 | ac_status=$? | |
10179 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10180 | (exit $ac_status); }; }; then | |
6c7a06a3 TT |
10181 | am_cv_lib_iconv=yes |
10182 | am_cv_func_iconv=yes | |
627af7ea | 10183 | else |
bec39cab AC |
10184 | echo "$as_me: failed program was:" >&5 |
10185 | sed 's/^/| /' conftest.$ac_ext >&5 | |
627af7ea | 10186 | |
627af7ea | 10187 | fi |
bec39cab | 10188 | rm -f conftest.err conftest.$ac_objext \ |
b4e70030 | 10189 | conftest$ac_exeext conftest.$ac_ext |
6c7a06a3 TT |
10190 | LIBS="$am_save_LIBS" |
10191 | if test "$am_cv_func_iconv" = "yes"; then | |
10192 | am_cv_use_build_libiconv=yes | |
10193 | else | |
10194 | CPPFLAGS="$am_save_CPPFLAGS" | |
10195 | fi | |
10196 | fi | |
10197 | ||
10198 | fi | |
10199 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
10200 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
10201 | if test "$am_cv_func_iconv" = yes; then | |
10202 | ||
10203 | cat >>confdefs.h <<\_ACEOF | |
10204 | #define HAVE_ICONV 1 | |
10205 | _ACEOF | |
10206 | ||
10207 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 | |
10208 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
10209 | if test "${am_cv_proto_iconv+set}" = set; then | |
10210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10211 | else | |
10212 | ||
10213 | cat >conftest.$ac_ext <<_ACEOF | |
b4e70030 JB |
10214 | /* confdefs.h. */ |
10215 | _ACEOF | |
10216 | cat confdefs.h >>conftest.$ac_ext | |
10217 | cat >>conftest.$ac_ext <<_ACEOF | |
10218 | /* end confdefs.h. */ | |
10219 | ||
6c7a06a3 TT |
10220 | #include <stdlib.h> |
10221 | #include <iconv.h> | |
10222 | extern | |
b4e70030 | 10223 | #ifdef __cplusplus |
6c7a06a3 | 10224 | "C" |
b4e70030 | 10225 | #endif |
6c7a06a3 TT |
10226 | #if defined(__STDC__) || defined(__cplusplus) |
10227 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
10228 | #else | |
10229 | size_t iconv(); | |
10230 | #endif | |
10231 | ||
b4e70030 JB |
10232 | int |
10233 | main () | |
10234 | { | |
6c7a06a3 | 10235 | |
b4e70030 JB |
10236 | ; |
10237 | return 0; | |
10238 | } | |
10239 | _ACEOF | |
6c7a06a3 TT |
10240 | rm -f conftest.$ac_objext |
10241 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
10242 | (eval $ac_compile) 2>conftest.er1 | |
b4e70030 JB |
10243 | ac_status=$? |
10244 | grep -v '^ *+' conftest.er1 >conftest.err | |
10245 | rm -f conftest.er1 | |
10246 | cat conftest.err >&5 | |
10247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10248 | (exit $ac_status); } && | |
10249 | { ac_try='test -z "$ac_c_werror_flag" | |
10250 | || test ! -s conftest.err' | |
10251 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10252 | (eval $ac_try) 2>&5 | |
10253 | ac_status=$? | |
10254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10255 | (exit $ac_status); }; } && | |
6c7a06a3 | 10256 | { ac_try='test -s conftest.$ac_objext' |
b4e70030 JB |
10257 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10258 | (eval $ac_try) 2>&5 | |
10259 | ac_status=$? | |
10260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10261 | (exit $ac_status); }; }; then | |
6c7a06a3 | 10262 | am_cv_proto_iconv_arg1="" |
4e8d927d | 10263 | else |
b4e70030 JB |
10264 | echo "$as_me: failed program was:" >&5 |
10265 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10266 | ||
6c7a06a3 | 10267 | am_cv_proto_iconv_arg1="const" |
b4e70030 | 10268 | fi |
6c7a06a3 TT |
10269 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
10270 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" | |
10271 | fi | |
10272 | ||
10273 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
10274 | echo "$as_me:$LINENO: result: ${ac_t:- | |
10275 | }$am_cv_proto_iconv" >&5 | |
10276 | echo "${ECHO_T}${ac_t:- | |
10277 | }$am_cv_proto_iconv" >&6 | |
10278 | ||
10279 | cat >>confdefs.h <<_ACEOF | |
10280 | #define ICONV_CONST $am_cv_proto_iconv_arg1 | |
10281 | _ACEOF | |
10282 | ||
10283 | fi | |
10284 | LIBICONV= | |
10285 | if test "$am_cv_lib_iconv" = yes; then | |
10286 | LIBICONV="-liconv" | |
10287 | fi | |
10288 | if test "$am_cv_use_build_libiconv" = yes; then | |
10289 | LIBICONV_LIBDIR="$BUILD_LIBICONV_LIBDIR" | |
10290 | LIBICONV_INCLUDE="$BUILD_LIBICONV_INCLUDE" | |
10291 | fi | |
10292 | ||
10293 | ||
10294 | ||
10295 | ||
10296 | ||
10297 | # On alpha-osf, it appears that libtermcap and libcurses are not compatible. | |
10298 | # There is a very specific comment in /usr/include/curses.h explaining that | |
10299 | # termcap routines built into libcurses must not be used. | |
10300 | # | |
10301 | # The symptoms we observed so far is GDB unexpectedly changing | |
10302 | # the terminal settings when tgetent is called - this is particularly | |
10303 | # visible as the output is missing carriage returns, and so rapidly | |
10304 | # becomes very hard to read. | |
10305 | # | |
10306 | # The readline configure script has already decided that libtermcap | |
10307 | # was enough for its purposes, and so decided to build readline using | |
10308 | # libtermcap. Since the TUI mode requires curses, building GDB with | |
10309 | # TUI enabled results in both libraries to be used at the same time, | |
10310 | # which is not allowed. This basically means that GDB with TUI is | |
10311 | # broken on alpha-osf. | |
10312 | ||
10313 | case $host_os in | |
10314 | alpha*-*-osf* ) | |
10315 | if "$enable_tui" = "yes"; then | |
10316 | { { echo "$as_me:$LINENO: error: Building GDB with TUI mode is not supported on this host" >&5 | |
10317 | echo "$as_me: error: Building GDB with TUI mode is not supported on this host" >&2;} | |
10318 | { (exit 1); exit 1; }; } | |
10319 | fi | |
10320 | if "$enable_tui" = "auto"; then | |
10321 | enable_tui=no | |
10322 | fi | |
10323 | ;; | |
10324 | esac | |
10325 | ||
cb01cfba | 10326 | # For the TUI, we need enhanced curses functionality. |
bd8a8e1b | 10327 | if test x"$enable_tui" != xno; then |
cb01cfba JB |
10328 | prefer_curses=yes |
10329 | fi | |
10330 | ||
10331 | curses_found=no | |
10332 | if test x"$prefer_curses" = xyes; then | |
10333 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied | |
10334 | # curses library because the latter might not provide all the | |
10335 | # functionality we need. However, this leads to problems on systems | |
10336 | # where the linker searches /usr/local/lib, but the compiler doesn't | |
10337 | # search /usr/local/include, if ncurses is installed in /usr/local. A | |
10338 | # default installation of ncurses on alpha*-dec-osf* will lead to such | |
10339 | # a situation. | |
10340 | echo "$as_me:$LINENO: checking for library containing waddstr" >&5 | |
6c7a06a3 TT |
10341 | echo $ECHO_N "checking for library containing waddstr... $ECHO_C" >&6 |
10342 | if test "${ac_cv_search_waddstr+set}" = set; then | |
10343 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10344 | else | |
10345 | ac_func_search_save_LIBS=$LIBS | |
10346 | ac_cv_search_waddstr=no | |
10347 | cat >conftest.$ac_ext <<_ACEOF | |
10348 | /* confdefs.h. */ | |
10349 | _ACEOF | |
10350 | cat confdefs.h >>conftest.$ac_ext | |
10351 | cat >>conftest.$ac_ext <<_ACEOF | |
10352 | /* end confdefs.h. */ | |
10353 | ||
10354 | /* Override any gcc2 internal prototype to avoid an error. */ | |
10355 | #ifdef __cplusplus | |
10356 | extern "C" | |
10357 | #endif | |
10358 | /* We use char because int might match the return type of a gcc2 | |
10359 | builtin and then its argument prototype would still apply. */ | |
10360 | char waddstr (); | |
10361 | int | |
10362 | main () | |
10363 | { | |
10364 | waddstr (); | |
10365 | ; | |
10366 | return 0; | |
10367 | } | |
10368 | _ACEOF | |
10369 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10370 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10371 | (eval $ac_link) 2>conftest.er1 | |
10372 | ac_status=$? | |
10373 | grep -v '^ *+' conftest.er1 >conftest.err | |
10374 | rm -f conftest.er1 | |
10375 | cat conftest.err >&5 | |
10376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10377 | (exit $ac_status); } && | |
10378 | { ac_try='test -z "$ac_c_werror_flag" | |
10379 | || test ! -s conftest.err' | |
10380 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10381 | (eval $ac_try) 2>&5 | |
10382 | ac_status=$? | |
10383 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10384 | (exit $ac_status); }; } && | |
10385 | { ac_try='test -s conftest$ac_exeext' | |
10386 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10387 | (eval $ac_try) 2>&5 | |
10388 | ac_status=$? | |
10389 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10390 | (exit $ac_status); }; }; then | |
10391 | ac_cv_search_waddstr="none required" | |
10392 | else | |
10393 | echo "$as_me: failed program was:" >&5 | |
10394 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10395 | ||
10396 | fi | |
10397 | rm -f conftest.err conftest.$ac_objext \ | |
10398 | conftest$ac_exeext conftest.$ac_ext | |
10399 | if test "$ac_cv_search_waddstr" = no; then | |
10400 | for ac_lib in ncurses cursesX curses; do | |
10401 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
10402 | cat >conftest.$ac_ext <<_ACEOF | |
10403 | /* confdefs.h. */ | |
10404 | _ACEOF | |
10405 | cat confdefs.h >>conftest.$ac_ext | |
10406 | cat >>conftest.$ac_ext <<_ACEOF | |
10407 | /* end confdefs.h. */ | |
10408 | ||
10409 | /* Override any gcc2 internal prototype to avoid an error. */ | |
10410 | #ifdef __cplusplus | |
10411 | extern "C" | |
10412 | #endif | |
10413 | /* We use char because int might match the return type of a gcc2 | |
10414 | builtin and then its argument prototype would still apply. */ | |
10415 | char waddstr (); | |
10416 | int | |
10417 | main () | |
10418 | { | |
10419 | waddstr (); | |
10420 | ; | |
10421 | return 0; | |
10422 | } | |
10423 | _ACEOF | |
10424 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10425 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10426 | (eval $ac_link) 2>conftest.er1 | |
10427 | ac_status=$? | |
10428 | grep -v '^ *+' conftest.er1 >conftest.err | |
10429 | rm -f conftest.er1 | |
10430 | cat conftest.err >&5 | |
10431 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10432 | (exit $ac_status); } && | |
10433 | { ac_try='test -z "$ac_c_werror_flag" | |
10434 | || test ! -s conftest.err' | |
10435 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10436 | (eval $ac_try) 2>&5 | |
10437 | ac_status=$? | |
10438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10439 | (exit $ac_status); }; } && | |
10440 | { ac_try='test -s conftest$ac_exeext' | |
10441 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10442 | (eval $ac_try) 2>&5 | |
10443 | ac_status=$? | |
10444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10445 | (exit $ac_status); }; }; then | |
10446 | ac_cv_search_waddstr="-l$ac_lib" | |
10447 | break | |
10448 | else | |
10449 | echo "$as_me: failed program was:" >&5 | |
10450 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10451 | ||
10452 | fi | |
10453 | rm -f conftest.err conftest.$ac_objext \ | |
10454 | conftest$ac_exeext conftest.$ac_ext | |
10455 | done | |
10456 | fi | |
10457 | LIBS=$ac_func_search_save_LIBS | |
10458 | fi | |
10459 | echo "$as_me:$LINENO: result: $ac_cv_search_waddstr" >&5 | |
10460 | echo "${ECHO_T}$ac_cv_search_waddstr" >&6 | |
10461 | if test "$ac_cv_search_waddstr" != no; then | |
10462 | test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS" | |
10463 | ||
10464 | fi | |
10465 | ||
10466 | ||
cb01cfba JB |
10467 | if test "$ac_cv_search_waddstr" != no; then |
10468 | curses_found=yes | |
10469 | fi | |
10470 | fi | |
10471 | ||
10472 | # Check whether we should enable the TUI, but only do so if we really | |
10473 | # can. | |
10474 | if test x"$enable_tui" != xno; then | |
10475 | if test -d $srcdir/tui; then | |
10476 | if test "$curses_found" != no; then | |
6c7a06a3 TT |
10477 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
10478 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" | |
10479 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" | |
10480 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" | |
10481 | CONFIG_ALL="${CONFIG_ALL} all-tui" | |
10482 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui" | |
10483 | CONFIG_INSTALL="${CONFIG_INSTALL} install-tui" | |
10484 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui" | |
10485 | else | |
10486 | if test x"$enable_tui" = xyes; then | |
10487 | { { echo "$as_me:$LINENO: error: no enhanced curses library found; disable TUI" >&5 | |
10488 | echo "$as_me: error: no enhanced curses library found; disable TUI" >&2;} | |
10489 | { (exit 1); exit 1; }; } | |
10490 | else | |
10491 | { echo "$as_me:$LINENO: WARNING: no enhanced curses library found; disabling TUI" >&5 | |
10492 | echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} | |
10493 | fi | |
10494 | fi | |
10495 | fi | |
10496 | fi | |
10497 | ||
10498 | # Since GDB uses Readline, we need termcap functionality. In many | |
10499 | # cases this will be provided by the curses library, but some systems | |
10500 | # have a seperate termcap library, or no curses library at all. | |
10501 | ||
10502 | case $host_os in | |
10503 | cygwin*) | |
10504 | if test -d $srcdir/libtermcap; then | |
10505 | LIBS="../libtermcap/libtermcap.a $LIBS" | |
10506 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" | |
10507 | fi ;; | |
10508 | go32* | *djgpp*) | |
10509 | ac_cv_search_tgetent="none required" | |
10510 | ;; | |
10511 | *mingw32*) | |
10512 | ac_cv_search_tgetent="none required" | |
10513 | CONFIG_OBS="$CONFIG_OBS windows-termcap.o" | |
10514 | ;; | |
10515 | esac | |
10516 | ||
10517 | # These are the libraries checked by Readline. | |
10518 | echo "$as_me:$LINENO: checking for library containing tgetent" >&5 | |
10519 | echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6 | |
10520 | if test "${ac_cv_search_tgetent+set}" = set; then | |
10521 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10522 | else | |
10523 | ac_func_search_save_LIBS=$LIBS | |
10524 | ac_cv_search_tgetent=no | |
10525 | cat >conftest.$ac_ext <<_ACEOF | |
10526 | /* confdefs.h. */ | |
10527 | _ACEOF | |
10528 | cat confdefs.h >>conftest.$ac_ext | |
10529 | cat >>conftest.$ac_ext <<_ACEOF | |
10530 | /* end confdefs.h. */ | |
10531 | ||
10532 | /* Override any gcc2 internal prototype to avoid an error. */ | |
10533 | #ifdef __cplusplus | |
10534 | extern "C" | |
10535 | #endif | |
10536 | /* We use char because int might match the return type of a gcc2 | |
10537 | builtin and then its argument prototype would still apply. */ | |
10538 | char tgetent (); | |
10539 | int | |
10540 | main () | |
10541 | { | |
10542 | tgetent (); | |
10543 | ; | |
10544 | return 0; | |
10545 | } | |
10546 | _ACEOF | |
10547 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10548 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10549 | (eval $ac_link) 2>conftest.er1 | |
10550 | ac_status=$? | |
10551 | grep -v '^ *+' conftest.er1 >conftest.err | |
10552 | rm -f conftest.er1 | |
10553 | cat conftest.err >&5 | |
10554 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10555 | (exit $ac_status); } && | |
10556 | { ac_try='test -z "$ac_c_werror_flag" | |
10557 | || test ! -s conftest.err' | |
10558 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10559 | (eval $ac_try) 2>&5 | |
10560 | ac_status=$? | |
10561 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10562 | (exit $ac_status); }; } && | |
10563 | { ac_try='test -s conftest$ac_exeext' | |
10564 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10565 | (eval $ac_try) 2>&5 | |
10566 | ac_status=$? | |
10567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10568 | (exit $ac_status); }; }; then | |
10569 | ac_cv_search_tgetent="none required" | |
10570 | else | |
10571 | echo "$as_me: failed program was:" >&5 | |
10572 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10573 | ||
10574 | fi | |
10575 | rm -f conftest.err conftest.$ac_objext \ | |
10576 | conftest$ac_exeext conftest.$ac_ext | |
10577 | if test "$ac_cv_search_tgetent" = no; then | |
10578 | for ac_lib in termcap tinfo curses ncurses; do | |
10579 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
10580 | cat >conftest.$ac_ext <<_ACEOF | |
10581 | /* confdefs.h. */ | |
10582 | _ACEOF | |
10583 | cat confdefs.h >>conftest.$ac_ext | |
10584 | cat >>conftest.$ac_ext <<_ACEOF | |
10585 | /* end confdefs.h. */ | |
10586 | ||
10587 | /* Override any gcc2 internal prototype to avoid an error. */ | |
10588 | #ifdef __cplusplus | |
10589 | extern "C" | |
10590 | #endif | |
10591 | /* We use char because int might match the return type of a gcc2 | |
10592 | builtin and then its argument prototype would still apply. */ | |
10593 | char tgetent (); | |
10594 | int | |
10595 | main () | |
10596 | { | |
10597 | tgetent (); | |
10598 | ; | |
10599 | return 0; | |
10600 | } | |
10601 | _ACEOF | |
10602 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10603 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10604 | (eval $ac_link) 2>conftest.er1 | |
10605 | ac_status=$? | |
10606 | grep -v '^ *+' conftest.er1 >conftest.err | |
10607 | rm -f conftest.er1 | |
10608 | cat conftest.err >&5 | |
10609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10610 | (exit $ac_status); } && | |
10611 | { ac_try='test -z "$ac_c_werror_flag" | |
10612 | || test ! -s conftest.err' | |
10613 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10614 | (eval $ac_try) 2>&5 | |
10615 | ac_status=$? | |
10616 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10617 | (exit $ac_status); }; } && | |
10618 | { ac_try='test -s conftest$ac_exeext' | |
10619 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10620 | (eval $ac_try) 2>&5 | |
10621 | ac_status=$? | |
10622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10623 | (exit $ac_status); }; }; then | |
10624 | ac_cv_search_tgetent="-l$ac_lib" | |
10625 | break | |
10626 | else | |
10627 | echo "$as_me: failed program was:" >&5 | |
10628 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10629 | ||
10630 | fi | |
10631 | rm -f conftest.err conftest.$ac_objext \ | |
10632 | conftest$ac_exeext conftest.$ac_ext | |
10633 | done | |
10634 | fi | |
10635 | LIBS=$ac_func_search_save_LIBS | |
10636 | fi | |
10637 | echo "$as_me:$LINENO: result: $ac_cv_search_tgetent" >&5 | |
10638 | echo "${ECHO_T}$ac_cv_search_tgetent" >&6 | |
10639 | if test "$ac_cv_search_tgetent" != no; then | |
10640 | test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" | |
10641 | ||
06825bd1 MK |
10642 | fi |
10643 | ||
06825bd1 | 10644 | |
bec39cab AC |
10645 | if test "$ac_cv_search_tgetent" = no; then |
10646 | { { echo "$as_me:$LINENO: error: no termcap library found" >&5 | |
10647 | echo "$as_me: error: no termcap library found" >&2;} | |
10648 | { (exit 1); exit 1; }; } | |
8ee53726 MK |
10649 | fi |
10650 | ||
3841debe | 10651 | |
6a30b0a5 AS |
10652 | # Check whether --with-system-readline or --without-system-readline was given. |
10653 | if test "${with_system_readline+set}" = set; then | |
10654 | withval="$with_system_readline" | |
10655 | ||
10656 | fi; | |
10657 | ||
10658 | if test "$with_system_readline" = yes; then | |
10659 | READLINE=-lreadline | |
10660 | READLINE_DEPS= | |
10661 | READLINE_CFLAGS= | |
10662 | else | |
10663 | READLINE='$(READLINE_DIR)/libreadline.a' | |
10664 | READLINE_DEPS='$(READLINE)' | |
10665 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' | |
10666 | fi | |
10667 | ||
10668 | ||
10669 | ||
10670 | ||
10671 | ||
5c39566f DJ |
10672 | # Check whether --with-expat or --without-expat was given. |
10673 | if test "${with_expat+set}" = set; then | |
10674 | withval="$with_expat" | |
10675 | ||
10676 | else | |
10677 | with_expat=auto | |
10678 | fi; | |
10679 | echo "$as_me:$LINENO: checking whether to use expat" >&5 | |
10680 | echo $ECHO_N "checking whether to use expat... $ECHO_C" >&6 | |
10681 | echo "$as_me:$LINENO: result: $with_expat" >&5 | |
10682 | echo "${ECHO_T}$with_expat" >&6 | |
10683 | ||
10684 | if test "${with_expat}" = no; then | |
10685 | { echo "$as_me:$LINENO: WARNING: expat support disabled; some features may be unavailable." >&5 | |
10686 | echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} | |
10687 | HAVE_LIBEXPAT=no | |
10688 | else | |
10689 | ||
3841debe DJ |
10690 | if test "X$prefix" = "XNONE"; then |
10691 | acl_final_prefix="$ac_default_prefix" | |
10692 | else | |
10693 | acl_final_prefix="$prefix" | |
10694 | fi | |
10695 | if test "X$exec_prefix" = "XNONE"; then | |
10696 | acl_final_exec_prefix='${prefix}' | |
10697 | else | |
10698 | acl_final_exec_prefix="$exec_prefix" | |
10699 | fi | |
10700 | acl_save_prefix="$prefix" | |
10701 | prefix="$acl_final_prefix" | |
10702 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10703 | prefix="$acl_save_prefix" | |
10704 | ||
10705 | ||
10706 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
10707 | if test "${with_gnu_ld+set}" = set; then | |
10708 | withval="$with_gnu_ld" | |
10709 | test "$withval" = no || with_gnu_ld=yes | |
10710 | else | |
10711 | with_gnu_ld=no | |
10712 | fi; | |
10713 | # Prepare PATH_SEPARATOR. | |
10714 | # The user is always right. | |
10715 | if test "${PATH_SEPARATOR+set}" != set; then | |
10716 | echo "#! /bin/sh" >conf$$.sh | |
10717 | echo "exit 0" >>conf$$.sh | |
10718 | chmod +x conf$$.sh | |
10719 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10720 | PATH_SEPARATOR=';' | |
10721 | else | |
10722 | PATH_SEPARATOR=: | |
10723 | fi | |
10724 | rm -f conf$$.sh | |
10725 | fi | |
10726 | ac_prog=ld | |
10727 | if test "$GCC" = yes; then | |
10728 | # Check if gcc -print-prog-name=ld gives a path. | |
10729 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10730 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10731 | case $host in | |
10732 | *-*-mingw*) | |
10733 | # gcc leaves a trailing carriage return which upsets mingw | |
10734 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10735 | *) | |
10736 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10737 | esac | |
10738 | case $ac_prog in | |
10739 | # Accept absolute paths. | |
10740 | [\\/]* | [A-Za-z]:[\\/]*) | |
10741 | re_direlt='/[^/][^/]*/\.\./' | |
10742 | # Canonicalize the path of ld | |
10743 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10744 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10745 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10746 | done | |
10747 | test -z "$LD" && LD="$ac_prog" | |
10748 | ;; | |
10749 | "") | |
10750 | # If it fails, then pretend we aren't using GCC. | |
10751 | ac_prog=ld | |
10752 | ;; | |
10753 | *) | |
10754 | # If it is relative, then search for the first ld in PATH. | |
10755 | with_gnu_ld=unknown | |
10756 | ;; | |
10757 | esac | |
10758 | elif test "$with_gnu_ld" = yes; then | |
10759 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10760 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
10761 | else | |
10762 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 | |
10763 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
10764 | fi | |
10765 | if test "${acl_cv_path_LD+set}" = set; then | |
10766 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10767 | else | |
10768 | if test -z "$LD"; then | |
10769 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10770 | for ac_dir in $PATH; do | |
10771 | test -z "$ac_dir" && ac_dir=. | |
10772 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10773 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10774 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10775 | # but apparently some GNU ld's only accept -v. | |
10776 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
10777 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
10778 | test "$with_gnu_ld" != no && break | |
10779 | else | |
10780 | test "$with_gnu_ld" != yes && break | |
10781 | fi | |
10782 | fi | |
10783 | done | |
10784 | IFS="$ac_save_ifs" | |
10785 | else | |
10786 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10787 | fi | |
10788 | fi | |
10789 | ||
10790 | LD="$acl_cv_path_LD" | |
10791 | if test -n "$LD"; then | |
10792 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10793 | echo "${ECHO_T}$LD" >&6 | |
10794 | else | |
10795 | echo "$as_me:$LINENO: result: no" >&5 | |
10796 | echo "${ECHO_T}no" >&6 | |
10797 | fi | |
10798 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 | |
10799 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10800 | { (exit 1); exit 1; }; } | |
10801 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10802 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10803 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10804 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10805 | else | |
10806 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
10807 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
10808 | acl_cv_prog_gnu_ld=yes | |
10809 | else | |
10810 | acl_cv_prog_gnu_ld=no | |
10811 | fi | |
10812 | fi | |
10813 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10814 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10815 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10816 | ||
10817 | ||
10818 | ||
10819 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10820 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10821 | if test "${acl_cv_rpath+set}" = set; then | |
10822 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10823 | else | |
10824 | ||
10825 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10826 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10827 | . ./conftest.sh | |
10828 | rm -f ./conftest.sh | |
10829 | acl_cv_rpath=done | |
10830 | ||
10831 | fi | |
10832 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 | |
10833 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10834 | wl="$acl_cv_wl" | |
10835 | libext="$acl_cv_libext" | |
10836 | shlibext="$acl_cv_shlibext" | |
10837 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10838 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10839 | hardcode_direct="$acl_cv_hardcode_direct" | |
10840 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10841 | # Check whether --enable-rpath or --disable-rpath was given. | |
10842 | if test "${enable_rpath+set}" = set; then | |
10843 | enableval="$enable_rpath" | |
10844 | : | |
10845 | else | |
10846 | enable_rpath=yes | |
10847 | fi; | |
10848 | ||
10849 | ||
10850 | ||
10851 | ||
10852 | ||
10853 | ||
10854 | ||
10855 | ||
10856 | ||
10857 | use_additional=yes | |
10858 | ||
10859 | acl_save_prefix="$prefix" | |
10860 | prefix="$acl_final_prefix" | |
10861 | acl_save_exec_prefix="$exec_prefix" | |
10862 | exec_prefix="$acl_final_exec_prefix" | |
10863 | ||
10864 | eval additional_includedir=\"$includedir\" | |
10865 | eval additional_libdir=\"$libdir\" | |
10866 | ||
10867 | exec_prefix="$acl_save_exec_prefix" | |
10868 | prefix="$acl_save_prefix" | |
10869 | ||
10870 | ||
10871 | # Check whether --with-libexpat-prefix or --without-libexpat-prefix was given. | |
10872 | if test "${with_libexpat_prefix+set}" = set; then | |
10873 | withval="$with_libexpat_prefix" | |
10874 | ||
10875 | if test "X$withval" = "Xno"; then | |
10876 | use_additional=no | |
10877 | else | |
10878 | if test "X$withval" = "X"; then | |
10879 | ||
10880 | acl_save_prefix="$prefix" | |
10881 | prefix="$acl_final_prefix" | |
10882 | acl_save_exec_prefix="$exec_prefix" | |
10883 | exec_prefix="$acl_final_exec_prefix" | |
10884 | ||
10885 | eval additional_includedir=\"$includedir\" | |
10886 | eval additional_libdir=\"$libdir\" | |
10887 | ||
10888 | exec_prefix="$acl_save_exec_prefix" | |
10889 | prefix="$acl_save_prefix" | |
10890 | ||
10891 | else | |
10892 | additional_includedir="$withval/include" | |
10893 | additional_libdir="$withval/lib" | |
10894 | fi | |
10895 | fi | |
10896 | ||
10897 | fi; | |
10898 | LIBEXPAT= | |
10899 | LTLIBEXPAT= | |
10900 | INCEXPAT= | |
10901 | rpathdirs= | |
10902 | ltrpathdirs= | |
10903 | names_already_handled= | |
10904 | names_next_round='expat ' | |
10905 | while test -n "$names_next_round"; do | |
10906 | names_this_round="$names_next_round" | |
10907 | names_next_round= | |
10908 | for name in $names_this_round; do | |
10909 | already_handled= | |
10910 | for n in $names_already_handled; do | |
10911 | if test "$n" = "$name"; then | |
10912 | already_handled=yes | |
10913 | break | |
10914 | fi | |
10915 | done | |
10916 | if test -z "$already_handled"; then | |
10917 | names_already_handled="$names_already_handled $name" | |
10918 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10919 | eval value=\"\$HAVE_LIB$uppername\" | |
10920 | if test -n "$value"; then | |
10921 | if test "$value" = yes; then | |
10922 | eval value=\"\$LIB$uppername\" | |
10923 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" | |
10924 | eval value=\"\$LTLIB$uppername\" | |
10925 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" | |
10926 | else | |
10927 | : | |
10928 | fi | |
10929 | else | |
10930 | found_dir= | |
10931 | found_la= | |
10932 | found_so= | |
10933 | found_a= | |
10934 | if test $use_additional = yes; then | |
10935 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10936 | found_dir="$additional_libdir" | |
10937 | found_so="$additional_libdir/lib$name.$shlibext" | |
10938 | if test -f "$additional_libdir/lib$name.la"; then | |
10939 | found_la="$additional_libdir/lib$name.la" | |
10940 | fi | |
10941 | else | |
10942 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10943 | found_dir="$additional_libdir" | |
10944 | found_a="$additional_libdir/lib$name.$libext" | |
10945 | if test -f "$additional_libdir/lib$name.la"; then | |
10946 | found_la="$additional_libdir/lib$name.la" | |
10947 | fi | |
10948 | fi | |
10949 | fi | |
10950 | fi | |
10951 | if test "X$found_dir" = "X"; then | |
10952 | for x in $LDFLAGS $LTLIBEXPAT; do | |
10953 | ||
10954 | acl_save_prefix="$prefix" | |
10955 | prefix="$acl_final_prefix" | |
10956 | acl_save_exec_prefix="$exec_prefix" | |
10957 | exec_prefix="$acl_final_exec_prefix" | |
10958 | eval x=\"$x\" | |
10959 | exec_prefix="$acl_save_exec_prefix" | |
10960 | prefix="$acl_save_prefix" | |
10961 | ||
10962 | case "$x" in | |
10963 | -L*) | |
10964 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10965 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10966 | found_dir="$dir" | |
10967 | found_so="$dir/lib$name.$shlibext" | |
10968 | if test -f "$dir/lib$name.la"; then | |
10969 | found_la="$dir/lib$name.la" | |
10970 | fi | |
10971 | else | |
10972 | if test -f "$dir/lib$name.$libext"; then | |
10973 | found_dir="$dir" | |
10974 | found_a="$dir/lib$name.$libext" | |
10975 | if test -f "$dir/lib$name.la"; then | |
10976 | found_la="$dir/lib$name.la" | |
10977 | fi | |
10978 | fi | |
10979 | fi | |
10980 | ;; | |
10981 | esac | |
10982 | if test "X$found_dir" != "X"; then | |
10983 | break | |
10984 | fi | |
10985 | done | |
10986 | fi | |
10987 | if test "X$found_dir" != "X"; then | |
10988 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" | |
10989 | if test "X$found_so" != "X"; then | |
10990 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10991 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
10992 | else | |
10993 | haveit= | |
10994 | for x in $ltrpathdirs; do | |
10995 | if test "X$x" = "X$found_dir"; then | |
10996 | haveit=yes | |
10997 | break | |
10998 | fi | |
10999 | done | |
11000 | if test -z "$haveit"; then | |
11001 | ltrpathdirs="$ltrpathdirs $found_dir" | |
11002 | fi | |
11003 | if test "$hardcode_direct" = yes; then | |
11004 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11005 | else | |
11006 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
11007 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11008 | haveit= | |
11009 | for x in $rpathdirs; do | |
11010 | if test "X$x" = "X$found_dir"; then | |
11011 | haveit=yes | |
11012 | break | |
11013 | fi | |
11014 | done | |
11015 | if test -z "$haveit"; then | |
11016 | rpathdirs="$rpathdirs $found_dir" | |
11017 | fi | |
11018 | else | |
11019 | haveit= | |
11020 | for x in $LDFLAGS $LIBEXPAT; do | |
11021 | ||
11022 | acl_save_prefix="$prefix" | |
11023 | prefix="$acl_final_prefix" | |
11024 | acl_save_exec_prefix="$exec_prefix" | |
11025 | exec_prefix="$acl_final_exec_prefix" | |
11026 | eval x=\"$x\" | |
11027 | exec_prefix="$acl_save_exec_prefix" | |
11028 | prefix="$acl_save_prefix" | |
11029 | ||
11030 | if test "X$x" = "X-L$found_dir"; then | |
11031 | haveit=yes | |
11032 | break | |
11033 | fi | |
11034 | done | |
11035 | if test -z "$haveit"; then | |
11036 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" | |
11037 | fi | |
11038 | if test "$hardcode_minus_L" != no; then | |
11039 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" | |
11040 | else | |
11041 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
11042 | fi | |
11043 | fi | |
11044 | fi | |
11045 | fi | |
11046 | else | |
11047 | if test "X$found_a" != "X"; then | |
11048 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" | |
11049 | else | |
11050 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" | |
11051 | fi | |
11052 | fi | |
11053 | additional_includedir= | |
11054 | case "$found_dir" in | |
11055 | */lib | */lib/) | |
11056 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
11057 | additional_includedir="$basedir/include" | |
11058 | ;; | |
11059 | esac | |
11060 | if test "X$additional_includedir" != "X"; then | |
11061 | if test "X$additional_includedir" != "X/usr/include"; then | |
11062 | haveit= | |
11063 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
11064 | if test -n "$GCC"; then | |
11065 | case $host_os in | |
11066 | linux*) haveit=yes;; | |
11067 | esac | |
11068 | fi | |
11069 | fi | |
11070 | if test -z "$haveit"; then | |
11071 | for x in $CPPFLAGS $INCEXPAT; do | |
11072 | ||
11073 | acl_save_prefix="$prefix" | |
11074 | prefix="$acl_final_prefix" | |
11075 | acl_save_exec_prefix="$exec_prefix" | |
11076 | exec_prefix="$acl_final_exec_prefix" | |
11077 | eval x=\"$x\" | |
11078 | exec_prefix="$acl_save_exec_prefix" | |
11079 | prefix="$acl_save_prefix" | |
11080 | ||
11081 | if test "X$x" = "X-I$additional_includedir"; then | |
11082 | haveit=yes | |
11083 | break | |
11084 | fi | |
11085 | done | |
11086 | if test -z "$haveit"; then | |
11087 | if test -d "$additional_includedir"; then | |
11088 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" | |
11089 | fi | |
11090 | fi | |
11091 | fi | |
11092 | fi | |
11093 | fi | |
11094 | if test -n "$found_la"; then | |
11095 | save_libdir="$libdir" | |
11096 | case "$found_la" in | |
11097 | */* | *\\*) . "$found_la" ;; | |
11098 | *) . "./$found_la" ;; | |
11099 | esac | |
11100 | libdir="$save_libdir" | |
11101 | for dep in $dependency_libs; do | |
11102 | case "$dep" in | |
11103 | -L*) | |
11104 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
11105 | if test "X$additional_libdir" != "X/usr/lib"; then | |
11106 | haveit= | |
11107 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
11108 | if test -n "$GCC"; then | |
11109 | case $host_os in | |
11110 | linux*) haveit=yes;; | |
11111 | esac | |
11112 | fi | |
11113 | fi | |
11114 | if test -z "$haveit"; then | |
11115 | haveit= | |
11116 | for x in $LDFLAGS $LIBEXPAT; do | |
11117 | ||
11118 | acl_save_prefix="$prefix" | |
11119 | prefix="$acl_final_prefix" | |
11120 | acl_save_exec_prefix="$exec_prefix" | |
11121 | exec_prefix="$acl_final_exec_prefix" | |
11122 | eval x=\"$x\" | |
11123 | exec_prefix="$acl_save_exec_prefix" | |
11124 | prefix="$acl_save_prefix" | |
11125 | ||
11126 | if test "X$x" = "X-L$additional_libdir"; then | |
11127 | haveit=yes | |
11128 | break | |
11129 | fi | |
11130 | done | |
11131 | if test -z "$haveit"; then | |
11132 | if test -d "$additional_libdir"; then | |
11133 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" | |
11134 | fi | |
11135 | fi | |
11136 | haveit= | |
11137 | for x in $LDFLAGS $LTLIBEXPAT; do | |
11138 | ||
11139 | acl_save_prefix="$prefix" | |
11140 | prefix="$acl_final_prefix" | |
11141 | acl_save_exec_prefix="$exec_prefix" | |
11142 | exec_prefix="$acl_final_exec_prefix" | |
11143 | eval x=\"$x\" | |
11144 | exec_prefix="$acl_save_exec_prefix" | |
11145 | prefix="$acl_save_prefix" | |
11146 | ||
11147 | if test "X$x" = "X-L$additional_libdir"; then | |
11148 | haveit=yes | |
11149 | break | |
11150 | fi | |
11151 | done | |
11152 | if test -z "$haveit"; then | |
11153 | if test -d "$additional_libdir"; then | |
11154 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" | |
11155 | fi | |
11156 | fi | |
11157 | fi | |
11158 | fi | |
11159 | ;; | |
11160 | -R*) | |
11161 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
11162 | if test "$enable_rpath" != no; then | |
11163 | haveit= | |
11164 | for x in $rpathdirs; do | |
11165 | if test "X$x" = "X$dir"; then | |
11166 | haveit=yes | |
11167 | break | |
11168 | fi | |
11169 | done | |
11170 | if test -z "$haveit"; then | |
11171 | rpathdirs="$rpathdirs $dir" | |
11172 | fi | |
11173 | haveit= | |
11174 | for x in $ltrpathdirs; do | |
11175 | if test "X$x" = "X$dir"; then | |
11176 | haveit=yes | |
11177 | break | |
11178 | fi | |
11179 | done | |
11180 | if test -z "$haveit"; then | |
11181 | ltrpathdirs="$ltrpathdirs $dir" | |
11182 | fi | |
11183 | fi | |
11184 | ;; | |
11185 | -l*) | |
11186 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
11187 | ;; | |
11188 | *.la) | |
11189 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
11190 | ;; | |
11191 | *) | |
11192 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" | |
11193 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" | |
11194 | ;; | |
11195 | esac | |
11196 | done | |
11197 | fi | |
11198 | else | |
11199 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" | |
11200 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" | |
11201 | fi | |
11202 | fi | |
11203 | fi | |
11204 | done | |
11205 | done | |
11206 | if test "X$rpathdirs" != "X"; then | |
11207 | if test -n "$hardcode_libdir_separator"; then | |
11208 | alldirs= | |
11209 | for found_dir in $rpathdirs; do | |
11210 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11211 | done | |
11212 | acl_save_libdir="$libdir" | |
11213 | libdir="$alldirs" | |
11214 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11215 | libdir="$acl_save_libdir" | |
11216 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
11217 | else | |
11218 | for found_dir in $rpathdirs; do | |
11219 | acl_save_libdir="$libdir" | |
11220 | libdir="$found_dir" | |
11221 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11222 | libdir="$acl_save_libdir" | |
11223 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" | |
11224 | done | |
11225 | fi | |
11226 | fi | |
11227 | if test "X$ltrpathdirs" != "X"; then | |
11228 | for found_dir in $ltrpathdirs; do | |
11229 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" | |
11230 | done | |
11231 | fi | |
11232 | ||
11233 | ||
11234 | ac_save_CPPFLAGS="$CPPFLAGS" | |
11235 | ||
11236 | for element in $INCEXPAT; do | |
11237 | haveit= | |
11238 | for x in $CPPFLAGS; do | |
11239 | ||
11240 | acl_save_prefix="$prefix" | |
11241 | prefix="$acl_final_prefix" | |
11242 | acl_save_exec_prefix="$exec_prefix" | |
11243 | exec_prefix="$acl_final_exec_prefix" | |
11244 | eval x=\"$x\" | |
11245 | exec_prefix="$acl_save_exec_prefix" | |
11246 | prefix="$acl_save_prefix" | |
11247 | ||
11248 | if test "X$x" = "X$element"; then | |
11249 | haveit=yes | |
11250 | break | |
11251 | fi | |
11252 | done | |
11253 | if test -z "$haveit"; then | |
11254 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11255 | fi | |
11256 | done | |
11257 | ||
11258 | ||
11259 | echo "$as_me:$LINENO: checking for libexpat" >&5 | |
11260 | echo $ECHO_N "checking for libexpat... $ECHO_C" >&6 | |
11261 | if test "${ac_cv_libexpat+set}" = set; then | |
11262 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11263 | else | |
11264 | ||
11265 | ac_save_LIBS="$LIBS" | |
11266 | LIBS="$LIBS $LIBEXPAT" | |
11267 | cat >conftest.$ac_ext <<_ACEOF | |
11268 | /* confdefs.h. */ | |
11269 | _ACEOF | |
11270 | cat confdefs.h >>conftest.$ac_ext | |
11271 | cat >>conftest.$ac_ext <<_ACEOF | |
11272 | /* end confdefs.h. */ | |
11273 | #include "expat.h" | |
11274 | int | |
11275 | main () | |
11276 | { | |
11277 | XML_Parser p = XML_ParserCreate (0); | |
11278 | ; | |
11279 | return 0; | |
11280 | } | |
11281 | _ACEOF | |
11282 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11283 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11284 | (eval $ac_link) 2>conftest.er1 | |
11285 | ac_status=$? | |
11286 | grep -v '^ *+' conftest.er1 >conftest.err | |
11287 | rm -f conftest.er1 | |
11288 | cat conftest.err >&5 | |
11289 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11290 | (exit $ac_status); } && | |
11291 | { ac_try='test -z "$ac_c_werror_flag" | |
11292 | || test ! -s conftest.err' | |
11293 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11294 | (eval $ac_try) 2>&5 | |
11295 | ac_status=$? | |
11296 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11297 | (exit $ac_status); }; } && | |
11298 | { ac_try='test -s conftest$ac_exeext' | |
11299 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11300 | (eval $ac_try) 2>&5 | |
11301 | ac_status=$? | |
11302 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11303 | (exit $ac_status); }; }; then | |
11304 | ac_cv_libexpat=yes | |
11305 | else | |
11306 | echo "$as_me: failed program was:" >&5 | |
11307 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11308 | ||
11309 | ac_cv_libexpat=no | |
11310 | fi | |
11311 | rm -f conftest.err conftest.$ac_objext \ | |
11312 | conftest$ac_exeext conftest.$ac_ext | |
11313 | LIBS="$ac_save_LIBS" | |
11314 | ||
11315 | fi | |
11316 | echo "$as_me:$LINENO: result: $ac_cv_libexpat" >&5 | |
11317 | echo "${ECHO_T}$ac_cv_libexpat" >&6 | |
11318 | if test "$ac_cv_libexpat" = yes; then | |
11319 | HAVE_LIBEXPAT=yes | |
11320 | ||
11321 | cat >>confdefs.h <<\_ACEOF | |
11322 | #define HAVE_LIBEXPAT 1 | |
11323 | _ACEOF | |
11324 | ||
11325 | echo "$as_me:$LINENO: checking how to link with libexpat" >&5 | |
11326 | echo $ECHO_N "checking how to link with libexpat... $ECHO_C" >&6 | |
11327 | echo "$as_me:$LINENO: result: $LIBEXPAT" >&5 | |
11328 | echo "${ECHO_T}$LIBEXPAT" >&6 | |
11329 | else | |
11330 | HAVE_LIBEXPAT=no | |
11331 | CPPFLAGS="$ac_save_CPPFLAGS" | |
11332 | LIBEXPAT= | |
11333 | LTLIBEXPAT= | |
11334 | fi | |
11335 | ||
11336 | ||
11337 | ||
11338 | ||
11339 | ||
11340 | ||
5c39566f DJ |
11341 | if test "$HAVE_LIBEXPAT" != yes; then |
11342 | if test "$with_expat" = yes; then | |
11343 | { { echo "$as_me:$LINENO: error: expat is missing or unusable" >&5 | |
11344 | echo "$as_me: error: expat is missing or unusable" >&2;} | |
11345 | { (exit 1); exit 1; }; } | |
11346 | else | |
11347 | { echo "$as_me:$LINENO: WARNING: expat is missing or unusable; some features may be unavailable." >&5 | |
11348 | echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} | |
11349 | fi | |
11350 | else | |
11351 | save_LIBS=$LIBS | |
11352 | LIBS="$LIBS $LIBEXPAT" | |
ca4ca11e DJ |
11353 | |
11354 | for ac_func in XML_StopParser | |
11355 | do | |
11356 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
11357 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
11358 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
11359 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
11360 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11361 | else | |
11362 | cat >conftest.$ac_ext <<_ACEOF | |
11363 | /* confdefs.h. */ | |
11364 | _ACEOF | |
11365 | cat confdefs.h >>conftest.$ac_ext | |
11366 | cat >>conftest.$ac_ext <<_ACEOF | |
11367 | /* end confdefs.h. */ | |
11368 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
11369 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
11370 | #define $ac_func innocuous_$ac_func | |
11371 | ||
11372 | /* System header to define __stub macros and hopefully few prototypes, | |
11373 | which can conflict with char $ac_func (); below. | |
11374 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
11375 | <limits.h> exists even on freestanding compilers. */ | |
11376 | ||
11377 | #ifdef __STDC__ | |
11378 | # include <limits.h> | |
11379 | #else | |
11380 | # include <assert.h> | |
11381 | #endif | |
11382 | ||
11383 | #undef $ac_func | |
11384 | ||
11385 | /* Override any gcc2 internal prototype to avoid an error. */ | |
11386 | #ifdef __cplusplus | |
11387 | extern "C" | |
11388 | { | |
11389 | #endif | |
11390 | /* We use char because int might match the return type of a gcc2 | |
11391 | builtin and then its argument prototype would still apply. */ | |
11392 | char $ac_func (); | |
11393 | /* The GNU C library defines this for functions which it implements | |
11394 | to always fail with ENOSYS. Some functions are actually named | |
11395 | something starting with __ and the normal name is an alias. */ | |
11396 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
11397 | choke me | |
11398 | #else | |
11399 | char (*f) () = $ac_func; | |
11400 | #endif | |
11401 | #ifdef __cplusplus | |
11402 | } | |
11403 | #endif | |
11404 | ||
11405 | int | |
11406 | main () | |
11407 | { | |
11408 | return f != $ac_func; | |
11409 | ; | |
11410 | return 0; | |
11411 | } | |
11412 | _ACEOF | |
11413 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11414 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11415 | (eval $ac_link) 2>conftest.er1 | |
11416 | ac_status=$? | |
11417 | grep -v '^ *+' conftest.er1 >conftest.err | |
11418 | rm -f conftest.er1 | |
11419 | cat conftest.err >&5 | |
11420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11421 | (exit $ac_status); } && | |
11422 | { ac_try='test -z "$ac_c_werror_flag" | |
11423 | || test ! -s conftest.err' | |
11424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11425 | (eval $ac_try) 2>&5 | |
11426 | ac_status=$? | |
11427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11428 | (exit $ac_status); }; } && | |
11429 | { ac_try='test -s conftest$ac_exeext' | |
11430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11431 | (eval $ac_try) 2>&5 | |
11432 | ac_status=$? | |
11433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11434 | (exit $ac_status); }; }; then | |
11435 | eval "$as_ac_var=yes" | |
11436 | else | |
11437 | echo "$as_me: failed program was:" >&5 | |
11438 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11439 | ||
11440 | eval "$as_ac_var=no" | |
11441 | fi | |
11442 | rm -f conftest.err conftest.$ac_objext \ | |
11443 | conftest$ac_exeext conftest.$ac_ext | |
11444 | fi | |
11445 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
11446 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
11447 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
11448 | cat >>confdefs.h <<_ACEOF | |
11449 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
11450 | _ACEOF | |
11451 | ||
11452 | fi | |
11453 | done | |
11454 | ||
5c39566f DJ |
11455 | LIBS=$save_LIBS |
11456 | fi | |
3841debe DJ |
11457 | fi |
11458 | ||
d57a3c85 TJB |
11459 | |
11460 | ||
11461 | ||
11462 | # Check whether --with-python or --without-python was given. | |
11463 | if test "${with_python+set}" = set; then | |
11464 | withval="$with_python" | |
11465 | ||
11466 | else | |
11467 | with_python=auto | |
11468 | fi; | |
11469 | echo "$as_me:$LINENO: checking whether to use python" >&5 | |
11470 | echo $ECHO_N "checking whether to use python... $ECHO_C" >&6 | |
11471 | echo "$as_me:$LINENO: result: $with_python" >&5 | |
11472 | echo "${ECHO_T}$with_python" >&6 | |
11473 | ||
11474 | if test "${with_python}" = no; then | |
11475 | { echo "$as_me:$LINENO: WARNING: python support disabled; some features may be unavailable." >&5 | |
11476 | echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} | |
11477 | have_libpython=no | |
11478 | else | |
11479 | case "${with_python}" in | |
11480 | yes | auto) | |
11481 | # Leave as empty, use defaults. | |
11482 | python_includes= | |
11483 | python_libs= | |
11484 | ;; | |
11485 | /*) | |
11486 | python_includes="-I${with_python}/include" | |
11487 | python_libs="-L${with_python}/lib" | |
11488 | ;; | |
11489 | *) | |
11490 | { { echo "$as_me:$LINENO: error: invalid value for --with-python" >&5 | |
11491 | echo "$as_me: error: invalid value for --with-python" >&2;} | |
11492 | { (exit 1); exit 1; }; } | |
11493 | ;; | |
11494 | esac | |
11495 | ||
11496 | save_CPPFLAGS=$CPPFLAGS | |
11497 | CPPFLAGS="$CPPFLAGS ${python_includes}" | |
11498 | save_LIBS=$LIBS | |
11499 | LIBS="$LIBS ${python_libs}" | |
11500 | have_libpython=no | |
11501 | if test "${have_libpython}" = no; then | |
11502 | ||
11503 | version=python2.6 | |
11504 | ||
11505 | ||
11506 | HAVE_LIBPYTHON2_6=no | |
11507 | echo "$as_me:$LINENO: checking for ${version}" >&5 | |
11508 | echo $ECHO_N "checking for ${version}... $ECHO_C" >&6 | |
11509 | save_LIBS=$LIBS | |
11510 | LIBS="$LIBS -l${version}" | |
11511 | cat >conftest.$ac_ext <<_ACEOF | |
11512 | /* confdefs.h. */ | |
11513 | _ACEOF | |
11514 | cat confdefs.h >>conftest.$ac_ext | |
11515 | cat >>conftest.$ac_ext <<_ACEOF | |
11516 | /* end confdefs.h. */ | |
11517 | #include "${version}/Python.h" | |
11518 | int | |
11519 | main () | |
11520 | { | |
11521 | Py_Initialize (); | |
11522 | ; | |
11523 | return 0; | |
11524 | } | |
11525 | _ACEOF | |
11526 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11527 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11528 | (eval $ac_link) 2>conftest.er1 | |
11529 | ac_status=$? | |
11530 | grep -v '^ *+' conftest.er1 >conftest.err | |
11531 | rm -f conftest.er1 | |
11532 | cat conftest.err >&5 | |
11533 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11534 | (exit $ac_status); } && | |
11535 | { ac_try='test -z "$ac_c_werror_flag" | |
11536 | || test ! -s conftest.err' | |
11537 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11538 | (eval $ac_try) 2>&5 | |
11539 | ac_status=$? | |
11540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11541 | (exit $ac_status); }; } && | |
11542 | { ac_try='test -s conftest$ac_exeext' | |
11543 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11544 | (eval $ac_try) 2>&5 | |
11545 | ac_status=$? | |
11546 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11547 | (exit $ac_status); }; }; then | |
11548 | HAVE_LIBPYTHON2_6=yes | |
11549 | have_libpython=yes | |
11550 | else | |
11551 | echo "$as_me: failed program was:" >&5 | |
11552 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11553 | ||
11554 | LIBS=$save_LIBS | |
11555 | fi | |
11556 | rm -f conftest.err conftest.$ac_objext \ | |
11557 | conftest$ac_exeext conftest.$ac_ext | |
11558 | echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_6" >&5 | |
11559 | echo "${ECHO_T}$HAVE_LIBPYTHON2_6" >&6 | |
11560 | ||
11561 | if test "${HAVE_LIBPYTHON2_6}" = yes; then | |
11562 | ||
11563 | cat >>confdefs.h <<\_ACEOF | |
11564 | #define HAVE_LIBPYTHON2_6 1 | |
11565 | _ACEOF | |
11566 | ||
11567 | fi | |
11568 | fi | |
11569 | if test ${have_libpython} = no; then | |
11570 | ||
11571 | version=python2.5 | |
11572 | ||
11573 | ||
11574 | HAVE_LIBPYTHON2_5=no | |
11575 | echo "$as_me:$LINENO: checking for ${version}" >&5 | |
11576 | echo $ECHO_N "checking for ${version}... $ECHO_C" >&6 | |
11577 | save_LIBS=$LIBS | |
11578 | LIBS="$LIBS -l${version}" | |
11579 | cat >conftest.$ac_ext <<_ACEOF | |
11580 | /* confdefs.h. */ | |
11581 | _ACEOF | |
11582 | cat confdefs.h >>conftest.$ac_ext | |
11583 | cat >>conftest.$ac_ext <<_ACEOF | |
11584 | /* end confdefs.h. */ | |
11585 | #include "${version}/Python.h" | |
11586 | int | |
11587 | main () | |
11588 | { | |
11589 | Py_Initialize (); | |
11590 | ; | |
11591 | return 0; | |
11592 | } | |
11593 | _ACEOF | |
11594 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11595 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11596 | (eval $ac_link) 2>conftest.er1 | |
11597 | ac_status=$? | |
11598 | grep -v '^ *+' conftest.er1 >conftest.err | |
11599 | rm -f conftest.er1 | |
11600 | cat conftest.err >&5 | |
11601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11602 | (exit $ac_status); } && | |
11603 | { ac_try='test -z "$ac_c_werror_flag" | |
11604 | || test ! -s conftest.err' | |
11605 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11606 | (eval $ac_try) 2>&5 | |
11607 | ac_status=$? | |
11608 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11609 | (exit $ac_status); }; } && | |
11610 | { ac_try='test -s conftest$ac_exeext' | |
11611 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11612 | (eval $ac_try) 2>&5 | |
11613 | ac_status=$? | |
11614 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11615 | (exit $ac_status); }; }; then | |
11616 | HAVE_LIBPYTHON2_5=yes | |
11617 | have_libpython=yes | |
11618 | else | |
11619 | echo "$as_me: failed program was:" >&5 | |
11620 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11621 | ||
11622 | LIBS=$save_LIBS | |
11623 | fi | |
11624 | rm -f conftest.err conftest.$ac_objext \ | |
11625 | conftest$ac_exeext conftest.$ac_ext | |
11626 | echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_5" >&5 | |
11627 | echo "${ECHO_T}$HAVE_LIBPYTHON2_5" >&6 | |
11628 | ||
11629 | if test "${HAVE_LIBPYTHON2_5}" = yes; then | |
11630 | ||
11631 | cat >>confdefs.h <<\_ACEOF | |
11632 | #define HAVE_LIBPYTHON2_5 1 | |
11633 | _ACEOF | |
11634 | ||
11635 | fi | |
11636 | fi | |
11637 | if test ${have_libpython} = no; then | |
11638 | ||
11639 | version=python2.4 | |
11640 | ||
11641 | ||
11642 | HAVE_LIBPYTHON2_4=no | |
11643 | echo "$as_me:$LINENO: checking for ${version}" >&5 | |
11644 | echo $ECHO_N "checking for ${version}... $ECHO_C" >&6 | |
11645 | save_LIBS=$LIBS | |
11646 | LIBS="$LIBS -l${version}" | |
11647 | cat >conftest.$ac_ext <<_ACEOF | |
11648 | /* confdefs.h. */ | |
11649 | _ACEOF | |
11650 | cat confdefs.h >>conftest.$ac_ext | |
11651 | cat >>conftest.$ac_ext <<_ACEOF | |
11652 | /* end confdefs.h. */ | |
11653 | #include "${version}/Python.h" | |
11654 | int | |
11655 | main () | |
11656 | { | |
11657 | Py_Initialize (); | |
11658 | ; | |
11659 | return 0; | |
11660 | } | |
11661 | _ACEOF | |
11662 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11663 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11664 | (eval $ac_link) 2>conftest.er1 | |
11665 | ac_status=$? | |
11666 | grep -v '^ *+' conftest.er1 >conftest.err | |
11667 | rm -f conftest.er1 | |
11668 | cat conftest.err >&5 | |
11669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11670 | (exit $ac_status); } && | |
11671 | { ac_try='test -z "$ac_c_werror_flag" | |
11672 | || test ! -s conftest.err' | |
11673 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11674 | (eval $ac_try) 2>&5 | |
11675 | ac_status=$? | |
11676 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11677 | (exit $ac_status); }; } && | |
11678 | { ac_try='test -s conftest$ac_exeext' | |
11679 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11680 | (eval $ac_try) 2>&5 | |
11681 | ac_status=$? | |
11682 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11683 | (exit $ac_status); }; }; then | |
11684 | HAVE_LIBPYTHON2_4=yes | |
11685 | have_libpython=yes | |
11686 | else | |
11687 | echo "$as_me: failed program was:" >&5 | |
11688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11689 | ||
11690 | LIBS=$save_LIBS | |
11691 | fi | |
11692 | rm -f conftest.err conftest.$ac_objext \ | |
11693 | conftest$ac_exeext conftest.$ac_ext | |
11694 | echo "$as_me:$LINENO: result: $HAVE_LIBPYTHON2_4" >&5 | |
11695 | echo "${ECHO_T}$HAVE_LIBPYTHON2_4" >&6 | |
11696 | ||
11697 | if test "${HAVE_LIBPYTHON2_4}" = yes; then | |
11698 | ||
11699 | cat >>confdefs.h <<\_ACEOF | |
11700 | #define HAVE_LIBPYTHON2_4 1 | |
11701 | _ACEOF | |
11702 | ||
11703 | fi | |
11704 | fi | |
11705 | if test ${have_libpython} = no; then | |
11706 | case "${with_python}" in | |
11707 | yes) | |
11708 | { { echo "$as_me:$LINENO: error: python is missing or unusable" >&5 | |
11709 | echo "$as_me: error: python is missing or unusable" >&2;} | |
11710 | { (exit 1); exit 1; }; } | |
11711 | ;; | |
11712 | auto) | |
11713 | { echo "$as_me:$LINENO: WARNING: python is missing or unusable; some features may be unavailable." >&5 | |
11714 | echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} | |
11715 | ;; | |
11716 | *) | |
11717 | { { echo "$as_me:$LINENO: error: no usable python found at ${with_python}" >&5 | |
11718 | echo "$as_me: error: no usable python found at ${with_python}" >&2;} | |
11719 | { (exit 1); exit 1; }; } | |
11720 | ;; | |
11721 | esac | |
11722 | CPPFLAGS=$save_CPPFLAGS | |
11723 | LIBS=$save_LIBS | |
11724 | fi | |
11725 | fi | |
11726 | ||
11727 | if test "${have_libpython}" = yes; then | |
11728 | ||
11729 | cat >>confdefs.h <<\_ACEOF | |
11730 | #define HAVE_PYTHON 1 | |
11731 | _ACEOF | |
11732 | ||
11733 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" | |
11734 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" | |
11735 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" | |
11736 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" | |
11737 | ||
11738 | # Flags needed to compile Python code (taken from python-config --cflags). | |
11739 | # We cannot call python-config directly because it will output whatever was | |
11740 | # used when compiling the Python interpreter itself, including flags which | |
11741 | # would make the python-related objects be compiled differently from the | |
11742 | # rest of GDB (e.g., -O2 and -fPIC). | |
11743 | if test "${GCC}" = yes; then | |
11744 | tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv" | |
11745 | fi | |
11746 | ||
11747 | if test "x${tentative_python_cflags}" != x; then | |
11748 | echo "$as_me:$LINENO: checking compiler flags for python code" >&5 | |
11749 | echo $ECHO_N "checking compiler flags for python code... $ECHO_C" >&6 | |
11750 | for flag in ${tentative_python_cflags}; do | |
11751 | # Check that the compiler accepts it | |
11752 | saved_CFLAGS="$CFLAGS" | |
11753 | CFLAGS="$CFLAGS $flag" | |
11754 | cat >conftest.$ac_ext <<_ACEOF | |
11755 | /* confdefs.h. */ | |
11756 | _ACEOF | |
11757 | cat confdefs.h >>conftest.$ac_ext | |
11758 | cat >>conftest.$ac_ext <<_ACEOF | |
11759 | /* end confdefs.h. */ | |
11760 | ||
11761 | int | |
11762 | main () | |
11763 | { | |
11764 | ||
11765 | ; | |
11766 | return 0; | |
11767 | } | |
11768 | _ACEOF | |
11769 | rm -f conftest.$ac_objext | |
11770 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
11771 | (eval $ac_compile) 2>conftest.er1 | |
11772 | ac_status=$? | |
11773 | grep -v '^ *+' conftest.er1 >conftest.err | |
11774 | rm -f conftest.er1 | |
11775 | cat conftest.err >&5 | |
11776 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11777 | (exit $ac_status); } && | |
11778 | { ac_try='test -z "$ac_c_werror_flag" | |
11779 | || test ! -s conftest.err' | |
11780 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11781 | (eval $ac_try) 2>&5 | |
11782 | ac_status=$? | |
11783 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11784 | (exit $ac_status); }; } && | |
11785 | { ac_try='test -s conftest.$ac_objext' | |
11786 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11787 | (eval $ac_try) 2>&5 | |
11788 | ac_status=$? | |
11789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11790 | (exit $ac_status); }; }; then | |
11791 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" | |
11792 | else | |
11793 | echo "$as_me: failed program was:" >&5 | |
11794 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11795 | ||
11796 | fi | |
11797 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
11798 | CFLAGS="$saved_CFLAGS" | |
11799 | done | |
11800 | echo "$as_me:$LINENO: result: ${PYTHON_CFLAGS}" >&5 | |
11801 | echo "${ECHO_T}${PYTHON_CFLAGS}" >&6 | |
11802 | fi | |
11803 | else | |
a08702d6 | 11804 | # Even if Python support is not compiled in, we need to have these files |
d57a3c85 | 11805 | # included in order to recognize the GDB command "python". |
a08702d6 TJB |
11806 | CONFIG_OBS="$CONFIG_OBS python.o python-value.o" |
11807 | CONFIG_SRCS="$CONFIG_SRCS python/python.c python/python-value.c" | |
d57a3c85 TJB |
11808 | fi |
11809 | ||
11810 | ||
bec39cab AC |
11811 | # ------------------------- # |
11812 | # Checks for header files. # | |
11813 | # ------------------------- # | |
8ee53726 | 11814 | |
0e5d83e3 | 11815 | |
bec39cab AC |
11816 | |
11817 | ||
11818 | ||
11819 | ||
11820 | ac_header_dirent=no | |
11821 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
11822 | as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | |
b4e70030 JB |
11823 | echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 |
11824 | echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 | |
11825 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
11826 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11827 | else | |
11828 | cat >conftest.$ac_ext <<_ACEOF | |
11829 | /* confdefs.h. */ | |
11830 | _ACEOF | |
11831 | cat confdefs.h >>conftest.$ac_ext | |
11832 | cat >>conftest.$ac_ext <<_ACEOF | |
11833 | /* end confdefs.h. */ | |
11834 | #include <sys/types.h> | |
0e5d83e3 | 11835 | #include <$ac_hdr> |
bec39cab AC |
11836 | |
11837 | int | |
11838 | main () | |
11839 | { | |
11840 | if ((DIR *) 0) | |
11841 | return 0; | |
11842 | ; | |
11843 | return 0; | |
11844 | } | |
11845 | _ACEOF | |
11846 | rm -f conftest.$ac_objext | |
11847 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
11848 | (eval $ac_compile) 2>conftest.er1 | |
11849 | ac_status=$? | |
11850 | grep -v '^ *+' conftest.er1 >conftest.err | |
11851 | rm -f conftest.er1 | |
11852 | cat conftest.err >&5 | |
11853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11854 | (exit $ac_status); } && | |
b4e70030 JB |
11855 | { ac_try='test -z "$ac_c_werror_flag" |
11856 | || test ! -s conftest.err' | |
bec39cab AC |
11857 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11858 | (eval $ac_try) 2>&5 | |
11859 | ac_status=$? | |
11860 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11861 | (exit $ac_status); }; } && | |
11862 | { ac_try='test -s conftest.$ac_objext' | |
11863 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11864 | (eval $ac_try) 2>&5 | |
11865 | ac_status=$? | |
11866 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11867 | (exit $ac_status); }; }; then | |
11868 | eval "$as_ac_Header=yes" | |
11869 | else | |
11870 | echo "$as_me: failed program was:" >&5 | |
11871 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11872 | ||
b4e70030 | 11873 | eval "$as_ac_Header=no" |
bec39cab AC |
11874 | fi |
11875 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
11876 | fi | |
b4e70030 JB |
11877 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
11878 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
11879 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
11880 | cat >>confdefs.h <<_ACEOF | |
11881 | #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | |
11882 | _ACEOF | |
11883 | ||
11884 | ac_header_dirent=$ac_hdr; break | |
0e5d83e3 | 11885 | fi |
0e5d83e3 | 11886 | |
bec39cab AC |
11887 | done |
11888 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
11889 | if test $ac_header_dirent = dirent.h; then | |
b4e70030 JB |
11890 | echo "$as_me:$LINENO: checking for library containing opendir" >&5 |
11891 | echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 | |
bec39cab AC |
11892 | if test "${ac_cv_search_opendir+set}" = set; then |
11893 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11894 | else | |
11895 | ac_func_search_save_LIBS=$LIBS | |
b4e70030 | 11896 | ac_cv_search_opendir=no |
bec39cab AC |
11897 | cat >conftest.$ac_ext <<_ACEOF |
11898 | /* confdefs.h. */ | |
11899 | _ACEOF | |
11900 | cat confdefs.h >>conftest.$ac_ext | |
11901 | cat >>conftest.$ac_ext <<_ACEOF | |
11902 | /* end confdefs.h. */ | |
0e5d83e3 | 11903 | |
b4e70030 | 11904 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
11905 | #ifdef __cplusplus |
11906 | extern "C" | |
11907 | #endif | |
b4e70030 JB |
11908 | /* We use char because int might match the return type of a gcc2 |
11909 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
11910 | char opendir (); |
11911 | int | |
11912 | main () | |
11913 | { | |
b4e70030 | 11914 | opendir (); |
bec39cab AC |
11915 | ; |
11916 | return 0; | |
11917 | } | |
11918 | _ACEOF | |
b4e70030 | 11919 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
11920 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
11921 | (eval $ac_link) 2>conftest.er1 | |
11922 | ac_status=$? | |
11923 | grep -v '^ *+' conftest.er1 >conftest.err | |
11924 | rm -f conftest.er1 | |
11925 | cat conftest.err >&5 | |
11926 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11927 | (exit $ac_status); } && | |
b4e70030 JB |
11928 | { ac_try='test -z "$ac_c_werror_flag" |
11929 | || test ! -s conftest.err' | |
bec39cab AC |
11930 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11931 | (eval $ac_try) 2>&5 | |
11932 | ac_status=$? | |
11933 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11934 | (exit $ac_status); }; } && | |
11935 | { ac_try='test -s conftest$ac_exeext' | |
11936 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11937 | (eval $ac_try) 2>&5 | |
11938 | ac_status=$? | |
11939 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11940 | (exit $ac_status); }; }; then | |
b4e70030 | 11941 | ac_cv_search_opendir="none required" |
bec39cab AC |
11942 | else |
11943 | echo "$as_me: failed program was:" >&5 | |
11944 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11945 | ||
11946 | fi | |
bec39cab | 11947 | rm -f conftest.err conftest.$ac_objext \ |
b4e70030 JB |
11948 | conftest$ac_exeext conftest.$ac_ext |
11949 | if test "$ac_cv_search_opendir" = no; then | |
11950 | for ac_lib in dir; do | |
11951 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
11952 | cat >conftest.$ac_ext <<_ACEOF | |
11953 | /* confdefs.h. */ | |
11954 | _ACEOF | |
11955 | cat confdefs.h >>conftest.$ac_ext | |
11956 | cat >>conftest.$ac_ext <<_ACEOF | |
11957 | /* end confdefs.h. */ | |
11958 | ||
11959 | /* Override any gcc2 internal prototype to avoid an error. */ | |
11960 | #ifdef __cplusplus | |
11961 | extern "C" | |
11962 | #endif | |
11963 | /* We use char because int might match the return type of a gcc2 | |
11964 | builtin and then its argument prototype would still apply. */ | |
11965 | char opendir (); | |
11966 | int | |
11967 | main () | |
11968 | { | |
11969 | opendir (); | |
11970 | ; | |
11971 | return 0; | |
11972 | } | |
11973 | _ACEOF | |
11974 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11975 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11976 | (eval $ac_link) 2>conftest.er1 | |
11977 | ac_status=$? | |
11978 | grep -v '^ *+' conftest.er1 >conftest.err | |
11979 | rm -f conftest.er1 | |
11980 | cat conftest.err >&5 | |
11981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11982 | (exit $ac_status); } && | |
11983 | { ac_try='test -z "$ac_c_werror_flag" | |
11984 | || test ! -s conftest.err' | |
11985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11986 | (eval $ac_try) 2>&5 | |
11987 | ac_status=$? | |
11988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11989 | (exit $ac_status); }; } && | |
11990 | { ac_try='test -s conftest$ac_exeext' | |
11991 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11992 | (eval $ac_try) 2>&5 | |
11993 | ac_status=$? | |
11994 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11995 | (exit $ac_status); }; }; then | |
11996 | ac_cv_search_opendir="-l$ac_lib" | |
11997 | break | |
4e8d927d | 11998 | else |
b4e70030 JB |
11999 | echo "$as_me: failed program was:" >&5 |
12000 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12001 | ||
12002 | fi | |
12003 | rm -f conftest.err conftest.$ac_objext \ | |
12004 | conftest$ac_exeext conftest.$ac_ext | |
12005 | done | |
0e5d83e3 | 12006 | fi |
bec39cab | 12007 | LIBS=$ac_func_search_save_LIBS |
0e5d83e3 | 12008 | fi |
b4e70030 JB |
12009 | echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 |
12010 | echo "${ECHO_T}$ac_cv_search_opendir" >&6 | |
12011 | if test "$ac_cv_search_opendir" != no; then | |
12012 | test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" | |
0e5d83e3 | 12013 | |
0e5d83e3 JJ |
12014 | fi |
12015 | ||
d28f9cdf | 12016 | else |
b4e70030 JB |
12017 | echo "$as_me:$LINENO: checking for library containing opendir" >&5 |
12018 | echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 | |
bec39cab AC |
12019 | if test "${ac_cv_search_opendir+set}" = set; then |
12020 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12021 | else | |
12022 | ac_func_search_save_LIBS=$LIBS | |
b4e70030 | 12023 | ac_cv_search_opendir=no |
bec39cab AC |
12024 | cat >conftest.$ac_ext <<_ACEOF |
12025 | /* confdefs.h. */ | |
12026 | _ACEOF | |
12027 | cat confdefs.h >>conftest.$ac_ext | |
12028 | cat >>conftest.$ac_ext <<_ACEOF | |
12029 | /* end confdefs.h. */ | |
d28f9cdf | 12030 | |
b4e70030 | 12031 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
12032 | #ifdef __cplusplus |
12033 | extern "C" | |
d28f9cdf | 12034 | #endif |
b4e70030 JB |
12035 | /* We use char because int might match the return type of a gcc2 |
12036 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
12037 | char opendir (); |
12038 | int | |
12039 | main () | |
12040 | { | |
b4e70030 | 12041 | opendir (); |
bec39cab AC |
12042 | ; |
12043 | return 0; | |
12044 | } | |
12045 | _ACEOF | |
b4e70030 | 12046 | rm -f conftest.$ac_objext conftest$ac_exeext |
bec39cab AC |
12047 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
12048 | (eval $ac_link) 2>conftest.er1 | |
12049 | ac_status=$? | |
12050 | grep -v '^ *+' conftest.er1 >conftest.err | |
12051 | rm -f conftest.er1 | |
12052 | cat conftest.err >&5 | |
12053 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12054 | (exit $ac_status); } && | |
b4e70030 JB |
12055 | { ac_try='test -z "$ac_c_werror_flag" |
12056 | || test ! -s conftest.err' | |
bec39cab AC |
12057 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12058 | (eval $ac_try) 2>&5 | |
12059 | ac_status=$? | |
12060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12061 | (exit $ac_status); }; } && | |
12062 | { ac_try='test -s conftest$ac_exeext' | |
12063 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12064 | (eval $ac_try) 2>&5 | |
12065 | ac_status=$? | |
12066 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12067 | (exit $ac_status); }; }; then | |
b4e70030 | 12068 | ac_cv_search_opendir="none required" |
d28f9cdf | 12069 | else |
bec39cab AC |
12070 | echo "$as_me: failed program was:" >&5 |
12071 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12072 | ||
d28f9cdf | 12073 | fi |
bec39cab | 12074 | rm -f conftest.err conftest.$ac_objext \ |
b4e70030 JB |
12075 | conftest$ac_exeext conftest.$ac_ext |
12076 | if test "$ac_cv_search_opendir" = no; then | |
12077 | for ac_lib in x; do | |
12078 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12079 | cat >conftest.$ac_ext <<_ACEOF | |
12080 | /* confdefs.h. */ | |
12081 | _ACEOF | |
12082 | cat confdefs.h >>conftest.$ac_ext | |
12083 | cat >>conftest.$ac_ext <<_ACEOF | |
12084 | /* end confdefs.h. */ | |
12085 | ||
12086 | /* Override any gcc2 internal prototype to avoid an error. */ | |
12087 | #ifdef __cplusplus | |
12088 | extern "C" | |
12089 | #endif | |
12090 | /* We use char because int might match the return type of a gcc2 | |
12091 | builtin and then its argument prototype would still apply. */ | |
12092 | char opendir (); | |
12093 | int | |
12094 | main () | |
12095 | { | |
12096 | opendir (); | |
12097 | ; | |
12098 | return 0; | |
12099 | } | |
12100 | _ACEOF | |
12101 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12102 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12103 | (eval $ac_link) 2>conftest.er1 | |
12104 | ac_status=$? | |
12105 | grep -v '^ *+' conftest.er1 >conftest.err | |
12106 | rm -f conftest.er1 | |
12107 | cat conftest.err >&5 | |
12108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12109 | (exit $ac_status); } && | |
12110 | { ac_try='test -z "$ac_c_werror_flag" | |
12111 | || test ! -s conftest.err' | |
12112 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12113 | (eval $ac_try) 2>&5 | |
12114 | ac_status=$? | |
12115 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12116 | (exit $ac_status); }; } && | |
12117 | { ac_try='test -s conftest$ac_exeext' | |
12118 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12119 | (eval $ac_try) 2>&5 | |
12120 | ac_status=$? | |
12121 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12122 | (exit $ac_status); }; }; then | |
12123 | ac_cv_search_opendir="-l$ac_lib" | |
12124 | break | |
4e8d927d | 12125 | else |
b4e70030 JB |
12126 | echo "$as_me: failed program was:" >&5 |
12127 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12128 | ||
12129 | fi | |
12130 | rm -f conftest.err conftest.$ac_objext \ | |
12131 | conftest$ac_exeext conftest.$ac_ext | |
12132 | done | |
bec39cab AC |
12133 | fi |
12134 | LIBS=$ac_func_search_save_LIBS | |
d28f9cdf | 12135 | fi |
b4e70030 JB |
12136 | echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 |
12137 | echo "${ECHO_T}$ac_cv_search_opendir" >&6 | |
12138 | if test "$ac_cv_search_opendir" != no; then | |
12139 | test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" | |
d28f9cdf | 12140 | |
d28f9cdf DJ |
12141 | fi |
12142 | ||
bec39cab | 12143 | fi |
b0b1c2c0 | 12144 | |
b4e70030 JB |
12145 | echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 |
12146 | echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 | |
bec39cab AC |
12147 | if test "${ac_cv_header_stat_broken+set}" = set; then |
12148 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
b0b1c2c0 | 12149 | else |
bec39cab AC |
12150 | cat >conftest.$ac_ext <<_ACEOF |
12151 | /* confdefs.h. */ | |
12152 | _ACEOF | |
12153 | cat confdefs.h >>conftest.$ac_ext | |
12154 | cat >>conftest.$ac_ext <<_ACEOF | |
12155 | /* end confdefs.h. */ | |
12156 | #include <sys/types.h> | |
12157 | #include <sys/stat.h> | |
b0b1c2c0 | 12158 | |
b4e70030 | 12159 | #if defined(S_ISBLK) && defined(S_IFDIR) |
bec39cab AC |
12160 | # if S_ISBLK (S_IFDIR) |
12161 | You lose. | |
12162 | # endif | |
12163 | #endif | |
b0b1c2c0 | 12164 | |
b4e70030 | 12165 | #if defined(S_ISBLK) && defined(S_IFCHR) |
bec39cab AC |
12166 | # if S_ISBLK (S_IFCHR) |
12167 | You lose. | |
12168 | # endif | |
12169 | #endif | |
d28f9cdf | 12170 | |
b4e70030 | 12171 | #if defined(S_ISLNK) && defined(S_IFREG) |
bec39cab AC |
12172 | # if S_ISLNK (S_IFREG) |
12173 | You lose. | |
12174 | # endif | |
12175 | #endif | |
d28f9cdf | 12176 | |
b4e70030 | 12177 | #if defined(S_ISSOCK) && defined(S_IFREG) |
bec39cab AC |
12178 | # if S_ISSOCK (S_IFREG) |
12179 | You lose. | |
12180 | # endif | |
12181 | #endif | |
12182 | ||
12183 | _ACEOF | |
12184 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12185 | $EGREP "You lose" >/dev/null 2>&1; then | |
12186 | ac_cv_header_stat_broken=yes | |
d28f9cdf | 12187 | else |
bec39cab | 12188 | ac_cv_header_stat_broken=no |
d28f9cdf DJ |
12189 | fi |
12190 | rm -f conftest* | |
d28f9cdf | 12191 | |
d28f9cdf | 12192 | fi |
b4e70030 JB |
12193 | echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 |
12194 | echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 | |
bec39cab | 12195 | if test $ac_cv_header_stat_broken = yes; then |
d28f9cdf | 12196 | |
bec39cab AC |
12197 | cat >>confdefs.h <<\_ACEOF |
12198 | #define STAT_MACROS_BROKEN 1 | |
12199 | _ACEOF | |
8bb2c122 | 12200 | |
7a292a7a | 12201 | fi |
bec39cab | 12202 | |
b4e70030 JB |
12203 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
12204 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
bec39cab AC |
12205 | if test "${ac_cv_header_stdc+set}" = set; then |
12206 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7a292a7a | 12207 | else |
bec39cab AC |
12208 | cat >conftest.$ac_ext <<_ACEOF |
12209 | /* confdefs.h. */ | |
12210 | _ACEOF | |
12211 | cat confdefs.h >>conftest.$ac_ext | |
12212 | cat >>conftest.$ac_ext <<_ACEOF | |
12213 | /* end confdefs.h. */ | |
12214 | #include <stdlib.h> | |
12215 | #include <stdarg.h> | |
12216 | #include <string.h> | |
12217 | #include <float.h> | |
7a292a7a | 12218 | |
bec39cab AC |
12219 | int |
12220 | main () | |
12221 | { | |
7a292a7a | 12222 | |
bec39cab AC |
12223 | ; |
12224 | return 0; | |
12225 | } | |
12226 | _ACEOF | |
12227 | rm -f conftest.$ac_objext | |
12228 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12229 | (eval $ac_compile) 2>conftest.er1 | |
12230 | ac_status=$? | |
12231 | grep -v '^ *+' conftest.er1 >conftest.err | |
12232 | rm -f conftest.er1 | |
12233 | cat conftest.err >&5 | |
12234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12235 | (exit $ac_status); } && | |
b4e70030 JB |
12236 | { ac_try='test -z "$ac_c_werror_flag" |
12237 | || test ! -s conftest.err' | |
bec39cab AC |
12238 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12239 | (eval $ac_try) 2>&5 | |
12240 | ac_status=$? | |
12241 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12242 | (exit $ac_status); }; } && | |
12243 | { ac_try='test -s conftest.$ac_objext' | |
12244 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12245 | (eval $ac_try) 2>&5 | |
12246 | ac_status=$? | |
12247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12248 | (exit $ac_status); }; }; then | |
12249 | ac_cv_header_stdc=yes | |
c906108c | 12250 | else |
bec39cab AC |
12251 | echo "$as_me: failed program was:" >&5 |
12252 | sed 's/^/| /' conftest.$ac_ext >&5 | |
c906108c | 12253 | |
b4e70030 | 12254 | ac_cv_header_stdc=no |
c906108c | 12255 | fi |
bec39cab | 12256 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 12257 | |
bec39cab AC |
12258 | if test $ac_cv_header_stdc = yes; then |
12259 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
12260 | cat >conftest.$ac_ext <<_ACEOF | |
12261 | /* confdefs.h. */ | |
12262 | _ACEOF | |
12263 | cat confdefs.h >>conftest.$ac_ext | |
12264 | cat >>conftest.$ac_ext <<_ACEOF | |
12265 | /* end confdefs.h. */ | |
12266 | #include <string.h> | |
c906108c | 12267 | |
bec39cab AC |
12268 | _ACEOF |
12269 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12270 | $EGREP "memchr" >/dev/null 2>&1; then | |
12271 | : | |
8bb2c122 | 12272 | else |
bec39cab | 12273 | ac_cv_header_stdc=no |
8bb2c122 | 12274 | fi |
bec39cab AC |
12275 | rm -f conftest* |
12276 | ||
c906108c SS |
12277 | fi |
12278 | ||
bec39cab AC |
12279 | if test $ac_cv_header_stdc = yes; then |
12280 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
12281 | cat >conftest.$ac_ext <<_ACEOF | |
12282 | /* confdefs.h. */ | |
12283 | _ACEOF | |
12284 | cat confdefs.h >>conftest.$ac_ext | |
12285 | cat >>conftest.$ac_ext <<_ACEOF | |
12286 | /* end confdefs.h. */ | |
12287 | #include <stdlib.h> | |
12288 | ||
12289 | _ACEOF | |
12290 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
12291 | $EGREP "free" >/dev/null 2>&1; then | |
12292 | : | |
c906108c | 12293 | else |
bec39cab | 12294 | ac_cv_header_stdc=no |
c906108c | 12295 | fi |
bec39cab AC |
12296 | rm -f conftest* |
12297 | ||
c906108c SS |
12298 | fi |
12299 | ||
bec39cab AC |
12300 | if test $ac_cv_header_stdc = yes; then |
12301 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
12302 | if test "$cross_compiling" = yes; then | |
12303 | : | |
c906108c | 12304 | else |
bec39cab AC |
12305 | cat >conftest.$ac_ext <<_ACEOF |
12306 | /* confdefs.h. */ | |
12307 | _ACEOF | |
12308 | cat confdefs.h >>conftest.$ac_ext | |
12309 | cat >>conftest.$ac_ext <<_ACEOF | |
12310 | /* end confdefs.h. */ | |
12311 | #include <ctype.h> | |
12312 | #if ((' ' & 0x0FF) == 0x020) | |
12313 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
12314 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
12315 | #else | |
12316 | # define ISLOWER(c) \ | |
12317 | (('a' <= (c) && (c) <= 'i') \ | |
12318 | || ('j' <= (c) && (c) <= 'r') \ | |
12319 | || ('s' <= (c) && (c) <= 'z')) | |
12320 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
12321 | #endif | |
12322 | ||
12323 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
12324 | int | |
12325 | main () | |
12326 | { | |
12327 | int i; | |
12328 | for (i = 0; i < 256; i++) | |
12329 | if (XOR (islower (i), ISLOWER (i)) | |
12330 | || toupper (i) != TOUPPER (i)) | |
b4e70030 JB |
12331 | exit(2); |
12332 | exit (0); | |
bec39cab AC |
12333 | } |
12334 | _ACEOF | |
12335 | rm -f conftest$ac_exeext | |
12336 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12337 | (eval $ac_link) 2>&5 | |
12338 | ac_status=$? | |
12339 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12340 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
12341 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12342 | (eval $ac_try) 2>&5 | |
12343 | ac_status=$? | |
12344 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12345 | (exit $ac_status); }; }; then | |
12346 | : | |
12347 | else | |
12348 | echo "$as_me: program exited with status $ac_status" >&5 | |
12349 | echo "$as_me: failed program was:" >&5 | |
12350 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12351 | ||
12352 | ( exit $ac_status ) | |
12353 | ac_cv_header_stdc=no | |
c906108c | 12354 | fi |
b4e70030 | 12355 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
c906108c | 12356 | fi |
c906108c | 12357 | fi |
bec39cab | 12358 | fi |
b4e70030 JB |
12359 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
12360 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
bec39cab | 12361 | if test $ac_cv_header_stdc = yes; then |
c906108c | 12362 | |
bec39cab AC |
12363 | cat >>confdefs.h <<\_ACEOF |
12364 | #define STDC_HEADERS 1 | |
12365 | _ACEOF | |
c906108c | 12366 | |
bec39cab | 12367 | fi |
8bb2c122 | 12368 | |
a9322a30 TT |
12369 | # elf_hp.h is for HP/UX 64-bit shared library support. |
12370 | # FIXME: kettenis/20030102: In most cases we include these (ctype.h, time.h) | |
12371 | # unconditionally, so what's the point in checking these? | |
12372 | ||
12373 | ||
12374 | ||
12375 | ||
12376 | ||
12377 | ||
12378 | ||
12379 | ||
12380 | ||
12381 | ||
12382 | ||
12383 | ||
12384 | ||
12385 | ||
12386 | ||
12387 | ||
12388 | ||
bec39cab | 12389 | |
a9322a30 TT |
12390 | |
12391 | ||
12392 | ||
12393 | ||
12394 | ||
12395 | ||
12396 | ||
12397 | ||
12398 | ||
12399 | ||
12400 | ||
12401 | ||
12402 | ||
12403 | ||
12404 | ||
12405 | ||
a8111142 | 12406 | |
a9322a30 TT |
12407 | |
12408 | ||
12409 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ | |
12410 | thread_db.h gnu/libc-version.h signal.h stddef.h \ | |
12411 | stdlib.h string.h memory.h strings.h sys/fault.h \ | |
12412 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ | |
12413 | sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \ | |
12414 | sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \ | |
12415 | sys/types.h sys/wait.h wait.h termios.h termio.h \ | |
a8111142 | 12416 | sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h |
bec39cab AC |
12417 | do |
12418 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b4e70030 JB |
12419 | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
12420 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
12421 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
12422 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
12423 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12424 | fi | |
b4e70030 JB |
12425 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
12426 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
12427 | else |
12428 | # Is the header compilable? | |
b4e70030 JB |
12429 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 |
12430 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
bec39cab AC |
12431 | cat >conftest.$ac_ext <<_ACEOF |
12432 | /* confdefs.h. */ | |
12433 | _ACEOF | |
12434 | cat confdefs.h >>conftest.$ac_ext | |
12435 | cat >>conftest.$ac_ext <<_ACEOF | |
12436 | /* end confdefs.h. */ | |
12437 | $ac_includes_default | |
12438 | #include <$ac_header> | |
12439 | _ACEOF | |
12440 | rm -f conftest.$ac_objext | |
12441 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12442 | (eval $ac_compile) 2>conftest.er1 | |
12443 | ac_status=$? | |
12444 | grep -v '^ *+' conftest.er1 >conftest.err | |
12445 | rm -f conftest.er1 | |
12446 | cat conftest.err >&5 | |
12447 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12448 | (exit $ac_status); } && | |
b4e70030 JB |
12449 | { ac_try='test -z "$ac_c_werror_flag" |
12450 | || test ! -s conftest.err' | |
bec39cab AC |
12451 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12452 | (eval $ac_try) 2>&5 | |
12453 | ac_status=$? | |
12454 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12455 | (exit $ac_status); }; } && | |
12456 | { ac_try='test -s conftest.$ac_objext' | |
12457 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12458 | (eval $ac_try) 2>&5 | |
12459 | ac_status=$? | |
12460 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12461 | (exit $ac_status); }; }; then | |
12462 | ac_header_compiler=yes | |
12463 | else | |
12464 | echo "$as_me: failed program was:" >&5 | |
12465 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12466 | ||
b4e70030 | 12467 | ac_header_compiler=no |
bec39cab AC |
12468 | fi |
12469 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
b4e70030 JB |
12470 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
12471 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
bec39cab AC |
12472 | |
12473 | # Is the header present? | |
b4e70030 JB |
12474 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 |
12475 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
bec39cab AC |
12476 | cat >conftest.$ac_ext <<_ACEOF |
12477 | /* confdefs.h. */ | |
12478 | _ACEOF | |
12479 | cat confdefs.h >>conftest.$ac_ext | |
12480 | cat >>conftest.$ac_ext <<_ACEOF | |
12481 | /* end confdefs.h. */ | |
12482 | #include <$ac_header> | |
12483 | _ACEOF | |
12484 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
12485 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
12486 | ac_status=$? | |
12487 | grep -v '^ *+' conftest.er1 >conftest.err | |
12488 | rm -f conftest.er1 | |
12489 | cat conftest.err >&5 | |
12490 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12491 | (exit $ac_status); } >/dev/null; then | |
12492 | if test -s conftest.err; then | |
12493 | ac_cpp_err=$ac_c_preproc_warn_flag | |
12494 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
12495 | else | |
12496 | ac_cpp_err= | |
12497 | fi | |
c906108c | 12498 | else |
bec39cab | 12499 | ac_cpp_err=yes |
c906108c | 12500 | fi |
bec39cab AC |
12501 | if test -z "$ac_cpp_err"; then |
12502 | ac_header_preproc=yes | |
c906108c | 12503 | else |
bec39cab AC |
12504 | echo "$as_me: failed program was:" >&5 |
12505 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8bb2c122 | 12506 | |
bec39cab AC |
12507 | ac_header_preproc=no |
12508 | fi | |
12509 | rm -f conftest.err conftest.$ac_ext | |
b4e70030 JB |
12510 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
12511 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
c906108c | 12512 | |
bec39cab AC |
12513 | # So? What about this header? |
12514 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
12515 | yes:no: ) | |
12516 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
12517 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
12518 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
12519 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
12520 | ac_header_preproc=yes | |
12521 | ;; | |
12522 | no:yes:* ) | |
12523 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
12524 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
12525 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
12526 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
12527 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
12528 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
12529 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
12530 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
12531 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
12532 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
12533 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
12534 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
b4e70030 JB |
12535 | ( |
12536 | cat <<\_ASBOX | |
12537 | ## ------------------------------------------ ## | |
12538 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
12539 | ## ------------------------------------------ ## | |
12540 | _ASBOX | |
12541 | ) | | |
12542 | sed "s/^/$as_me: WARNING: /" >&2 | |
bec39cab AC |
12543 | ;; |
12544 | esac | |
b4e70030 JB |
12545 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
12546 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
12547 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab | 12548 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
95ca63c4 | 12549 | else |
bec39cab | 12550 | eval "$as_ac_Header=\$ac_header_preproc" |
95ca63c4 | 12551 | fi |
b4e70030 JB |
12552 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
12553 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab | 12554 | |
95ca63c4 | 12555 | fi |
bec39cab AC |
12556 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
12557 | cat >>confdefs.h <<_ACEOF | |
12558 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12559 | _ACEOF | |
12560 | ||
95ca63c4 CF |
12561 | fi |
12562 | ||
bec39cab | 12563 | done |
95ca63c4 CF |
12564 | |
12565 | ||
7cb9022a | 12566 | for ac_header in link.h |
bec39cab AC |
12567 | do |
12568 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b4e70030 JB |
12569 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
12570 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
12571 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab | 12572 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 12573 | else |
7cb9022a | 12574 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
12575 | /* confdefs.h. */ |
12576 | _ACEOF | |
12577 | cat confdefs.h >>conftest.$ac_ext | |
12578 | cat >>conftest.$ac_ext <<_ACEOF | |
12579 | /* end confdefs.h. */ | |
7cb9022a MK |
12580 | #if HAVE_SYS_TYPES_H |
12581 | # include <sys/types.h> | |
12582 | #endif | |
12583 | #if HAVE_NLIST_H | |
12584 | # include <nlist.h> | |
12585 | #endif | |
12586 | ||
12587 | ||
bec39cab AC |
12588 | #include <$ac_header> |
12589 | _ACEOF | |
12590 | rm -f conftest.$ac_objext | |
12591 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12592 | (eval $ac_compile) 2>conftest.er1 | |
12593 | ac_status=$? | |
12594 | grep -v '^ *+' conftest.er1 >conftest.err | |
12595 | rm -f conftest.er1 | |
12596 | cat conftest.err >&5 | |
12597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12598 | (exit $ac_status); } && | |
b4e70030 JB |
12599 | { ac_try='test -z "$ac_c_werror_flag" |
12600 | || test ! -s conftest.err' | |
bec39cab AC |
12601 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12602 | (eval $ac_try) 2>&5 | |
12603 | ac_status=$? | |
12604 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12605 | (exit $ac_status); }; } && | |
12606 | { ac_try='test -s conftest.$ac_objext' | |
12607 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12608 | (eval $ac_try) 2>&5 | |
12609 | ac_status=$? | |
12610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12611 | (exit $ac_status); }; }; then | |
7cb9022a | 12612 | eval "$as_ac_Header=yes" |
bec39cab AC |
12613 | else |
12614 | echo "$as_me: failed program was:" >&5 | |
12615 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12616 | ||
b4e70030 | 12617 | eval "$as_ac_Header=no" |
bec39cab AC |
12618 | fi |
12619 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
bec39cab | 12620 | fi |
b4e70030 JB |
12621 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
12622 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
12623 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
12624 | cat >>confdefs.h <<_ACEOF | |
12625 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12626 | _ACEOF | |
95ca63c4 | 12627 | |
bec39cab | 12628 | fi |
95ca63c4 | 12629 | |
bec39cab | 12630 | done |
95ca63c4 | 12631 | |
c906108c | 12632 | |
a9322a30 | 12633 | for ac_header in sys/proc.h |
bec39cab AC |
12634 | do |
12635 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
a9322a30 | 12636 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
b4e70030 JB |
12637 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
12638 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab | 12639 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 12640 | else |
a9322a30 | 12641 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
12642 | /* confdefs.h. */ |
12643 | _ACEOF | |
12644 | cat confdefs.h >>conftest.$ac_ext | |
12645 | cat >>conftest.$ac_ext <<_ACEOF | |
12646 | /* end confdefs.h. */ | |
a9322a30 TT |
12647 | #if HAVE_SYS_PARAM_H |
12648 | # include <sys/param.h> | |
12649 | #endif | |
12650 | ||
12651 | ||
bec39cab AC |
12652 | #include <$ac_header> |
12653 | _ACEOF | |
12654 | rm -f conftest.$ac_objext | |
12655 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12656 | (eval $ac_compile) 2>conftest.er1 | |
12657 | ac_status=$? | |
12658 | grep -v '^ *+' conftest.er1 >conftest.err | |
12659 | rm -f conftest.er1 | |
12660 | cat conftest.err >&5 | |
12661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12662 | (exit $ac_status); } && | |
b4e70030 JB |
12663 | { ac_try='test -z "$ac_c_werror_flag" |
12664 | || test ! -s conftest.err' | |
bec39cab AC |
12665 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12666 | (eval $ac_try) 2>&5 | |
12667 | ac_status=$? | |
12668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12669 | (exit $ac_status); }; } && | |
12670 | { ac_try='test -s conftest.$ac_objext' | |
12671 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12672 | (eval $ac_try) 2>&5 | |
12673 | ac_status=$? | |
12674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12675 | (exit $ac_status); }; }; then | |
a9322a30 | 12676 | eval "$as_ac_Header=yes" |
bec39cab AC |
12677 | else |
12678 | echo "$as_me: failed program was:" >&5 | |
12679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12680 | ||
a9322a30 | 12681 | eval "$as_ac_Header=no" |
bec39cab AC |
12682 | fi |
12683 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
12684 | fi |
12685 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
12686 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
12687 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
12688 | cat >>confdefs.h <<_ACEOF | |
12689 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12690 | _ACEOF | |
bec39cab | 12691 | |
a9322a30 TT |
12692 | fi |
12693 | ||
12694 | done | |
12695 | ||
12696 | ||
12697 | for ac_header in sys/user.h | |
12698 | do | |
12699 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
12700 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
12701 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
12702 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
12703 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12704 | else | |
12705 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
12706 | /* confdefs.h. */ |
12707 | _ACEOF | |
12708 | cat confdefs.h >>conftest.$ac_ext | |
12709 | cat >>conftest.$ac_ext <<_ACEOF | |
12710 | /* end confdefs.h. */ | |
a9322a30 TT |
12711 | #if HAVE_SYS_PARAM_H |
12712 | # include <sys/param.h> | |
12713 | #endif | |
12714 | ||
12715 | ||
bec39cab AC |
12716 | #include <$ac_header> |
12717 | _ACEOF | |
a9322a30 TT |
12718 | rm -f conftest.$ac_objext |
12719 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12720 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
12721 | ac_status=$? |
12722 | grep -v '^ *+' conftest.er1 >conftest.err | |
12723 | rm -f conftest.er1 | |
12724 | cat conftest.err >&5 | |
12725 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 TT |
12726 | (exit $ac_status); } && |
12727 | { ac_try='test -z "$ac_c_werror_flag" | |
12728 | || test ! -s conftest.err' | |
12729 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12730 | (eval $ac_try) 2>&5 | |
12731 | ac_status=$? | |
12732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12733 | (exit $ac_status); }; } && | |
12734 | { ac_try='test -s conftest.$ac_objext' | |
12735 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12736 | (eval $ac_try) 2>&5 | |
12737 | ac_status=$? | |
12738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12739 | (exit $ac_status); }; }; then | |
12740 | eval "$as_ac_Header=yes" | |
bec39cab AC |
12741 | else |
12742 | echo "$as_me: failed program was:" >&5 | |
12743 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12744 | ||
a9322a30 | 12745 | eval "$as_ac_Header=no" |
75c6e08a | 12746 | fi |
a9322a30 TT |
12747 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
12748 | fi | |
12749 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
12750 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
12751 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
12752 | cat >>confdefs.h <<_ACEOF | |
12753 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12754 | _ACEOF | |
bec39cab | 12755 | |
bec39cab | 12756 | fi |
bec39cab | 12757 | |
a9322a30 TT |
12758 | done |
12759 | ||
12760 | ||
12761 | # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash | |
12762 | # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to | |
12763 | # think that we don't have <curses.h> if we're using GCC. | |
12764 | case $host_os in | |
12765 | solaris2.[789]) | |
12766 | if test "$GCC" = yes; then | |
12767 | ||
12768 | cat >>confdefs.h <<\_ACEOF | |
12769 | #define _MSE_INT_H 1 | |
bec39cab | 12770 | _ACEOF |
75c6e08a | 12771 | |
a9322a30 TT |
12772 | fi ;; |
12773 | esac | |
12774 | ||
75c6e08a MK |
12775 | |
12776 | ||
12777 | ||
9a156167 | 12778 | |
a9322a30 | 12779 | for ac_header in curses.h cursesX.h ncurses.h ncurses/ncurses.h ncurses/term.h |
bec39cab AC |
12780 | do |
12781 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b4e70030 JB |
12782 | if eval "test \"\${$as_ac_Header+set}\" = set"; then |
12783 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
12784 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
12785 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab AC |
12786 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
12787 | fi | |
b4e70030 JB |
12788 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
12789 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab AC |
12790 | else |
12791 | # Is the header compilable? | |
b4e70030 JB |
12792 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 |
12793 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
bec39cab AC |
12794 | cat >conftest.$ac_ext <<_ACEOF |
12795 | /* confdefs.h. */ | |
12796 | _ACEOF | |
12797 | cat confdefs.h >>conftest.$ac_ext | |
12798 | cat >>conftest.$ac_ext <<_ACEOF | |
12799 | /* end confdefs.h. */ | |
12800 | $ac_includes_default | |
12801 | #include <$ac_header> | |
12802 | _ACEOF | |
12803 | rm -f conftest.$ac_objext | |
12804 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12805 | (eval $ac_compile) 2>conftest.er1 | |
12806 | ac_status=$? | |
12807 | grep -v '^ *+' conftest.er1 >conftest.err | |
12808 | rm -f conftest.er1 | |
12809 | cat conftest.err >&5 | |
12810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12811 | (exit $ac_status); } && | |
b4e70030 JB |
12812 | { ac_try='test -z "$ac_c_werror_flag" |
12813 | || test ! -s conftest.err' | |
bec39cab AC |
12814 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12815 | (eval $ac_try) 2>&5 | |
12816 | ac_status=$? | |
12817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12818 | (exit $ac_status); }; } && | |
12819 | { ac_try='test -s conftest.$ac_objext' | |
12820 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12821 | (eval $ac_try) 2>&5 | |
12822 | ac_status=$? | |
12823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12824 | (exit $ac_status); }; }; then | |
12825 | ac_header_compiler=yes | |
12826 | else | |
12827 | echo "$as_me: failed program was:" >&5 | |
12828 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12829 | ||
b4e70030 | 12830 | ac_header_compiler=no |
bec39cab AC |
12831 | fi |
12832 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
b4e70030 JB |
12833 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
12834 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
bec39cab AC |
12835 | |
12836 | # Is the header present? | |
b4e70030 JB |
12837 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 |
12838 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
bec39cab AC |
12839 | cat >conftest.$ac_ext <<_ACEOF |
12840 | /* confdefs.h. */ | |
12841 | _ACEOF | |
12842 | cat confdefs.h >>conftest.$ac_ext | |
12843 | cat >>conftest.$ac_ext <<_ACEOF | |
12844 | /* end confdefs.h. */ | |
12845 | #include <$ac_header> | |
12846 | _ACEOF | |
12847 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
12848 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
12849 | ac_status=$? | |
12850 | grep -v '^ *+' conftest.er1 >conftest.err | |
12851 | rm -f conftest.er1 | |
12852 | cat conftest.err >&5 | |
12853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12854 | (exit $ac_status); } >/dev/null; then | |
12855 | if test -s conftest.err; then | |
12856 | ac_cpp_err=$ac_c_preproc_warn_flag | |
12857 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
12858 | else | |
12859 | ac_cpp_err= | |
12860 | fi | |
9a156167 | 12861 | else |
bec39cab | 12862 | ac_cpp_err=yes |
9a156167 | 12863 | fi |
bec39cab AC |
12864 | if test -z "$ac_cpp_err"; then |
12865 | ac_header_preproc=yes | |
12866 | else | |
12867 | echo "$as_me: failed program was:" >&5 | |
12868 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9a156167 | 12869 | |
bec39cab | 12870 | ac_header_preproc=no |
9a156167 | 12871 | fi |
bec39cab | 12872 | rm -f conftest.err conftest.$ac_ext |
b4e70030 JB |
12873 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
12874 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
9a156167 | 12875 | |
bec39cab AC |
12876 | # So? What about this header? |
12877 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
12878 | yes:no: ) | |
12879 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
12880 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
12881 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
12882 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
12883 | ac_header_preproc=yes | |
12884 | ;; | |
12885 | no:yes:* ) | |
12886 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
12887 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
12888 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
12889 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
12890 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
12891 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
12892 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
12893 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
12894 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
12895 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
12896 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
12897 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
b4e70030 JB |
12898 | ( |
12899 | cat <<\_ASBOX | |
12900 | ## ------------------------------------------ ## | |
12901 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
12902 | ## ------------------------------------------ ## | |
12903 | _ASBOX | |
12904 | ) | | |
12905 | sed "s/^/$as_me: WARNING: /" >&2 | |
bec39cab AC |
12906 | ;; |
12907 | esac | |
b4e70030 JB |
12908 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
12909 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
12910 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab | 12911 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9a156167 | 12912 | else |
bec39cab | 12913 | eval "$as_ac_Header=\$ac_header_preproc" |
9a156167 | 12914 | fi |
b4e70030 JB |
12915 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
12916 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
9a156167 | 12917 | |
bec39cab AC |
12918 | fi |
12919 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
12920 | cat >>confdefs.h <<_ACEOF | |
12921 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12922 | _ACEOF | |
9a156167 | 12923 | |
bec39cab | 12924 | fi |
9a156167 | 12925 | |
bec39cab | 12926 | done |
9a156167 | 12927 | |
9a156167 | 12928 | |
a9322a30 | 12929 | for ac_header in term.h |
bec39cab AC |
12930 | do |
12931 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
a9322a30 | 12932 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
b4e70030 JB |
12933 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
12934 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab | 12935 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 12936 | else |
a9322a30 | 12937 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
12938 | /* confdefs.h. */ |
12939 | _ACEOF | |
12940 | cat confdefs.h >>conftest.$ac_ext | |
12941 | cat >>conftest.$ac_ext <<_ACEOF | |
436868fb | 12942 | /* end confdefs.h. */ |
a9322a30 TT |
12943 | #if HAVE_CURSES_H |
12944 | # include <curses.h> | |
12945 | #endif | |
12946 | ||
12947 | ||
436868fb DP |
12948 | #include <$ac_header> |
12949 | _ACEOF | |
12950 | rm -f conftest.$ac_objext | |
12951 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12952 | (eval $ac_compile) 2>conftest.er1 | |
12953 | ac_status=$? | |
12954 | grep -v '^ *+' conftest.er1 >conftest.err | |
12955 | rm -f conftest.er1 | |
12956 | cat conftest.err >&5 | |
12957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12958 | (exit $ac_status); } && | |
12959 | { ac_try='test -z "$ac_c_werror_flag" | |
12960 | || test ! -s conftest.err' | |
12961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12962 | (eval $ac_try) 2>&5 | |
12963 | ac_status=$? | |
12964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12965 | (exit $ac_status); }; } && | |
12966 | { ac_try='test -s conftest.$ac_objext' | |
12967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12968 | (eval $ac_try) 2>&5 | |
12969 | ac_status=$? | |
12970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12971 | (exit $ac_status); }; }; then | |
a9322a30 | 12972 | eval "$as_ac_Header=yes" |
436868fb DP |
12973 | else |
12974 | echo "$as_me: failed program was:" >&5 | |
12975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12976 | ||
a9322a30 | 12977 | eval "$as_ac_Header=no" |
436868fb DP |
12978 | fi |
12979 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
12980 | fi |
12981 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
12982 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
12983 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
12984 | cat >>confdefs.h <<_ACEOF | |
12985 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
12986 | _ACEOF | |
436868fb | 12987 | |
a9322a30 TT |
12988 | fi |
12989 | ||
12990 | done | |
12991 | ||
12992 | ||
12993 | # ------------------------- # | |
12994 | # Checks for declarations. # | |
12995 | # ------------------------- # | |
12996 | ||
12997 | echo "$as_me:$LINENO: checking whether free is declared" >&5 | |
12998 | echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6 | |
12999 | if test "${ac_cv_have_decl_free+set}" = set; then | |
13000 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13001 | else | |
13002 | cat >conftest.$ac_ext <<_ACEOF | |
436868fb DP |
13003 | /* confdefs.h. */ |
13004 | _ACEOF | |
13005 | cat confdefs.h >>conftest.$ac_ext | |
13006 | cat >>conftest.$ac_ext <<_ACEOF | |
13007 | /* end confdefs.h. */ | |
a9322a30 TT |
13008 | $ac_includes_default |
13009 | int | |
13010 | main () | |
13011 | { | |
13012 | #ifndef free | |
13013 | char *p = (char *) free; | |
13014 | #endif | |
13015 | ||
13016 | ; | |
13017 | return 0; | |
13018 | } | |
436868fb | 13019 | _ACEOF |
a9322a30 TT |
13020 | rm -f conftest.$ac_objext |
13021 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13022 | (eval $ac_compile) 2>conftest.er1 | |
436868fb DP |
13023 | ac_status=$? |
13024 | grep -v '^ *+' conftest.er1 >conftest.err | |
13025 | rm -f conftest.er1 | |
13026 | cat conftest.err >&5 | |
13027 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 TT |
13028 | (exit $ac_status); } && |
13029 | { ac_try='test -z "$ac_c_werror_flag" | |
13030 | || test ! -s conftest.err' | |
13031 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13032 | (eval $ac_try) 2>&5 | |
13033 | ac_status=$? | |
13034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13035 | (exit $ac_status); }; } && | |
13036 | { ac_try='test -s conftest.$ac_objext' | |
13037 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13038 | (eval $ac_try) 2>&5 | |
13039 | ac_status=$? | |
13040 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13041 | (exit $ac_status); }; }; then | |
13042 | ac_cv_have_decl_free=yes | |
436868fb DP |
13043 | else |
13044 | echo "$as_me: failed program was:" >&5 | |
13045 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13046 | ||
a9322a30 | 13047 | ac_cv_have_decl_free=no |
436868fb | 13048 | fi |
a9322a30 | 13049 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
436868fb | 13050 | fi |
a9322a30 TT |
13051 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5 |
13052 | echo "${ECHO_T}$ac_cv_have_decl_free" >&6 | |
13053 | if test $ac_cv_have_decl_free = yes; then | |
436868fb | 13054 | |
a9322a30 TT |
13055 | cat >>confdefs.h <<_ACEOF |
13056 | #define HAVE_DECL_FREE 1 | |
436868fb DP |
13057 | _ACEOF |
13058 | ||
436868fb | 13059 | |
a9322a30 TT |
13060 | else |
13061 | cat >>confdefs.h <<_ACEOF | |
13062 | #define HAVE_DECL_FREE 0 | |
13063 | _ACEOF | |
436868fb DP |
13064 | |
13065 | ||
436868fb | 13066 | fi |
a9322a30 TT |
13067 | echo "$as_me:$LINENO: checking whether malloc is declared" >&5 |
13068 | echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6 | |
13069 | if test "${ac_cv_have_decl_malloc+set}" = set; then | |
13070 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
436868fb | 13071 | else |
a9322a30 | 13072 | cat >conftest.$ac_ext <<_ACEOF |
436868fb DP |
13073 | /* confdefs.h. */ |
13074 | _ACEOF | |
13075 | cat confdefs.h >>conftest.$ac_ext | |
13076 | cat >>conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
13077 | /* end confdefs.h. */ |
13078 | $ac_includes_default | |
a9322a30 TT |
13079 | int |
13080 | main () | |
13081 | { | |
13082 | #ifndef malloc | |
13083 | char *p = (char *) malloc; | |
13084 | #endif | |
13085 | ||
13086 | ; | |
13087 | return 0; | |
13088 | } | |
bec39cab AC |
13089 | _ACEOF |
13090 | rm -f conftest.$ac_objext | |
13091 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13092 | (eval $ac_compile) 2>conftest.er1 | |
13093 | ac_status=$? | |
13094 | grep -v '^ *+' conftest.er1 >conftest.err | |
13095 | rm -f conftest.er1 | |
13096 | cat conftest.err >&5 | |
13097 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13098 | (exit $ac_status); } && | |
b4e70030 JB |
13099 | { ac_try='test -z "$ac_c_werror_flag" |
13100 | || test ! -s conftest.err' | |
bec39cab AC |
13101 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13102 | (eval $ac_try) 2>&5 | |
13103 | ac_status=$? | |
13104 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13105 | (exit $ac_status); }; } && | |
13106 | { ac_try='test -s conftest.$ac_objext' | |
13107 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13108 | (eval $ac_try) 2>&5 | |
13109 | ac_status=$? | |
13110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13111 | (exit $ac_status); }; }; then | |
a9322a30 | 13112 | ac_cv_have_decl_malloc=yes |
bec39cab AC |
13113 | else |
13114 | echo "$as_me: failed program was:" >&5 | |
13115 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13116 | ||
a9322a30 | 13117 | ac_cv_have_decl_malloc=no |
bec39cab AC |
13118 | fi |
13119 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13120 | fi |
13121 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5 | |
13122 | echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6 | |
13123 | if test $ac_cv_have_decl_malloc = yes; then | |
bec39cab | 13124 | |
a9322a30 TT |
13125 | cat >>confdefs.h <<_ACEOF |
13126 | #define HAVE_DECL_MALLOC 1 | |
bec39cab | 13127 | _ACEOF |
9a156167 | 13128 | |
9a156167 MK |
13129 | |
13130 | else | |
bec39cab | 13131 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13132 | #define HAVE_DECL_MALLOC 0 |
bec39cab | 13133 | _ACEOF |
9a156167 | 13134 | |
c890192f | 13135 | |
bec39cab | 13136 | fi |
a9322a30 TT |
13137 | echo "$as_me:$LINENO: checking whether realloc is declared" >&5 |
13138 | echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6 | |
13139 | if test "${ac_cv_have_decl_realloc+set}" = set; then | |
13140 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13141 | else |
a9322a30 | 13142 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13143 | /* confdefs.h. */ |
13144 | _ACEOF | |
13145 | cat confdefs.h >>conftest.$ac_ext | |
13146 | cat >>conftest.$ac_ext <<_ACEOF | |
13147 | /* end confdefs.h. */ | |
13148 | $ac_includes_default | |
a9322a30 TT |
13149 | int |
13150 | main () | |
13151 | { | |
13152 | #ifndef realloc | |
13153 | char *p = (char *) realloc; | |
13154 | #endif | |
13155 | ||
13156 | ; | |
13157 | return 0; | |
13158 | } | |
bec39cab AC |
13159 | _ACEOF |
13160 | rm -f conftest.$ac_objext | |
13161 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13162 | (eval $ac_compile) 2>conftest.er1 | |
13163 | ac_status=$? | |
13164 | grep -v '^ *+' conftest.er1 >conftest.err | |
13165 | rm -f conftest.er1 | |
13166 | cat conftest.err >&5 | |
13167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13168 | (exit $ac_status); } && | |
b4e70030 JB |
13169 | { ac_try='test -z "$ac_c_werror_flag" |
13170 | || test ! -s conftest.err' | |
bec39cab AC |
13171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13172 | (eval $ac_try) 2>&5 | |
13173 | ac_status=$? | |
13174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13175 | (exit $ac_status); }; } && | |
13176 | { ac_try='test -s conftest.$ac_objext' | |
13177 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13178 | (eval $ac_try) 2>&5 | |
13179 | ac_status=$? | |
13180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13181 | (exit $ac_status); }; }; then | |
a9322a30 | 13182 | ac_cv_have_decl_realloc=yes |
bec39cab AC |
13183 | else |
13184 | echo "$as_me: failed program was:" >&5 | |
13185 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13186 | ||
a9322a30 | 13187 | ac_cv_have_decl_realloc=no |
bec39cab AC |
13188 | fi |
13189 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13190 | fi |
13191 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5 | |
13192 | echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6 | |
13193 | if test $ac_cv_have_decl_realloc = yes; then | |
bec39cab | 13194 | |
a9322a30 TT |
13195 | cat >>confdefs.h <<_ACEOF |
13196 | #define HAVE_DECL_REALLOC 1 | |
bec39cab | 13197 | _ACEOF |
bec39cab | 13198 | |
bec39cab | 13199 | |
c890192f | 13200 | else |
bec39cab | 13201 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13202 | #define HAVE_DECL_REALLOC 0 |
bec39cab | 13203 | _ACEOF |
c890192f | 13204 | |
bec39cab | 13205 | |
bec39cab | 13206 | fi |
a9322a30 TT |
13207 | echo "$as_me:$LINENO: checking whether strerror is declared" >&5 |
13208 | echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6 | |
13209 | if test "${ac_cv_have_decl_strerror+set}" = set; then | |
13210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13211 | else |
a9322a30 | 13212 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13213 | /* confdefs.h. */ |
13214 | _ACEOF | |
13215 | cat confdefs.h >>conftest.$ac_ext | |
13216 | cat >>conftest.$ac_ext <<_ACEOF | |
13217 | /* end confdefs.h. */ | |
13218 | $ac_includes_default | |
a9322a30 TT |
13219 | int |
13220 | main () | |
13221 | { | |
13222 | #ifndef strerror | |
13223 | char *p = (char *) strerror; | |
13224 | #endif | |
13225 | ||
13226 | ; | |
13227 | return 0; | |
13228 | } | |
bec39cab AC |
13229 | _ACEOF |
13230 | rm -f conftest.$ac_objext | |
13231 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13232 | (eval $ac_compile) 2>conftest.er1 | |
13233 | ac_status=$? | |
13234 | grep -v '^ *+' conftest.er1 >conftest.err | |
13235 | rm -f conftest.er1 | |
13236 | cat conftest.err >&5 | |
13237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13238 | (exit $ac_status); } && | |
b4e70030 JB |
13239 | { ac_try='test -z "$ac_c_werror_flag" |
13240 | || test ! -s conftest.err' | |
bec39cab AC |
13241 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13242 | (eval $ac_try) 2>&5 | |
13243 | ac_status=$? | |
13244 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13245 | (exit $ac_status); }; } && | |
13246 | { ac_try='test -s conftest.$ac_objext' | |
13247 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13248 | (eval $ac_try) 2>&5 | |
13249 | ac_status=$? | |
13250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13251 | (exit $ac_status); }; }; then | |
a9322a30 | 13252 | ac_cv_have_decl_strerror=yes |
bec39cab AC |
13253 | else |
13254 | echo "$as_me: failed program was:" >&5 | |
13255 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13256 | ||
a9322a30 | 13257 | ac_cv_have_decl_strerror=no |
bec39cab AC |
13258 | fi |
13259 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13260 | fi |
13261 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5 | |
13262 | echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6 | |
13263 | if test $ac_cv_have_decl_strerror = yes; then | |
bec39cab | 13264 | |
a9322a30 TT |
13265 | cat >>confdefs.h <<_ACEOF |
13266 | #define HAVE_DECL_STRERROR 1 | |
bec39cab | 13267 | _ACEOF |
bec39cab | 13268 | |
bec39cab | 13269 | |
9a156167 | 13270 | else |
bec39cab | 13271 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13272 | #define HAVE_DECL_STRERROR 0 |
bec39cab | 13273 | _ACEOF |
9a156167 | 13274 | |
06825bd1 | 13275 | |
bec39cab | 13276 | fi |
a9322a30 TT |
13277 | echo "$as_me:$LINENO: checking whether strstr is declared" >&5 |
13278 | echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6 | |
13279 | if test "${ac_cv_have_decl_strstr+set}" = set; then | |
13280 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13281 | else |
a9322a30 | 13282 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13283 | /* confdefs.h. */ |
13284 | _ACEOF | |
13285 | cat confdefs.h >>conftest.$ac_ext | |
13286 | cat >>conftest.$ac_ext <<_ACEOF | |
13287 | /* end confdefs.h. */ | |
13288 | $ac_includes_default | |
a9322a30 TT |
13289 | int |
13290 | main () | |
13291 | { | |
13292 | #ifndef strstr | |
13293 | char *p = (char *) strstr; | |
13294 | #endif | |
13295 | ||
13296 | ; | |
13297 | return 0; | |
13298 | } | |
bec39cab AC |
13299 | _ACEOF |
13300 | rm -f conftest.$ac_objext | |
13301 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13302 | (eval $ac_compile) 2>conftest.er1 | |
13303 | ac_status=$? | |
13304 | grep -v '^ *+' conftest.er1 >conftest.err | |
13305 | rm -f conftest.er1 | |
13306 | cat conftest.err >&5 | |
13307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13308 | (exit $ac_status); } && | |
b4e70030 JB |
13309 | { ac_try='test -z "$ac_c_werror_flag" |
13310 | || test ! -s conftest.err' | |
bec39cab AC |
13311 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13312 | (eval $ac_try) 2>&5 | |
13313 | ac_status=$? | |
13314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13315 | (exit $ac_status); }; } && | |
13316 | { ac_try='test -s conftest.$ac_objext' | |
13317 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13318 | (eval $ac_try) 2>&5 | |
13319 | ac_status=$? | |
13320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13321 | (exit $ac_status); }; }; then | |
a9322a30 | 13322 | ac_cv_have_decl_strstr=yes |
bec39cab AC |
13323 | else |
13324 | echo "$as_me: failed program was:" >&5 | |
13325 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13326 | ||
a9322a30 | 13327 | ac_cv_have_decl_strstr=no |
bec39cab AC |
13328 | fi |
13329 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13330 | fi |
13331 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5 | |
13332 | echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6 | |
13333 | if test $ac_cv_have_decl_strstr = yes; then | |
bec39cab | 13334 | |
a9322a30 TT |
13335 | cat >>confdefs.h <<_ACEOF |
13336 | #define HAVE_DECL_STRSTR 1 | |
bec39cab | 13337 | _ACEOF |
bec39cab | 13338 | |
bec39cab | 13339 | |
bec39cab | 13340 | else |
bec39cab | 13341 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13342 | #define HAVE_DECL_STRSTR 0 |
bec39cab | 13343 | _ACEOF |
06825bd1 | 13344 | |
bec39cab | 13345 | |
bec39cab | 13346 | fi |
a9322a30 TT |
13347 | echo "$as_me:$LINENO: checking whether getopt is declared" >&5 |
13348 | echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6 | |
13349 | if test "${ac_cv_have_decl_getopt+set}" = set; then | |
13350 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13351 | else |
a9322a30 | 13352 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13353 | /* confdefs.h. */ |
13354 | _ACEOF | |
13355 | cat confdefs.h >>conftest.$ac_ext | |
13356 | cat >>conftest.$ac_ext <<_ACEOF | |
13357 | /* end confdefs.h. */ | |
13358 | $ac_includes_default | |
a9322a30 TT |
13359 | int |
13360 | main () | |
13361 | { | |
13362 | #ifndef getopt | |
13363 | char *p = (char *) getopt; | |
13364 | #endif | |
13365 | ||
13366 | ; | |
13367 | return 0; | |
13368 | } | |
bec39cab AC |
13369 | _ACEOF |
13370 | rm -f conftest.$ac_objext | |
13371 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13372 | (eval $ac_compile) 2>conftest.er1 | |
13373 | ac_status=$? | |
13374 | grep -v '^ *+' conftest.er1 >conftest.err | |
13375 | rm -f conftest.er1 | |
13376 | cat conftest.err >&5 | |
13377 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13378 | (exit $ac_status); } && | |
b4e70030 JB |
13379 | { ac_try='test -z "$ac_c_werror_flag" |
13380 | || test ! -s conftest.err' | |
bec39cab AC |
13381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13382 | (eval $ac_try) 2>&5 | |
13383 | ac_status=$? | |
13384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13385 | (exit $ac_status); }; } && | |
13386 | { ac_try='test -s conftest.$ac_objext' | |
13387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13388 | (eval $ac_try) 2>&5 | |
13389 | ac_status=$? | |
13390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13391 | (exit $ac_status); }; }; then | |
a9322a30 | 13392 | ac_cv_have_decl_getopt=yes |
bec39cab AC |
13393 | else |
13394 | echo "$as_me: failed program was:" >&5 | |
13395 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13396 | ||
a9322a30 | 13397 | ac_cv_have_decl_getopt=no |
bec39cab AC |
13398 | fi |
13399 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13400 | fi |
13401 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5 | |
13402 | echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6 | |
13403 | if test $ac_cv_have_decl_getopt = yes; then | |
bec39cab | 13404 | |
a9322a30 TT |
13405 | cat >>confdefs.h <<_ACEOF |
13406 | #define HAVE_DECL_GETOPT 1 | |
bec39cab | 13407 | _ACEOF |
5ee754fc | 13408 | |
bec39cab | 13409 | |
5ee754fc | 13410 | else |
bec39cab | 13411 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13412 | #define HAVE_DECL_GETOPT 0 |
bec39cab | 13413 | _ACEOF |
c906108c | 13414 | |
bec39cab | 13415 | |
bec39cab | 13416 | fi |
a9322a30 TT |
13417 | echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 |
13418 | echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 | |
13419 | if test "${ac_cv_have_decl_snprintf+set}" = set; then | |
13420 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13421 | else |
a9322a30 | 13422 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13423 | /* confdefs.h. */ |
13424 | _ACEOF | |
13425 | cat confdefs.h >>conftest.$ac_ext | |
13426 | cat >>conftest.$ac_ext <<_ACEOF | |
13427 | /* end confdefs.h. */ | |
13428 | $ac_includes_default | |
a9322a30 TT |
13429 | int |
13430 | main () | |
13431 | { | |
13432 | #ifndef snprintf | |
13433 | char *p = (char *) snprintf; | |
13434 | #endif | |
13435 | ||
13436 | ; | |
13437 | return 0; | |
13438 | } | |
bec39cab AC |
13439 | _ACEOF |
13440 | rm -f conftest.$ac_objext | |
13441 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13442 | (eval $ac_compile) 2>conftest.er1 | |
13443 | ac_status=$? | |
13444 | grep -v '^ *+' conftest.er1 >conftest.err | |
13445 | rm -f conftest.er1 | |
13446 | cat conftest.err >&5 | |
13447 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13448 | (exit $ac_status); } && | |
b4e70030 JB |
13449 | { ac_try='test -z "$ac_c_werror_flag" |
13450 | || test ! -s conftest.err' | |
bec39cab AC |
13451 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13452 | (eval $ac_try) 2>&5 | |
13453 | ac_status=$? | |
13454 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13455 | (exit $ac_status); }; } && | |
13456 | { ac_try='test -s conftest.$ac_objext' | |
13457 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13458 | (eval $ac_try) 2>&5 | |
13459 | ac_status=$? | |
13460 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13461 | (exit $ac_status); }; }; then | |
a9322a30 | 13462 | ac_cv_have_decl_snprintf=yes |
bec39cab AC |
13463 | else |
13464 | echo "$as_me: failed program was:" >&5 | |
13465 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13466 | ||
a9322a30 | 13467 | ac_cv_have_decl_snprintf=no |
bec39cab AC |
13468 | fi |
13469 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13470 | fi |
13471 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 | |
13472 | echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 | |
13473 | if test $ac_cv_have_decl_snprintf = yes; then | |
bec39cab | 13474 | |
a9322a30 TT |
13475 | cat >>confdefs.h <<_ACEOF |
13476 | #define HAVE_DECL_SNPRINTF 1 | |
bec39cab | 13477 | _ACEOF |
c906108c SS |
13478 | |
13479 | ||
9608ab8b | 13480 | else |
bec39cab | 13481 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13482 | #define HAVE_DECL_SNPRINTF 0 |
bec39cab | 13483 | _ACEOF |
5ee754fc | 13484 | |
5ee754fc | 13485 | |
bec39cab | 13486 | fi |
a9322a30 TT |
13487 | echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 |
13488 | echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 | |
13489 | if test "${ac_cv_have_decl_vsnprintf+set}" = set; then | |
13490 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13491 | else |
a9322a30 | 13492 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13493 | /* confdefs.h. */ |
13494 | _ACEOF | |
13495 | cat confdefs.h >>conftest.$ac_ext | |
13496 | cat >>conftest.$ac_ext <<_ACEOF | |
13497 | /* end confdefs.h. */ | |
13498 | $ac_includes_default | |
a9322a30 TT |
13499 | int |
13500 | main () | |
13501 | { | |
13502 | #ifndef vsnprintf | |
13503 | char *p = (char *) vsnprintf; | |
13504 | #endif | |
13505 | ||
13506 | ; | |
13507 | return 0; | |
13508 | } | |
bec39cab AC |
13509 | _ACEOF |
13510 | rm -f conftest.$ac_objext | |
13511 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13512 | (eval $ac_compile) 2>conftest.er1 | |
13513 | ac_status=$? | |
13514 | grep -v '^ *+' conftest.er1 >conftest.err | |
13515 | rm -f conftest.er1 | |
13516 | cat conftest.err >&5 | |
13517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13518 | (exit $ac_status); } && | |
b4e70030 JB |
13519 | { ac_try='test -z "$ac_c_werror_flag" |
13520 | || test ! -s conftest.err' | |
bec39cab AC |
13521 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13522 | (eval $ac_try) 2>&5 | |
13523 | ac_status=$? | |
13524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13525 | (exit $ac_status); }; } && | |
13526 | { ac_try='test -s conftest.$ac_objext' | |
13527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13528 | (eval $ac_try) 2>&5 | |
13529 | ac_status=$? | |
13530 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13531 | (exit $ac_status); }; }; then | |
a9322a30 | 13532 | ac_cv_have_decl_vsnprintf=yes |
bec39cab AC |
13533 | else |
13534 | echo "$as_me: failed program was:" >&5 | |
13535 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13536 | ||
a9322a30 | 13537 | ac_cv_have_decl_vsnprintf=no |
bec39cab AC |
13538 | fi |
13539 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13540 | fi |
13541 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 | |
13542 | echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 | |
13543 | if test $ac_cv_have_decl_vsnprintf = yes; then | |
bec39cab | 13544 | |
a9322a30 TT |
13545 | cat >>confdefs.h <<_ACEOF |
13546 | #define HAVE_DECL_VSNPRINTF 1 | |
bec39cab | 13547 | _ACEOF |
5ee754fc | 13548 | |
5ee754fc | 13549 | |
5ee754fc | 13550 | else |
bec39cab | 13551 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 13552 | #define HAVE_DECL_VSNPRINTF 0 |
bec39cab | 13553 | _ACEOF |
5ee754fc | 13554 | |
a9322a30 | 13555 | |
5ee754fc MK |
13556 | fi |
13557 | ||
bec39cab AC |
13558 | |
13559 | ||
a8111142 TT |
13560 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
13561 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
13562 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
13563 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13564 | else | |
13565 | cat >conftest.$ac_ext <<_ACEOF | |
13566 | /* confdefs.h. */ | |
13567 | _ACEOF | |
13568 | cat confdefs.h >>conftest.$ac_ext | |
13569 | cat >>conftest.$ac_ext <<_ACEOF | |
13570 | /* end confdefs.h. */ | |
13571 | #include <locale.h> | |
13572 | int | |
13573 | main () | |
13574 | { | |
13575 | return LC_MESSAGES | |
13576 | ; | |
13577 | return 0; | |
13578 | } | |
13579 | _ACEOF | |
13580 | rm -f conftest.$ac_objext conftest$ac_exeext | |
13581 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
13582 | (eval $ac_link) 2>conftest.er1 | |
13583 | ac_status=$? | |
13584 | grep -v '^ *+' conftest.er1 >conftest.err | |
13585 | rm -f conftest.er1 | |
13586 | cat conftest.err >&5 | |
13587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13588 | (exit $ac_status); } && | |
13589 | { ac_try='test -z "$ac_c_werror_flag" | |
13590 | || test ! -s conftest.err' | |
13591 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13592 | (eval $ac_try) 2>&5 | |
13593 | ac_status=$? | |
13594 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13595 | (exit $ac_status); }; } && | |
13596 | { ac_try='test -s conftest$ac_exeext' | |
13597 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13598 | (eval $ac_try) 2>&5 | |
13599 | ac_status=$? | |
13600 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13601 | (exit $ac_status); }; }; then | |
13602 | am_cv_val_LC_MESSAGES=yes | |
13603 | else | |
13604 | echo "$as_me: failed program was:" >&5 | |
13605 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13606 | ||
13607 | am_cv_val_LC_MESSAGES=no | |
13608 | fi | |
13609 | rm -f conftest.err conftest.$ac_objext \ | |
13610 | conftest$ac_exeext conftest.$ac_ext | |
13611 | fi | |
13612 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 | |
13613 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
13614 | if test $am_cv_val_LC_MESSAGES = yes; then | |
13615 | ||
13616 | cat >>confdefs.h <<\_ACEOF | |
13617 | #define HAVE_LC_MESSAGES 1 | |
13618 | _ACEOF | |
13619 | ||
13620 | fi | |
13621 | ||
13622 | ||
a9322a30 TT |
13623 | # ----------------------- # |
13624 | # Checks for structures. # | |
13625 | # ----------------------- # | |
13626 | ||
13627 | echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 | |
13628 | echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 | |
13629 | if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then | |
bec39cab | 13630 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 13631 | else |
a9322a30 | 13632 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13633 | /* confdefs.h. */ |
13634 | _ACEOF | |
13635 | cat confdefs.h >>conftest.$ac_ext | |
13636 | cat >>conftest.$ac_ext <<_ACEOF | |
13637 | /* end confdefs.h. */ | |
13638 | $ac_includes_default | |
a9322a30 TT |
13639 | int |
13640 | main () | |
13641 | { | |
13642 | static struct stat ac_aggr; | |
13643 | if (ac_aggr.st_blocks) | |
13644 | return 0; | |
13645 | ; | |
13646 | return 0; | |
13647 | } | |
bec39cab AC |
13648 | _ACEOF |
13649 | rm -f conftest.$ac_objext | |
13650 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13651 | (eval $ac_compile) 2>conftest.er1 | |
13652 | ac_status=$? | |
13653 | grep -v '^ *+' conftest.er1 >conftest.err | |
13654 | rm -f conftest.er1 | |
13655 | cat conftest.err >&5 | |
13656 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13657 | (exit $ac_status); } && | |
b4e70030 JB |
13658 | { ac_try='test -z "$ac_c_werror_flag" |
13659 | || test ! -s conftest.err' | |
bec39cab AC |
13660 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13661 | (eval $ac_try) 2>&5 | |
13662 | ac_status=$? | |
13663 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13664 | (exit $ac_status); }; } && | |
13665 | { ac_try='test -s conftest.$ac_objext' | |
13666 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13667 | (eval $ac_try) 2>&5 | |
13668 | ac_status=$? | |
13669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13670 | (exit $ac_status); }; }; then | |
a9322a30 | 13671 | ac_cv_member_struct_stat_st_blocks=yes |
bec39cab AC |
13672 | else |
13673 | echo "$as_me: failed program was:" >&5 | |
13674 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13675 | ||
bec39cab AC |
13676 | cat >conftest.$ac_ext <<_ACEOF |
13677 | /* confdefs.h. */ | |
13678 | _ACEOF | |
13679 | cat confdefs.h >>conftest.$ac_ext | |
13680 | cat >>conftest.$ac_ext <<_ACEOF | |
13681 | /* end confdefs.h. */ | |
a9322a30 TT |
13682 | $ac_includes_default |
13683 | int | |
13684 | main () | |
13685 | { | |
13686 | static struct stat ac_aggr; | |
13687 | if (sizeof ac_aggr.st_blocks) | |
13688 | return 0; | |
13689 | ; | |
13690 | return 0; | |
13691 | } | |
bec39cab | 13692 | _ACEOF |
a9322a30 TT |
13693 | rm -f conftest.$ac_objext |
13694 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13695 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
13696 | ac_status=$? |
13697 | grep -v '^ *+' conftest.er1 >conftest.err | |
13698 | rm -f conftest.er1 | |
13699 | cat conftest.err >&5 | |
13700 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 TT |
13701 | (exit $ac_status); } && |
13702 | { ac_try='test -z "$ac_c_werror_flag" | |
13703 | || test ! -s conftest.err' | |
13704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13705 | (eval $ac_try) 2>&5 | |
13706 | ac_status=$? | |
13707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13708 | (exit $ac_status); }; } && | |
13709 | { ac_try='test -s conftest.$ac_objext' | |
13710 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13711 | (eval $ac_try) 2>&5 | |
13712 | ac_status=$? | |
13713 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13714 | (exit $ac_status); }; }; then | |
13715 | ac_cv_member_struct_stat_st_blocks=yes | |
bec39cab AC |
13716 | else |
13717 | echo "$as_me: failed program was:" >&5 | |
13718 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5ee754fc | 13719 | |
a9322a30 | 13720 | ac_cv_member_struct_stat_st_blocks=no |
5ee754fc | 13721 | fi |
a9322a30 | 13722 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 13723 | fi |
a9322a30 | 13724 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 13725 | fi |
a9322a30 TT |
13726 | echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 |
13727 | echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 | |
13728 | if test $ac_cv_member_struct_stat_st_blocks = yes; then | |
5ee754fc | 13729 | |
a9322a30 TT |
13730 | cat >>confdefs.h <<_ACEOF |
13731 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 | |
13732 | _ACEOF | |
5ee754fc | 13733 | |
5ee754fc | 13734 | |
bec39cab | 13735 | fi |
a9322a30 TT |
13736 | echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 |
13737 | echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 | |
13738 | if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then | |
13739 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
bec39cab | 13740 | else |
a9322a30 | 13741 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13742 | /* confdefs.h. */ |
13743 | _ACEOF | |
13744 | cat confdefs.h >>conftest.$ac_ext | |
13745 | cat >>conftest.$ac_ext <<_ACEOF | |
13746 | /* end confdefs.h. */ | |
13747 | $ac_includes_default | |
a9322a30 TT |
13748 | int |
13749 | main () | |
13750 | { | |
13751 | static struct stat ac_aggr; | |
13752 | if (ac_aggr.st_blksize) | |
13753 | return 0; | |
13754 | ; | |
13755 | return 0; | |
13756 | } | |
bec39cab AC |
13757 | _ACEOF |
13758 | rm -f conftest.$ac_objext | |
13759 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13760 | (eval $ac_compile) 2>conftest.er1 | |
13761 | ac_status=$? | |
13762 | grep -v '^ *+' conftest.er1 >conftest.err | |
13763 | rm -f conftest.er1 | |
13764 | cat conftest.err >&5 | |
13765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13766 | (exit $ac_status); } && | |
b4e70030 JB |
13767 | { ac_try='test -z "$ac_c_werror_flag" |
13768 | || test ! -s conftest.err' | |
bec39cab AC |
13769 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13770 | (eval $ac_try) 2>&5 | |
13771 | ac_status=$? | |
13772 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13773 | (exit $ac_status); }; } && | |
13774 | { ac_try='test -s conftest.$ac_objext' | |
13775 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13776 | (eval $ac_try) 2>&5 | |
13777 | ac_status=$? | |
13778 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13779 | (exit $ac_status); }; }; then | |
a9322a30 | 13780 | ac_cv_member_struct_stat_st_blksize=yes |
bec39cab AC |
13781 | else |
13782 | echo "$as_me: failed program was:" >&5 | |
13783 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13784 | ||
7eb368b3 NR |
13785 | cat >conftest.$ac_ext <<_ACEOF |
13786 | /* confdefs.h. */ | |
13787 | _ACEOF | |
13788 | cat confdefs.h >>conftest.$ac_ext | |
13789 | cat >>conftest.$ac_ext <<_ACEOF | |
13790 | /* end confdefs.h. */ | |
13791 | $ac_includes_default | |
a9322a30 TT |
13792 | int |
13793 | main () | |
13794 | { | |
13795 | static struct stat ac_aggr; | |
13796 | if (sizeof ac_aggr.st_blksize) | |
13797 | return 0; | |
13798 | ; | |
13799 | return 0; | |
13800 | } | |
7eb368b3 NR |
13801 | _ACEOF |
13802 | rm -f conftest.$ac_objext | |
13803 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13804 | (eval $ac_compile) 2>conftest.er1 | |
13805 | ac_status=$? | |
13806 | grep -v '^ *+' conftest.er1 >conftest.err | |
13807 | rm -f conftest.er1 | |
13808 | cat conftest.err >&5 | |
13809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13810 | (exit $ac_status); } && | |
13811 | { ac_try='test -z "$ac_c_werror_flag" | |
13812 | || test ! -s conftest.err' | |
13813 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13814 | (eval $ac_try) 2>&5 | |
13815 | ac_status=$? | |
13816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13817 | (exit $ac_status); }; } && | |
13818 | { ac_try='test -s conftest.$ac_objext' | |
13819 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13820 | (eval $ac_try) 2>&5 | |
13821 | ac_status=$? | |
13822 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13823 | (exit $ac_status); }; }; then | |
a9322a30 | 13824 | ac_cv_member_struct_stat_st_blksize=yes |
7eb368b3 NR |
13825 | else |
13826 | echo "$as_me: failed program was:" >&5 | |
13827 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13828 | ||
a9322a30 | 13829 | ac_cv_member_struct_stat_st_blksize=no |
7eb368b3 NR |
13830 | fi |
13831 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
7eb368b3 | 13832 | fi |
a9322a30 | 13833 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
7eb368b3 | 13834 | fi |
a9322a30 TT |
13835 | echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 |
13836 | echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 | |
13837 | if test $ac_cv_member_struct_stat_st_blksize = yes; then | |
7eb368b3 | 13838 | |
a9322a30 TT |
13839 | cat >>confdefs.h <<_ACEOF |
13840 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 | |
7eb368b3 NR |
13841 | _ACEOF |
13842 | ||
a9322a30 | 13843 | |
7eb368b3 NR |
13844 | fi |
13845 | ||
7eb368b3 | 13846 | |
a9322a30 TT |
13847 | # ------------------ # |
13848 | # Checks for types. # | |
13849 | # ------------------ # | |
7eb368b3 | 13850 | |
a9322a30 TT |
13851 | echo "$as_me:$LINENO: checking return type of signal handlers" >&5 |
13852 | echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 | |
13853 | if test "${ac_cv_type_signal+set}" = set; then | |
bec39cab | 13854 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 13855 | else |
7cb9022a | 13856 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13857 | /* confdefs.h. */ |
13858 | _ACEOF | |
13859 | cat confdefs.h >>conftest.$ac_ext | |
13860 | cat >>conftest.$ac_ext <<_ACEOF | |
13861 | /* end confdefs.h. */ | |
a9322a30 TT |
13862 | #include <sys/types.h> |
13863 | #include <signal.h> | |
13864 | #ifdef signal | |
13865 | # undef signal | |
13866 | #endif | |
13867 | #ifdef __cplusplus | |
13868 | extern "C" void (*signal (int, void (*)(int)))(int); | |
13869 | #else | |
13870 | void (*signal ()) (); | |
7cb9022a MK |
13871 | #endif |
13872 | ||
a9322a30 TT |
13873 | int |
13874 | main () | |
13875 | { | |
13876 | int i; | |
13877 | ; | |
13878 | return 0; | |
13879 | } | |
bec39cab AC |
13880 | _ACEOF |
13881 | rm -f conftest.$ac_objext | |
13882 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13883 | (eval $ac_compile) 2>conftest.er1 | |
13884 | ac_status=$? | |
13885 | grep -v '^ *+' conftest.er1 >conftest.err | |
13886 | rm -f conftest.er1 | |
13887 | cat conftest.err >&5 | |
13888 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13889 | (exit $ac_status); } && | |
b4e70030 JB |
13890 | { ac_try='test -z "$ac_c_werror_flag" |
13891 | || test ! -s conftest.err' | |
bec39cab AC |
13892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13893 | (eval $ac_try) 2>&5 | |
13894 | ac_status=$? | |
13895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13896 | (exit $ac_status); }; } && | |
13897 | { ac_try='test -s conftest.$ac_objext' | |
13898 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13899 | (eval $ac_try) 2>&5 | |
13900 | ac_status=$? | |
13901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13902 | (exit $ac_status); }; }; then | |
a9322a30 | 13903 | ac_cv_type_signal=void |
bec39cab AC |
13904 | else |
13905 | echo "$as_me: failed program was:" >&5 | |
13906 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13907 | ||
a9322a30 | 13908 | ac_cv_type_signal=int |
bec39cab AC |
13909 | fi |
13910 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5ee754fc | 13911 | fi |
a9322a30 TT |
13912 | echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 |
13913 | echo "${ECHO_T}$ac_cv_type_signal" >&6 | |
bec39cab | 13914 | |
a9322a30 TT |
13915 | cat >>confdefs.h <<_ACEOF |
13916 | #define RETSIGTYPE $ac_cv_type_signal | |
13917 | _ACEOF | |
5ee754fc | 13918 | |
bec39cab | 13919 | |
a9322a30 TT |
13920 | echo "$as_me:$LINENO: checking for socklen_t" >&5 |
13921 | echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 | |
13922 | if test "${ac_cv_type_socklen_t+set}" = set; then | |
bec39cab | 13923 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 13924 | else |
a9322a30 | 13925 | cat >conftest.$ac_ext <<_ACEOF |
bec39cab AC |
13926 | /* confdefs.h. */ |
13927 | _ACEOF | |
13928 | cat confdefs.h >>conftest.$ac_ext | |
13929 | cat >>conftest.$ac_ext <<_ACEOF | |
13930 | /* end confdefs.h. */ | |
a9322a30 TT |
13931 | #include <sys/types.h> |
13932 | #include <sys/socket.h> | |
13933 | ||
13934 | ||
13935 | int | |
13936 | main () | |
13937 | { | |
13938 | if ((socklen_t *) 0) | |
13939 | return 0; | |
13940 | if (sizeof (socklen_t)) | |
13941 | return 0; | |
13942 | ; | |
13943 | return 0; | |
13944 | } | |
bec39cab AC |
13945 | _ACEOF |
13946 | rm -f conftest.$ac_objext | |
13947 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
13948 | (eval $ac_compile) 2>conftest.er1 | |
13949 | ac_status=$? | |
13950 | grep -v '^ *+' conftest.er1 >conftest.err | |
13951 | rm -f conftest.er1 | |
13952 | cat conftest.err >&5 | |
13953 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13954 | (exit $ac_status); } && | |
b4e70030 JB |
13955 | { ac_try='test -z "$ac_c_werror_flag" |
13956 | || test ! -s conftest.err' | |
bec39cab AC |
13957 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
13958 | (eval $ac_try) 2>&5 | |
13959 | ac_status=$? | |
13960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13961 | (exit $ac_status); }; } && | |
13962 | { ac_try='test -s conftest.$ac_objext' | |
13963 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13964 | (eval $ac_try) 2>&5 | |
13965 | ac_status=$? | |
13966 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13967 | (exit $ac_status); }; }; then | |
a9322a30 | 13968 | ac_cv_type_socklen_t=yes |
bec39cab AC |
13969 | else |
13970 | echo "$as_me: failed program was:" >&5 | |
13971 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13972 | ||
a9322a30 | 13973 | ac_cv_type_socklen_t=no |
bec39cab AC |
13974 | fi |
13975 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 TT |
13976 | fi |
13977 | echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 | |
13978 | echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 | |
13979 | if test $ac_cv_type_socklen_t = yes; then | |
bec39cab | 13980 | |
a9322a30 TT |
13981 | cat >>confdefs.h <<_ACEOF |
13982 | #define HAVE_SOCKLEN_T 1 | |
13983 | _ACEOF | |
13984 | ||
13985 | ||
13986 | fi | |
13987 | ||
13988 | ||
13989 | # ------------------------------------- # | |
13990 | # Checks for compiler characteristics. # | |
13991 | # ------------------------------------- # | |
13992 | ||
13993 | echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 | |
13994 | echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 | |
13995 | if test "${ac_cv_c_const+set}" = set; then | |
13996 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13997 | else | |
13998 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
13999 | /* confdefs.h. */ |
14000 | _ACEOF | |
14001 | cat confdefs.h >>conftest.$ac_ext | |
14002 | cat >>conftest.$ac_ext <<_ACEOF | |
14003 | /* end confdefs.h. */ | |
a9322a30 TT |
14004 | |
14005 | int | |
14006 | main () | |
14007 | { | |
14008 | /* FIXME: Include the comments suggested by Paul. */ | |
14009 | #ifndef __cplusplus | |
14010 | /* Ultrix mips cc rejects this. */ | |
14011 | typedef int charset[2]; | |
14012 | const charset x; | |
14013 | /* SunOS 4.1.1 cc rejects this. */ | |
14014 | char const *const *ccp; | |
14015 | char **p; | |
14016 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
14017 | struct point {int x, y;}; | |
14018 | static struct point const zero = {0,0}; | |
14019 | /* AIX XL C 1.02.0.0 rejects this. | |
14020 | It does not let you subtract one const X* pointer from another in | |
14021 | an arm of an if-expression whose if-part is not a constant | |
14022 | expression */ | |
14023 | const char *g = "string"; | |
14024 | ccp = &g + (g ? g-g : 0); | |
14025 | /* HPUX 7.0 cc rejects these. */ | |
14026 | ++ccp; | |
14027 | p = (char**) ccp; | |
14028 | ccp = (char const *const *) p; | |
14029 | { /* SCO 3.2v4 cc rejects this. */ | |
14030 | char *t; | |
14031 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
14032 | ||
14033 | *t++ = 0; | |
14034 | } | |
14035 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
14036 | int x[] = {25, 17}; | |
14037 | const int *foo = &x[0]; | |
14038 | ++foo; | |
14039 | } | |
14040 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
14041 | typedef const int *iptr; | |
14042 | iptr p = 0; | |
14043 | ++p; | |
14044 | } | |
14045 | { /* AIX XL C 1.02.0.0 rejects this saying | |
14046 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
14047 | struct s { int j; const int *ap[3]; }; | |
14048 | struct s *b; b->j = 5; | |
14049 | } | |
14050 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
14051 | const int foo = 10; | |
14052 | } | |
14053 | #endif | |
14054 | ||
14055 | ; | |
14056 | return 0; | |
14057 | } | |
bec39cab | 14058 | _ACEOF |
a9322a30 TT |
14059 | rm -f conftest.$ac_objext |
14060 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
14061 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
14062 | ac_status=$? |
14063 | grep -v '^ *+' conftest.er1 >conftest.err | |
14064 | rm -f conftest.er1 | |
14065 | cat conftest.err >&5 | |
14066 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 TT |
14067 | (exit $ac_status); } && |
14068 | { ac_try='test -z "$ac_c_werror_flag" | |
14069 | || test ! -s conftest.err' | |
14070 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14071 | (eval $ac_try) 2>&5 | |
14072 | ac_status=$? | |
14073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14074 | (exit $ac_status); }; } && | |
14075 | { ac_try='test -s conftest.$ac_objext' | |
14076 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14077 | (eval $ac_try) 2>&5 | |
14078 | ac_status=$? | |
14079 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14080 | (exit $ac_status); }; }; then | |
14081 | ac_cv_c_const=yes | |
5ee754fc | 14082 | else |
bec39cab AC |
14083 | echo "$as_me: failed program was:" >&5 |
14084 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14085 | ||
a9322a30 | 14086 | ac_cv_c_const=no |
5ee754fc | 14087 | fi |
a9322a30 | 14088 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5ee754fc | 14089 | fi |
a9322a30 TT |
14090 | echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 |
14091 | echo "${ECHO_T}$ac_cv_c_const" >&6 | |
14092 | if test $ac_cv_c_const = no; then | |
bec39cab | 14093 | |
a9322a30 TT |
14094 | cat >>confdefs.h <<\_ACEOF |
14095 | #define const | |
bec39cab AC |
14096 | _ACEOF |
14097 | ||
5ee754fc | 14098 | fi |
bec39cab | 14099 | |
a9322a30 TT |
14100 | echo "$as_me:$LINENO: checking for inline" >&5 |
14101 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
14102 | if test "${ac_cv_c_inline+set}" = set; then | |
bec39cab | 14103 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 14104 | else |
a9322a30 TT |
14105 | ac_cv_c_inline=no |
14106 | for ac_kw in inline __inline__ __inline; do | |
14107 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
14108 | /* confdefs.h. */ |
14109 | _ACEOF | |
14110 | cat confdefs.h >>conftest.$ac_ext | |
14111 | cat >>conftest.$ac_ext <<_ACEOF | |
14112 | /* end confdefs.h. */ | |
a9322a30 TT |
14113 | #ifndef __cplusplus |
14114 | typedef int foo_t; | |
14115 | static $ac_kw foo_t static_foo () {return 0; } | |
14116 | $ac_kw foo_t foo () {return 0; } | |
14117 | #endif | |
14118 | ||
bec39cab AC |
14119 | _ACEOF |
14120 | rm -f conftest.$ac_objext | |
14121 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
14122 | (eval $ac_compile) 2>conftest.er1 | |
14123 | ac_status=$? | |
14124 | grep -v '^ *+' conftest.er1 >conftest.err | |
14125 | rm -f conftest.er1 | |
14126 | cat conftest.err >&5 | |
14127 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14128 | (exit $ac_status); } && | |
b4e70030 JB |
14129 | { ac_try='test -z "$ac_c_werror_flag" |
14130 | || test ! -s conftest.err' | |
bec39cab AC |
14131 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14132 | (eval $ac_try) 2>&5 | |
14133 | ac_status=$? | |
14134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14135 | (exit $ac_status); }; } && | |
14136 | { ac_try='test -s conftest.$ac_objext' | |
14137 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14138 | (eval $ac_try) 2>&5 | |
14139 | ac_status=$? | |
14140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14141 | (exit $ac_status); }; }; then | |
a9322a30 | 14142 | ac_cv_c_inline=$ac_kw; break |
bec39cab AC |
14143 | else |
14144 | echo "$as_me: failed program was:" >&5 | |
14145 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14146 | ||
bec39cab AC |
14147 | fi |
14148 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
a9322a30 | 14149 | done |
bec39cab | 14150 | |
5ee754fc | 14151 | fi |
a9322a30 TT |
14152 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
14153 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
bec39cab | 14154 | |
5ee754fc | 14155 | |
a9322a30 TT |
14156 | case $ac_cv_c_inline in |
14157 | inline | yes) ;; | |
14158 | *) | |
14159 | case $ac_cv_c_inline in | |
14160 | no) ac_val=;; | |
14161 | *) ac_val=$ac_cv_c_inline;; | |
14162 | esac | |
14163 | cat >>confdefs.h <<_ACEOF | |
14164 | #ifndef __cplusplus | |
14165 | #define inline $ac_val | |
14166 | #endif | |
14167 | _ACEOF | |
bec39cab AC |
14168 | ;; |
14169 | esac | |
bec39cab | 14170 | |
a9322a30 TT |
14171 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
14172 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
14173 | if test "${ac_cv_c_bigendian+set}" = set; then | |
bec39cab | 14174 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
bec39cab | 14175 | else |
a9322a30 | 14176 | # See if sys/param.h defines the BYTE_ORDER macro. |
bec39cab AC |
14177 | cat >conftest.$ac_ext <<_ACEOF |
14178 | /* confdefs.h. */ | |
14179 | _ACEOF | |
14180 | cat confdefs.h >>conftest.$ac_ext | |
14181 | cat >>conftest.$ac_ext <<_ACEOF | |
14182 | /* end confdefs.h. */ | |
a9322a30 TT |
14183 | #include <sys/types.h> |
14184 | #include <sys/param.h> | |
14185 | ||
14186 | int | |
14187 | main () | |
14188 | { | |
14189 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN | |
14190 | bogus endian macros | |
14191 | #endif | |
14192 | ||
14193 | ; | |
14194 | return 0; | |
14195 | } | |
bec39cab AC |
14196 | _ACEOF |
14197 | rm -f conftest.$ac_objext | |
14198 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
14199 | (eval $ac_compile) 2>conftest.er1 | |
14200 | ac_status=$? | |
14201 | grep -v '^ *+' conftest.er1 >conftest.err | |
14202 | rm -f conftest.er1 | |
14203 | cat conftest.err >&5 | |
14204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14205 | (exit $ac_status); } && | |
b4e70030 JB |
14206 | { ac_try='test -z "$ac_c_werror_flag" |
14207 | || test ! -s conftest.err' | |
bec39cab AC |
14208 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14209 | (eval $ac_try) 2>&5 | |
14210 | ac_status=$? | |
14211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14212 | (exit $ac_status); }; } && | |
14213 | { ac_try='test -s conftest.$ac_objext' | |
14214 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14215 | (eval $ac_try) 2>&5 | |
14216 | ac_status=$? | |
14217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14218 | (exit $ac_status); }; }; then | |
a9322a30 | 14219 | # It does; now see whether it defined to BIG_ENDIAN or not. |
bec39cab AC |
14220 | cat >conftest.$ac_ext <<_ACEOF |
14221 | /* confdefs.h. */ | |
14222 | _ACEOF | |
14223 | cat confdefs.h >>conftest.$ac_ext | |
14224 | cat >>conftest.$ac_ext <<_ACEOF | |
14225 | /* end confdefs.h. */ | |
a9322a30 TT |
14226 | #include <sys/types.h> |
14227 | #include <sys/param.h> | |
14228 | ||
14229 | int | |
14230 | main () | |
14231 | { | |
14232 | #if BYTE_ORDER != BIG_ENDIAN | |
14233 | not big endian | |
14234 | #endif | |
14235 | ||
14236 | ; | |
14237 | return 0; | |
14238 | } | |
bec39cab | 14239 | _ACEOF |
a9322a30 TT |
14240 | rm -f conftest.$ac_objext |
14241 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
14242 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
14243 | ac_status=$? |
14244 | grep -v '^ *+' conftest.er1 >conftest.err | |
14245 | rm -f conftest.er1 | |
14246 | cat conftest.err >&5 | |
14247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 TT |
14248 | (exit $ac_status); } && |
14249 | { ac_try='test -z "$ac_c_werror_flag" | |
14250 | || test ! -s conftest.err' | |
14251 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14252 | (eval $ac_try) 2>&5 | |
14253 | ac_status=$? | |
14254 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14255 | (exit $ac_status); }; } && | |
14256 | { ac_try='test -s conftest.$ac_objext' | |
14257 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14258 | (eval $ac_try) 2>&5 | |
14259 | ac_status=$? | |
14260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14261 | (exit $ac_status); }; }; then | |
14262 | ac_cv_c_bigendian=yes | |
5ee754fc | 14263 | else |
bec39cab AC |
14264 | echo "$as_me: failed program was:" >&5 |
14265 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14266 | ||
a9322a30 | 14267 | ac_cv_c_bigendian=no |
5ee754fc | 14268 | fi |
a9322a30 | 14269 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab | 14270 | else |
a9322a30 TT |
14271 | echo "$as_me: failed program was:" >&5 |
14272 | sed 's/^/| /' conftest.$ac_ext >&5 | |
bec39cab | 14273 | |
a9322a30 TT |
14274 | # It does not; compile a test program. |
14275 | if test "$cross_compiling" = yes; then | |
14276 | # try to guess the endianness by grepping values into an object file | |
14277 | ac_cv_c_bigendian=unknown | |
14278 | cat >conftest.$ac_ext <<_ACEOF | |
14279 | /* confdefs.h. */ | |
7eb368b3 NR |
14280 | _ACEOF |
14281 | cat confdefs.h >>conftest.$ac_ext | |
14282 | cat >>conftest.$ac_ext <<_ACEOF | |
14283 | /* end confdefs.h. */ | |
a9322a30 TT |
14284 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
14285 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
14286 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
14287 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
14288 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
14289 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
7eb368b3 NR |
14290 | int |
14291 | main () | |
14292 | { | |
a9322a30 | 14293 | _ascii (); _ebcdic (); |
7eb368b3 NR |
14294 | ; |
14295 | return 0; | |
14296 | } | |
14297 | _ACEOF | |
a9322a30 TT |
14298 | rm -f conftest.$ac_objext |
14299 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
14300 | (eval $ac_compile) 2>conftest.er1 | |
7eb368b3 NR |
14301 | ac_status=$? |
14302 | grep -v '^ *+' conftest.er1 >conftest.err | |
14303 | rm -f conftest.er1 | |
14304 | cat conftest.err >&5 | |
14305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14306 | (exit $ac_status); } && | |
14307 | { ac_try='test -z "$ac_c_werror_flag" | |
14308 | || test ! -s conftest.err' | |
14309 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14310 | (eval $ac_try) 2>&5 | |
14311 | ac_status=$? | |
14312 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14313 | (exit $ac_status); }; } && | |
a9322a30 | 14314 | { ac_try='test -s conftest.$ac_objext' |
7eb368b3 NR |
14315 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14316 | (eval $ac_try) 2>&5 | |
14317 | ac_status=$? | |
14318 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14319 | (exit $ac_status); }; }; then | |
a9322a30 TT |
14320 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then |
14321 | ac_cv_c_bigendian=yes | |
14322 | fi | |
14323 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
14324 | if test "$ac_cv_c_bigendian" = unknown; then | |
14325 | ac_cv_c_bigendian=no | |
14326 | else | |
14327 | # finding both strings is unlikely to happen, but who knows? | |
14328 | ac_cv_c_bigendian=unknown | |
14329 | fi | |
14330 | fi | |
7eb368b3 NR |
14331 | else |
14332 | echo "$as_me: failed program was:" >&5 | |
14333 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14334 | ||
7eb368b3 | 14335 | fi |
a9322a30 | 14336 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bec39cab AC |
14337 | else |
14338 | cat >conftest.$ac_ext <<_ACEOF | |
14339 | /* confdefs.h. */ | |
14340 | _ACEOF | |
14341 | cat confdefs.h >>conftest.$ac_ext | |
14342 | cat >>conftest.$ac_ext <<_ACEOF | |
14343 | /* end confdefs.h. */ | |
d3ea6809 MM |
14344 | int |
14345 | main () | |
14346 | { | |
a9322a30 TT |
14347 | /* Are we little or big endian? From Harbison&Steele. */ |
14348 | union | |
14349 | { | |
14350 | long l; | |
14351 | char c[sizeof (long)]; | |
14352 | } u; | |
14353 | u.l = 1; | |
14354 | exit (u.c[sizeof (long) - 1] == 1); | |
d3ea6809 MM |
14355 | } |
14356 | _ACEOF | |
a9322a30 | 14357 | rm -f conftest$ac_exeext |
d3ea6809 | 14358 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
a9322a30 | 14359 | (eval $ac_link) 2>&5 |
d3ea6809 MM |
14360 | ac_status=$? |
14361 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 | 14362 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
d3ea6809 MM |
14363 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14364 | (eval $ac_try) 2>&5 | |
14365 | ac_status=$? | |
14366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14367 | (exit $ac_status); }; }; then | |
a9322a30 | 14368 | ac_cv_c_bigendian=no |
d3ea6809 | 14369 | else |
a9322a30 TT |
14370 | echo "$as_me: program exited with status $ac_status" >&5 |
14371 | echo "$as_me: failed program was:" >&5 | |
d3ea6809 MM |
14372 | sed 's/^/| /' conftest.$ac_ext >&5 |
14373 | ||
a9322a30 TT |
14374 | ( exit $ac_status ) |
14375 | ac_cv_c_bigendian=yes | |
d3ea6809 | 14376 | fi |
a9322a30 | 14377 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
d3ea6809 | 14378 | fi |
d3ea6809 | 14379 | fi |
a9322a30 TT |
14380 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
14381 | fi | |
14382 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 | |
14383 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
14384 | case $ac_cv_c_bigendian in | |
14385 | yes) | |
14386 | ||
14387 | cat >>confdefs.h <<\_ACEOF | |
14388 | #define WORDS_BIGENDIAN 1 | |
14389 | _ACEOF | |
14390 | ;; | |
14391 | no) | |
14392 | ;; | |
14393 | *) | |
14394 | { { echo "$as_me:$LINENO: error: unknown endianness | |
14395 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
14396 | echo "$as_me: error: unknown endianness | |
14397 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
14398 | { (exit 1); exit 1; }; } ;; | |
14399 | esac | |
d3ea6809 MM |
14400 | |
14401 | ||
a9322a30 TT |
14402 | # ------------------------------ # |
14403 | # Checks for library functions. # | |
14404 | # ------------------------------ # | |
d3ea6809 | 14405 | |
a9322a30 TT |
14406 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
14407 | # for constant arguments. Useless! | |
14408 | echo "$as_me:$LINENO: checking for working alloca.h" >&5 | |
14409 | echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 | |
14410 | if test "${ac_cv_working_alloca_h+set}" = set; then | |
d3ea6809 MM |
14411 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
14412 | else | |
14413 | cat >conftest.$ac_ext <<_ACEOF | |
14414 | /* confdefs.h. */ | |
14415 | _ACEOF | |
14416 | cat confdefs.h >>conftest.$ac_ext | |
14417 | cat >>conftest.$ac_ext <<_ACEOF | |
14418 | /* end confdefs.h. */ | |
a9322a30 | 14419 | #include <alloca.h> |
bec39cab AC |
14420 | int |
14421 | main () | |
14422 | { | |
a9322a30 | 14423 | char *p = (char *) alloca (2 * sizeof (int)); |
bec39cab AC |
14424 | ; |
14425 | return 0; | |
14426 | } | |
14427 | _ACEOF | |
14428 | rm -f conftest.$ac_objext conftest$ac_exeext | |
14429 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
14430 | (eval $ac_link) 2>conftest.er1 | |
14431 | ac_status=$? | |
14432 | grep -v '^ *+' conftest.er1 >conftest.err | |
14433 | rm -f conftest.er1 | |
14434 | cat conftest.err >&5 | |
14435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14436 | (exit $ac_status); } && | |
b4e70030 JB |
14437 | { ac_try='test -z "$ac_c_werror_flag" |
14438 | || test ! -s conftest.err' | |
bec39cab AC |
14439 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14440 | (eval $ac_try) 2>&5 | |
14441 | ac_status=$? | |
14442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14443 | (exit $ac_status); }; } && | |
14444 | { ac_try='test -s conftest$ac_exeext' | |
14445 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14446 | (eval $ac_try) 2>&5 | |
14447 | ac_status=$? | |
14448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14449 | (exit $ac_status); }; }; then | |
a9322a30 | 14450 | ac_cv_working_alloca_h=yes |
bec39cab AC |
14451 | else |
14452 | echo "$as_me: failed program was:" >&5 | |
14453 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14454 | ||
a9322a30 | 14455 | ac_cv_working_alloca_h=no |
bec39cab AC |
14456 | fi |
14457 | rm -f conftest.err conftest.$ac_objext \ | |
14458 | conftest$ac_exeext conftest.$ac_ext | |
14459 | fi | |
a9322a30 TT |
14460 | echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 |
14461 | echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 | |
14462 | if test $ac_cv_working_alloca_h = yes; then | |
14463 | ||
14464 | cat >>confdefs.h <<\_ACEOF | |
14465 | #define HAVE_ALLOCA_H 1 | |
bec39cab | 14466 | _ACEOF |
c906108c | 14467 | |
c906108c | 14468 | fi |
bec39cab | 14469 | |
a9322a30 TT |
14470 | echo "$as_me:$LINENO: checking for alloca" >&5 |
14471 | echo $ECHO_N "checking for alloca... $ECHO_C" >&6 | |
14472 | if test "${ac_cv_func_alloca_works+set}" = set; then | |
bec39cab AC |
14473 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
14474 | else | |
14475 | cat >conftest.$ac_ext <<_ACEOF | |
14476 | /* confdefs.h. */ | |
14477 | _ACEOF | |
14478 | cat confdefs.h >>conftest.$ac_ext | |
14479 | cat >>conftest.$ac_ext <<_ACEOF | |
14480 | /* end confdefs.h. */ | |
a9322a30 TT |
14481 | #ifdef __GNUC__ |
14482 | # define alloca __builtin_alloca | |
b4e70030 | 14483 | #else |
a9322a30 TT |
14484 | # ifdef _MSC_VER |
14485 | # include <malloc.h> | |
14486 | # define alloca _alloca | |
14487 | # else | |
14488 | # if HAVE_ALLOCA_H | |
14489 | # include <alloca.h> | |
14490 | # else | |
14491 | # ifdef _AIX | |
14492 | #pragma alloca | |
14493 | # else | |
14494 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
14495 | char *alloca (); | |
14496 | # endif | |
14497 | # endif | |
14498 | # endif | |
14499 | # endif | |
c906108c | 14500 | #endif |
97bf5e38 | 14501 | |
bec39cab AC |
14502 | int |
14503 | main () | |
14504 | { | |
a9322a30 | 14505 | char *p = (char *) alloca (1); |
bec39cab AC |
14506 | ; |
14507 | return 0; | |
14508 | } | |
14509 | _ACEOF | |
14510 | rm -f conftest.$ac_objext conftest$ac_exeext | |
14511 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
14512 | (eval $ac_link) 2>conftest.er1 | |
14513 | ac_status=$? | |
14514 | grep -v '^ *+' conftest.er1 >conftest.err | |
14515 | rm -f conftest.er1 | |
14516 | cat conftest.err >&5 | |
14517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14518 | (exit $ac_status); } && | |
b4e70030 JB |
14519 | { ac_try='test -z "$ac_c_werror_flag" |
14520 | || test ! -s conftest.err' | |
bec39cab AC |
14521 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14522 | (eval $ac_try) 2>&5 | |
14523 | ac_status=$? | |
14524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14525 | (exit $ac_status); }; } && | |
14526 | { ac_try='test -s conftest$ac_exeext' | |
14527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14528 | (eval $ac_try) 2>&5 | |
14529 | ac_status=$? | |
14530 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14531 | (exit $ac_status); }; }; then | |
a9322a30 | 14532 | ac_cv_func_alloca_works=yes |
bec39cab AC |
14533 | else |
14534 | echo "$as_me: failed program was:" >&5 | |
14535 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14536 | ||
a9322a30 | 14537 | ac_cv_func_alloca_works=no |
bec39cab AC |
14538 | fi |
14539 | rm -f conftest.err conftest.$ac_objext \ | |
14540 | conftest$ac_exeext conftest.$ac_ext | |
14541 | fi | |
a9322a30 TT |
14542 | echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 |
14543 | echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 | |
14544 | ||
14545 | if test $ac_cv_func_alloca_works = yes; then | |
14546 | ||
14547 | cat >>confdefs.h <<\_ACEOF | |
14548 | #define HAVE_ALLOCA 1 | |
bec39cab | 14549 | _ACEOF |
c906108c | 14550 | |
a9322a30 TT |
14551 | else |
14552 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
14553 | # that cause trouble. Some versions do not even contain alloca or | |
14554 | # contain a buggy version. If you still want to use their alloca, | |
14555 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
14556 | ||
14557 | ALLOCA=alloca.$ac_objext | |
14558 | ||
14559 | cat >>confdefs.h <<\_ACEOF | |
14560 | #define C_ALLOCA 1 | |
14561 | _ACEOF | |
c906108c | 14562 | |
bec39cab | 14563 | |
a9322a30 TT |
14564 | echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 |
14565 | echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 | |
14566 | if test "${ac_cv_os_cray+set}" = set; then | |
14567 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14568 | else | |
14569 | cat >conftest.$ac_ext <<_ACEOF | |
14570 | /* confdefs.h. */ | |
14571 | _ACEOF | |
14572 | cat confdefs.h >>conftest.$ac_ext | |
14573 | cat >>conftest.$ac_ext <<_ACEOF | |
14574 | /* end confdefs.h. */ | |
14575 | #if defined(CRAY) && ! defined(CRAY2) | |
14576 | webecray | |
14577 | #else | |
14578 | wenotbecray | |
14579 | #endif | |
14580 | ||
14581 | _ACEOF | |
14582 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
14583 | $EGREP "webecray" >/dev/null 2>&1; then | |
14584 | ac_cv_os_cray=yes | |
14585 | else | |
14586 | ac_cv_os_cray=no | |
14587 | fi | |
14588 | rm -f conftest* | |
14589 | ||
14590 | fi | |
14591 | echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 | |
14592 | echo "${ECHO_T}$ac_cv_os_cray" >&6 | |
14593 | if test $ac_cv_os_cray = yes; then | |
14594 | for ac_func in _getb67 GETB67 getb67; do | |
14595 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
b4e70030 JB |
14596 | echo "$as_me:$LINENO: checking for $ac_func" >&5 |
14597 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
14598 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
bec39cab AC |
14599 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
14600 | else | |
14601 | cat >conftest.$ac_ext <<_ACEOF | |
14602 | /* confdefs.h. */ | |
14603 | _ACEOF | |
14604 | cat confdefs.h >>conftest.$ac_ext | |
14605 | cat >>conftest.$ac_ext <<_ACEOF | |
14606 | /* end confdefs.h. */ | |
14607 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
14608 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
14609 | #define $ac_func innocuous_$ac_func | |
14610 | ||
97bf5e38 | 14611 | /* System header to define __stub macros and hopefully few prototypes, |
bec39cab AC |
14612 | which can conflict with char $ac_func (); below. |
14613 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
14614 | <limits.h> exists even on freestanding compilers. */ | |
14615 | ||
14616 | #ifdef __STDC__ | |
14617 | # include <limits.h> | |
14618 | #else | |
14619 | # include <assert.h> | |
14620 | #endif | |
c906108c | 14621 | |
bec39cab | 14622 | #undef $ac_func |
97bf5e38 | 14623 | |
b4e70030 | 14624 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
14625 | #ifdef __cplusplus |
14626 | extern "C" | |
b4e70030 | 14627 | { |
bec39cab | 14628 | #endif |
b4e70030 JB |
14629 | /* We use char because int might match the return type of a gcc2 |
14630 | builtin and then its argument prototype would still apply. */ | |
bec39cab | 14631 | char $ac_func (); |
97bf5e38 MK |
14632 | /* The GNU C library defines this for functions which it implements |
14633 | to always fail with ENOSYS. Some functions are actually named | |
14634 | something starting with __ and the normal name is an alias. */ | |
b4e70030 | 14635 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
97bf5e38 | 14636 | choke me |
b4e70030 JB |
14637 | #else |
14638 | char (*f) () = $ac_func; | |
14639 | #endif | |
14640 | #ifdef __cplusplus | |
14641 | } | |
c906108c | 14642 | #endif |
97bf5e38 | 14643 | |
bec39cab AC |
14644 | int |
14645 | main () | |
14646 | { | |
b4e70030 | 14647 | return f != $ac_func; |
bec39cab AC |
14648 | ; |
14649 | return 0; | |
14650 | } | |
14651 | _ACEOF | |
14652 | rm -f conftest.$ac_objext conftest$ac_exeext | |
14653 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
14654 | (eval $ac_link) 2>conftest.er1 | |
14655 | ac_status=$? | |
14656 | grep -v '^ *+' conftest.er1 >conftest.err | |
14657 | rm -f conftest.er1 | |
14658 | cat conftest.err >&5 | |
14659 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14660 | (exit $ac_status); } && | |
b4e70030 JB |
14661 | { ac_try='test -z "$ac_c_werror_flag" |
14662 | || test ! -s conftest.err' | |
bec39cab AC |
14663 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14664 | (eval $ac_try) 2>&5 | |
14665 | ac_status=$? | |
14666 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14667 | (exit $ac_status); }; } && | |
14668 | { ac_try='test -s conftest$ac_exeext' | |
14669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14670 | (eval $ac_try) 2>&5 | |
14671 | ac_status=$? | |
14672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14673 | (exit $ac_status); }; }; then | |
14674 | eval "$as_ac_var=yes" | |
14675 | else | |
14676 | echo "$as_me: failed program was:" >&5 | |
14677 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14678 | ||
b4e70030 | 14679 | eval "$as_ac_var=no" |
bec39cab AC |
14680 | fi |
14681 | rm -f conftest.err conftest.$ac_objext \ | |
14682 | conftest$ac_exeext conftest.$ac_ext | |
14683 | fi | |
b4e70030 JB |
14684 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 |
14685 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
bec39cab | 14686 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
a9322a30 TT |
14687 | |
14688 | cat >>confdefs.h <<_ACEOF | |
14689 | #define CRAY_STACKSEG_END $ac_func | |
bec39cab | 14690 | _ACEOF |
c906108c | 14691 | |
a9322a30 | 14692 | break |
c906108c SS |
14693 | fi |
14694 | ||
a9322a30 TT |
14695 | done |
14696 | fi | |
bec39cab | 14697 | |
a9322a30 TT |
14698 | echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 |
14699 | echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 | |
14700 | if test "${ac_cv_c_stack_direction+set}" = set; then | |
bec39cab | 14701 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
a9322a30 TT |
14702 | else |
14703 | if test "$cross_compiling" = yes; then | |
14704 | ac_cv_c_stack_direction=0 | |
bec39cab AC |
14705 | else |
14706 | cat >conftest.$ac_ext <<_ACEOF | |
14707 | /* confdefs.h. */ | |
14708 | _ACEOF | |
14709 | cat confdefs.h >>conftest.$ac_ext | |
14710 | cat >>conftest.$ac_ext <<_ACEOF | |
14711 | /* end confdefs.h. */ | |
a9322a30 TT |
14712 | int |
14713 | find_stack_direction () | |
b4e70030 | 14714 | { |
a9322a30 TT |
14715 | static char *addr = 0; |
14716 | auto char dummy; | |
14717 | if (addr == 0) | |
14718 | { | |
14719 | addr = &dummy; | |
14720 | return find_stack_direction (); | |
14721 | } | |
14722 | else | |
14723 | return (&dummy > addr) ? 1 : -1; | |
b4e70030 | 14724 | } |
b757528f | 14725 | |
bec39cab AC |
14726 | int |
14727 | main () | |
14728 | { | |
a9322a30 | 14729 | exit (find_stack_direction () < 0); |
bec39cab AC |
14730 | } |
14731 | _ACEOF | |
a9322a30 | 14732 | rm -f conftest$ac_exeext |
bec39cab | 14733 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
a9322a30 TT |
14734 | (eval $ac_link) 2>&5 |
14735 | ac_status=$? | |
14736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14737 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
14738 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14739 | (eval $ac_try) 2>&5 | |
14740 | ac_status=$? | |
14741 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14742 | (exit $ac_status); }; }; then | |
14743 | ac_cv_c_stack_direction=1 | |
14744 | else | |
14745 | echo "$as_me: program exited with status $ac_status" >&5 | |
14746 | echo "$as_me: failed program was:" >&5 | |
14747 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14748 | ||
14749 | ( exit $ac_status ) | |
14750 | ac_cv_c_stack_direction=-1 | |
14751 | fi | |
14752 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
14753 | fi | |
14754 | fi | |
14755 | echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 | |
14756 | echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 | |
14757 | ||
14758 | cat >>confdefs.h <<_ACEOF | |
14759 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
14760 | _ACEOF | |
14761 | ||
14762 | ||
14763 | fi | |
14764 | ||
14765 | ||
14766 | ||
14767 | for ac_header in stdlib.h unistd.h | |
14768 | do | |
14769 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
14770 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
14771 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
14772 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
14773 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
14774 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14775 | fi | |
14776 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
14777 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
14778 | else | |
14779 | # Is the header compilable? | |
14780 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
14781 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
14782 | cat >conftest.$ac_ext <<_ACEOF | |
14783 | /* confdefs.h. */ | |
14784 | _ACEOF | |
14785 | cat confdefs.h >>conftest.$ac_ext | |
14786 | cat >>conftest.$ac_ext <<_ACEOF | |
14787 | /* end confdefs.h. */ | |
14788 | $ac_includes_default | |
14789 | #include <$ac_header> | |
14790 | _ACEOF | |
14791 | rm -f conftest.$ac_objext | |
14792 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
14793 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
14794 | ac_status=$? |
14795 | grep -v '^ *+' conftest.er1 >conftest.err | |
14796 | rm -f conftest.er1 | |
14797 | cat conftest.err >&5 | |
14798 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14799 | (exit $ac_status); } && | |
b4e70030 JB |
14800 | { ac_try='test -z "$ac_c_werror_flag" |
14801 | || test ! -s conftest.err' | |
bec39cab AC |
14802 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14803 | (eval $ac_try) 2>&5 | |
14804 | ac_status=$? | |
14805 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14806 | (exit $ac_status); }; } && | |
a9322a30 | 14807 | { ac_try='test -s conftest.$ac_objext' |
bec39cab AC |
14808 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14809 | (eval $ac_try) 2>&5 | |
14810 | ac_status=$? | |
14811 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14812 | (exit $ac_status); }; }; then | |
a9322a30 TT |
14813 | ac_header_compiler=yes |
14814 | else | |
14815 | echo "$as_me: failed program was:" >&5 | |
14816 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14817 | ||
14818 | ac_header_compiler=no | |
14819 | fi | |
14820 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
14821 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
14822 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
14823 | ||
14824 | # Is the header present? | |
14825 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
14826 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
14827 | cat >conftest.$ac_ext <<_ACEOF | |
14828 | /* confdefs.h. */ | |
14829 | _ACEOF | |
14830 | cat confdefs.h >>conftest.$ac_ext | |
14831 | cat >>conftest.$ac_ext <<_ACEOF | |
14832 | /* end confdefs.h. */ | |
14833 | #include <$ac_header> | |
14834 | _ACEOF | |
14835 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
14836 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
14837 | ac_status=$? | |
14838 | grep -v '^ *+' conftest.er1 >conftest.err | |
14839 | rm -f conftest.er1 | |
14840 | cat conftest.err >&5 | |
14841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14842 | (exit $ac_status); } >/dev/null; then | |
14843 | if test -s conftest.err; then | |
14844 | ac_cpp_err=$ac_c_preproc_warn_flag | |
14845 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
14846 | else | |
14847 | ac_cpp_err= | |
14848 | fi | |
14849 | else | |
14850 | ac_cpp_err=yes | |
14851 | fi | |
14852 | if test -z "$ac_cpp_err"; then | |
14853 | ac_header_preproc=yes | |
bec39cab AC |
14854 | else |
14855 | echo "$as_me: failed program was:" >&5 | |
14856 | sed 's/^/| /' conftest.$ac_ext >&5 | |
14857 | ||
a9322a30 TT |
14858 | ac_header_preproc=no |
14859 | fi | |
14860 | rm -f conftest.err conftest.$ac_ext | |
14861 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
14862 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
14863 | ||
14864 | # So? What about this header? | |
14865 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
14866 | yes:no: ) | |
14867 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
14868 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
14869 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
14870 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
14871 | ac_header_preproc=yes | |
14872 | ;; | |
14873 | no:yes:* ) | |
14874 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
14875 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
14876 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
14877 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
14878 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
14879 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
14880 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
14881 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
14882 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
14883 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
14884 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
14885 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
14886 | ( | |
14887 | cat <<\_ASBOX | |
14888 | ## ------------------------------------------ ## | |
14889 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
14890 | ## ------------------------------------------ ## | |
14891 | _ASBOX | |
14892 | ) | | |
14893 | sed "s/^/$as_me: WARNING: /" >&2 | |
14894 | ;; | |
14895 | esac | |
14896 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
14897 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
14898 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
14899 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14900 | else | |
14901 | eval "$as_ac_Header=\$ac_header_preproc" | |
bec39cab | 14902 | fi |
a9322a30 TT |
14903 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
14904 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
14905 | ||
bec39cab | 14906 | fi |
a9322a30 | 14907 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
bec39cab | 14908 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 14909 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 14910 | _ACEOF |
b757528f | 14911 | |
b757528f | 14912 | fi |
bec39cab | 14913 | |
a9322a30 | 14914 | done |
a3828db0 | 14915 | |
83116857 | 14916 | |
a9322a30 | 14917 | for ac_func in getpagesize |
bcb3dc3d | 14918 | do |
bec39cab | 14919 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
b4e70030 JB |
14920 | echo "$as_me:$LINENO: checking for $ac_func" >&5 |
14921 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
14922 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
bec39cab AC |
14923 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
14924 | else | |
14925 | cat >conftest.$ac_ext <<_ACEOF | |
14926 | /* confdefs.h. */ | |
14927 | _ACEOF | |
14928 | cat confdefs.h >>conftest.$ac_ext | |
14929 | cat >>conftest.$ac_ext <<_ACEOF | |
14930 | /* end confdefs.h. */ | |
14931 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
14932 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
14933 | #define $ac_func innocuous_$ac_func | |
14934 | ||
bcb3dc3d | 14935 | /* System header to define __stub macros and hopefully few prototypes, |
bec39cab AC |
14936 | which can conflict with char $ac_func (); below. |
14937 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
14938 | <limits.h> exists even on freestanding compilers. */ | |
14939 | ||
14940 | #ifdef __STDC__ | |
14941 | # include <limits.h> | |
14942 | #else | |
14943 | # include <assert.h> | |
14944 | #endif | |
bcb3dc3d | 14945 | |
bec39cab | 14946 | #undef $ac_func |
bcb3dc3d | 14947 | |
b4e70030 | 14948 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
14949 | #ifdef __cplusplus |
14950 | extern "C" | |
b4e70030 | 14951 | { |
bec39cab | 14952 | #endif |
b4e70030 JB |
14953 | /* We use char because int might match the return type of a gcc2 |
14954 | builtin and then its argument prototype would still apply. */ | |
bec39cab | 14955 | char $ac_func (); |
bcb3dc3d MK |
14956 | /* The GNU C library defines this for functions which it implements |
14957 | to always fail with ENOSYS. Some functions are actually named | |
14958 | something starting with __ and the normal name is an alias. */ | |
b4e70030 | 14959 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
bcb3dc3d | 14960 | choke me |
b4e70030 JB |
14961 | #else |
14962 | char (*f) () = $ac_func; | |
14963 | #endif | |
14964 | #ifdef __cplusplus | |
14965 | } | |
bcb3dc3d MK |
14966 | #endif |
14967 | ||
bec39cab AC |
14968 | int |
14969 | main () | |
14970 | { | |
b4e70030 | 14971 | return f != $ac_func; |
bec39cab AC |
14972 | ; |
14973 | return 0; | |
14974 | } | |
14975 | _ACEOF | |
14976 | rm -f conftest.$ac_objext conftest$ac_exeext | |
14977 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
14978 | (eval $ac_link) 2>conftest.er1 | |
14979 | ac_status=$? | |
14980 | grep -v '^ *+' conftest.er1 >conftest.err | |
14981 | rm -f conftest.er1 | |
14982 | cat conftest.err >&5 | |
14983 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14984 | (exit $ac_status); } && | |
b4e70030 JB |
14985 | { ac_try='test -z "$ac_c_werror_flag" |
14986 | || test ! -s conftest.err' | |
bec39cab AC |
14987 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14988 | (eval $ac_try) 2>&5 | |
14989 | ac_status=$? | |
14990 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14991 | (exit $ac_status); }; } && | |
14992 | { ac_try='test -s conftest$ac_exeext' | |
14993 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14994 | (eval $ac_try) 2>&5 | |
14995 | ac_status=$? | |
14996 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14997 | (exit $ac_status); }; }; then | |
14998 | eval "$as_ac_var=yes" | |
14999 | else | |
15000 | echo "$as_me: failed program was:" >&5 | |
15001 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15002 | ||
b4e70030 | 15003 | eval "$as_ac_var=no" |
bec39cab AC |
15004 | fi |
15005 | rm -f conftest.err conftest.$ac_objext \ | |
15006 | conftest$ac_exeext conftest.$ac_ext | |
15007 | fi | |
b4e70030 JB |
15008 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 |
15009 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
bec39cab AC |
15010 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
15011 | cat >>confdefs.h <<_ACEOF | |
15012 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15013 | _ACEOF | |
bcb3dc3d | 15014 | |
bcb3dc3d MK |
15015 | fi |
15016 | done | |
15017 | ||
a9322a30 TT |
15018 | echo "$as_me:$LINENO: checking for working mmap" >&5 |
15019 | echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 | |
15020 | if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then | |
bec39cab | 15021 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
a9322a30 TT |
15022 | else |
15023 | if test "$cross_compiling" = yes; then | |
15024 | ac_cv_func_mmap_fixed_mapped=no | |
bec39cab AC |
15025 | else |
15026 | cat >conftest.$ac_ext <<_ACEOF | |
15027 | /* confdefs.h. */ | |
15028 | _ACEOF | |
15029 | cat confdefs.h >>conftest.$ac_ext | |
15030 | cat >>conftest.$ac_ext <<_ACEOF | |
15031 | /* end confdefs.h. */ | |
a9322a30 TT |
15032 | $ac_includes_default |
15033 | /* malloc might have been renamed as rpl_malloc. */ | |
15034 | #undef malloc | |
bec39cab | 15035 | |
a9322a30 TT |
15036 | /* Thanks to Mike Haertel and Jim Avera for this test. |
15037 | Here is a matrix of mmap possibilities: | |
15038 | mmap private not fixed | |
15039 | mmap private fixed at somewhere currently unmapped | |
15040 | mmap private fixed at somewhere already mapped | |
15041 | mmap shared not fixed | |
15042 | mmap shared fixed at somewhere currently unmapped | |
15043 | mmap shared fixed at somewhere already mapped | |
15044 | For private mappings, we should verify that changes cannot be read() | |
15045 | back from the file, nor mmap's back from the file at a different | |
15046 | address. (There have been systems where private was not correctly | |
15047 | implemented like the infamous i386 svr4.0, and systems where the | |
15048 | VM page cache was not coherent with the file system buffer cache | |
15049 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
15050 | For shared mappings, we should conversely verify that changes get | |
15051 | propagated back to all the places they're supposed to be. | |
bec39cab | 15052 | |
a9322a30 TT |
15053 | Grep wants private fixed already mapped. |
15054 | The main things grep needs to know about mmap are: | |
15055 | * does it exist and is it safe to write into the mmap'd area | |
15056 | * how to use it (BSD variants) */ | |
8b9cf735 | 15057 | |
a9322a30 TT |
15058 | #include <fcntl.h> |
15059 | #include <sys/mman.h> | |
8b9cf735 | 15060 | |
a9322a30 TT |
15061 | #if !STDC_HEADERS && !HAVE_STDLIB_H |
15062 | char *malloc (); | |
a3828db0 MK |
15063 | #endif |
15064 | ||
a9322a30 TT |
15065 | /* This mess was copied from the GNU getpagesize.h. */ |
15066 | #if !HAVE_GETPAGESIZE | |
15067 | /* Assume that all systems that can run configure have sys/param.h. */ | |
15068 | # if !HAVE_SYS_PARAM_H | |
15069 | # define HAVE_SYS_PARAM_H 1 | |
15070 | # endif | |
15071 | ||
15072 | # ifdef _SC_PAGESIZE | |
15073 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
15074 | # else /* no _SC_PAGESIZE */ | |
15075 | # if HAVE_SYS_PARAM_H | |
15076 | # include <sys/param.h> | |
15077 | # ifdef EXEC_PAGESIZE | |
15078 | # define getpagesize() EXEC_PAGESIZE | |
15079 | # else /* no EXEC_PAGESIZE */ | |
15080 | # ifdef NBPG | |
15081 | # define getpagesize() NBPG * CLSIZE | |
15082 | # ifndef CLSIZE | |
15083 | # define CLSIZE 1 | |
15084 | # endif /* no CLSIZE */ | |
15085 | # else /* no NBPG */ | |
15086 | # ifdef NBPC | |
15087 | # define getpagesize() NBPC | |
15088 | # else /* no NBPC */ | |
15089 | # ifdef PAGESIZE | |
15090 | # define getpagesize() PAGESIZE | |
15091 | # endif /* PAGESIZE */ | |
15092 | # endif /* no NBPC */ | |
15093 | # endif /* no NBPG */ | |
15094 | # endif /* no EXEC_PAGESIZE */ | |
15095 | # else /* no HAVE_SYS_PARAM_H */ | |
15096 | # define getpagesize() 8192 /* punt totally */ | |
15097 | # endif /* no HAVE_SYS_PARAM_H */ | |
15098 | # endif /* no _SC_PAGESIZE */ | |
15099 | ||
15100 | #endif /* no HAVE_GETPAGESIZE */ | |
15101 | ||
bec39cab AC |
15102 | int |
15103 | main () | |
15104 | { | |
a9322a30 TT |
15105 | char *data, *data2, *data3; |
15106 | int i, pagesize; | |
15107 | int fd; | |
15108 | ||
15109 | pagesize = getpagesize (); | |
15110 | ||
15111 | /* First, make a file with some known garbage in it. */ | |
15112 | data = (char *) malloc (pagesize); | |
15113 | if (!data) | |
15114 | exit (1); | |
15115 | for (i = 0; i < pagesize; ++i) | |
15116 | *(data + i) = rand (); | |
15117 | umask (0); | |
15118 | fd = creat ("conftest.mmap", 0600); | |
15119 | if (fd < 0) | |
15120 | exit (1); | |
15121 | if (write (fd, data, pagesize) != pagesize) | |
15122 | exit (1); | |
15123 | close (fd); | |
15124 | ||
15125 | /* Next, try to mmap the file at a fixed address which already has | |
15126 | something else allocated at it. If we can, also make sure that | |
15127 | we see the same garbage. */ | |
15128 | fd = open ("conftest.mmap", O_RDWR); | |
15129 | if (fd < 0) | |
15130 | exit (1); | |
15131 | data2 = (char *) malloc (2 * pagesize); | |
15132 | if (!data2) | |
15133 | exit (1); | |
15134 | data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); | |
15135 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
15136 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
15137 | exit (1); | |
15138 | for (i = 0; i < pagesize; ++i) | |
15139 | if (*(data + i) != *(data2 + i)) | |
15140 | exit (1); | |
15141 | ||
15142 | /* Finally, make sure that changes to the mapped area do not | |
15143 | percolate back to the file as seen by read(). (This is a bug on | |
15144 | some variants of i386 svr4.0.) */ | |
15145 | for (i = 0; i < pagesize; ++i) | |
15146 | *(data2 + i) = *(data2 + i) + 1; | |
15147 | data3 = (char *) malloc (pagesize); | |
15148 | if (!data3) | |
15149 | exit (1); | |
15150 | if (read (fd, data3, pagesize) != pagesize) | |
15151 | exit (1); | |
15152 | for (i = 0; i < pagesize; ++i) | |
15153 | if (*(data + i) != *(data3 + i)) | |
15154 | exit (1); | |
15155 | close (fd); | |
15156 | exit (0); | |
bec39cab AC |
15157 | } |
15158 | _ACEOF | |
a9322a30 | 15159 | rm -f conftest$ac_exeext |
a3828db0 | 15160 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
a9322a30 | 15161 | (eval $ac_link) 2>&5 |
bec39cab AC |
15162 | ac_status=$? |
15163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a9322a30 | 15164 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
bec39cab AC |
15165 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15166 | (eval $ac_try) 2>&5 | |
15167 | ac_status=$? | |
15168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15169 | (exit $ac_status); }; }; then | |
a9322a30 | 15170 | ac_cv_func_mmap_fixed_mapped=yes |
086ec9eb | 15171 | else |
a9322a30 TT |
15172 | echo "$as_me: program exited with status $ac_status" >&5 |
15173 | echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
15174 | sed 's/^/| /' conftest.$ac_ext >&5 |
15175 | ||
a9322a30 TT |
15176 | ( exit $ac_status ) |
15177 | ac_cv_func_mmap_fixed_mapped=no | |
a3828db0 | 15178 | fi |
a9322a30 | 15179 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
a3828db0 | 15180 | fi |
a9322a30 TT |
15181 | fi |
15182 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
15183 | echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 | |
15184 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
15185 | ||
15186 | cat >>confdefs.h <<\_ACEOF | |
15187 | #define HAVE_MMAP 1 | |
a3828db0 MK |
15188 | _ACEOF |
15189 | ||
086ec9eb | 15190 | fi |
a9322a30 | 15191 | rm -f conftest.mmap |
a3828db0 | 15192 | |
a9322a30 TT |
15193 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
15194 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
15195 | if test "${ac_cv_type_pid_t+set}" = set; then | |
a3828db0 MK |
15196 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
15197 | else | |
15198 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
15199 | /* confdefs.h. */ |
15200 | _ACEOF | |
15201 | cat confdefs.h >>conftest.$ac_ext | |
15202 | cat >>conftest.$ac_ext <<_ACEOF | |
15203 | /* end confdefs.h. */ | |
a9322a30 | 15204 | $ac_includes_default |
bec39cab AC |
15205 | int |
15206 | main () | |
15207 | { | |
a9322a30 TT |
15208 | if ((pid_t *) 0) |
15209 | return 0; | |
15210 | if (sizeof (pid_t)) | |
15211 | return 0; | |
bec39cab AC |
15212 | ; |
15213 | return 0; | |
15214 | } | |
15215 | _ACEOF | |
a9322a30 TT |
15216 | rm -f conftest.$ac_objext |
15217 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
15218 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab AC |
15219 | ac_status=$? |
15220 | grep -v '^ *+' conftest.er1 >conftest.err | |
15221 | rm -f conftest.er1 | |
15222 | cat conftest.err >&5 | |
15223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15224 | (exit $ac_status); } && | |
b4e70030 JB |
15225 | { ac_try='test -z "$ac_c_werror_flag" |
15226 | || test ! -s conftest.err' | |
bec39cab AC |
15227 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15228 | (eval $ac_try) 2>&5 | |
15229 | ac_status=$? | |
15230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15231 | (exit $ac_status); }; } && | |
a9322a30 | 15232 | { ac_try='test -s conftest.$ac_objext' |
bec39cab AC |
15233 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15234 | (eval $ac_try) 2>&5 | |
15235 | ac_status=$? | |
15236 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15237 | (exit $ac_status); }; }; then | |
a9322a30 | 15238 | ac_cv_type_pid_t=yes |
086ec9eb | 15239 | else |
bec39cab AC |
15240 | echo "$as_me: failed program was:" >&5 |
15241 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15242 | ||
a9322a30 | 15243 | ac_cv_type_pid_t=no |
086ec9eb | 15244 | fi |
a9322a30 | 15245 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
086ec9eb | 15246 | fi |
a9322a30 TT |
15247 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
15248 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
15249 | if test $ac_cv_type_pid_t = yes; then | |
15250 | : | |
15251 | else | |
15252 | ||
15253 | cat >>confdefs.h <<_ACEOF | |
15254 | #define pid_t int | |
bec39cab | 15255 | _ACEOF |
086ec9eb MK |
15256 | |
15257 | fi | |
15258 | ||
a3828db0 | 15259 | |
a9322a30 TT |
15260 | |
15261 | for ac_header in unistd.h vfork.h | |
a3828db0 | 15262 | do |
a9322a30 TT |
15263 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
15264 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
15265 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
15266 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
15267 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bec39cab | 15268 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
a9322a30 TT |
15269 | fi |
15270 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
15271 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bec39cab | 15272 | else |
a9322a30 TT |
15273 | # Is the header compilable? |
15274 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
15275 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
15276 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
15277 | /* confdefs.h. */ |
15278 | _ACEOF | |
15279 | cat confdefs.h >>conftest.$ac_ext | |
15280 | cat >>conftest.$ac_ext <<_ACEOF | |
15281 | /* end confdefs.h. */ | |
a9322a30 TT |
15282 | $ac_includes_default |
15283 | #include <$ac_header> | |
bec39cab | 15284 | _ACEOF |
a9322a30 TT |
15285 | rm -f conftest.$ac_objext |
15286 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
15287 | (eval $ac_compile) 2>conftest.er1 | |
bec39cab | 15288 | ac_status=$? |
a3828db0 MK |
15289 | grep -v '^ *+' conftest.er1 >conftest.err |
15290 | rm -f conftest.er1 | |
15291 | cat conftest.err >&5 | |
bec39cab | 15292 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
a3828db0 | 15293 | (exit $ac_status); } && |
b4e70030 JB |
15294 | { ac_try='test -z "$ac_c_werror_flag" |
15295 | || test ! -s conftest.err' | |
a3828db0 MK |
15296 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15297 | (eval $ac_try) 2>&5 | |
15298 | ac_status=$? | |
15299 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15300 | (exit $ac_status); }; } && | |
a9322a30 | 15301 | { ac_try='test -s conftest.$ac_objext' |
bec39cab AC |
15302 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15303 | (eval $ac_try) 2>&5 | |
15304 | ac_status=$? | |
15305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15306 | (exit $ac_status); }; }; then | |
a9322a30 | 15307 | ac_header_compiler=yes |
c906108c | 15308 | else |
a3828db0 | 15309 | echo "$as_me: failed program was:" >&5 |
bec39cab AC |
15310 | sed 's/^/| /' conftest.$ac_ext >&5 |
15311 | ||
a9322a30 | 15312 | ac_header_compiler=no |
97bf5e38 | 15313 | fi |
a9322a30 TT |
15314 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
15315 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
15316 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
15317 | ||
15318 | # Is the header present? | |
15319 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
15320 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
15321 | cat >conftest.$ac_ext <<_ACEOF | |
15322 | /* confdefs.h. */ | |
15323 | _ACEOF | |
15324 | cat confdefs.h >>conftest.$ac_ext | |
15325 | cat >>conftest.$ac_ext <<_ACEOF | |
15326 | /* end confdefs.h. */ | |
15327 | #include <$ac_header> | |
15328 | _ACEOF | |
15329 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
15330 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
15331 | ac_status=$? | |
15332 | grep -v '^ *+' conftest.er1 >conftest.err | |
15333 | rm -f conftest.er1 | |
15334 | cat conftest.err >&5 | |
15335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15336 | (exit $ac_status); } >/dev/null; then | |
15337 | if test -s conftest.err; then | |
15338 | ac_cpp_err=$ac_c_preproc_warn_flag | |
15339 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
15340 | else | |
15341 | ac_cpp_err= | |
15342 | fi | |
15343 | else | |
15344 | ac_cpp_err=yes | |
a3828db0 | 15345 | fi |
a9322a30 TT |
15346 | if test -z "$ac_cpp_err"; then |
15347 | ac_header_preproc=yes | |
15348 | else | |
15349 | echo "$as_me: failed program was:" >&5 | |
15350 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15351 | ||
15352 | ac_header_preproc=no | |
15353 | fi | |
15354 | rm -f conftest.err conftest.$ac_ext | |
15355 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
15356 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
15357 | ||
15358 | # So? What about this header? | |
15359 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
15360 | yes:no: ) | |
15361 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
15362 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
15363 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
15364 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
15365 | ac_header_preproc=yes | |
15366 | ;; | |
15367 | no:yes:* ) | |
15368 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
15369 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
15370 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
15371 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
15372 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
15373 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
15374 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
15375 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
15376 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
15377 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
15378 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
15379 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
15380 | ( | |
15381 | cat <<\_ASBOX | |
15382 | ## ------------------------------------------ ## | |
15383 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
15384 | ## ------------------------------------------ ## | |
15385 | _ASBOX | |
15386 | ) | | |
15387 | sed "s/^/$as_me: WARNING: /" >&2 | |
15388 | ;; | |
15389 | esac | |
15390 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
15391 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
15392 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
15393 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15394 | else | |
15395 | eval "$as_ac_Header=\$ac_header_preproc" | |
15396 | fi | |
15397 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
15398 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
15399 | ||
15400 | fi | |
15401 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
a3828db0 | 15402 | cat >>confdefs.h <<_ACEOF |
a9322a30 | 15403 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
bec39cab | 15404 | _ACEOF |
c906108c SS |
15405 | |
15406 | fi | |
a9322a30 | 15407 | |
a3828db0 | 15408 | done |
c906108c | 15409 | |
a3828db0 | 15410 | |
a9322a30 TT |
15411 | |
15412 | for ac_func in fork vfork | |
a3828db0 MK |
15413 | do |
15414 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
b4e70030 JB |
15415 | echo "$as_me:$LINENO: checking for $ac_func" >&5 |
15416 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
15417 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
bec39cab | 15418 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
b83266a0 | 15419 | else |
bec39cab AC |
15420 | cat >conftest.$ac_ext <<_ACEOF |
15421 | /* confdefs.h. */ | |
15422 | _ACEOF | |
15423 | cat confdefs.h >>conftest.$ac_ext | |
15424 | cat >>conftest.$ac_ext <<_ACEOF | |
15425 | /* end confdefs.h. */ | |
a3828db0 MK |
15426 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
15427 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
15428 | #define $ac_func innocuous_$ac_func | |
b83266a0 | 15429 | |
a3828db0 MK |
15430 | /* System header to define __stub macros and hopefully few prototypes, |
15431 | which can conflict with char $ac_func (); below. | |
15432 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
15433 | <limits.h> exists even on freestanding compilers. */ | |
15434 | ||
15435 | #ifdef __STDC__ | |
15436 | # include <limits.h> | |
15437 | #else | |
15438 | # include <assert.h> | |
15439 | #endif | |
15440 | ||
15441 | #undef $ac_func | |
15442 | ||
b4e70030 | 15443 | /* Override any gcc2 internal prototype to avoid an error. */ |
a3828db0 MK |
15444 | #ifdef __cplusplus |
15445 | extern "C" | |
b4e70030 | 15446 | { |
a3828db0 | 15447 | #endif |
b4e70030 JB |
15448 | /* We use char because int might match the return type of a gcc2 |
15449 | builtin and then its argument prototype would still apply. */ | |
a3828db0 MK |
15450 | char $ac_func (); |
15451 | /* The GNU C library defines this for functions which it implements | |
15452 | to always fail with ENOSYS. Some functions are actually named | |
15453 | something starting with __ and the normal name is an alias. */ | |
b4e70030 | 15454 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
a3828db0 | 15455 | choke me |
b4e70030 JB |
15456 | #else |
15457 | char (*f) () = $ac_func; | |
15458 | #endif | |
15459 | #ifdef __cplusplus | |
15460 | } | |
a3828db0 | 15461 | #endif |
97bf5e38 | 15462 | |
bec39cab AC |
15463 | int |
15464 | main () | |
15465 | { | |
b4e70030 | 15466 | return f != $ac_func; |
bec39cab AC |
15467 | ; |
15468 | return 0; | |
15469 | } | |
15470 | _ACEOF | |
a3828db0 MK |
15471 | rm -f conftest.$ac_objext conftest$ac_exeext |
15472 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
15473 | (eval $ac_link) 2>conftest.er1 | |
bec39cab AC |
15474 | ac_status=$? |
15475 | grep -v '^ *+' conftest.er1 >conftest.err | |
15476 | rm -f conftest.er1 | |
15477 | cat conftest.err >&5 | |
15478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15479 | (exit $ac_status); } && | |
b4e70030 JB |
15480 | { ac_try='test -z "$ac_c_werror_flag" |
15481 | || test ! -s conftest.err' | |
bec39cab AC |
15482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15483 | (eval $ac_try) 2>&5 | |
15484 | ac_status=$? | |
15485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15486 | (exit $ac_status); }; } && | |
a3828db0 | 15487 | { ac_try='test -s conftest$ac_exeext' |
bec39cab AC |
15488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15489 | (eval $ac_try) 2>&5 | |
15490 | ac_status=$? | |
15491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15492 | (exit $ac_status); }; }; then | |
a3828db0 | 15493 | eval "$as_ac_var=yes" |
b83266a0 | 15494 | else |
bec39cab AC |
15495 | echo "$as_me: failed program was:" >&5 |
15496 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15497 | ||
b4e70030 | 15498 | eval "$as_ac_var=no" |
b83266a0 | 15499 | fi |
a3828db0 MK |
15500 | rm -f conftest.err conftest.$ac_objext \ |
15501 | conftest$ac_exeext conftest.$ac_ext | |
b83266a0 | 15502 | fi |
b4e70030 JB |
15503 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 |
15504 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
a3828db0 MK |
15505 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
15506 | cat >>confdefs.h <<_ACEOF | |
15507 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
bec39cab | 15508 | _ACEOF |
b83266a0 | 15509 | |
97bf5e38 | 15510 | fi |
a3828db0 | 15511 | done |
b83266a0 | 15512 | |
a9322a30 TT |
15513 | if test "x$ac_cv_func_fork" = xyes; then |
15514 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
15515 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
15516 | if test "${ac_cv_func_fork_works+set}" = set; then | |
15517 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15518 | else | |
15519 | if test "$cross_compiling" = yes; then | |
15520 | ac_cv_func_fork_works=cross | |
15521 | else | |
15522 | cat >conftest.$ac_ext <<_ACEOF | |
15523 | /* By Ruediger Kuhlmann. */ | |
15524 | #include <sys/types.h> | |
15525 | #if HAVE_UNISTD_H | |
15526 | # include <unistd.h> | |
15527 | #endif | |
15528 | /* Some systems only have a dummy stub for fork() */ | |
15529 | int main () | |
15530 | { | |
15531 | if (fork() < 0) | |
15532 | exit (1); | |
15533 | exit (0); | |
15534 | } | |
15535 | _ACEOF | |
15536 | rm -f conftest$ac_exeext | |
15537 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
15538 | (eval $ac_link) 2>&5 | |
15539 | ac_status=$? | |
15540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15541 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
15542 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15543 | (eval $ac_try) 2>&5 | |
15544 | ac_status=$? | |
15545 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15546 | (exit $ac_status); }; }; then | |
15547 | ac_cv_func_fork_works=yes | |
15548 | else | |
15549 | echo "$as_me: program exited with status $ac_status" >&5 | |
15550 | echo "$as_me: failed program was:" >&5 | |
15551 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15552 | ||
15553 | ( exit $ac_status ) | |
15554 | ac_cv_func_fork_works=no | |
15555 | fi | |
15556 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
15557 | fi | |
15558 | fi | |
15559 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
15560 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
15561 | ||
15562 | else | |
15563 | ac_cv_func_fork_works=$ac_cv_func_fork | |
15564 | fi | |
15565 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15566 | case $host in | |
15567 | *-*-amigaos* | *-*-msdosdjgpp*) | |
15568 | # Override, as these systems have only a dummy fork() stub | |
15569 | ac_cv_func_fork_works=no | |
15570 | ;; | |
15571 | *) | |
15572 | ac_cv_func_fork_works=yes | |
15573 | ;; | |
15574 | esac | |
15575 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
15576 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
15577 | fi | |
15578 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15579 | if test "x$ac_cv_func_vfork" = xyes; then | |
15580 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
15581 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
15582 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
15583 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15584 | else | |
15585 | if test "$cross_compiling" = yes; then | |
15586 | ac_cv_func_vfork_works=cross | |
15587 | else | |
15588 | cat >conftest.$ac_ext <<_ACEOF | |
15589 | /* confdefs.h. */ | |
15590 | _ACEOF | |
15591 | cat confdefs.h >>conftest.$ac_ext | |
15592 | cat >>conftest.$ac_ext <<_ACEOF | |
15593 | /* end confdefs.h. */ | |
15594 | /* Thanks to Paul Eggert for this test. */ | |
15595 | #include <stdio.h> | |
15596 | #include <stdlib.h> | |
15597 | #include <sys/types.h> | |
15598 | #include <sys/stat.h> | |
15599 | #include <sys/wait.h> | |
15600 | #if HAVE_UNISTD_H | |
15601 | # include <unistd.h> | |
15602 | #endif | |
15603 | #if HAVE_VFORK_H | |
15604 | # include <vfork.h> | |
15605 | #endif | |
15606 | /* On some sparc systems, changes by the child to local and incoming | |
15607 | argument registers are propagated back to the parent. The compiler | |
15608 | is told about this with #include <vfork.h>, but some compilers | |
15609 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
15610 | static variable whose address is put into a register that is | |
15611 | clobbered by the vfork. */ | |
15612 | static void | |
15613 | #ifdef __cplusplus | |
15614 | sparc_address_test (int arg) | |
15615 | # else | |
15616 | sparc_address_test (arg) int arg; | |
15617 | #endif | |
15618 | { | |
15619 | static pid_t child; | |
15620 | if (!child) { | |
15621 | child = vfork (); | |
15622 | if (child < 0) { | |
15623 | perror ("vfork"); | |
15624 | _exit(2); | |
15625 | } | |
15626 | if (!child) { | |
15627 | arg = getpid(); | |
15628 | write(-1, "", 0); | |
15629 | _exit (arg); | |
15630 | } | |
15631 | } | |
15632 | } | |
15633 | ||
15634 | int | |
15635 | main () | |
15636 | { | |
15637 | pid_t parent = getpid (); | |
15638 | pid_t child; | |
15639 | ||
15640 | sparc_address_test (0); | |
15641 | ||
15642 | child = vfork (); | |
15643 | ||
15644 | if (child == 0) { | |
15645 | /* Here is another test for sparc vfork register problems. This | |
15646 | test uses lots of local variables, at least as many local | |
15647 | variables as main has allocated so far including compiler | |
15648 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
15649 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
15650 | reuse the register of parent for one of the local variables, | |
15651 | since it will think that parent can't possibly be used any more | |
15652 | in this routine. Assigning to the local variable will thus | |
15653 | munge parent in the parent process. */ | |
15654 | pid_t | |
15655 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
15656 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
15657 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
15658 | use the same hardware register for all 8 local variables. */ | |
15659 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
15660 | || p != p5 || p != p6 || p != p7) | |
15661 | _exit(1); | |
15662 | ||
15663 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent | |
15664 | from child file descriptors. If the child closes a descriptor | |
15665 | before it execs or exits, this munges the parent's descriptor | |
15666 | as well. Test for this by closing stdout in the child. */ | |
15667 | _exit(close(fileno(stdout)) != 0); | |
15668 | } else { | |
15669 | int status; | |
15670 | struct stat st; | |
15671 | ||
15672 | while (wait(&status) != child) | |
15673 | ; | |
15674 | exit( | |
15675 | /* Was there some problem with vforking? */ | |
15676 | child < 0 | |
15677 | ||
15678 | /* Did the child fail? (This shouldn't happen.) */ | |
15679 | || status | |
15680 | ||
15681 | /* Did the vfork/compiler bug occur? */ | |
15682 | || parent != getpid() | |
15683 | ||
15684 | /* Did the file descriptor bug occur? */ | |
15685 | || fstat(fileno(stdout), &st) != 0 | |
15686 | ); | |
15687 | } | |
15688 | } | |
15689 | _ACEOF | |
15690 | rm -f conftest$ac_exeext | |
15691 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
15692 | (eval $ac_link) 2>&5 | |
15693 | ac_status=$? | |
15694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15695 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
15696 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15697 | (eval $ac_try) 2>&5 | |
15698 | ac_status=$? | |
15699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15700 | (exit $ac_status); }; }; then | |
15701 | ac_cv_func_vfork_works=yes | |
15702 | else | |
15703 | echo "$as_me: program exited with status $ac_status" >&5 | |
15704 | echo "$as_me: failed program was:" >&5 | |
15705 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15706 | ||
15707 | ( exit $ac_status ) | |
15708 | ac_cv_func_vfork_works=no | |
15709 | fi | |
15710 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
15711 | fi | |
15712 | fi | |
15713 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
15714 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
15715 | ||
15716 | fi; | |
15717 | if test "x$ac_cv_func_fork_works" = xcross; then | |
15718 | ac_cv_func_vfork_works=$ac_cv_func_vfork | |
15719 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
15720 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
15721 | fi | |
15722 | ||
15723 | if test "x$ac_cv_func_vfork_works" = xyes; then | |
15724 | ||
15725 | cat >>confdefs.h <<\_ACEOF | |
15726 | #define HAVE_WORKING_VFORK 1 | |
15727 | _ACEOF | |
15728 | ||
15729 | else | |
15730 | ||
15731 | cat >>confdefs.h <<\_ACEOF | |
15732 | #define vfork fork | |
15733 | _ACEOF | |
15734 | ||
15735 | fi | |
15736 | if test "x$ac_cv_func_fork_works" = xyes; then | |
15737 | ||
15738 | cat >>confdefs.h <<\_ACEOF | |
15739 | #define HAVE_WORKING_FORK 1 | |
15740 | _ACEOF | |
15741 | ||
15742 | fi | |
15743 | ||
15744 | ||
15745 | ||
15746 | ||
15747 | ||
15748 | ||
15749 | ||
15750 | ||
15751 | ||
15752 | ||
15753 | ||
15754 | ||
15755 | ||
15756 | ||
15757 | ||
15758 | ||
15759 | ||
15760 | ||
a3828db0 | 15761 | |
6c7a06a3 | 15762 | |
a8111142 | 15763 | |
a9322a30 TT |
15764 | for ac_func in canonicalize_file_name realpath getrusage getuid \ |
15765 | getgid poll pread64 sbrk setpgid setpgrp setsid \ | |
15766 | sigaction sigprocmask sigsetmask socketpair syscall \ | |
6c7a06a3 | 15767 | ttrace wborder setlocale iconvlist |
a3828db0 MK |
15768 | do |
15769 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
b4e70030 JB |
15770 | echo "$as_me:$LINENO: checking for $ac_func" >&5 |
15771 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
15772 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
bec39cab AC |
15773 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
15774 | else | |
15775 | cat >conftest.$ac_ext <<_ACEOF | |
15776 | /* confdefs.h. */ | |
15777 | _ACEOF | |
15778 | cat confdefs.h >>conftest.$ac_ext | |
15779 | cat >>conftest.$ac_ext <<_ACEOF | |
15780 | /* end confdefs.h. */ | |
a3828db0 MK |
15781 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
15782 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
15783 | #define $ac_func innocuous_$ac_func | |
a4db0f07 | 15784 | |
a3828db0 MK |
15785 | /* System header to define __stub macros and hopefully few prototypes, |
15786 | which can conflict with char $ac_func (); below. | |
15787 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
15788 | <limits.h> exists even on freestanding compilers. */ | |
15789 | ||
15790 | #ifdef __STDC__ | |
15791 | # include <limits.h> | |
15792 | #else | |
15793 | # include <assert.h> | |
15794 | #endif | |
15795 | ||
15796 | #undef $ac_func | |
15797 | ||
b4e70030 | 15798 | /* Override any gcc2 internal prototype to avoid an error. */ |
a3828db0 MK |
15799 | #ifdef __cplusplus |
15800 | extern "C" | |
b4e70030 | 15801 | { |
a3828db0 | 15802 | #endif |
b4e70030 JB |
15803 | /* We use char because int might match the return type of a gcc2 |
15804 | builtin and then its argument prototype would still apply. */ | |
a3828db0 MK |
15805 | char $ac_func (); |
15806 | /* The GNU C library defines this for functions which it implements | |
15807 | to always fail with ENOSYS. Some functions are actually named | |
15808 | something starting with __ and the normal name is an alias. */ | |
b4e70030 | 15809 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
a3828db0 | 15810 | choke me |
b4e70030 JB |
15811 | #else |
15812 | char (*f) () = $ac_func; | |
15813 | #endif | |
15814 | #ifdef __cplusplus | |
15815 | } | |
a3828db0 | 15816 | #endif |
97bf5e38 | 15817 | |
bec39cab AC |
15818 | int |
15819 | main () | |
15820 | { | |
6c7a06a3 TT |
15821 | return f != $ac_func; |
15822 | ; | |
15823 | return 0; | |
15824 | } | |
15825 | _ACEOF | |
15826 | rm -f conftest.$ac_objext conftest$ac_exeext | |
15827 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
15828 | (eval $ac_link) 2>conftest.er1 | |
15829 | ac_status=$? | |
15830 | grep -v '^ *+' conftest.er1 >conftest.err | |
15831 | rm -f conftest.er1 | |
15832 | cat conftest.err >&5 | |
15833 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15834 | (exit $ac_status); } && | |
15835 | { ac_try='test -z "$ac_c_werror_flag" | |
15836 | || test ! -s conftest.err' | |
15837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15838 | (eval $ac_try) 2>&5 | |
15839 | ac_status=$? | |
15840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15841 | (exit $ac_status); }; } && | |
15842 | { ac_try='test -s conftest$ac_exeext' | |
15843 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15844 | (eval $ac_try) 2>&5 | |
15845 | ac_status=$? | |
15846 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15847 | (exit $ac_status); }; }; then | |
15848 | eval "$as_ac_var=yes" | |
15849 | else | |
15850 | echo "$as_me: failed program was:" >&5 | |
15851 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15852 | ||
15853 | eval "$as_ac_var=no" | |
15854 | fi | |
15855 | rm -f conftest.err conftest.$ac_objext \ | |
15856 | conftest$ac_exeext conftest.$ac_ext | |
15857 | fi | |
15858 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
15859 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
15860 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
15861 | cat >>confdefs.h <<_ACEOF | |
15862 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
15863 | _ACEOF | |
15864 | ||
15865 | fi | |
15866 | done | |
15867 | ||
15868 | ||
15869 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
15870 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
15871 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
15872 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15873 | else | |
15874 | cat >conftest.$ac_ext <<_ACEOF | |
15875 | /* confdefs.h. */ | |
15876 | _ACEOF | |
15877 | cat confdefs.h >>conftest.$ac_ext | |
15878 | cat >>conftest.$ac_ext <<_ACEOF | |
15879 | /* end confdefs.h. */ | |
15880 | #include <langinfo.h> | |
15881 | int | |
15882 | main () | |
15883 | { | |
15884 | char* cs = nl_langinfo(CODESET); | |
bec39cab AC |
15885 | ; |
15886 | return 0; | |
15887 | } | |
15888 | _ACEOF | |
a3828db0 MK |
15889 | rm -f conftest.$ac_objext conftest$ac_exeext |
15890 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
15891 | (eval $ac_link) 2>conftest.er1 | |
bec39cab AC |
15892 | ac_status=$? |
15893 | grep -v '^ *+' conftest.er1 >conftest.err | |
15894 | rm -f conftest.er1 | |
15895 | cat conftest.err >&5 | |
15896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15897 | (exit $ac_status); } && | |
b4e70030 JB |
15898 | { ac_try='test -z "$ac_c_werror_flag" |
15899 | || test ! -s conftest.err' | |
bec39cab AC |
15900 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15901 | (eval $ac_try) 2>&5 | |
15902 | ac_status=$? | |
15903 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15904 | (exit $ac_status); }; } && | |
a3828db0 | 15905 | { ac_try='test -s conftest$ac_exeext' |
bec39cab AC |
15906 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15907 | (eval $ac_try) 2>&5 | |
15908 | ac_status=$? | |
15909 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15910 | (exit $ac_status); }; }; then | |
6c7a06a3 | 15911 | am_cv_langinfo_codeset=yes |
a4db0f07 | 15912 | else |
bec39cab AC |
15913 | echo "$as_me: failed program was:" >&5 |
15914 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15915 | ||
6c7a06a3 | 15916 | am_cv_langinfo_codeset=no |
a4db0f07 | 15917 | fi |
a3828db0 MK |
15918 | rm -f conftest.err conftest.$ac_objext \ |
15919 | conftest$ac_exeext conftest.$ac_ext | |
6c7a06a3 | 15920 | |
a4db0f07 | 15921 | fi |
6c7a06a3 TT |
15922 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 |
15923 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
15924 | if test $am_cv_langinfo_codeset = yes; then | |
15925 | ||
15926 | cat >>confdefs.h <<\_ACEOF | |
15927 | #define HAVE_LANGINFO_CODESET 1 | |
bec39cab | 15928 | _ACEOF |
a4db0f07 | 15929 | |
6c7a06a3 | 15930 | fi |
c906108c | 15931 | |
06825bd1 | 15932 | |
a3828db0 MK |
15933 | # Check the return and argument types of ptrace. No canned test for |
15934 | # this, so roll our own. | |
15935 | gdb_ptrace_headers=' | |
15936 | #if HAVE_SYS_TYPES_H | |
15937 | # include <sys/types.h> | |
15938 | #endif | |
15939 | #if HAVE_SYS_PTRACE_H | |
15940 | # include <sys/ptrace.h> | |
15941 | #endif | |
15942 | #if HAVE_UNISTD_H | |
15943 | # include <unistd.h> | |
15944 | #endif | |
15945 | ' | |
15946 | # There is no point in checking if we don't have a prototype. | |
b4e70030 JB |
15947 | echo "$as_me:$LINENO: checking whether ptrace is declared" >&5 |
15948 | echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6 | |
a3828db0 | 15949 | if test "${ac_cv_have_decl_ptrace+set}" = set; then |
bec39cab AC |
15950 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
15951 | else | |
15952 | cat >conftest.$ac_ext <<_ACEOF | |
15953 | /* confdefs.h. */ | |
15954 | _ACEOF | |
15955 | cat confdefs.h >>conftest.$ac_ext | |
15956 | cat >>conftest.$ac_ext <<_ACEOF | |
15957 | /* end confdefs.h. */ | |
a3828db0 MK |
15958 | $gdb_ptrace_headers |
15959 | ||
bec39cab AC |
15960 | int |
15961 | main () | |
15962 | { | |
a3828db0 MK |
15963 | #ifndef ptrace |
15964 | char *p = (char *) ptrace; | |
06825bd1 | 15965 | #endif |
a3828db0 | 15966 | |
bec39cab AC |
15967 | ; |
15968 | return 0; | |
15969 | } | |
15970 | _ACEOF | |
15971 | rm -f conftest.$ac_objext | |
15972 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
15973 | (eval $ac_compile) 2>conftest.er1 | |
15974 | ac_status=$? | |
15975 | grep -v '^ *+' conftest.er1 >conftest.err | |
15976 | rm -f conftest.er1 | |
15977 | cat conftest.err >&5 | |
15978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15979 | (exit $ac_status); } && | |
b4e70030 JB |
15980 | { ac_try='test -z "$ac_c_werror_flag" |
15981 | || test ! -s conftest.err' | |
bec39cab AC |
15982 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
15983 | (eval $ac_try) 2>&5 | |
15984 | ac_status=$? | |
15985 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15986 | (exit $ac_status); }; } && | |
15987 | { ac_try='test -s conftest.$ac_objext' | |
15988 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15989 | (eval $ac_try) 2>&5 | |
15990 | ac_status=$? | |
15991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15992 | (exit $ac_status); }; }; then | |
a3828db0 | 15993 | ac_cv_have_decl_ptrace=yes |
06825bd1 | 15994 | else |
bec39cab AC |
15995 | echo "$as_me: failed program was:" >&5 |
15996 | sed 's/^/| /' conftest.$ac_ext >&5 | |
15997 | ||
b4e70030 | 15998 | ac_cv_have_decl_ptrace=no |
06825bd1 | 15999 | fi |
bec39cab | 16000 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
06825bd1 | 16001 | fi |
b4e70030 JB |
16002 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5 |
16003 | echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6 | |
a3828db0 | 16004 | if test $ac_cv_have_decl_ptrace = yes; then |
06825bd1 | 16005 | |
a3828db0 MK |
16006 | cat >>confdefs.h <<_ACEOF |
16007 | #define HAVE_DECL_PTRACE 1 | |
16008 | _ACEOF | |
bec39cab | 16009 | |
bec39cab | 16010 | |
a3828db0 MK |
16011 | else |
16012 | cat >>confdefs.h <<_ACEOF | |
16013 | #define HAVE_DECL_PTRACE 0 | |
bec39cab | 16014 | _ACEOF |
06825bd1 | 16015 | |
a3828db0 MK |
16016 | |
16017 | : ${gdb_cv_func_ptrace_ret='int'} | |
16018 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
16019 | ||
06825bd1 MK |
16020 | fi |
16021 | ||
a3828db0 | 16022 | |
064ef605 DJ |
16023 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
16024 | # empty argument list, so check for that explicitly. | |
b4e70030 JB |
16025 | echo "$as_me:$LINENO: checking return type of ptrace" >&5 |
16026 | echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6 | |
a3828db0 | 16027 | if test "${gdb_cv_func_ptrace_ret+set}" = set; then |
bec39cab AC |
16028 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16029 | else | |
16030 | cat >conftest.$ac_ext <<_ACEOF | |
16031 | /* confdefs.h. */ | |
16032 | _ACEOF | |
16033 | cat confdefs.h >>conftest.$ac_ext | |
16034 | cat >>conftest.$ac_ext <<_ACEOF | |
16035 | /* end confdefs.h. */ | |
a3828db0 | 16036 | $gdb_ptrace_headers |
bec39cab AC |
16037 | int |
16038 | main () | |
16039 | { | |
064ef605 DJ |
16040 | extern long ptrace (enum __ptrace_request, ...); |
16041 | ; | |
16042 | return 0; | |
16043 | } | |
16044 | _ACEOF | |
16045 | rm -f conftest.$ac_objext | |
16046 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16047 | (eval $ac_compile) 2>conftest.er1 | |
16048 | ac_status=$? | |
16049 | grep -v '^ *+' conftest.er1 >conftest.err | |
16050 | rm -f conftest.er1 | |
16051 | cat conftest.err >&5 | |
16052 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16053 | (exit $ac_status); } && | |
16054 | { ac_try='test -z "$ac_c_werror_flag" | |
16055 | || test ! -s conftest.err' | |
16056 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16057 | (eval $ac_try) 2>&5 | |
16058 | ac_status=$? | |
16059 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16060 | (exit $ac_status); }; } && | |
16061 | { ac_try='test -s conftest.$ac_objext' | |
16062 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16063 | (eval $ac_try) 2>&5 | |
16064 | ac_status=$? | |
16065 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16066 | (exit $ac_status); }; }; then | |
16067 | gdb_cv_func_ptrace_ret='long' | |
16068 | else | |
16069 | echo "$as_me: failed program was:" >&5 | |
16070 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16071 | ||
16072 | cat >conftest.$ac_ext <<_ACEOF | |
16073 | /* confdefs.h. */ | |
16074 | _ACEOF | |
16075 | cat confdefs.h >>conftest.$ac_ext | |
16076 | cat >>conftest.$ac_ext <<_ACEOF | |
16077 | /* end confdefs.h. */ | |
16078 | $gdb_ptrace_headers | |
16079 | int | |
16080 | main () | |
16081 | { | |
a3828db0 | 16082 | extern int ptrace (); |
bec39cab AC |
16083 | ; |
16084 | return 0; | |
16085 | } | |
16086 | _ACEOF | |
16087 | rm -f conftest.$ac_objext | |
16088 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16089 | (eval $ac_compile) 2>conftest.er1 | |
16090 | ac_status=$? | |
16091 | grep -v '^ *+' conftest.er1 >conftest.err | |
16092 | rm -f conftest.er1 | |
16093 | cat conftest.err >&5 | |
16094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16095 | (exit $ac_status); } && | |
b4e70030 JB |
16096 | { ac_try='test -z "$ac_c_werror_flag" |
16097 | || test ! -s conftest.err' | |
bec39cab AC |
16098 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16099 | (eval $ac_try) 2>&5 | |
16100 | ac_status=$? | |
16101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16102 | (exit $ac_status); }; } && | |
16103 | { ac_try='test -s conftest.$ac_objext' | |
16104 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16105 | (eval $ac_try) 2>&5 | |
16106 | ac_status=$? | |
16107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16108 | (exit $ac_status); }; }; then | |
a3828db0 | 16109 | gdb_cv_func_ptrace_ret='int' |
70f9f479 | 16110 | else |
bec39cab AC |
16111 | echo "$as_me: failed program was:" >&5 |
16112 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16113 | ||
b4e70030 | 16114 | gdb_cv_func_ptrace_ret='long' |
70f9f479 | 16115 | fi |
bec39cab | 16116 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
70f9f479 | 16117 | fi |
064ef605 DJ |
16118 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
16119 | fi | |
b4e70030 JB |
16120 | echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5 |
16121 | echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6 | |
bec39cab | 16122 | |
a3828db0 MK |
16123 | cat >>confdefs.h <<_ACEOF |
16124 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret | |
bec39cab | 16125 | _ACEOF |
70f9f479 | 16126 | |
a3828db0 | 16127 | # Check argument types. |
b4e70030 JB |
16128 | echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5 |
16129 | echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6 | |
a3828db0 | 16130 | if test "${gdb_cv_func_ptrace_args+set}" = set; then |
bec39cab AC |
16131 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16132 | else | |
a3828db0 | 16133 | |
064ef605 DJ |
16134 | cat >conftest.$ac_ext <<_ACEOF |
16135 | /* confdefs.h. */ | |
16136 | _ACEOF | |
16137 | cat confdefs.h >>conftest.$ac_ext | |
16138 | cat >>conftest.$ac_ext <<_ACEOF | |
16139 | /* end confdefs.h. */ | |
16140 | $gdb_ptrace_headers | |
16141 | int | |
16142 | main () | |
16143 | { | |
16144 | extern long ptrace (enum __ptrace_request, ...); | |
16145 | ; | |
16146 | return 0; | |
16147 | } | |
16148 | _ACEOF | |
16149 | rm -f conftest.$ac_objext | |
16150 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16151 | (eval $ac_compile) 2>conftest.er1 | |
16152 | ac_status=$? | |
16153 | grep -v '^ *+' conftest.er1 >conftest.err | |
16154 | rm -f conftest.er1 | |
16155 | cat conftest.err >&5 | |
16156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16157 | (exit $ac_status); } && | |
16158 | { ac_try='test -z "$ac_c_werror_flag" | |
16159 | || test ! -s conftest.err' | |
16160 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16161 | (eval $ac_try) 2>&5 | |
16162 | ac_status=$? | |
16163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16164 | (exit $ac_status); }; } && | |
16165 | { ac_try='test -s conftest.$ac_objext' | |
16166 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16167 | (eval $ac_try) 2>&5 | |
16168 | ac_status=$? | |
16169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16170 | (exit $ac_status); }; }; then | |
16171 | gdb_cv_func_ptrace_args='int,int,long,long' | |
16172 | else | |
16173 | echo "$as_me: failed program was:" >&5 | |
16174 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16175 | ||
16176 | ||
a3828db0 MK |
16177 | for gdb_arg1 in 'int' 'long'; do |
16178 | for gdb_arg2 in 'pid_t' 'int' 'long'; do | |
5ed10e6e | 16179 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
a3828db0 MK |
16180 | for gdb_arg4 in 'int' 'long'; do |
16181 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
16182 | /* confdefs.h. */ |
16183 | _ACEOF | |
16184 | cat confdefs.h >>conftest.$ac_ext | |
16185 | cat >>conftest.$ac_ext <<_ACEOF | |
16186 | /* end confdefs.h. */ | |
a3828db0 | 16187 | $gdb_ptrace_headers |
bec39cab AC |
16188 | int |
16189 | main () | |
16190 | { | |
a3828db0 MK |
16191 | |
16192 | extern $gdb_cv_func_ptrace_ret | |
16193 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); | |
16194 | ||
bec39cab AC |
16195 | ; |
16196 | return 0; | |
16197 | } | |
16198 | _ACEOF | |
16199 | rm -f conftest.$ac_objext | |
16200 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16201 | (eval $ac_compile) 2>conftest.er1 | |
16202 | ac_status=$? | |
16203 | grep -v '^ *+' conftest.er1 >conftest.err | |
16204 | rm -f conftest.er1 | |
16205 | cat conftest.err >&5 | |
16206 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16207 | (exit $ac_status); } && | |
b4e70030 JB |
16208 | { ac_try='test -z "$ac_c_werror_flag" |
16209 | || test ! -s conftest.err' | |
bec39cab AC |
16210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16211 | (eval $ac_try) 2>&5 | |
16212 | ac_status=$? | |
16213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16214 | (exit $ac_status); }; } && | |
16215 | { ac_try='test -s conftest.$ac_objext' | |
16216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16217 | (eval $ac_try) 2>&5 | |
16218 | ac_status=$? | |
16219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16220 | (exit $ac_status); }; }; then | |
a3828db0 MK |
16221 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
16222 | break 4; | |
5c7f2947 | 16223 | else |
bec39cab AC |
16224 | echo "$as_me: failed program was:" >&5 |
16225 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16226 | ||
5c7f2947 | 16227 | fi |
bec39cab | 16228 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
16229 | for gdb_arg5 in 'int *' 'int' 'long'; do |
16230 | cat >conftest.$ac_ext <<_ACEOF | |
bec39cab AC |
16231 | /* confdefs.h. */ |
16232 | _ACEOF | |
16233 | cat confdefs.h >>conftest.$ac_ext | |
16234 | cat >>conftest.$ac_ext <<_ACEOF | |
16235 | /* end confdefs.h. */ | |
a3828db0 | 16236 | $gdb_ptrace_headers |
bec39cab AC |
16237 | int |
16238 | main () | |
16239 | { | |
a3828db0 MK |
16240 | |
16241 | extern $gdb_cv_func_ptrace_ret | |
16242 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); | |
16243 | ||
bec39cab AC |
16244 | ; |
16245 | return 0; | |
16246 | } | |
16247 | _ACEOF | |
16248 | rm -f conftest.$ac_objext | |
16249 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16250 | (eval $ac_compile) 2>conftest.er1 | |
16251 | ac_status=$? | |
16252 | grep -v '^ *+' conftest.er1 >conftest.err | |
16253 | rm -f conftest.er1 | |
16254 | cat conftest.err >&5 | |
16255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16256 | (exit $ac_status); } && | |
b4e70030 JB |
16257 | { ac_try='test -z "$ac_c_werror_flag" |
16258 | || test ! -s conftest.err' | |
bec39cab AC |
16259 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16260 | (eval $ac_try) 2>&5 | |
16261 | ac_status=$? | |
16262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16263 | (exit $ac_status); }; } && | |
16264 | { ac_try='test -s conftest.$ac_objext' | |
16265 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16266 | (eval $ac_try) 2>&5 | |
16267 | ac_status=$? | |
16268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16269 | (exit $ac_status); }; }; then | |
a3828db0 MK |
16270 | |
16271 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; | |
16272 | break 5; | |
78434e59 | 16273 | else |
bec39cab AC |
16274 | echo "$as_me: failed program was:" >&5 |
16275 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16276 | ||
78434e59 | 16277 | fi |
bec39cab | 16278 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
a3828db0 MK |
16279 | done |
16280 | done | |
16281 | done | |
16282 | done | |
16283 | done | |
16284 | # Provide a safe default value. | |
16285 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} | |
16286 | ||
064ef605 DJ |
16287 | fi |
16288 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
78434e59 | 16289 | fi |
b4e70030 JB |
16290 | echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5 |
16291 | echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6 | |
a3828db0 MK |
16292 | ac_save_IFS=$IFS; IFS=',' |
16293 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` | |
16294 | IFS=$ac_save_IFS | |
16295 | shift | |
bec39cab | 16296 | |
a3828db0 MK |
16297 | cat >>confdefs.h <<_ACEOF |
16298 | #define PTRACE_TYPE_ARG3 $3 | |
16299 | _ACEOF | |
16300 | ||
16301 | if test -n "$5"; then | |
16302 | ||
16303 | cat >>confdefs.h <<_ACEOF | |
16304 | #define PTRACE_TYPE_ARG5 $5 | |
bec39cab | 16305 | _ACEOF |
78434e59 MK |
16306 | |
16307 | fi | |
16308 | ||
a3828db0 | 16309 | if test "$cross_compiling" = no; then |
b4e70030 JB |
16310 | echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 |
16311 | echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6 | |
a3828db0 | 16312 | if test "${ac_cv_func_setpgrp_void+set}" = set; then |
bec39cab | 16313 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
a3828db0 MK |
16314 | else |
16315 | if test "$cross_compiling" = yes; then | |
16316 | { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 | |
16317 | echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} | |
16318 | { (exit 1); exit 1; }; } | |
bec39cab AC |
16319 | else |
16320 | cat >conftest.$ac_ext <<_ACEOF | |
16321 | /* confdefs.h. */ | |
16322 | _ACEOF | |
16323 | cat confdefs.h >>conftest.$ac_ext | |
16324 | cat >>conftest.$ac_ext <<_ACEOF | |
16325 | /* end confdefs.h. */ | |
b4e70030 JB |
16326 | #if HAVE_UNISTD_H |
16327 | # include <unistd.h> | |
16328 | #endif | |
16329 | ||
bec39cab AC |
16330 | int |
16331 | main () | |
16332 | { | |
a3828db0 MK |
16333 | /* If this system has a BSD-style setpgrp which takes arguments, |
16334 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case | |
16335 | exit successfully. */ | |
b4e70030 | 16336 | exit (setpgrp (1,1) == -1 ? 0 : 1); |
bec39cab AC |
16337 | ; |
16338 | return 0; | |
16339 | } | |
16340 | _ACEOF | |
a3828db0 MK |
16341 | rm -f conftest$ac_exeext |
16342 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
16343 | (eval $ac_link) 2>&5 | |
bec39cab AC |
16344 | ac_status=$? |
16345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
a3828db0 | 16346 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' |
bec39cab AC |
16347 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16348 | (eval $ac_try) 2>&5 | |
16349 | ac_status=$? | |
16350 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16351 | (exit $ac_status); }; }; then | |
a3828db0 | 16352 | ac_cv_func_setpgrp_void=no |
c906108c | 16353 | else |
a3828db0 MK |
16354 | echo "$as_me: program exited with status $ac_status" >&5 |
16355 | echo "$as_me: failed program was:" >&5 | |
bec39cab AC |
16356 | sed 's/^/| /' conftest.$ac_ext >&5 |
16357 | ||
a3828db0 MK |
16358 | ( exit $ac_status ) |
16359 | ac_cv_func_setpgrp_void=yes | |
c906108c | 16360 | fi |
b4e70030 | 16361 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 16362 | fi |
a3828db0 | 16363 | fi |
b4e70030 JB |
16364 | echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 |
16365 | echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6 | |
a3828db0 MK |
16366 | if test $ac_cv_func_setpgrp_void = yes; then |
16367 | ||
16368 | cat >>confdefs.h <<\_ACEOF | |
16369 | #define SETPGRP_VOID 1 | |
bec39cab | 16370 | _ACEOF |
97bf5e38 MK |
16371 | |
16372 | fi | |
a3828db0 MK |
16373 | |
16374 | else | |
b4e70030 JB |
16375 | echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 |
16376 | echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6 | |
a3828db0 | 16377 | if test "${ac_cv_func_setpgrp_void+set}" = set; then |
bec39cab | 16378 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
97bf5e38 | 16379 | else |
bec39cab AC |
16380 | cat >conftest.$ac_ext <<_ACEOF |
16381 | /* confdefs.h. */ | |
16382 | _ACEOF | |
16383 | cat confdefs.h >>conftest.$ac_ext | |
16384 | cat >>conftest.$ac_ext <<_ACEOF | |
16385 | /* end confdefs.h. */ | |
a3828db0 MK |
16386 | |
16387 | #include <unistd.h> | |
16388 | ||
bec39cab AC |
16389 | int |
16390 | main () | |
16391 | { | |
a3828db0 MK |
16392 | |
16393 | if (setpgrp(1,1) == -1) | |
16394 | exit (0); | |
16395 | else | |
16396 | exit (1); | |
16397 | ||
bec39cab AC |
16398 | ; |
16399 | return 0; | |
16400 | } | |
16401 | _ACEOF | |
16402 | rm -f conftest.$ac_objext | |
16403 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16404 | (eval $ac_compile) 2>conftest.er1 | |
16405 | ac_status=$? | |
16406 | grep -v '^ *+' conftest.er1 >conftest.err | |
16407 | rm -f conftest.er1 | |
16408 | cat conftest.err >&5 | |
16409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16410 | (exit $ac_status); } && | |
b4e70030 JB |
16411 | { ac_try='test -z "$ac_c_werror_flag" |
16412 | || test ! -s conftest.err' | |
bec39cab AC |
16413 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16414 | (eval $ac_try) 2>&5 | |
16415 | ac_status=$? | |
16416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16417 | (exit $ac_status); }; } && | |
16418 | { ac_try='test -s conftest.$ac_objext' | |
16419 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16420 | (eval $ac_try) 2>&5 | |
16421 | ac_status=$? | |
16422 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16423 | (exit $ac_status); }; }; then | |
a3828db0 | 16424 | ac_cv_func_setpgrp_void=no |
c906108c | 16425 | else |
bec39cab AC |
16426 | echo "$as_me: failed program was:" >&5 |
16427 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16428 | ||
b4e70030 | 16429 | ac_cv_func_setpgrp_void=yes |
c906108c | 16430 | fi |
bec39cab | 16431 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 16432 | fi |
b4e70030 JB |
16433 | echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 |
16434 | echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6 | |
a3828db0 | 16435 | if test $ac_cv_func_setpgrp_void = yes; then |
bec39cab | 16436 | cat >>confdefs.h <<\_ACEOF |
a3828db0 | 16437 | #define SETPGRP_VOID 1 |
bec39cab | 16438 | _ACEOF |
c3f6f71d | 16439 | |
a3828db0 | 16440 | fi |
c906108c SS |
16441 | fi |
16442 | ||
a3828db0 MK |
16443 | # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do |
16444 | # since sigsetjmp might only be defined as a macro. | |
b4e70030 JB |
16445 | echo "$as_me:$LINENO: checking for sigsetjmp" >&5 |
16446 | echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6 | |
a3828db0 | 16447 | if test "${gdb_cv_func_sigsetjmp+set}" = set; then |
bec39cab AC |
16448 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16449 | else | |
16450 | cat >conftest.$ac_ext <<_ACEOF | |
16451 | /* confdefs.h. */ | |
16452 | _ACEOF | |
16453 | cat confdefs.h >>conftest.$ac_ext | |
16454 | cat >>conftest.$ac_ext <<_ACEOF | |
16455 | /* end confdefs.h. */ | |
a3828db0 MK |
16456 | |
16457 | #include <setjmp.h> | |
16458 | ||
bec39cab AC |
16459 | int |
16460 | main () | |
16461 | { | |
a3828db0 | 16462 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
bec39cab AC |
16463 | ; |
16464 | return 0; | |
16465 | } | |
16466 | _ACEOF | |
16467 | rm -f conftest.$ac_objext | |
16468 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16469 | (eval $ac_compile) 2>conftest.er1 | |
16470 | ac_status=$? | |
16471 | grep -v '^ *+' conftest.er1 >conftest.err | |
16472 | rm -f conftest.er1 | |
16473 | cat conftest.err >&5 | |
16474 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16475 | (exit $ac_status); } && | |
b4e70030 JB |
16476 | { ac_try='test -z "$ac_c_werror_flag" |
16477 | || test ! -s conftest.err' | |
bec39cab AC |
16478 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16479 | (eval $ac_try) 2>&5 | |
16480 | ac_status=$? | |
16481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16482 | (exit $ac_status); }; } && | |
16483 | { ac_try='test -s conftest.$ac_objext' | |
16484 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16485 | (eval $ac_try) 2>&5 | |
16486 | ac_status=$? | |
16487 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16488 | (exit $ac_status); }; }; then | |
a3828db0 | 16489 | gdb_cv_func_sigsetjmp=yes |
c906108c | 16490 | else |
bec39cab AC |
16491 | echo "$as_me: failed program was:" >&5 |
16492 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16493 | ||
b4e70030 | 16494 | gdb_cv_func_sigsetjmp=no |
c906108c | 16495 | fi |
bec39cab | 16496 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 16497 | fi |
b4e70030 JB |
16498 | echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5 |
16499 | echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6 | |
a3828db0 | 16500 | if test $gdb_cv_func_sigsetjmp = yes; then |
c906108c | 16501 | |
a3828db0 MK |
16502 | cat >>confdefs.h <<\_ACEOF |
16503 | #define HAVE_SIGSETJMP 1 | |
bec39cab | 16504 | _ACEOF |
c906108c | 16505 | |
97bf5e38 | 16506 | fi |
c906108c | 16507 | |
a3828db0 MK |
16508 | # Assume we'll default to using the included libiberty regex. |
16509 | gdb_use_included_regex=yes | |
16510 | ||
16511 | # However, if the system regex is GNU regex, then default to *not* | |
16512 | # using the included regex. | |
b4e70030 JB |
16513 | echo "$as_me:$LINENO: checking for GNU regex" >&5 |
16514 | echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6 | |
a3828db0 | 16515 | if test "${gdb_cv_have_gnu_regex+set}" = set; then |
bec39cab AC |
16516 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16517 | else | |
16518 | cat >conftest.$ac_ext <<_ACEOF | |
16519 | /* confdefs.h. */ | |
16520 | _ACEOF | |
16521 | cat confdefs.h >>conftest.$ac_ext | |
16522 | cat >>conftest.$ac_ext <<_ACEOF | |
16523 | /* end confdefs.h. */ | |
a3828db0 | 16524 | #include <gnu-versions.h> |
bec39cab AC |
16525 | int |
16526 | main () | |
16527 | { | |
a3828db0 MK |
16528 | #define REGEX_INTERFACE_VERSION 1 |
16529 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION | |
16530 | # error "Version mismatch" | |
16531 | #endif | |
bec39cab AC |
16532 | ; |
16533 | return 0; | |
16534 | } | |
16535 | _ACEOF | |
16536 | rm -f conftest.$ac_objext | |
16537 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16538 | (eval $ac_compile) 2>conftest.er1 | |
16539 | ac_status=$? | |
16540 | grep -v '^ *+' conftest.er1 >conftest.err | |
16541 | rm -f conftest.er1 | |
16542 | cat conftest.err >&5 | |
16543 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16544 | (exit $ac_status); } && | |
b4e70030 JB |
16545 | { ac_try='test -z "$ac_c_werror_flag" |
16546 | || test ! -s conftest.err' | |
bec39cab AC |
16547 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16548 | (eval $ac_try) 2>&5 | |
16549 | ac_status=$? | |
16550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16551 | (exit $ac_status); }; } && | |
16552 | { ac_try='test -s conftest.$ac_objext' | |
16553 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16554 | (eval $ac_try) 2>&5 | |
16555 | ac_status=$? | |
16556 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16557 | (exit $ac_status); }; }; then | |
a3828db0 | 16558 | gdb_cv_have_gnu_regex=yes |
c906108c | 16559 | else |
bec39cab AC |
16560 | echo "$as_me: failed program was:" >&5 |
16561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16562 | ||
b4e70030 | 16563 | gdb_cv_have_gnu_regex=no |
c906108c | 16564 | fi |
bec39cab | 16565 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 16566 | fi |
b4e70030 JB |
16567 | echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5 |
16568 | echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6 | |
a3828db0 MK |
16569 | if test $gdb_cv_have_gnu_regex = yes; then |
16570 | gdb_use_included_regex=no | |
16571 | fi | |
c906108c | 16572 | |
a3828db0 | 16573 | |
b4e70030 | 16574 | # Check whether --with-included-regex or --without-included-regex was given. |
a3828db0 | 16575 | if test "${with_included_regex+set}" = set; then |
b4e70030 JB |
16576 | withval="$with_included_regex" |
16577 | gdb_with_regex=$withval | |
a3828db0 MK |
16578 | else |
16579 | gdb_with_regex=$gdb_use_included_regex | |
b4e70030 | 16580 | fi; |
a3828db0 MK |
16581 | if test "$gdb_with_regex" = yes; then |
16582 | ||
16583 | cat >>confdefs.h <<\_ACEOF | |
16584 | #define USE_INCLUDED_REGEX 1 | |
bec39cab | 16585 | _ACEOF |
c906108c | 16586 | |
97bf5e38 | 16587 | fi |
c906108c | 16588 | |
5c45e068 | 16589 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
b4e70030 JB |
16590 | echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5 |
16591 | echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6 | |
5c45e068 | 16592 | if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then |
bec39cab AC |
16593 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16594 | else | |
16595 | cat >conftest.$ac_ext <<_ACEOF | |
16596 | /* confdefs.h. */ | |
16597 | _ACEOF | |
16598 | cat confdefs.h >>conftest.$ac_ext | |
16599 | cat >>conftest.$ac_ext <<_ACEOF | |
16600 | /* end confdefs.h. */ | |
a3828db0 MK |
16601 | #include <sys/param.h> |
16602 | #include <sys/proc.h> | |
5c45e068 MK |
16603 | |
16604 | ||
bec39cab AC |
16605 | int |
16606 | main () | |
16607 | { | |
5c45e068 MK |
16608 | static struct thread ac_aggr; |
16609 | if (ac_aggr.td_pcb) | |
16610 | return 0; | |
bec39cab AC |
16611 | ; |
16612 | return 0; | |
16613 | } | |
16614 | _ACEOF | |
16615 | rm -f conftest.$ac_objext | |
16616 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16617 | (eval $ac_compile) 2>conftest.er1 | |
16618 | ac_status=$? | |
16619 | grep -v '^ *+' conftest.er1 >conftest.err | |
16620 | rm -f conftest.er1 | |
16621 | cat conftest.err >&5 | |
16622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16623 | (exit $ac_status); } && | |
b4e70030 JB |
16624 | { ac_try='test -z "$ac_c_werror_flag" |
16625 | || test ! -s conftest.err' | |
bec39cab AC |
16626 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16627 | (eval $ac_try) 2>&5 | |
16628 | ac_status=$? | |
16629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16630 | (exit $ac_status); }; } && | |
16631 | { ac_try='test -s conftest.$ac_objext' | |
16632 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16633 | (eval $ac_try) 2>&5 | |
16634 | ac_status=$? | |
16635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16636 | (exit $ac_status); }; }; then | |
5c45e068 | 16637 | ac_cv_member_struct_thread_td_pcb=yes |
c906108c | 16638 | else |
bec39cab AC |
16639 | echo "$as_me: failed program was:" >&5 |
16640 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16641 | ||
b4e70030 | 16642 | cat >conftest.$ac_ext <<_ACEOF |
5c45e068 MK |
16643 | /* confdefs.h. */ |
16644 | _ACEOF | |
16645 | cat confdefs.h >>conftest.$ac_ext | |
16646 | cat >>conftest.$ac_ext <<_ACEOF | |
16647 | /* end confdefs.h. */ | |
16648 | #include <sys/param.h> | |
16649 | #include <sys/proc.h> | |
16650 | ||
16651 | ||
16652 | int | |
16653 | main () | |
16654 | { | |
16655 | static struct thread ac_aggr; | |
16656 | if (sizeof ac_aggr.td_pcb) | |
16657 | return 0; | |
16658 | ; | |
16659 | return 0; | |
16660 | } | |
16661 | _ACEOF | |
16662 | rm -f conftest.$ac_objext | |
16663 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16664 | (eval $ac_compile) 2>conftest.er1 | |
16665 | ac_status=$? | |
16666 | grep -v '^ *+' conftest.er1 >conftest.err | |
16667 | rm -f conftest.er1 | |
16668 | cat conftest.err >&5 | |
16669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16670 | (exit $ac_status); } && | |
b4e70030 JB |
16671 | { ac_try='test -z "$ac_c_werror_flag" |
16672 | || test ! -s conftest.err' | |
5c45e068 MK |
16673 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16674 | (eval $ac_try) 2>&5 | |
16675 | ac_status=$? | |
16676 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16677 | (exit $ac_status); }; } && | |
16678 | { ac_try='test -s conftest.$ac_objext' | |
16679 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16680 | (eval $ac_try) 2>&5 | |
16681 | ac_status=$? | |
16682 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16683 | (exit $ac_status); }; }; then | |
16684 | ac_cv_member_struct_thread_td_pcb=yes | |
16685 | else | |
16686 | echo "$as_me: failed program was:" >&5 | |
16687 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16688 | ||
b4e70030 | 16689 | ac_cv_member_struct_thread_td_pcb=no |
5c45e068 MK |
16690 | fi |
16691 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
c906108c | 16692 | fi |
bec39cab | 16693 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 16694 | fi |
b4e70030 JB |
16695 | echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5 |
16696 | echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6 | |
5c45e068 | 16697 | if test $ac_cv_member_struct_thread_td_pcb = yes; then |
c906108c | 16698 | |
5c45e068 | 16699 | cat >>confdefs.h <<_ACEOF |
a3828db0 | 16700 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
bec39cab | 16701 | _ACEOF |
c906108c | 16702 | |
5c45e068 | 16703 | |
97bf5e38 | 16704 | fi |
c906108c | 16705 | |
5c45e068 | 16706 | |
a3828db0 | 16707 | # See if <sys/lwp.h> defines `struct lwp`. |
b4e70030 JB |
16708 | echo "$as_me:$LINENO: checking for struct lwp" >&5 |
16709 | echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6 | |
a3828db0 | 16710 | if test "${gdb_cv_struct_lwp+set}" = set; then |
bec39cab AC |
16711 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16712 | else | |
16713 | cat >conftest.$ac_ext <<_ACEOF | |
16714 | /* confdefs.h. */ | |
16715 | _ACEOF | |
16716 | cat confdefs.h >>conftest.$ac_ext | |
16717 | cat >>conftest.$ac_ext <<_ACEOF | |
16718 | /* end confdefs.h. */ | |
a3828db0 MK |
16719 | #include <sys/param.h> |
16720 | #include <sys/lwp.h> | |
bec39cab AC |
16721 | int |
16722 | main () | |
16723 | { | |
a3828db0 | 16724 | struct lwp l; |
bec39cab AC |
16725 | ; |
16726 | return 0; | |
16727 | } | |
16728 | _ACEOF | |
16729 | rm -f conftest.$ac_objext | |
16730 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16731 | (eval $ac_compile) 2>conftest.er1 | |
16732 | ac_status=$? | |
16733 | grep -v '^ *+' conftest.er1 >conftest.err | |
16734 | rm -f conftest.er1 | |
16735 | cat conftest.err >&5 | |
16736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16737 | (exit $ac_status); } && | |
b4e70030 JB |
16738 | { ac_try='test -z "$ac_c_werror_flag" |
16739 | || test ! -s conftest.err' | |
bec39cab AC |
16740 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16741 | (eval $ac_try) 2>&5 | |
16742 | ac_status=$? | |
16743 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16744 | (exit $ac_status); }; } && | |
16745 | { ac_try='test -s conftest.$ac_objext' | |
16746 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16747 | (eval $ac_try) 2>&5 | |
16748 | ac_status=$? | |
16749 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16750 | (exit $ac_status); }; }; then | |
a3828db0 | 16751 | gdb_cv_struct_lwp=yes |
c906108c | 16752 | else |
bec39cab AC |
16753 | echo "$as_me: failed program was:" >&5 |
16754 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16755 | ||
b4e70030 | 16756 | gdb_cv_struct_lwp=no |
c906108c | 16757 | fi |
bec39cab | 16758 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 16759 | fi |
b4e70030 JB |
16760 | echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5 |
16761 | echo "${ECHO_T}$gdb_cv_struct_lwp" >&6 | |
a3828db0 | 16762 | if test $gdb_cv_struct_lwp = yes; then |
c906108c | 16763 | |
a3828db0 MK |
16764 | cat >>confdefs.h <<\_ACEOF |
16765 | #define HAVE_STRUCT_LWP 1 | |
bec39cab | 16766 | _ACEOF |
c906108c | 16767 | |
97bf5e38 | 16768 | fi |
c906108c | 16769 | |
a3828db0 | 16770 | # See if <machine/reg.h> degines `struct reg'. |
b4e70030 JB |
16771 | echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5 |
16772 | echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6 | |
a3828db0 | 16773 | if test "${gdb_cv_struct_reg+set}" = set; then |
bec39cab AC |
16774 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
16775 | else | |
16776 | cat >conftest.$ac_ext <<_ACEOF | |
16777 | /* confdefs.h. */ | |
16778 | _ACEOF | |
16779 | cat confdefs.h >>conftest.$ac_ext | |
16780 | cat >>conftest.$ac_ext <<_ACEOF | |
16781 | /* end confdefs.h. */ | |
a3828db0 MK |
16782 | #include <sys/types.h> |
16783 | #include <machine/reg.h> | |
bec39cab AC |
16784 | int |
16785 | main () | |
16786 | { | |
a3828db0 | 16787 | struct reg r; |
bec39cab AC |
16788 | ; |
16789 | return 0; | |
16790 | } | |
16791 | _ACEOF | |
16792 | rm -f conftest.$ac_objext | |
16793 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16794 | (eval $ac_compile) 2>conftest.er1 | |
16795 | ac_status=$? | |
16796 | grep -v '^ *+' conftest.er1 >conftest.err | |
16797 | rm -f conftest.er1 | |
16798 | cat conftest.err >&5 | |
16799 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16800 | (exit $ac_status); } && | |
b4e70030 JB |
16801 | { ac_try='test -z "$ac_c_werror_flag" |
16802 | || test ! -s conftest.err' | |
bec39cab AC |
16803 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16804 | (eval $ac_try) 2>&5 | |
16805 | ac_status=$? | |
16806 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16807 | (exit $ac_status); }; } && | |
16808 | { ac_try='test -s conftest.$ac_objext' | |
16809 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16810 | (eval $ac_try) 2>&5 | |
16811 | ac_status=$? | |
16812 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16813 | (exit $ac_status); }; }; then | |
a3828db0 | 16814 | gdb_cv_struct_reg=yes |
27ca5dad | 16815 | else |
bec39cab AC |
16816 | echo "$as_me: failed program was:" >&5 |
16817 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16818 | ||
b4e70030 | 16819 | gdb_cv_struct_reg=no |
27ca5dad | 16820 | fi |
bec39cab | 16821 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
27ca5dad | 16822 | fi |
b4e70030 JB |
16823 | echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5 |
16824 | echo "${ECHO_T}$gdb_cv_struct_reg" >&6 | |
a3828db0 | 16825 | if test $gdb_cv_struct_reg = yes; then |
bec39cab AC |
16826 | |
16827 | cat >>confdefs.h <<\_ACEOF | |
a3828db0 | 16828 | #define HAVE_STRUCT_REG 1 |
bec39cab | 16829 | _ACEOF |
27ca5dad MC |
16830 | |
16831 | fi | |
97bf5e38 | 16832 | |
a3828db0 MK |
16833 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
16834 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. | |
b4e70030 JB |
16835 | echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5 |
16836 | echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6 | |
5c45e068 | 16837 | if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then |
bec39cab | 16838 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3862412b | 16839 | else |
bec39cab AC |
16840 | cat >conftest.$ac_ext <<_ACEOF |
16841 | /* confdefs.h. */ | |
16842 | _ACEOF | |
16843 | cat confdefs.h >>conftest.$ac_ext | |
16844 | cat >>conftest.$ac_ext <<_ACEOF | |
16845 | /* end confdefs.h. */ | |
a3828db0 | 16846 | #include <machine/reg.h> |
5c45e068 MK |
16847 | |
16848 | int | |
16849 | main () | |
16850 | { | |
16851 | static struct reg ac_aggr; | |
16852 | if (ac_aggr.r_fs) | |
16853 | return 0; | |
16854 | ; | |
16855 | return 0; | |
16856 | } | |
16857 | _ACEOF | |
16858 | rm -f conftest.$ac_objext | |
16859 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16860 | (eval $ac_compile) 2>conftest.er1 | |
16861 | ac_status=$? | |
16862 | grep -v '^ *+' conftest.er1 >conftest.err | |
16863 | rm -f conftest.er1 | |
16864 | cat conftest.err >&5 | |
16865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16866 | (exit $ac_status); } && | |
b4e70030 JB |
16867 | { ac_try='test -z "$ac_c_werror_flag" |
16868 | || test ! -s conftest.err' | |
5c45e068 MK |
16869 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16870 | (eval $ac_try) 2>&5 | |
16871 | ac_status=$? | |
16872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16873 | (exit $ac_status); }; } && | |
16874 | { ac_try='test -s conftest.$ac_objext' | |
16875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16876 | (eval $ac_try) 2>&5 | |
16877 | ac_status=$? | |
16878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16879 | (exit $ac_status); }; }; then | |
16880 | ac_cv_member_struct_reg_r_fs=yes | |
16881 | else | |
16882 | echo "$as_me: failed program was:" >&5 | |
16883 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16884 | ||
b4e70030 | 16885 | cat >conftest.$ac_ext <<_ACEOF |
5c45e068 MK |
16886 | /* confdefs.h. */ |
16887 | _ACEOF | |
16888 | cat confdefs.h >>conftest.$ac_ext | |
16889 | cat >>conftest.$ac_ext <<_ACEOF | |
16890 | /* end confdefs.h. */ | |
16891 | #include <machine/reg.h> | |
16892 | ||
bec39cab AC |
16893 | int |
16894 | main () | |
16895 | { | |
5c45e068 MK |
16896 | static struct reg ac_aggr; |
16897 | if (sizeof ac_aggr.r_fs) | |
16898 | return 0; | |
bec39cab AC |
16899 | ; |
16900 | return 0; | |
16901 | } | |
16902 | _ACEOF | |
16903 | rm -f conftest.$ac_objext | |
16904 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16905 | (eval $ac_compile) 2>conftest.er1 | |
16906 | ac_status=$? | |
16907 | grep -v '^ *+' conftest.er1 >conftest.err | |
16908 | rm -f conftest.er1 | |
16909 | cat conftest.err >&5 | |
16910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16911 | (exit $ac_status); } && | |
b4e70030 JB |
16912 | { ac_try='test -z "$ac_c_werror_flag" |
16913 | || test ! -s conftest.err' | |
bec39cab AC |
16914 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16915 | (eval $ac_try) 2>&5 | |
16916 | ac_status=$? | |
16917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16918 | (exit $ac_status); }; } && | |
16919 | { ac_try='test -s conftest.$ac_objext' | |
16920 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16921 | (eval $ac_try) 2>&5 | |
16922 | ac_status=$? | |
16923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16924 | (exit $ac_status); }; }; then | |
5c45e068 | 16925 | ac_cv_member_struct_reg_r_fs=yes |
3862412b | 16926 | else |
bec39cab AC |
16927 | echo "$as_me: failed program was:" >&5 |
16928 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16929 | ||
b4e70030 | 16930 | ac_cv_member_struct_reg_r_fs=no |
3862412b | 16931 | fi |
bec39cab | 16932 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b | 16933 | fi |
5c45e068 MK |
16934 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
16935 | fi | |
b4e70030 JB |
16936 | echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5 |
16937 | echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6 | |
5c45e068 MK |
16938 | if test $ac_cv_member_struct_reg_r_fs = yes; then |
16939 | ||
16940 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 16941 | #define HAVE_STRUCT_REG_R_FS 1 |
bec39cab | 16942 | _ACEOF |
3862412b | 16943 | |
5c45e068 | 16944 | |
97bf5e38 | 16945 | fi |
b4e70030 JB |
16946 | echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5 |
16947 | echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6 | |
5c45e068 | 16948 | if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then |
bec39cab | 16949 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3862412b | 16950 | else |
bec39cab AC |
16951 | cat >conftest.$ac_ext <<_ACEOF |
16952 | /* confdefs.h. */ | |
16953 | _ACEOF | |
16954 | cat confdefs.h >>conftest.$ac_ext | |
16955 | cat >>conftest.$ac_ext <<_ACEOF | |
16956 | /* end confdefs.h. */ | |
a3828db0 | 16957 | #include <machine/reg.h> |
5c45e068 | 16958 | |
bec39cab AC |
16959 | int |
16960 | main () | |
16961 | { | |
5c45e068 MK |
16962 | static struct reg ac_aggr; |
16963 | if (ac_aggr.r_gs) | |
16964 | return 0; | |
bec39cab AC |
16965 | ; |
16966 | return 0; | |
16967 | } | |
16968 | _ACEOF | |
16969 | rm -f conftest.$ac_objext | |
16970 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
16971 | (eval $ac_compile) 2>conftest.er1 | |
16972 | ac_status=$? | |
16973 | grep -v '^ *+' conftest.er1 >conftest.err | |
16974 | rm -f conftest.er1 | |
16975 | cat conftest.err >&5 | |
16976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16977 | (exit $ac_status); } && | |
b4e70030 JB |
16978 | { ac_try='test -z "$ac_c_werror_flag" |
16979 | || test ! -s conftest.err' | |
bec39cab AC |
16980 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
16981 | (eval $ac_try) 2>&5 | |
16982 | ac_status=$? | |
16983 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16984 | (exit $ac_status); }; } && | |
16985 | { ac_try='test -s conftest.$ac_objext' | |
16986 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16987 | (eval $ac_try) 2>&5 | |
16988 | ac_status=$? | |
16989 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16990 | (exit $ac_status); }; }; then | |
5c45e068 | 16991 | ac_cv_member_struct_reg_r_gs=yes |
3862412b | 16992 | else |
bec39cab AC |
16993 | echo "$as_me: failed program was:" >&5 |
16994 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16995 | ||
b4e70030 | 16996 | cat >conftest.$ac_ext <<_ACEOF |
5c45e068 MK |
16997 | /* confdefs.h. */ |
16998 | _ACEOF | |
16999 | cat confdefs.h >>conftest.$ac_ext | |
17000 | cat >>conftest.$ac_ext <<_ACEOF | |
17001 | /* end confdefs.h. */ | |
17002 | #include <machine/reg.h> | |
17003 | ||
17004 | int | |
17005 | main () | |
17006 | { | |
17007 | static struct reg ac_aggr; | |
17008 | if (sizeof ac_aggr.r_gs) | |
17009 | return 0; | |
17010 | ; | |
17011 | return 0; | |
17012 | } | |
17013 | _ACEOF | |
17014 | rm -f conftest.$ac_objext | |
17015 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17016 | (eval $ac_compile) 2>conftest.er1 | |
17017 | ac_status=$? | |
17018 | grep -v '^ *+' conftest.er1 >conftest.err | |
17019 | rm -f conftest.er1 | |
17020 | cat conftest.err >&5 | |
17021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17022 | (exit $ac_status); } && | |
b4e70030 JB |
17023 | { ac_try='test -z "$ac_c_werror_flag" |
17024 | || test ! -s conftest.err' | |
5c45e068 MK |
17025 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17026 | (eval $ac_try) 2>&5 | |
17027 | ac_status=$? | |
17028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17029 | (exit $ac_status); }; } && | |
17030 | { ac_try='test -s conftest.$ac_objext' | |
17031 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17032 | (eval $ac_try) 2>&5 | |
17033 | ac_status=$? | |
17034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17035 | (exit $ac_status); }; }; then | |
17036 | ac_cv_member_struct_reg_r_gs=yes | |
17037 | else | |
17038 | echo "$as_me: failed program was:" >&5 | |
17039 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17040 | ||
b4e70030 | 17041 | ac_cv_member_struct_reg_r_gs=no |
3862412b | 17042 | fi |
bec39cab | 17043 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b | 17044 | fi |
5c45e068 MK |
17045 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
17046 | fi | |
b4e70030 JB |
17047 | echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5 |
17048 | echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6 | |
5c45e068 MK |
17049 | if test $ac_cv_member_struct_reg_r_gs = yes; then |
17050 | ||
17051 | cat >>confdefs.h <<_ACEOF | |
a3828db0 | 17052 | #define HAVE_STRUCT_REG_R_GS 1 |
bec39cab | 17053 | _ACEOF |
3862412b | 17054 | |
5c45e068 | 17055 | |
97bf5e38 | 17056 | fi |
3862412b | 17057 | |
5c45e068 | 17058 | |
a3828db0 | 17059 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
b4e70030 JB |
17060 | echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5 |
17061 | echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6 | |
a3828db0 | 17062 | if test "${gdb_cv_have_ptrace_getregs+set}" = set; then |
bec39cab | 17063 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
451928c5 | 17064 | else |
bec39cab AC |
17065 | cat >conftest.$ac_ext <<_ACEOF |
17066 | /* confdefs.h. */ | |
17067 | _ACEOF | |
17068 | cat confdefs.h >>conftest.$ac_ext | |
17069 | cat >>conftest.$ac_ext <<_ACEOF | |
17070 | /* end confdefs.h. */ | |
a3828db0 | 17071 | #include <sys/ptrace.h> |
bec39cab AC |
17072 | int |
17073 | main () | |
17074 | { | |
a3828db0 | 17075 | PTRACE_GETREGS; |
bec39cab AC |
17076 | ; |
17077 | return 0; | |
17078 | } | |
17079 | _ACEOF | |
17080 | rm -f conftest.$ac_objext | |
17081 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17082 | (eval $ac_compile) 2>conftest.er1 | |
17083 | ac_status=$? | |
17084 | grep -v '^ *+' conftest.er1 >conftest.err | |
17085 | rm -f conftest.er1 | |
17086 | cat conftest.err >&5 | |
17087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17088 | (exit $ac_status); } && | |
b4e70030 JB |
17089 | { ac_try='test -z "$ac_c_werror_flag" |
17090 | || test ! -s conftest.err' | |
bec39cab AC |
17091 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17092 | (eval $ac_try) 2>&5 | |
17093 | ac_status=$? | |
17094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17095 | (exit $ac_status); }; } && | |
17096 | { ac_try='test -s conftest.$ac_objext' | |
17097 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17098 | (eval $ac_try) 2>&5 | |
17099 | ac_status=$? | |
17100 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17101 | (exit $ac_status); }; }; then | |
a3828db0 | 17102 | gdb_cv_have_ptrace_getregs=yes |
451928c5 | 17103 | else |
bec39cab AC |
17104 | echo "$as_me: failed program was:" >&5 |
17105 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17106 | ||
b4e70030 | 17107 | gdb_cv_have_ptrace_getregs=no |
451928c5 | 17108 | fi |
bec39cab | 17109 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
17110 | fi |
17111 | ||
b4e70030 JB |
17112 | echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5 |
17113 | echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6 | |
a3828db0 | 17114 | if test $gdb_cv_have_ptrace_getregs = yes; then |
60ca704f SE |
17115 | |
17116 | cat >>confdefs.h <<\_ACEOF | |
a3828db0 | 17117 | #define HAVE_PTRACE_GETREGS 1 |
bec39cab | 17118 | _ACEOF |
451928c5 | 17119 | |
97bf5e38 | 17120 | fi |
451928c5 | 17121 | |
a3828db0 | 17122 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
b4e70030 JB |
17123 | echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5 |
17124 | echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6 | |
a3828db0 | 17125 | if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then |
bec39cab | 17126 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
451928c5 | 17127 | else |
bec39cab AC |
17128 | cat >conftest.$ac_ext <<_ACEOF |
17129 | /* confdefs.h. */ | |
17130 | _ACEOF | |
17131 | cat confdefs.h >>conftest.$ac_ext | |
17132 | cat >>conftest.$ac_ext <<_ACEOF | |
17133 | /* end confdefs.h. */ | |
a3828db0 | 17134 | #include <sys/ptrace.h> |
bec39cab AC |
17135 | int |
17136 | main () | |
17137 | { | |
a3828db0 | 17138 | PTRACE_GETFPXREGS; |
bec39cab AC |
17139 | ; |
17140 | return 0; | |
17141 | } | |
17142 | _ACEOF | |
17143 | rm -f conftest.$ac_objext | |
17144 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17145 | (eval $ac_compile) 2>conftest.er1 | |
17146 | ac_status=$? | |
17147 | grep -v '^ *+' conftest.er1 >conftest.err | |
17148 | rm -f conftest.er1 | |
17149 | cat conftest.err >&5 | |
17150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17151 | (exit $ac_status); } && | |
b4e70030 JB |
17152 | { ac_try='test -z "$ac_c_werror_flag" |
17153 | || test ! -s conftest.err' | |
bec39cab AC |
17154 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17155 | (eval $ac_try) 2>&5 | |
17156 | ac_status=$? | |
17157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17158 | (exit $ac_status); }; } && | |
17159 | { ac_try='test -s conftest.$ac_objext' | |
17160 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17161 | (eval $ac_try) 2>&5 | |
17162 | ac_status=$? | |
17163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17164 | (exit $ac_status); }; }; then | |
a3828db0 | 17165 | gdb_cv_have_ptrace_getfpxregs=yes |
451928c5 | 17166 | else |
bec39cab AC |
17167 | echo "$as_me: failed program was:" >&5 |
17168 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17169 | ||
b4e70030 | 17170 | gdb_cv_have_ptrace_getfpxregs=no |
451928c5 | 17171 | fi |
bec39cab | 17172 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
451928c5 AC |
17173 | fi |
17174 | ||
b4e70030 JB |
17175 | echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
17176 | echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6 | |
a3828db0 | 17177 | if test $gdb_cv_have_ptrace_getfpxregs = yes; then |
60ca704f SE |
17178 | |
17179 | cat >>confdefs.h <<\_ACEOF | |
a3828db0 | 17180 | #define HAVE_PTRACE_GETFPXREGS 1 |
bec39cab | 17181 | _ACEOF |
451928c5 | 17182 | |
97bf5e38 | 17183 | fi |
451928c5 | 17184 | |
a3828db0 | 17185 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
b4e70030 JB |
17186 | echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5 |
17187 | echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6 | |
a3828db0 | 17188 | if test "${gdb_cv_have_pt_getdbregs+set}" = set; then |
bec39cab | 17189 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3862412b | 17190 | else |
bec39cab AC |
17191 | cat >conftest.$ac_ext <<_ACEOF |
17192 | /* confdefs.h. */ | |
17193 | _ACEOF | |
17194 | cat confdefs.h >>conftest.$ac_ext | |
17195 | cat >>conftest.$ac_ext <<_ACEOF | |
17196 | /* end confdefs.h. */ | |
a3828db0 MK |
17197 | #include <sys/types.h> |
17198 | #include <sys/ptrace.h> | |
bec39cab AC |
17199 | int |
17200 | main () | |
17201 | { | |
a3828db0 | 17202 | PT_GETDBREGS; |
bec39cab AC |
17203 | ; |
17204 | return 0; | |
17205 | } | |
17206 | _ACEOF | |
17207 | rm -f conftest.$ac_objext | |
17208 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17209 | (eval $ac_compile) 2>conftest.er1 | |
17210 | ac_status=$? | |
17211 | grep -v '^ *+' conftest.er1 >conftest.err | |
17212 | rm -f conftest.er1 | |
17213 | cat conftest.err >&5 | |
17214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17215 | (exit $ac_status); } && | |
b4e70030 JB |
17216 | { ac_try='test -z "$ac_c_werror_flag" |
17217 | || test ! -s conftest.err' | |
bec39cab AC |
17218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17219 | (eval $ac_try) 2>&5 | |
17220 | ac_status=$? | |
17221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17222 | (exit $ac_status); }; } && | |
17223 | { ac_try='test -s conftest.$ac_objext' | |
17224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17225 | (eval $ac_try) 2>&5 | |
17226 | ac_status=$? | |
17227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17228 | (exit $ac_status); }; }; then | |
a3828db0 | 17229 | gdb_cv_have_pt_getdbregs=yes |
3862412b | 17230 | else |
bec39cab AC |
17231 | echo "$as_me: failed program was:" >&5 |
17232 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17233 | ||
b4e70030 | 17234 | gdb_cv_have_pt_getdbregs=no |
3862412b | 17235 | fi |
bec39cab | 17236 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
17237 | fi |
17238 | ||
b4e70030 JB |
17239 | echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5 |
17240 | echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6 | |
a3828db0 | 17241 | if test $gdb_cv_have_pt_getdbregs = yes; then |
60ca704f SE |
17242 | |
17243 | cat >>confdefs.h <<\_ACEOF | |
a3828db0 | 17244 | #define HAVE_PT_GETDBREGS 1 |
bec39cab | 17245 | _ACEOF |
3862412b | 17246 | |
97bf5e38 | 17247 | fi |
3862412b | 17248 | |
a3828db0 | 17249 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
b4e70030 JB |
17250 | echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5 |
17251 | echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6 | |
a3828db0 | 17252 | if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then |
bec39cab | 17253 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3862412b | 17254 | else |
bec39cab AC |
17255 | cat >conftest.$ac_ext <<_ACEOF |
17256 | /* confdefs.h. */ | |
17257 | _ACEOF | |
17258 | cat confdefs.h >>conftest.$ac_ext | |
17259 | cat >>conftest.$ac_ext <<_ACEOF | |
17260 | /* end confdefs.h. */ | |
a3828db0 MK |
17261 | #include <sys/types.h> |
17262 | #include <sys/ptrace.h> | |
bec39cab AC |
17263 | int |
17264 | main () | |
17265 | { | |
a3828db0 | 17266 | PT_GETXMMREGS; |
bec39cab AC |
17267 | ; |
17268 | return 0; | |
17269 | } | |
17270 | _ACEOF | |
17271 | rm -f conftest.$ac_objext | |
17272 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17273 | (eval $ac_compile) 2>conftest.er1 | |
17274 | ac_status=$? | |
17275 | grep -v '^ *+' conftest.er1 >conftest.err | |
17276 | rm -f conftest.er1 | |
17277 | cat conftest.err >&5 | |
17278 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17279 | (exit $ac_status); } && | |
b4e70030 JB |
17280 | { ac_try='test -z "$ac_c_werror_flag" |
17281 | || test ! -s conftest.err' | |
bec39cab AC |
17282 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17283 | (eval $ac_try) 2>&5 | |
17284 | ac_status=$? | |
17285 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17286 | (exit $ac_status); }; } && | |
17287 | { ac_try='test -s conftest.$ac_objext' | |
17288 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17289 | (eval $ac_try) 2>&5 | |
17290 | ac_status=$? | |
17291 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17292 | (exit $ac_status); }; }; then | |
a3828db0 | 17293 | gdb_cv_have_pt_getxmmregs=yes |
3862412b | 17294 | else |
bec39cab AC |
17295 | echo "$as_me: failed program was:" >&5 |
17296 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17297 | ||
b4e70030 | 17298 | gdb_cv_have_pt_getxmmregs=no |
3862412b | 17299 | fi |
bec39cab | 17300 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3862412b MK |
17301 | fi |
17302 | ||
b4e70030 JB |
17303 | echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5 |
17304 | echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6 | |
a3828db0 | 17305 | if test $gdb_cv_have_pt_getxmmregs = yes; then |
60ca704f SE |
17306 | |
17307 | cat >>confdefs.h <<\_ACEOF | |
a3828db0 | 17308 | #define HAVE_PT_GETXMMREGS 1 |
bec39cab | 17309 | _ACEOF |
3862412b | 17310 | |
97bf5e38 | 17311 | fi |
3862412b | 17312 | |
eb368090 | 17313 | # Detect which type of /proc is in use, such as for Unixware or Solaris. |
97bf5e38 MK |
17314 | |
17315 | if test "${target}" = "${host}"; then | |
17316 | case "${host}" in | |
97bf5e38 | 17317 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* ) |
60ca704f SE |
17318 | |
17319 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17320 | #define NEW_PROC_API 1 |
bec39cab | 17321 | _ACEOF |
97bf5e38 MK |
17322 | |
17323 | ;; | |
c162e8c9 | 17324 | *-*-solaris2.[6789] | *-*-solaris2.1[0-9]*) |
60ca704f SE |
17325 | |
17326 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17327 | #define NEW_PROC_API 1 |
bec39cab | 17328 | _ACEOF |
c960c18f AC |
17329 | |
17330 | ;; | |
17331 | mips-sgi-irix5*) | |
17332 | # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5. | |
60ca704f SE |
17333 | |
17334 | cat >>confdefs.h <<\_ACEOF | |
c960c18f | 17335 | #define _KMEMUSER 1 |
bec39cab | 17336 | _ACEOF |
97bf5e38 MK |
17337 | |
17338 | ;; | |
17339 | esac | |
17340 | fi | |
17341 | ||
17342 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
b4e70030 JB |
17343 | echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5 |
17344 | echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17345 | if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then |
17346 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17347 | else | |
17348 | cat >conftest.$ac_ext <<_ACEOF | |
17349 | /* confdefs.h. */ | |
17350 | _ACEOF | |
17351 | cat confdefs.h >>conftest.$ac_ext | |
17352 | cat >>conftest.$ac_ext <<_ACEOF | |
17353 | /* end confdefs.h. */ | |
596c9d4b KB |
17354 | |
17355 | #define _SYSCALL32 | |
17356 | #include <sys/procfs.h> | |
bec39cab AC |
17357 | int |
17358 | main () | |
17359 | { | |
97bf5e38 | 17360 | pstatus_t avar |
bec39cab AC |
17361 | ; |
17362 | return 0; | |
17363 | } | |
17364 | _ACEOF | |
17365 | rm -f conftest.$ac_objext | |
17366 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17367 | (eval $ac_compile) 2>conftest.er1 | |
17368 | ac_status=$? | |
17369 | grep -v '^ *+' conftest.er1 >conftest.err | |
17370 | rm -f conftest.er1 | |
17371 | cat conftest.err >&5 | |
17372 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17373 | (exit $ac_status); } && | |
b4e70030 JB |
17374 | { ac_try='test -z "$ac_c_werror_flag" |
17375 | || test ! -s conftest.err' | |
bec39cab AC |
17376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17377 | (eval $ac_try) 2>&5 | |
17378 | ac_status=$? | |
17379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17380 | (exit $ac_status); }; } && | |
17381 | { ac_try='test -s conftest.$ac_objext' | |
17382 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17383 | (eval $ac_try) 2>&5 | |
17384 | ac_status=$? | |
17385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17386 | (exit $ac_status); }; }; then | |
97bf5e38 | 17387 | bfd_cv_have_sys_procfs_type_pstatus_t=yes |
596c9d4b | 17388 | else |
bec39cab AC |
17389 | echo "$as_me: failed program was:" >&5 |
17390 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17391 | ||
b4e70030 | 17392 | bfd_cv_have_sys_procfs_type_pstatus_t=no |
bec39cab | 17393 | |
596c9d4b | 17394 | fi |
bec39cab | 17395 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
17396 | fi |
17397 | ||
97bf5e38 | 17398 | if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then |
bec39cab AC |
17399 | |
17400 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17401 | #define HAVE_PSTATUS_T 1 |
bec39cab | 17402 | _ACEOF |
596c9d4b KB |
17403 | |
17404 | fi | |
b4e70030 JB |
17405 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 |
17406 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6 | |
596c9d4b | 17407 | |
b4e70030 JB |
17408 | echo "$as_me:$LINENO: checking for prrun_t in sys/procfs.h" >&5 |
17409 | echo $ECHO_N "checking for prrun_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17410 | if test "${bfd_cv_have_sys_procfs_type_prrun_t+set}" = set; then |
17411 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
596c9d4b | 17412 | else |
bec39cab AC |
17413 | cat >conftest.$ac_ext <<_ACEOF |
17414 | /* confdefs.h. */ | |
17415 | _ACEOF | |
17416 | cat confdefs.h >>conftest.$ac_ext | |
17417 | cat >>conftest.$ac_ext <<_ACEOF | |
17418 | /* end confdefs.h. */ | |
596c9d4b KB |
17419 | |
17420 | #define _SYSCALL32 | |
17421 | #include <sys/procfs.h> | |
bec39cab AC |
17422 | int |
17423 | main () | |
17424 | { | |
97bf5e38 | 17425 | prrun_t avar |
bec39cab AC |
17426 | ; |
17427 | return 0; | |
17428 | } | |
17429 | _ACEOF | |
17430 | rm -f conftest.$ac_objext | |
17431 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17432 | (eval $ac_compile) 2>conftest.er1 | |
17433 | ac_status=$? | |
17434 | grep -v '^ *+' conftest.er1 >conftest.err | |
17435 | rm -f conftest.er1 | |
17436 | cat conftest.err >&5 | |
17437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17438 | (exit $ac_status); } && | |
b4e70030 JB |
17439 | { ac_try='test -z "$ac_c_werror_flag" |
17440 | || test ! -s conftest.err' | |
bec39cab AC |
17441 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17442 | (eval $ac_try) 2>&5 | |
17443 | ac_status=$? | |
17444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17445 | (exit $ac_status); }; } && | |
17446 | { ac_try='test -s conftest.$ac_objext' | |
17447 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17448 | (eval $ac_try) 2>&5 | |
17449 | ac_status=$? | |
17450 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17451 | (exit $ac_status); }; }; then | |
97bf5e38 | 17452 | bfd_cv_have_sys_procfs_type_prrun_t=yes |
596c9d4b | 17453 | else |
bec39cab AC |
17454 | echo "$as_me: failed program was:" >&5 |
17455 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17456 | ||
b4e70030 | 17457 | bfd_cv_have_sys_procfs_type_prrun_t=no |
bec39cab | 17458 | |
596c9d4b | 17459 | fi |
bec39cab | 17460 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
17461 | fi |
17462 | ||
97bf5e38 | 17463 | if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then |
bec39cab AC |
17464 | |
17465 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17466 | #define HAVE_PRRUN_T 1 |
bec39cab | 17467 | _ACEOF |
596c9d4b KB |
17468 | |
17469 | fi | |
b4e70030 JB |
17470 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prrun_t" >&5 |
17471 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prrun_t" >&6 | |
596c9d4b | 17472 | |
b4e70030 JB |
17473 | echo "$as_me:$LINENO: checking for gregset_t in sys/procfs.h" >&5 |
17474 | echo $ECHO_N "checking for gregset_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17475 | if test "${bfd_cv_have_sys_procfs_type_gregset_t+set}" = set; then |
17476 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
596c9d4b | 17477 | else |
bec39cab AC |
17478 | cat >conftest.$ac_ext <<_ACEOF |
17479 | /* confdefs.h. */ | |
17480 | _ACEOF | |
17481 | cat confdefs.h >>conftest.$ac_ext | |
17482 | cat >>conftest.$ac_ext <<_ACEOF | |
17483 | /* end confdefs.h. */ | |
596c9d4b KB |
17484 | |
17485 | #define _SYSCALL32 | |
17486 | #include <sys/procfs.h> | |
bec39cab AC |
17487 | int |
17488 | main () | |
17489 | { | |
97bf5e38 | 17490 | gregset_t avar |
bec39cab AC |
17491 | ; |
17492 | return 0; | |
17493 | } | |
17494 | _ACEOF | |
17495 | rm -f conftest.$ac_objext | |
17496 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17497 | (eval $ac_compile) 2>conftest.er1 | |
17498 | ac_status=$? | |
17499 | grep -v '^ *+' conftest.er1 >conftest.err | |
17500 | rm -f conftest.er1 | |
17501 | cat conftest.err >&5 | |
17502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17503 | (exit $ac_status); } && | |
b4e70030 JB |
17504 | { ac_try='test -z "$ac_c_werror_flag" |
17505 | || test ! -s conftest.err' | |
bec39cab AC |
17506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17507 | (eval $ac_try) 2>&5 | |
17508 | ac_status=$? | |
17509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17510 | (exit $ac_status); }; } && | |
17511 | { ac_try='test -s conftest.$ac_objext' | |
17512 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17513 | (eval $ac_try) 2>&5 | |
17514 | ac_status=$? | |
17515 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17516 | (exit $ac_status); }; }; then | |
97bf5e38 | 17517 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
596c9d4b | 17518 | else |
bec39cab AC |
17519 | echo "$as_me: failed program was:" >&5 |
17520 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17521 | ||
b4e70030 | 17522 | bfd_cv_have_sys_procfs_type_gregset_t=no |
bec39cab | 17523 | |
596c9d4b | 17524 | fi |
bec39cab | 17525 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
596c9d4b KB |
17526 | fi |
17527 | ||
97bf5e38 | 17528 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
bec39cab AC |
17529 | |
17530 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17531 | #define HAVE_GREGSET_T 1 |
bec39cab | 17532 | _ACEOF |
596c9d4b KB |
17533 | |
17534 | fi | |
b4e70030 JB |
17535 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
17536 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_gregset_t" >&6 | |
451928c5 | 17537 | |
b4e70030 JB |
17538 | echo "$as_me:$LINENO: checking for fpregset_t in sys/procfs.h" >&5 |
17539 | echo $ECHO_N "checking for fpregset_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17540 | if test "${bfd_cv_have_sys_procfs_type_fpregset_t+set}" = set; then |
17541 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
d84dd0c5 | 17542 | else |
bec39cab AC |
17543 | cat >conftest.$ac_ext <<_ACEOF |
17544 | /* confdefs.h. */ | |
17545 | _ACEOF | |
17546 | cat confdefs.h >>conftest.$ac_ext | |
17547 | cat >>conftest.$ac_ext <<_ACEOF | |
17548 | /* end confdefs.h. */ | |
97bf5e38 MK |
17549 | |
17550 | #define _SYSCALL32 | |
d84dd0c5 | 17551 | #include <sys/procfs.h> |
bec39cab AC |
17552 | int |
17553 | main () | |
17554 | { | |
97bf5e38 | 17555 | fpregset_t avar |
bec39cab AC |
17556 | ; |
17557 | return 0; | |
17558 | } | |
17559 | _ACEOF | |
17560 | rm -f conftest.$ac_objext | |
17561 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17562 | (eval $ac_compile) 2>conftest.er1 | |
17563 | ac_status=$? | |
17564 | grep -v '^ *+' conftest.er1 >conftest.err | |
17565 | rm -f conftest.er1 | |
17566 | cat conftest.err >&5 | |
17567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17568 | (exit $ac_status); } && | |
b4e70030 JB |
17569 | { ac_try='test -z "$ac_c_werror_flag" |
17570 | || test ! -s conftest.err' | |
bec39cab AC |
17571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17572 | (eval $ac_try) 2>&5 | |
17573 | ac_status=$? | |
17574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17575 | (exit $ac_status); }; } && | |
17576 | { ac_try='test -s conftest.$ac_objext' | |
17577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17578 | (eval $ac_try) 2>&5 | |
17579 | ac_status=$? | |
17580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17581 | (exit $ac_status); }; }; then | |
97bf5e38 | 17582 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
d84dd0c5 | 17583 | else |
bec39cab AC |
17584 | echo "$as_me: failed program was:" >&5 |
17585 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17586 | ||
b4e70030 | 17587 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
bec39cab | 17588 | |
d84dd0c5 | 17589 | fi |
bec39cab | 17590 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
d84dd0c5 MK |
17591 | fi |
17592 | ||
97bf5e38 | 17593 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
bec39cab AC |
17594 | |
17595 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17596 | #define HAVE_FPREGSET_T 1 |
bec39cab | 17597 | _ACEOF |
d84dd0c5 | 17598 | |
97bf5e38 | 17599 | fi |
b4e70030 JB |
17600 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
17601 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_fpregset_t" >&6 | |
d84dd0c5 | 17602 | |
b4e70030 JB |
17603 | echo "$as_me:$LINENO: checking for prgregset_t in sys/procfs.h" >&5 |
17604 | echo $ECHO_N "checking for prgregset_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17605 | if test "${bfd_cv_have_sys_procfs_type_prgregset_t+set}" = set; then |
17606 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 17607 | else |
bec39cab AC |
17608 | cat >conftest.$ac_ext <<_ACEOF |
17609 | /* confdefs.h. */ | |
17610 | _ACEOF | |
17611 | cat confdefs.h >>conftest.$ac_ext | |
17612 | cat >>conftest.$ac_ext <<_ACEOF | |
17613 | /* end confdefs.h. */ | |
c906108c | 17614 | |
97bf5e38 MK |
17615 | #define _SYSCALL32 |
17616 | #include <sys/procfs.h> | |
bec39cab AC |
17617 | int |
17618 | main () | |
17619 | { | |
97bf5e38 | 17620 | prgregset_t avar |
bec39cab AC |
17621 | ; |
17622 | return 0; | |
17623 | } | |
17624 | _ACEOF | |
17625 | rm -f conftest.$ac_objext | |
17626 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17627 | (eval $ac_compile) 2>conftest.er1 | |
17628 | ac_status=$? | |
17629 | grep -v '^ *+' conftest.er1 >conftest.err | |
17630 | rm -f conftest.er1 | |
17631 | cat conftest.err >&5 | |
17632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17633 | (exit $ac_status); } && | |
b4e70030 JB |
17634 | { ac_try='test -z "$ac_c_werror_flag" |
17635 | || test ! -s conftest.err' | |
bec39cab AC |
17636 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17637 | (eval $ac_try) 2>&5 | |
17638 | ac_status=$? | |
17639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17640 | (exit $ac_status); }; } && | |
17641 | { ac_try='test -s conftest.$ac_objext' | |
17642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17643 | (eval $ac_try) 2>&5 | |
17644 | ac_status=$? | |
17645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17646 | (exit $ac_status); }; }; then | |
97bf5e38 | 17647 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
c906108c | 17648 | else |
bec39cab AC |
17649 | echo "$as_me: failed program was:" >&5 |
17650 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17651 | ||
b4e70030 | 17652 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
bec39cab | 17653 | |
c906108c | 17654 | fi |
bec39cab | 17655 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
17656 | fi |
17657 | ||
97bf5e38 | 17658 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
bec39cab AC |
17659 | |
17660 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17661 | #define HAVE_PRGREGSET_T 1 |
bec39cab | 17662 | _ACEOF |
c906108c | 17663 | |
97bf5e38 | 17664 | fi |
b4e70030 JB |
17665 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
17666 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset_t" >&6 | |
c906108c | 17667 | |
b4e70030 JB |
17668 | echo "$as_me:$LINENO: checking for prfpregset_t in sys/procfs.h" >&5 |
17669 | echo $ECHO_N "checking for prfpregset_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17670 | if test "${bfd_cv_have_sys_procfs_type_prfpregset_t+set}" = set; then |
17671 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
d45fe813 | 17672 | else |
bec39cab AC |
17673 | cat >conftest.$ac_ext <<_ACEOF |
17674 | /* confdefs.h. */ | |
17675 | _ACEOF | |
17676 | cat confdefs.h >>conftest.$ac_ext | |
17677 | cat >>conftest.$ac_ext <<_ACEOF | |
17678 | /* end confdefs.h. */ | |
97bf5e38 MK |
17679 | |
17680 | #define _SYSCALL32 | |
17681 | #include <sys/procfs.h> | |
bec39cab AC |
17682 | int |
17683 | main () | |
17684 | { | |
97bf5e38 | 17685 | prfpregset_t avar |
bec39cab AC |
17686 | ; |
17687 | return 0; | |
17688 | } | |
17689 | _ACEOF | |
17690 | rm -f conftest.$ac_objext | |
17691 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17692 | (eval $ac_compile) 2>conftest.er1 | |
17693 | ac_status=$? | |
17694 | grep -v '^ *+' conftest.er1 >conftest.err | |
17695 | rm -f conftest.er1 | |
17696 | cat conftest.err >&5 | |
17697 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17698 | (exit $ac_status); } && | |
b4e70030 JB |
17699 | { ac_try='test -z "$ac_c_werror_flag" |
17700 | || test ! -s conftest.err' | |
bec39cab AC |
17701 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17702 | (eval $ac_try) 2>&5 | |
17703 | ac_status=$? | |
17704 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17705 | (exit $ac_status); }; } && | |
17706 | { ac_try='test -s conftest.$ac_objext' | |
17707 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17708 | (eval $ac_try) 2>&5 | |
17709 | ac_status=$? | |
17710 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17711 | (exit $ac_status); }; }; then | |
97bf5e38 | 17712 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
d45fe813 | 17713 | else |
bec39cab AC |
17714 | echo "$as_me: failed program was:" >&5 |
17715 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17716 | ||
b4e70030 | 17717 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
bec39cab | 17718 | |
d45fe813 | 17719 | fi |
bec39cab | 17720 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
17721 | fi |
17722 | ||
97bf5e38 | 17723 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
bec39cab AC |
17724 | |
17725 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17726 | #define HAVE_PRFPREGSET_T 1 |
bec39cab | 17727 | _ACEOF |
d45fe813 | 17728 | |
97bf5e38 | 17729 | fi |
b4e70030 JB |
17730 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
17731 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6 | |
d45fe813 | 17732 | |
b4e70030 JB |
17733 | echo "$as_me:$LINENO: checking for prgregset32_t in sys/procfs.h" >&5 |
17734 | echo $ECHO_N "checking for prgregset32_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17735 | if test "${bfd_cv_have_sys_procfs_type_prgregset32_t+set}" = set; then |
17736 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
d45fe813 | 17737 | else |
bec39cab AC |
17738 | cat >conftest.$ac_ext <<_ACEOF |
17739 | /* confdefs.h. */ | |
17740 | _ACEOF | |
17741 | cat confdefs.h >>conftest.$ac_ext | |
17742 | cat >>conftest.$ac_ext <<_ACEOF | |
17743 | /* end confdefs.h. */ | |
97bf5e38 MK |
17744 | |
17745 | #define _SYSCALL32 | |
17746 | #include <sys/procfs.h> | |
bec39cab AC |
17747 | int |
17748 | main () | |
17749 | { | |
97bf5e38 | 17750 | prgregset32_t avar |
bec39cab AC |
17751 | ; |
17752 | return 0; | |
17753 | } | |
17754 | _ACEOF | |
17755 | rm -f conftest.$ac_objext | |
17756 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17757 | (eval $ac_compile) 2>conftest.er1 | |
17758 | ac_status=$? | |
17759 | grep -v '^ *+' conftest.er1 >conftest.err | |
17760 | rm -f conftest.er1 | |
17761 | cat conftest.err >&5 | |
17762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17763 | (exit $ac_status); } && | |
b4e70030 JB |
17764 | { ac_try='test -z "$ac_c_werror_flag" |
17765 | || test ! -s conftest.err' | |
bec39cab AC |
17766 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17767 | (eval $ac_try) 2>&5 | |
17768 | ac_status=$? | |
17769 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17770 | (exit $ac_status); }; } && | |
17771 | { ac_try='test -s conftest.$ac_objext' | |
17772 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17773 | (eval $ac_try) 2>&5 | |
17774 | ac_status=$? | |
17775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17776 | (exit $ac_status); }; }; then | |
97bf5e38 | 17777 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
d45fe813 | 17778 | else |
bec39cab AC |
17779 | echo "$as_me: failed program was:" >&5 |
17780 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17781 | ||
b4e70030 | 17782 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
bec39cab | 17783 | |
d45fe813 | 17784 | fi |
bec39cab | 17785 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
17786 | fi |
17787 | ||
97bf5e38 | 17788 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
bec39cab AC |
17789 | |
17790 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17791 | #define HAVE_PRGREGSET32_T 1 |
bec39cab | 17792 | _ACEOF |
d45fe813 | 17793 | |
97bf5e38 | 17794 | fi |
b4e70030 JB |
17795 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
17796 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6 | |
d45fe813 | 17797 | |
b4e70030 JB |
17798 | echo "$as_me:$LINENO: checking for prfpregset32_t in sys/procfs.h" >&5 |
17799 | echo $ECHO_N "checking for prfpregset32_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17800 | if test "${bfd_cv_have_sys_procfs_type_prfpregset32_t+set}" = set; then |
17801 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
d45fe813 | 17802 | else |
bec39cab AC |
17803 | cat >conftest.$ac_ext <<_ACEOF |
17804 | /* confdefs.h. */ | |
17805 | _ACEOF | |
17806 | cat confdefs.h >>conftest.$ac_ext | |
17807 | cat >>conftest.$ac_ext <<_ACEOF | |
17808 | /* end confdefs.h. */ | |
97bf5e38 MK |
17809 | |
17810 | #define _SYSCALL32 | |
17811 | #include <sys/procfs.h> | |
bec39cab AC |
17812 | int |
17813 | main () | |
17814 | { | |
97bf5e38 | 17815 | prfpregset32_t avar |
bec39cab AC |
17816 | ; |
17817 | return 0; | |
17818 | } | |
17819 | _ACEOF | |
17820 | rm -f conftest.$ac_objext | |
17821 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17822 | (eval $ac_compile) 2>conftest.er1 | |
17823 | ac_status=$? | |
17824 | grep -v '^ *+' conftest.er1 >conftest.err | |
17825 | rm -f conftest.er1 | |
17826 | cat conftest.err >&5 | |
17827 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17828 | (exit $ac_status); } && | |
b4e70030 JB |
17829 | { ac_try='test -z "$ac_c_werror_flag" |
17830 | || test ! -s conftest.err' | |
bec39cab AC |
17831 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17832 | (eval $ac_try) 2>&5 | |
17833 | ac_status=$? | |
17834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17835 | (exit $ac_status); }; } && | |
17836 | { ac_try='test -s conftest.$ac_objext' | |
17837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17838 | (eval $ac_try) 2>&5 | |
17839 | ac_status=$? | |
17840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17841 | (exit $ac_status); }; }; then | |
97bf5e38 | 17842 | bfd_cv_have_sys_procfs_type_prfpregset32_t=yes |
d45fe813 | 17843 | else |
bec39cab AC |
17844 | echo "$as_me: failed program was:" >&5 |
17845 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17846 | ||
b4e70030 | 17847 | bfd_cv_have_sys_procfs_type_prfpregset32_t=no |
bec39cab | 17848 | |
d45fe813 | 17849 | fi |
bec39cab | 17850 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
17851 | fi |
17852 | ||
97bf5e38 | 17853 | if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then |
bec39cab AC |
17854 | |
17855 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17856 | #define HAVE_PRFPREGSET32_T 1 |
bec39cab | 17857 | _ACEOF |
d45fe813 | 17858 | |
97bf5e38 | 17859 | fi |
b4e70030 JB |
17860 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prfpregset32_t" >&5 |
17861 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prfpregset32_t" >&6 | |
d45fe813 | 17862 | |
b4e70030 JB |
17863 | echo "$as_me:$LINENO: checking for lwpid_t in sys/procfs.h" >&5 |
17864 | echo $ECHO_N "checking for lwpid_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17865 | if test "${bfd_cv_have_sys_procfs_type_lwpid_t+set}" = set; then |
17866 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
d45fe813 | 17867 | else |
bec39cab AC |
17868 | cat >conftest.$ac_ext <<_ACEOF |
17869 | /* confdefs.h. */ | |
17870 | _ACEOF | |
17871 | cat confdefs.h >>conftest.$ac_ext | |
17872 | cat >>conftest.$ac_ext <<_ACEOF | |
17873 | /* end confdefs.h. */ | |
97bf5e38 | 17874 | |
d45fe813 | 17875 | #define _SYSCALL32 |
97bf5e38 | 17876 | #include <sys/procfs.h> |
bec39cab AC |
17877 | int |
17878 | main () | |
17879 | { | |
97bf5e38 | 17880 | lwpid_t avar |
bec39cab AC |
17881 | ; |
17882 | return 0; | |
17883 | } | |
17884 | _ACEOF | |
17885 | rm -f conftest.$ac_objext | |
17886 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17887 | (eval $ac_compile) 2>conftest.er1 | |
17888 | ac_status=$? | |
17889 | grep -v '^ *+' conftest.er1 >conftest.err | |
17890 | rm -f conftest.er1 | |
17891 | cat conftest.err >&5 | |
17892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17893 | (exit $ac_status); } && | |
b4e70030 JB |
17894 | { ac_try='test -z "$ac_c_werror_flag" |
17895 | || test ! -s conftest.err' | |
bec39cab AC |
17896 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17897 | (eval $ac_try) 2>&5 | |
17898 | ac_status=$? | |
17899 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17900 | (exit $ac_status); }; } && | |
17901 | { ac_try='test -s conftest.$ac_objext' | |
17902 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17903 | (eval $ac_try) 2>&5 | |
17904 | ac_status=$? | |
17905 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17906 | (exit $ac_status); }; }; then | |
97bf5e38 | 17907 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
d45fe813 | 17908 | else |
bec39cab AC |
17909 | echo "$as_me: failed program was:" >&5 |
17910 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17911 | ||
b4e70030 | 17912 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
bec39cab | 17913 | |
d45fe813 | 17914 | fi |
bec39cab | 17915 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
d45fe813 KB |
17916 | fi |
17917 | ||
97bf5e38 | 17918 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
bec39cab AC |
17919 | |
17920 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17921 | #define HAVE_LWPID_T 1 |
bec39cab | 17922 | _ACEOF |
d45fe813 | 17923 | |
97bf5e38 | 17924 | fi |
b4e70030 JB |
17925 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
17926 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpid_t" >&6 | |
c906108c | 17927 | |
b4e70030 JB |
17928 | echo "$as_me:$LINENO: checking for psaddr_t in sys/procfs.h" >&5 |
17929 | echo $ECHO_N "checking for psaddr_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17930 | if test "${bfd_cv_have_sys_procfs_type_psaddr_t+set}" = set; then |
17931 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 17932 | else |
bec39cab AC |
17933 | cat >conftest.$ac_ext <<_ACEOF |
17934 | /* confdefs.h. */ | |
17935 | _ACEOF | |
17936 | cat confdefs.h >>conftest.$ac_ext | |
17937 | cat >>conftest.$ac_ext <<_ACEOF | |
17938 | /* end confdefs.h. */ | |
c906108c | 17939 | |
97bf5e38 MK |
17940 | #define _SYSCALL32 |
17941 | #include <sys/procfs.h> | |
bec39cab AC |
17942 | int |
17943 | main () | |
17944 | { | |
97bf5e38 | 17945 | psaddr_t avar |
bec39cab AC |
17946 | ; |
17947 | return 0; | |
17948 | } | |
17949 | _ACEOF | |
17950 | rm -f conftest.$ac_objext | |
17951 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
17952 | (eval $ac_compile) 2>conftest.er1 | |
17953 | ac_status=$? | |
17954 | grep -v '^ *+' conftest.er1 >conftest.err | |
17955 | rm -f conftest.er1 | |
17956 | cat conftest.err >&5 | |
17957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17958 | (exit $ac_status); } && | |
b4e70030 JB |
17959 | { ac_try='test -z "$ac_c_werror_flag" |
17960 | || test ! -s conftest.err' | |
bec39cab AC |
17961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
17962 | (eval $ac_try) 2>&5 | |
17963 | ac_status=$? | |
17964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17965 | (exit $ac_status); }; } && | |
17966 | { ac_try='test -s conftest.$ac_objext' | |
17967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
17968 | (eval $ac_try) 2>&5 | |
17969 | ac_status=$? | |
17970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
17971 | (exit $ac_status); }; }; then | |
97bf5e38 | 17972 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
c906108c | 17973 | else |
bec39cab AC |
17974 | echo "$as_me: failed program was:" >&5 |
17975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
17976 | ||
b4e70030 | 17977 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
bec39cab | 17978 | |
c906108c | 17979 | fi |
bec39cab | 17980 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
17981 | fi |
17982 | ||
97bf5e38 | 17983 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
bec39cab AC |
17984 | |
17985 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 17986 | #define HAVE_PSADDR_T 1 |
bec39cab | 17987 | _ACEOF |
c906108c | 17988 | |
97bf5e38 | 17989 | fi |
b4e70030 JB |
17990 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
17991 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psaddr_t" >&6 | |
c906108c | 17992 | |
b4e70030 JB |
17993 | echo "$as_me:$LINENO: checking for prsysent_t in sys/procfs.h" >&5 |
17994 | echo $ECHO_N "checking for prsysent_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
17995 | if test "${bfd_cv_have_sys_procfs_type_prsysent_t+set}" = set; then |
17996 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 17997 | else |
bec39cab AC |
17998 | cat >conftest.$ac_ext <<_ACEOF |
17999 | /* confdefs.h. */ | |
18000 | _ACEOF | |
18001 | cat confdefs.h >>conftest.$ac_ext | |
18002 | cat >>conftest.$ac_ext <<_ACEOF | |
18003 | /* end confdefs.h. */ | |
c906108c | 18004 | |
97bf5e38 MK |
18005 | #define _SYSCALL32 |
18006 | #include <sys/procfs.h> | |
bec39cab AC |
18007 | int |
18008 | main () | |
18009 | { | |
97bf5e38 | 18010 | prsysent_t avar |
bec39cab AC |
18011 | ; |
18012 | return 0; | |
18013 | } | |
18014 | _ACEOF | |
18015 | rm -f conftest.$ac_objext | |
18016 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18017 | (eval $ac_compile) 2>conftest.er1 | |
18018 | ac_status=$? | |
18019 | grep -v '^ *+' conftest.er1 >conftest.err | |
18020 | rm -f conftest.er1 | |
18021 | cat conftest.err >&5 | |
18022 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18023 | (exit $ac_status); } && | |
b4e70030 JB |
18024 | { ac_try='test -z "$ac_c_werror_flag" |
18025 | || test ! -s conftest.err' | |
bec39cab AC |
18026 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18027 | (eval $ac_try) 2>&5 | |
18028 | ac_status=$? | |
18029 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18030 | (exit $ac_status); }; } && | |
18031 | { ac_try='test -s conftest.$ac_objext' | |
18032 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18033 | (eval $ac_try) 2>&5 | |
18034 | ac_status=$? | |
18035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18036 | (exit $ac_status); }; }; then | |
97bf5e38 | 18037 | bfd_cv_have_sys_procfs_type_prsysent_t=yes |
c906108c | 18038 | else |
bec39cab AC |
18039 | echo "$as_me: failed program was:" >&5 |
18040 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18041 | ||
b4e70030 | 18042 | bfd_cv_have_sys_procfs_type_prsysent_t=no |
bec39cab | 18043 | |
c906108c | 18044 | fi |
bec39cab | 18045 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
18046 | fi |
18047 | ||
97bf5e38 | 18048 | if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then |
bec39cab AC |
18049 | |
18050 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18051 | #define HAVE_PRSYSENT_T 1 |
bec39cab | 18052 | _ACEOF |
c906108c | 18053 | |
97bf5e38 | 18054 | fi |
b4e70030 JB |
18055 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prsysent_t" >&5 |
18056 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prsysent_t" >&6 | |
c906108c | 18057 | |
b4e70030 JB |
18058 | echo "$as_me:$LINENO: checking for pr_sigset_t in sys/procfs.h" >&5 |
18059 | echo $ECHO_N "checking for pr_sigset_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
18060 | if test "${bfd_cv_have_sys_procfs_type_pr_sigset_t+set}" = set; then |
18061 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 18062 | else |
bec39cab AC |
18063 | cat >conftest.$ac_ext <<_ACEOF |
18064 | /* confdefs.h. */ | |
18065 | _ACEOF | |
18066 | cat confdefs.h >>conftest.$ac_ext | |
18067 | cat >>conftest.$ac_ext <<_ACEOF | |
18068 | /* end confdefs.h. */ | |
c906108c | 18069 | |
97bf5e38 MK |
18070 | #define _SYSCALL32 |
18071 | #include <sys/procfs.h> | |
bec39cab AC |
18072 | int |
18073 | main () | |
18074 | { | |
97bf5e38 | 18075 | pr_sigset_t avar |
bec39cab AC |
18076 | ; |
18077 | return 0; | |
18078 | } | |
18079 | _ACEOF | |
18080 | rm -f conftest.$ac_objext | |
18081 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18082 | (eval $ac_compile) 2>conftest.er1 | |
18083 | ac_status=$? | |
18084 | grep -v '^ *+' conftest.er1 >conftest.err | |
18085 | rm -f conftest.er1 | |
18086 | cat conftest.err >&5 | |
18087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18088 | (exit $ac_status); } && | |
b4e70030 JB |
18089 | { ac_try='test -z "$ac_c_werror_flag" |
18090 | || test ! -s conftest.err' | |
bec39cab AC |
18091 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18092 | (eval $ac_try) 2>&5 | |
18093 | ac_status=$? | |
18094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18095 | (exit $ac_status); }; } && | |
18096 | { ac_try='test -s conftest.$ac_objext' | |
18097 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18098 | (eval $ac_try) 2>&5 | |
18099 | ac_status=$? | |
18100 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18101 | (exit $ac_status); }; }; then | |
97bf5e38 | 18102 | bfd_cv_have_sys_procfs_type_pr_sigset_t=yes |
c906108c | 18103 | else |
bec39cab AC |
18104 | echo "$as_me: failed program was:" >&5 |
18105 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18106 | ||
b4e70030 | 18107 | bfd_cv_have_sys_procfs_type_pr_sigset_t=no |
bec39cab | 18108 | |
c906108c | 18109 | fi |
bec39cab | 18110 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
18111 | fi |
18112 | ||
97bf5e38 | 18113 | if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then |
bec39cab AC |
18114 | |
18115 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18116 | #define HAVE_PR_SIGSET_T 1 |
bec39cab | 18117 | _ACEOF |
c906108c | 18118 | |
97bf5e38 | 18119 | fi |
b4e70030 JB |
18120 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigset_t" >&5 |
18121 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigset_t" >&6 | |
c906108c | 18122 | |
b4e70030 JB |
18123 | echo "$as_me:$LINENO: checking for pr_sigaction64_t in sys/procfs.h" >&5 |
18124 | echo $ECHO_N "checking for pr_sigaction64_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
18125 | if test "${bfd_cv_have_sys_procfs_type_pr_sigaction64_t+set}" = set; then |
18126 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 18127 | else |
bec39cab AC |
18128 | cat >conftest.$ac_ext <<_ACEOF |
18129 | /* confdefs.h. */ | |
18130 | _ACEOF | |
18131 | cat confdefs.h >>conftest.$ac_ext | |
18132 | cat >>conftest.$ac_ext <<_ACEOF | |
18133 | /* end confdefs.h. */ | |
c906108c | 18134 | |
97bf5e38 MK |
18135 | #define _SYSCALL32 |
18136 | #include <sys/procfs.h> | |
bec39cab AC |
18137 | int |
18138 | main () | |
18139 | { | |
97bf5e38 | 18140 | pr_sigaction64_t avar |
bec39cab AC |
18141 | ; |
18142 | return 0; | |
18143 | } | |
18144 | _ACEOF | |
18145 | rm -f conftest.$ac_objext | |
18146 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18147 | (eval $ac_compile) 2>conftest.er1 | |
18148 | ac_status=$? | |
18149 | grep -v '^ *+' conftest.er1 >conftest.err | |
18150 | rm -f conftest.er1 | |
18151 | cat conftest.err >&5 | |
18152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18153 | (exit $ac_status); } && | |
b4e70030 JB |
18154 | { ac_try='test -z "$ac_c_werror_flag" |
18155 | || test ! -s conftest.err' | |
bec39cab AC |
18156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18157 | (eval $ac_try) 2>&5 | |
18158 | ac_status=$? | |
18159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18160 | (exit $ac_status); }; } && | |
18161 | { ac_try='test -s conftest.$ac_objext' | |
18162 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18163 | (eval $ac_try) 2>&5 | |
18164 | ac_status=$? | |
18165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18166 | (exit $ac_status); }; }; then | |
97bf5e38 | 18167 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes |
c906108c | 18168 | else |
bec39cab AC |
18169 | echo "$as_me: failed program was:" >&5 |
18170 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18171 | ||
b4e70030 | 18172 | bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no |
bec39cab | 18173 | |
c906108c | 18174 | fi |
bec39cab | 18175 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
18176 | fi |
18177 | ||
97bf5e38 | 18178 | if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then |
bec39cab AC |
18179 | |
18180 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18181 | #define HAVE_PR_SIGACTION64_T 1 |
bec39cab | 18182 | _ACEOF |
c906108c | 18183 | |
97bf5e38 | 18184 | fi |
b4e70030 JB |
18185 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&5 |
18186 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" >&6 | |
97bf5e38 | 18187 | |
b4e70030 JB |
18188 | echo "$as_me:$LINENO: checking for pr_siginfo64_t in sys/procfs.h" >&5 |
18189 | echo $ECHO_N "checking for pr_siginfo64_t in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
18190 | if test "${bfd_cv_have_sys_procfs_type_pr_siginfo64_t+set}" = set; then |
18191 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
97bf5e38 | 18192 | else |
bec39cab AC |
18193 | cat >conftest.$ac_ext <<_ACEOF |
18194 | /* confdefs.h. */ | |
18195 | _ACEOF | |
18196 | cat confdefs.h >>conftest.$ac_ext | |
18197 | cat >>conftest.$ac_ext <<_ACEOF | |
18198 | /* end confdefs.h. */ | |
97bf5e38 MK |
18199 | |
18200 | #define _SYSCALL32 | |
18201 | #include <sys/procfs.h> | |
bec39cab AC |
18202 | int |
18203 | main () | |
18204 | { | |
97bf5e38 | 18205 | pr_siginfo64_t avar |
bec39cab AC |
18206 | ; |
18207 | return 0; | |
18208 | } | |
18209 | _ACEOF | |
18210 | rm -f conftest.$ac_objext | |
18211 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18212 | (eval $ac_compile) 2>conftest.er1 | |
18213 | ac_status=$? | |
18214 | grep -v '^ *+' conftest.er1 >conftest.err | |
18215 | rm -f conftest.er1 | |
18216 | cat conftest.err >&5 | |
18217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18218 | (exit $ac_status); } && | |
b4e70030 JB |
18219 | { ac_try='test -z "$ac_c_werror_flag" |
18220 | || test ! -s conftest.err' | |
bec39cab AC |
18221 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18222 | (eval $ac_try) 2>&5 | |
18223 | ac_status=$? | |
18224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18225 | (exit $ac_status); }; } && | |
18226 | { ac_try='test -s conftest.$ac_objext' | |
18227 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18228 | (eval $ac_try) 2>&5 | |
18229 | ac_status=$? | |
18230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18231 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
18232 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes |
18233 | else | |
bec39cab AC |
18234 | echo "$as_me: failed program was:" >&5 |
18235 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18236 | ||
b4e70030 | 18237 | bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no |
bec39cab | 18238 | |
97bf5e38 | 18239 | fi |
bec39cab | 18240 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 18241 | fi |
c906108c | 18242 | |
97bf5e38 | 18243 | if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then |
bec39cab AC |
18244 | |
18245 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18246 | #define HAVE_PR_SIGINFO64_T 1 |
bec39cab | 18247 | _ACEOF |
c906108c | 18248 | |
97bf5e38 | 18249 | fi |
b4e70030 JB |
18250 | echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&5 |
18251 | echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" >&6 | |
bec39cab AC |
18252 | |
18253 | ||
97bf5e38 MK |
18254 | |
18255 | ||
18256 | ||
97bf5e38 | 18257 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
b4e70030 JB |
18258 | echo "$as_me:$LINENO: checking whether prfpregset_t type is broken" >&5 |
18259 | echo $ECHO_N "checking whether prfpregset_t type is broken... $ECHO_C" >&6 | |
bec39cab AC |
18260 | if test "${gdb_cv_prfpregset_t_broken+set}" = set; then |
18261 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c SS |
18262 | else |
18263 | if test "$cross_compiling" = yes; then | |
97bf5e38 | 18264 | gdb_cv_prfpregset_t_broken=yes |
c906108c | 18265 | else |
bec39cab AC |
18266 | cat >conftest.$ac_ext <<_ACEOF |
18267 | /* confdefs.h. */ | |
18268 | _ACEOF | |
18269 | cat confdefs.h >>conftest.$ac_ext | |
18270 | cat >>conftest.$ac_ext <<_ACEOF | |
18271 | /* end confdefs.h. */ | |
97bf5e38 MK |
18272 | #include <sys/procfs.h> |
18273 | int main () | |
18274 | { | |
18275 | if (sizeof (prfpregset_t) == sizeof (void *)) | |
18276 | return 1; | |
18277 | return 0; | |
18278 | } | |
bec39cab AC |
18279 | _ACEOF |
18280 | rm -f conftest$ac_exeext | |
18281 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
18282 | (eval $ac_link) 2>&5 | |
18283 | ac_status=$? | |
18284 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18285 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
18286 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18287 | (eval $ac_try) 2>&5 | |
18288 | ac_status=$? | |
18289 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18290 | (exit $ac_status); }; }; then | |
97bf5e38 | 18291 | gdb_cv_prfpregset_t_broken=no |
c906108c | 18292 | else |
bec39cab AC |
18293 | echo "$as_me: program exited with status $ac_status" >&5 |
18294 | echo "$as_me: failed program was:" >&5 | |
18295 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18296 | ||
18297 | ( exit $ac_status ) | |
18298 | gdb_cv_prfpregset_t_broken=yes | |
c906108c | 18299 | fi |
b4e70030 | 18300 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
c906108c | 18301 | fi |
c906108c SS |
18302 | fi |
18303 | ||
b4e70030 JB |
18304 | echo "$as_me:$LINENO: result: $gdb_cv_prfpregset_t_broken" >&5 |
18305 | echo "${ECHO_T}$gdb_cv_prfpregset_t_broken" >&6 | |
97bf5e38 | 18306 | if test $gdb_cv_prfpregset_t_broken = yes; then |
60ca704f SE |
18307 | |
18308 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18309 | #define PRFPREGSET_T_BROKEN 1 |
bec39cab | 18310 | _ACEOF |
c906108c | 18311 | |
97bf5e38 MK |
18312 | fi |
18313 | fi | |
c906108c | 18314 | |
bec39cab | 18315 | |
b4e70030 JB |
18316 | echo "$as_me:$LINENO: checking for PIOCSET ioctl entry in sys/procfs.h" >&5 |
18317 | echo $ECHO_N "checking for PIOCSET ioctl entry in sys/procfs.h... $ECHO_C" >&6 | |
bec39cab AC |
18318 | if test "${gdb_cv_have_procfs_piocset+set}" = set; then |
18319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 18320 | else |
bec39cab AC |
18321 | cat >conftest.$ac_ext <<_ACEOF |
18322 | /* confdefs.h. */ | |
18323 | _ACEOF | |
18324 | cat confdefs.h >>conftest.$ac_ext | |
18325 | cat >>conftest.$ac_ext <<_ACEOF | |
18326 | /* end confdefs.h. */ | |
97bf5e38 MK |
18327 | #include <unistd.h> |
18328 | #include <sys/types.h> | |
18329 | #include <sys/procfs.h> | |
18330 | ||
bec39cab AC |
18331 | int |
18332 | main () | |
18333 | { | |
97bf5e38 MK |
18334 | |
18335 | int dummy;; | |
18336 | dummy = ioctl(0, PIOCSET, &dummy); | |
bec39cab AC |
18337 | |
18338 | ; | |
18339 | return 0; | |
18340 | } | |
18341 | _ACEOF | |
18342 | rm -f conftest.$ac_objext | |
18343 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18344 | (eval $ac_compile) 2>conftest.er1 | |
18345 | ac_status=$? | |
18346 | grep -v '^ *+' conftest.er1 >conftest.err | |
18347 | rm -f conftest.er1 | |
18348 | cat conftest.err >&5 | |
18349 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18350 | (exit $ac_status); } && | |
b4e70030 JB |
18351 | { ac_try='test -z "$ac_c_werror_flag" |
18352 | || test ! -s conftest.err' | |
bec39cab AC |
18353 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18354 | (eval $ac_try) 2>&5 | |
18355 | ac_status=$? | |
18356 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18357 | (exit $ac_status); }; } && | |
18358 | { ac_try='test -s conftest.$ac_objext' | |
18359 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18360 | (eval $ac_try) 2>&5 | |
18361 | ac_status=$? | |
18362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18363 | (exit $ac_status); }; }; then | |
97bf5e38 | 18364 | gdb_cv_have_procfs_piocset=yes |
c906108c | 18365 | else |
bec39cab AC |
18366 | echo "$as_me: failed program was:" >&5 |
18367 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18368 | ||
b4e70030 | 18369 | gdb_cv_have_procfs_piocset=no |
c906108c | 18370 | fi |
bec39cab | 18371 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 18372 | fi |
97bf5e38 | 18373 | |
b4e70030 JB |
18374 | echo "$as_me:$LINENO: result: $gdb_cv_have_procfs_piocset" >&5 |
18375 | echo "${ECHO_T}$gdb_cv_have_procfs_piocset" >&6 | |
97bf5e38 | 18376 | if test $gdb_cv_have_procfs_piocset = yes; then |
60ca704f SE |
18377 | |
18378 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18379 | #define HAVE_PROCFS_PIOCSET 1 |
bec39cab | 18380 | _ACEOF |
97bf5e38 MK |
18381 | |
18382 | fi | |
c906108c | 18383 | fi |
c906108c | 18384 | |
97bf5e38 | 18385 | if test ${host} = ${target} ; then |
bec39cab | 18386 | |
b4e70030 JB |
18387 | echo "$as_me:$LINENO: checking for member l_addr in struct link_map" >&5 |
18388 | echo $ECHO_N "checking for member l_addr in struct link_map... $ECHO_C" >&6 | |
bec39cab AC |
18389 | if test "${gdb_cv_have_struct_link_map_with_l_members+set}" = set; then |
18390 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
18391 | else | |
18392 | cat >conftest.$ac_ext <<_ACEOF | |
18393 | /* confdefs.h. */ | |
18394 | _ACEOF | |
18395 | cat confdefs.h >>conftest.$ac_ext | |
18396 | cat >>conftest.$ac_ext <<_ACEOF | |
18397 | /* end confdefs.h. */ | |
97bf5e38 | 18398 | #include <link.h> |
bec39cab AC |
18399 | int |
18400 | main () | |
18401 | { | |
97bf5e38 | 18402 | struct link_map lm; (void) lm.l_addr; |
bec39cab AC |
18403 | ; |
18404 | return 0; | |
18405 | } | |
18406 | _ACEOF | |
18407 | rm -f conftest.$ac_objext | |
18408 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18409 | (eval $ac_compile) 2>conftest.er1 | |
18410 | ac_status=$? | |
18411 | grep -v '^ *+' conftest.er1 >conftest.err | |
18412 | rm -f conftest.er1 | |
18413 | cat conftest.err >&5 | |
18414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18415 | (exit $ac_status); } && | |
b4e70030 JB |
18416 | { ac_try='test -z "$ac_c_werror_flag" |
18417 | || test ! -s conftest.err' | |
bec39cab AC |
18418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18419 | (eval $ac_try) 2>&5 | |
18420 | ac_status=$? | |
18421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18422 | (exit $ac_status); }; } && | |
18423 | { ac_try='test -s conftest.$ac_objext' | |
18424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18425 | (eval $ac_try) 2>&5 | |
18426 | ac_status=$? | |
18427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18428 | (exit $ac_status); }; }; then | |
97bf5e38 | 18429 | gdb_cv_have_struct_link_map_with_l_members=yes |
c906108c | 18430 | else |
bec39cab AC |
18431 | echo "$as_me: failed program was:" >&5 |
18432 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18433 | ||
b4e70030 | 18434 | gdb_cv_have_struct_link_map_with_l_members=no |
c906108c | 18435 | fi |
bec39cab | 18436 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c SS |
18437 | fi |
18438 | ||
b4e70030 JB |
18439 | echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_l_members" >&5 |
18440 | echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_l_members" >&6 | |
97bf5e38 | 18441 | if test $gdb_cv_have_struct_link_map_with_l_members = yes; then |
60ca704f SE |
18442 | |
18443 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18444 | #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1 |
bec39cab | 18445 | _ACEOF |
97bf5e38 MK |
18446 | |
18447 | fi | |
18448 | ||
bec39cab | 18449 | |
b4e70030 JB |
18450 | echo "$as_me:$LINENO: checking for member lm_addr in struct link_map" >&5 |
18451 | echo $ECHO_N "checking for member lm_addr in struct link_map... $ECHO_C" >&6 | |
bec39cab AC |
18452 | if test "${gdb_cv_have_struct_link_map_with_lm_members+set}" = set; then |
18453 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 18454 | else |
bec39cab AC |
18455 | cat >conftest.$ac_ext <<_ACEOF |
18456 | /* confdefs.h. */ | |
18457 | _ACEOF | |
18458 | cat confdefs.h >>conftest.$ac_ext | |
18459 | cat >>conftest.$ac_ext <<_ACEOF | |
18460 | /* end confdefs.h. */ | |
97bf5e38 MK |
18461 | #include <sys/types.h> |
18462 | #include <link.h> | |
bec39cab AC |
18463 | int |
18464 | main () | |
18465 | { | |
97bf5e38 | 18466 | struct link_map lm; (void) lm.lm_addr; |
bec39cab AC |
18467 | ; |
18468 | return 0; | |
18469 | } | |
18470 | _ACEOF | |
18471 | rm -f conftest.$ac_objext | |
18472 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18473 | (eval $ac_compile) 2>conftest.er1 | |
18474 | ac_status=$? | |
18475 | grep -v '^ *+' conftest.er1 >conftest.err | |
18476 | rm -f conftest.er1 | |
18477 | cat conftest.err >&5 | |
18478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18479 | (exit $ac_status); } && | |
b4e70030 JB |
18480 | { ac_try='test -z "$ac_c_werror_flag" |
18481 | || test ! -s conftest.err' | |
bec39cab AC |
18482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18483 | (eval $ac_try) 2>&5 | |
18484 | ac_status=$? | |
18485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18486 | (exit $ac_status); }; } && | |
18487 | { ac_try='test -s conftest.$ac_objext' | |
18488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18489 | (eval $ac_try) 2>&5 | |
18490 | ac_status=$? | |
18491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18492 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
18493 | gdb_cv_have_struct_link_map_with_lm_members=yes |
18494 | else | |
bec39cab AC |
18495 | echo "$as_me: failed program was:" >&5 |
18496 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18497 | ||
b4e70030 | 18498 | gdb_cv_have_struct_link_map_with_lm_members=no |
97bf5e38 | 18499 | fi |
bec39cab | 18500 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c906108c | 18501 | fi |
c906108c | 18502 | |
b4e70030 JB |
18503 | echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map_with_lm_members" >&5 |
18504 | echo "${ECHO_T}$gdb_cv_have_struct_link_map_with_lm_members" >&6 | |
97bf5e38 | 18505 | if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then |
60ca704f SE |
18506 | |
18507 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18508 | #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1 |
bec39cab | 18509 | _ACEOF |
97bf5e38 MK |
18510 | |
18511 | fi | |
18512 | ||
bec39cab | 18513 | |
b4e70030 JB |
18514 | echo "$as_me:$LINENO: checking for member som_addr in struct so_map" >&5 |
18515 | echo $ECHO_N "checking for member som_addr in struct so_map... $ECHO_C" >&6 | |
bec39cab AC |
18516 | if test "${gdb_cv_have_struct_so_map_with_som_members+set}" = set; then |
18517 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 18518 | else |
bec39cab AC |
18519 | cat >conftest.$ac_ext <<_ACEOF |
18520 | /* confdefs.h. */ | |
18521 | _ACEOF | |
18522 | cat confdefs.h >>conftest.$ac_ext | |
18523 | cat >>conftest.$ac_ext <<_ACEOF | |
18524 | /* end confdefs.h. */ | |
97bf5e38 MK |
18525 | #include <sys/types.h> |
18526 | #ifdef HAVE_NLIST_H | |
18527 | #include <nlist.h> | |
18528 | #endif | |
18529 | #include <link.h> | |
bec39cab AC |
18530 | int |
18531 | main () | |
18532 | { | |
97bf5e38 | 18533 | struct so_map lm; (void) lm.som_addr; |
bec39cab AC |
18534 | ; |
18535 | return 0; | |
18536 | } | |
18537 | _ACEOF | |
18538 | rm -f conftest.$ac_objext | |
18539 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18540 | (eval $ac_compile) 2>conftest.er1 | |
18541 | ac_status=$? | |
18542 | grep -v '^ *+' conftest.er1 >conftest.err | |
18543 | rm -f conftest.er1 | |
18544 | cat conftest.err >&5 | |
18545 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18546 | (exit $ac_status); } && | |
b4e70030 JB |
18547 | { ac_try='test -z "$ac_c_werror_flag" |
18548 | || test ! -s conftest.err' | |
bec39cab AC |
18549 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18550 | (eval $ac_try) 2>&5 | |
18551 | ac_status=$? | |
18552 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18553 | (exit $ac_status); }; } && | |
18554 | { ac_try='test -s conftest.$ac_objext' | |
18555 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18556 | (eval $ac_try) 2>&5 | |
18557 | ac_status=$? | |
18558 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18559 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
18560 | gdb_cv_have_struct_so_map_with_som_members=yes |
18561 | else | |
bec39cab AC |
18562 | echo "$as_me: failed program was:" >&5 |
18563 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18564 | ||
b4e70030 | 18565 | gdb_cv_have_struct_so_map_with_som_members=no |
97bf5e38 | 18566 | fi |
bec39cab | 18567 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 18568 | fi |
c906108c | 18569 | |
b4e70030 JB |
18570 | echo "$as_me:$LINENO: result: $gdb_cv_have_struct_so_map_with_som_members" >&5 |
18571 | echo "${ECHO_T}$gdb_cv_have_struct_so_map_with_som_members" >&6 | |
97bf5e38 | 18572 | if test $gdb_cv_have_struct_so_map_with_som_members = yes; then |
60ca704f SE |
18573 | |
18574 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18575 | #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1 |
bec39cab | 18576 | _ACEOF |
c906108c | 18577 | |
97bf5e38 | 18578 | fi |
c906108c | 18579 | |
bec39cab | 18580 | |
b4e70030 JB |
18581 | echo "$as_me:$LINENO: checking for struct link_map32 in sys/link.h" >&5 |
18582 | echo $ECHO_N "checking for struct link_map32 in sys/link.h... $ECHO_C" >&6 | |
bec39cab AC |
18583 | if test "${gdb_cv_have_struct_link_map32+set}" = set; then |
18584 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
97bf5e38 | 18585 | else |
bec39cab AC |
18586 | cat >conftest.$ac_ext <<_ACEOF |
18587 | /* confdefs.h. */ | |
18588 | _ACEOF | |
18589 | cat confdefs.h >>conftest.$ac_ext | |
18590 | cat >>conftest.$ac_ext <<_ACEOF | |
18591 | /* end confdefs.h. */ | |
97bf5e38 MK |
18592 | #define _SYSCALL32 |
18593 | #include <sys/link.h> | |
bec39cab AC |
18594 | int |
18595 | main () | |
18596 | { | |
97bf5e38 | 18597 | struct link_map32 l; |
bec39cab AC |
18598 | ; |
18599 | return 0; | |
18600 | } | |
18601 | _ACEOF | |
18602 | rm -f conftest.$ac_objext | |
18603 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18604 | (eval $ac_compile) 2>conftest.er1 | |
18605 | ac_status=$? | |
18606 | grep -v '^ *+' conftest.er1 >conftest.err | |
18607 | rm -f conftest.er1 | |
18608 | cat conftest.err >&5 | |
18609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18610 | (exit $ac_status); } && | |
b4e70030 JB |
18611 | { ac_try='test -z "$ac_c_werror_flag" |
18612 | || test ! -s conftest.err' | |
bec39cab AC |
18613 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18614 | (eval $ac_try) 2>&5 | |
18615 | ac_status=$? | |
18616 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18617 | (exit $ac_status); }; } && | |
18618 | { ac_try='test -s conftest.$ac_objext' | |
18619 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18620 | (eval $ac_try) 2>&5 | |
18621 | ac_status=$? | |
18622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18623 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
18624 | gdb_cv_have_struct_link_map32=yes |
18625 | else | |
bec39cab AC |
18626 | echo "$as_me: failed program was:" >&5 |
18627 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18628 | ||
b4e70030 | 18629 | gdb_cv_have_struct_link_map32=no |
97bf5e38 | 18630 | fi |
bec39cab | 18631 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 18632 | fi |
c906108c | 18633 | |
b4e70030 JB |
18634 | echo "$as_me:$LINENO: result: $gdb_cv_have_struct_link_map32" >&5 |
18635 | echo "${ECHO_T}$gdb_cv_have_struct_link_map32" >&6 | |
97bf5e38 | 18636 | if test $gdb_cv_have_struct_link_map32 = yes; then |
60ca704f SE |
18637 | |
18638 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18639 | #define HAVE_STRUCT_LINK_MAP32 1 |
bec39cab | 18640 | _ACEOF |
c906108c | 18641 | |
60ca704f SE |
18642 | |
18643 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18644 | #define _SYSCALL32 1 |
bec39cab | 18645 | _ACEOF |
c906108c | 18646 | |
97bf5e38 MK |
18647 | fi |
18648 | fi | |
c906108c | 18649 | |
bc8bcb4b | 18650 | # Check if the compiler supports the `long long' type. |
c906108c | 18651 | |
b4e70030 JB |
18652 | echo "$as_me:$LINENO: checking for long long support in compiler" >&5 |
18653 | echo $ECHO_N "checking for long long support in compiler... $ECHO_C" >&6 | |
bec39cab AC |
18654 | if test "${gdb_cv_c_long_long+set}" = set; then |
18655 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
97bf5e38 | 18656 | else |
bec39cab AC |
18657 | cat >conftest.$ac_ext <<_ACEOF |
18658 | /* confdefs.h. */ | |
18659 | _ACEOF | |
18660 | cat confdefs.h >>conftest.$ac_ext | |
18661 | cat >>conftest.$ac_ext <<_ACEOF | |
18662 | /* end confdefs.h. */ | |
bc8bcb4b | 18663 | extern long long foo; |
bec39cab AC |
18664 | int |
18665 | main () | |
18666 | { | |
bc8bcb4b | 18667 | switch (foo & 2) { case 0: return 1; } |
bec39cab AC |
18668 | ; |
18669 | return 0; | |
18670 | } | |
18671 | _ACEOF | |
18672 | rm -f conftest.$ac_objext | |
18673 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18674 | (eval $ac_compile) 2>conftest.er1 | |
18675 | ac_status=$? | |
18676 | grep -v '^ *+' conftest.er1 >conftest.err | |
18677 | rm -f conftest.er1 | |
18678 | cat conftest.err >&5 | |
18679 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18680 | (exit $ac_status); } && | |
b4e70030 JB |
18681 | { ac_try='test -z "$ac_c_werror_flag" |
18682 | || test ! -s conftest.err' | |
bec39cab AC |
18683 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18684 | (eval $ac_try) 2>&5 | |
18685 | ac_status=$? | |
18686 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18687 | (exit $ac_status); }; } && | |
18688 | { ac_try='test -s conftest.$ac_objext' | |
18689 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18690 | (eval $ac_try) 2>&5 | |
18691 | ac_status=$? | |
18692 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18693 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
18694 | gdb_cv_c_long_long=yes |
18695 | else | |
bec39cab AC |
18696 | echo "$as_me: failed program was:" >&5 |
18697 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18698 | ||
b4e70030 | 18699 | gdb_cv_c_long_long=no |
97bf5e38 | 18700 | fi |
bec39cab | 18701 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 18702 | fi |
b4e70030 JB |
18703 | echo "$as_me:$LINENO: result: $gdb_cv_c_long_long" >&5 |
18704 | echo "${ECHO_T}$gdb_cv_c_long_long" >&6 | |
97bf5e38 | 18705 | if test $gdb_cv_c_long_long = yes; then |
bc8bcb4b MK |
18706 | |
18707 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18708 | #define CC_HAS_LONG_LONG 1 |
bec39cab | 18709 | _ACEOF |
97bf5e38 MK |
18710 | |
18711 | fi | |
18712 | ||
bc8bcb4b | 18713 | # Check if the compiler and runtime support printing long longs. |
97bf5e38 | 18714 | |
b4e70030 JB |
18715 | echo "$as_me:$LINENO: checking for long long support in printf" >&5 |
18716 | echo $ECHO_N "checking for long long support in printf... $ECHO_C" >&6 | |
bec39cab AC |
18717 | if test "${gdb_cv_printf_has_long_long+set}" = set; then |
18718 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
97bf5e38 MK |
18719 | else |
18720 | if test "$cross_compiling" = yes; then | |
18721 | gdb_cv_printf_has_long_long=no | |
18722 | else | |
bec39cab AC |
18723 | cat >conftest.$ac_ext <<_ACEOF |
18724 | /* confdefs.h. */ | |
18725 | _ACEOF | |
18726 | cat confdefs.h >>conftest.$ac_ext | |
18727 | cat >>conftest.$ac_ext <<_ACEOF | |
18728 | /* end confdefs.h. */ | |
bc8bcb4b MK |
18729 | $ac_includes_default |
18730 | int | |
18731 | main () | |
18732 | { | |
18733 | char buf[32]; | |
97bf5e38 MK |
18734 | long long l = 0; |
18735 | l = (l << 16) + 0x0123; | |
18736 | l = (l << 16) + 0x4567; | |
18737 | l = (l << 16) + 0x89ab; | |
18738 | l = (l << 16) + 0xcdef; | |
18739 | sprintf (buf, "0x%016llx", l); | |
18740 | return (strcmp ("0x0123456789abcdef", buf)); | |
bc8bcb4b MK |
18741 | ; |
18742 | return 0; | |
c906108c | 18743 | } |
bec39cab AC |
18744 | _ACEOF |
18745 | rm -f conftest$ac_exeext | |
18746 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
18747 | (eval $ac_link) 2>&5 | |
18748 | ac_status=$? | |
18749 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18750 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
18751 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18752 | (eval $ac_try) 2>&5 | |
18753 | ac_status=$? | |
18754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18755 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
18756 | gdb_cv_printf_has_long_long=yes |
18757 | else | |
bec39cab AC |
18758 | echo "$as_me: program exited with status $ac_status" >&5 |
18759 | echo "$as_me: failed program was:" >&5 | |
18760 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18761 | ||
18762 | ( exit $ac_status ) | |
18763 | gdb_cv_printf_has_long_long=no | |
97bf5e38 | 18764 | fi |
b4e70030 | 18765 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 18766 | fi |
97bf5e38 | 18767 | fi |
b4e70030 JB |
18768 | echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_long" >&5 |
18769 | echo "${ECHO_T}$gdb_cv_printf_has_long_long" >&6 | |
97bf5e38 | 18770 | if test $gdb_cv_printf_has_long_long = yes; then |
bc8bcb4b MK |
18771 | |
18772 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18773 | #define PRINTF_HAS_LONG_LONG 1 |
bec39cab | 18774 | _ACEOF |
97bf5e38 MK |
18775 | |
18776 | fi | |
97bf5e38 | 18777 | |
1a619819 LM |
18778 | # Check if the compiler and runtime support printing decfloats. |
18779 | ||
18780 | echo "$as_me:$LINENO: checking for decfloat support in printf" >&5 | |
18781 | echo $ECHO_N "checking for decfloat support in printf... $ECHO_C" >&6 | |
18782 | if test "${gdb_cv_printf_has_decfloat+set}" = set; then | |
18783 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
18784 | else | |
18785 | if test "$cross_compiling" = yes; then | |
18786 | gdb_cv_printf_has_decfloat=no | |
18787 | else | |
18788 | cat >conftest.$ac_ext <<_ACEOF | |
18789 | /* confdefs.h. */ | |
18790 | _ACEOF | |
18791 | cat confdefs.h >>conftest.$ac_ext | |
18792 | cat >>conftest.$ac_ext <<_ACEOF | |
18793 | /* end confdefs.h. */ | |
18794 | $ac_includes_default | |
18795 | int | |
18796 | main () | |
18797 | { | |
18798 | char buf[64]; | |
18799 | _Decimal32 d32 = 1.2345df; | |
18800 | _Decimal64 d64 = 1.2345dd; | |
18801 | _Decimal128 d128 = 1.2345dl; | |
18802 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); | |
18803 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); | |
18804 | ; | |
18805 | return 0; | |
18806 | } | |
18807 | _ACEOF | |
18808 | rm -f conftest$ac_exeext | |
18809 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
18810 | (eval $ac_link) 2>&5 | |
18811 | ac_status=$? | |
18812 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18813 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
18814 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18815 | (eval $ac_try) 2>&5 | |
18816 | ac_status=$? | |
18817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18818 | (exit $ac_status); }; }; then | |
18819 | gdb_cv_printf_has_decfloat=yes | |
18820 | else | |
18821 | echo "$as_me: program exited with status $ac_status" >&5 | |
18822 | echo "$as_me: failed program was:" >&5 | |
18823 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18824 | ||
18825 | ( exit $ac_status ) | |
18826 | gdb_cv_printf_has_decfloat=no | |
18827 | fi | |
18828 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
18829 | fi | |
18830 | fi | |
18831 | echo "$as_me:$LINENO: result: $gdb_cv_printf_has_decfloat" >&5 | |
18832 | echo "${ECHO_T}$gdb_cv_printf_has_decfloat" >&6 | |
18833 | if test $gdb_cv_printf_has_decfloat = yes; then | |
18834 | ||
18835 | cat >>confdefs.h <<\_ACEOF | |
18836 | #define PRINTF_HAS_DECFLOAT 1 | |
18837 | _ACEOF | |
18838 | ||
18839 | fi | |
18840 | ||
bc8bcb4b MK |
18841 | # Check if the compiler supports the `long double' type. We can't use |
18842 | # AC_C_LONG_DOUBLE because that one does additional checks on the | |
18843 | # constants defined in <float.h> that fail on some systems, | |
18844 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. | |
97bf5e38 | 18845 | |
b4e70030 JB |
18846 | echo "$as_me:$LINENO: checking for long double support in compiler" >&5 |
18847 | echo $ECHO_N "checking for long double support in compiler... $ECHO_C" >&6 | |
bc8bcb4b | 18848 | if test "${gdb_cv_c_long_double+set}" = set; then |
bec39cab | 18849 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
97bf5e38 | 18850 | else |
bec39cab AC |
18851 | cat >conftest.$ac_ext <<_ACEOF |
18852 | /* confdefs.h. */ | |
18853 | _ACEOF | |
18854 | cat confdefs.h >>conftest.$ac_ext | |
18855 | cat >>conftest.$ac_ext <<_ACEOF | |
18856 | /* end confdefs.h. */ | |
97bf5e38 | 18857 | long double foo; |
bec39cab AC |
18858 | _ACEOF |
18859 | rm -f conftest.$ac_objext | |
18860 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
18861 | (eval $ac_compile) 2>conftest.er1 | |
18862 | ac_status=$? | |
18863 | grep -v '^ *+' conftest.er1 >conftest.err | |
18864 | rm -f conftest.er1 | |
18865 | cat conftest.err >&5 | |
18866 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18867 | (exit $ac_status); } && | |
b4e70030 JB |
18868 | { ac_try='test -z "$ac_c_werror_flag" |
18869 | || test ! -s conftest.err' | |
bec39cab AC |
18870 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
18871 | (eval $ac_try) 2>&5 | |
18872 | ac_status=$? | |
18873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18874 | (exit $ac_status); }; } && | |
18875 | { ac_try='test -s conftest.$ac_objext' | |
18876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18877 | (eval $ac_try) 2>&5 | |
18878 | ac_status=$? | |
18879 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18880 | (exit $ac_status); }; }; then | |
bc8bcb4b | 18881 | gdb_cv_c_long_double=yes |
97bf5e38 | 18882 | else |
bec39cab AC |
18883 | echo "$as_me: failed program was:" >&5 |
18884 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18885 | ||
b4e70030 | 18886 | gdb_cv_c_long_double=no |
97bf5e38 | 18887 | fi |
bec39cab | 18888 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 18889 | fi |
b4e70030 JB |
18890 | echo "$as_me:$LINENO: result: $gdb_cv_c_long_double" >&5 |
18891 | echo "${ECHO_T}$gdb_cv_c_long_double" >&6 | |
bc8bcb4b | 18892 | if test $gdb_cv_c_long_double = yes; then |
c906108c | 18893 | |
bc8bcb4b | 18894 | cat >>confdefs.h <<\_ACEOF |
97bf5e38 | 18895 | #define HAVE_LONG_DOUBLE 1 |
bec39cab | 18896 | _ACEOF |
97bf5e38 MK |
18897 | |
18898 | fi | |
18899 | ||
bc8bcb4b | 18900 | # Check if the compiler and runtime support printing long doubles. |
97bf5e38 | 18901 | |
b4e70030 JB |
18902 | echo "$as_me:$LINENO: checking for long double support in printf" >&5 |
18903 | echo $ECHO_N "checking for long double support in printf... $ECHO_C" >&6 | |
bec39cab AC |
18904 | if test "${gdb_cv_printf_has_long_double+set}" = set; then |
18905 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
97bf5e38 MK |
18906 | else |
18907 | if test "$cross_compiling" = yes; then | |
18908 | gdb_cv_printf_has_long_double=no | |
18909 | else | |
bec39cab AC |
18910 | cat >conftest.$ac_ext <<_ACEOF |
18911 | /* confdefs.h. */ | |
18912 | _ACEOF | |
18913 | cat confdefs.h >>conftest.$ac_ext | |
18914 | cat >>conftest.$ac_ext <<_ACEOF | |
18915 | /* end confdefs.h. */ | |
bc8bcb4b MK |
18916 | $ac_includes_default |
18917 | int | |
18918 | main () | |
18919 | { | |
18920 | char buf[16]; | |
97bf5e38 MK |
18921 | long double f = 3.141592653; |
18922 | sprintf (buf, "%Lg", f); | |
18923 | return (strncmp ("3.14159", buf, 7)); | |
bc8bcb4b MK |
18924 | ; |
18925 | return 0; | |
97bf5e38 | 18926 | } |
bec39cab AC |
18927 | _ACEOF |
18928 | rm -f conftest$ac_exeext | |
18929 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
18930 | (eval $ac_link) 2>&5 | |
18931 | ac_status=$? | |
18932 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18933 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
18934 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18935 | (eval $ac_try) 2>&5 | |
18936 | ac_status=$? | |
18937 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18938 | (exit $ac_status); }; }; then | |
97bf5e38 | 18939 | gdb_cv_printf_has_long_double=yes |
c906108c | 18940 | else |
bec39cab AC |
18941 | echo "$as_me: program exited with status $ac_status" >&5 |
18942 | echo "$as_me: failed program was:" >&5 | |
18943 | sed 's/^/| /' conftest.$ac_ext >&5 | |
18944 | ||
18945 | ( exit $ac_status ) | |
18946 | gdb_cv_printf_has_long_double=no | |
c906108c | 18947 | fi |
b4e70030 | 18948 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
c906108c | 18949 | fi |
c906108c | 18950 | fi |
b4e70030 JB |
18951 | echo "$as_me:$LINENO: result: $gdb_cv_printf_has_long_double" >&5 |
18952 | echo "${ECHO_T}$gdb_cv_printf_has_long_double" >&6 | |
97bf5e38 | 18953 | if test $gdb_cv_printf_has_long_double = yes; then |
bc8bcb4b MK |
18954 | |
18955 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 18956 | #define PRINTF_HAS_LONG_DOUBLE 1 |
bec39cab | 18957 | _ACEOF |
97bf5e38 MK |
18958 | |
18959 | fi | |
97bf5e38 | 18960 | |
bc8bcb4b | 18961 | # Check if the compiler and runtime support scanning long doubles. |
97bf5e38 | 18962 | |
b4e70030 JB |
18963 | echo "$as_me:$LINENO: checking for long double support in scanf" >&5 |
18964 | echo $ECHO_N "checking for long double support in scanf... $ECHO_C" >&6 | |
bec39cab AC |
18965 | if test "${gdb_cv_scanf_has_long_double+set}" = set; then |
18966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
97bf5e38 MK |
18967 | else |
18968 | if test "$cross_compiling" = yes; then | |
18969 | gdb_cv_scanf_has_long_double=no | |
18970 | else | |
bec39cab AC |
18971 | cat >conftest.$ac_ext <<_ACEOF |
18972 | /* confdefs.h. */ | |
18973 | _ACEOF | |
18974 | cat confdefs.h >>conftest.$ac_ext | |
18975 | cat >>conftest.$ac_ext <<_ACEOF | |
18976 | /* end confdefs.h. */ | |
bc8bcb4b MK |
18977 | #include <stdio.h> |
18978 | int | |
18979 | main () | |
18980 | { | |
18981 | char *buf = "3.141592653"; | |
97bf5e38 MK |
18982 | long double f = 0; |
18983 | sscanf (buf, "%Lg", &f); | |
18984 | return !(f > 3.14159 && f < 3.14160); | |
bc8bcb4b MK |
18985 | ; |
18986 | return 0; | |
97bf5e38 | 18987 | } |
bec39cab AC |
18988 | _ACEOF |
18989 | rm -f conftest$ac_exeext | |
18990 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
18991 | (eval $ac_link) 2>&5 | |
18992 | ac_status=$? | |
18993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18994 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
18995 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
18996 | (eval $ac_try) 2>&5 | |
18997 | ac_status=$? | |
18998 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
18999 | (exit $ac_status); }; }; then | |
97bf5e38 MK |
19000 | gdb_cv_scanf_has_long_double=yes |
19001 | else | |
bec39cab AC |
19002 | echo "$as_me: program exited with status $ac_status" >&5 |
19003 | echo "$as_me: failed program was:" >&5 | |
19004 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19005 | ||
19006 | ( exit $ac_status ) | |
19007 | gdb_cv_scanf_has_long_double=no | |
97bf5e38 | 19008 | fi |
b4e70030 | 19009 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
97bf5e38 | 19010 | fi |
c906108c | 19011 | fi |
b4e70030 JB |
19012 | echo "$as_me:$LINENO: result: $gdb_cv_scanf_has_long_double" >&5 |
19013 | echo "${ECHO_T}$gdb_cv_scanf_has_long_double" >&6 | |
97bf5e38 | 19014 | if test $gdb_cv_scanf_has_long_double = yes; then |
bc8bcb4b MK |
19015 | |
19016 | cat >>confdefs.h <<\_ACEOF | |
97bf5e38 | 19017 | #define SCANF_HAS_LONG_DOUBLE 1 |
bec39cab | 19018 | _ACEOF |
97bf5e38 MK |
19019 | |
19020 | fi | |
c906108c | 19021 | |
438013df AO |
19022 | case ${host_os} in |
19023 | aix*) | |
b4e70030 JB |
19024 | echo "$as_me:$LINENO: checking for -bbigtoc option" >&5 |
19025 | echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6 | |
bec39cab AC |
19026 | if test "${gdb_cv_bigtoc+set}" = set; then |
19027 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
438013df | 19028 | else |
bec39cab | 19029 | |
438013df AO |
19030 | SAVE_LDFLAGS=$LDFLAGS |
19031 | ||
19032 | case $GCC in | |
19033 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; | |
19034 | *) gdb_cv_bigtoc=-bbigtoc ;; | |
19035 | esac | |
19036 | ||
19037 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc | |
bec39cab AC |
19038 | cat >conftest.$ac_ext <<_ACEOF |
19039 | /* confdefs.h. */ | |
19040 | _ACEOF | |
19041 | cat confdefs.h >>conftest.$ac_ext | |
19042 | cat >>conftest.$ac_ext <<_ACEOF | |
19043 | /* end confdefs.h. */ | |
438013df | 19044 | |
bec39cab AC |
19045 | int |
19046 | main () | |
19047 | { | |
438013df | 19048 | int i; |
bec39cab AC |
19049 | ; |
19050 | return 0; | |
19051 | } | |
19052 | _ACEOF | |
19053 | rm -f conftest.$ac_objext conftest$ac_exeext | |
19054 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
19055 | (eval $ac_link) 2>conftest.er1 | |
19056 | ac_status=$? | |
19057 | grep -v '^ *+' conftest.er1 >conftest.err | |
19058 | rm -f conftest.er1 | |
19059 | cat conftest.err >&5 | |
19060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19061 | (exit $ac_status); } && | |
b4e70030 JB |
19062 | { ac_try='test -z "$ac_c_werror_flag" |
19063 | || test ! -s conftest.err' | |
bec39cab AC |
19064 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19065 | (eval $ac_try) 2>&5 | |
19066 | ac_status=$? | |
19067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19068 | (exit $ac_status); }; } && | |
19069 | { ac_try='test -s conftest$ac_exeext' | |
19070 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19071 | (eval $ac_try) 2>&5 | |
19072 | ac_status=$? | |
19073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19074 | (exit $ac_status); }; }; then | |
438013df AO |
19075 | : |
19076 | else | |
bec39cab AC |
19077 | echo "$as_me: failed program was:" >&5 |
19078 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19079 | ||
b4e70030 | 19080 | gdb_cv_bigtoc= |
438013df | 19081 | fi |
bec39cab AC |
19082 | rm -f conftest.err conftest.$ac_objext \ |
19083 | conftest$ac_exeext conftest.$ac_ext | |
ec76baa5 | 19084 | LDFLAGS="${SAVE_LDFLAGS}" |
438013df | 19085 | |
bec39cab | 19086 | fi |
b4e70030 JB |
19087 | echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5 |
19088 | echo "${ECHO_T}$gdb_cv_bigtoc" >&6 | |
438013df AO |
19089 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
19090 | ;; | |
19091 | esac | |
19092 | ||
c906108c SS |
19093 | |
19094 | ||
19095 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
19096 | case ${host_os} in | |
19097 | hpux*) | |
b4e70030 JB |
19098 | echo "$as_me:$LINENO: checking for HPUX/OSF thread support" >&5 |
19099 | echo $ECHO_N "checking for HPUX/OSF thread support... $ECHO_C" >&6 | |
c906108c SS |
19100 | if test -f /usr/include/dce/cma_config.h ; then |
19101 | if test "$GCC" = "yes" ; then | |
b4e70030 JB |
19102 | echo "$as_me:$LINENO: result: yes" >&5 |
19103 | echo "${ECHO_T}yes" >&6 | |
60ca704f SE |
19104 | |
19105 | cat >>confdefs.h <<\_ACEOF | |
c906108c | 19106 | #define HAVE_HPUX_THREAD_SUPPORT 1 |
bec39cab | 19107 | _ACEOF |
c906108c | 19108 | |
3483b318 | 19109 | CONFIG_OBS="${CONFIG_OBS} hpux-thread.o" |
c906108c SS |
19110 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" |
19111 | else | |
b4e70030 JB |
19112 | echo "$as_me:$LINENO: result: no (suppressed because you are not using GCC)" >&5 |
19113 | echo "${ECHO_T}no (suppressed because you are not using GCC)" >&6 | |
c906108c SS |
19114 | fi |
19115 | else | |
b4e70030 JB |
19116 | echo "$as_me:$LINENO: result: no" >&5 |
19117 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
19118 | fi |
19119 | ;; | |
19120 | solaris*) | |
d92419e5 JB |
19121 | # See if thread_db library is around for Solaris thread debugging. |
19122 | # Note that we must explicitly test for version 1 of the library | |
19123 | # because version 0 (present on Solaris 2.4 or earlier) doesn't have | |
19124 | # the same API. | |
b4e70030 JB |
19125 | echo "$as_me:$LINENO: checking for Solaris thread debugging library" >&5 |
19126 | echo $ECHO_N "checking for Solaris thread debugging library... $ECHO_C" >&6 | |
c906108c | 19127 | if test -f /usr/lib/libthread_db.so.1 ; then |
b4e70030 JB |
19128 | echo "$as_me:$LINENO: result: yes" >&5 |
19129 | echo "${ECHO_T}yes" >&6 | |
60ca704f SE |
19130 | |
19131 | cat >>confdefs.h <<\_ACEOF | |
c906108c | 19132 | #define HAVE_THREAD_DB_LIB 1 |
bec39cab | 19133 | _ACEOF |
c906108c | 19134 | |
3483b318 | 19135 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" |
c906108c | 19136 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" |
bec39cab | 19137 | |
b4e70030 JB |
19138 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 |
19139 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | |
bec39cab AC |
19140 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then |
19141 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 19142 | else |
bec39cab | 19143 | ac_check_lib_save_LIBS=$LIBS |
c906108c | 19144 | LIBS="-ldl $LIBS" |
bec39cab AC |
19145 | cat >conftest.$ac_ext <<_ACEOF |
19146 | /* confdefs.h. */ | |
19147 | _ACEOF | |
19148 | cat confdefs.h >>conftest.$ac_ext | |
19149 | cat >>conftest.$ac_ext <<_ACEOF | |
19150 | /* end confdefs.h. */ | |
19151 | ||
b4e70030 | 19152 | /* Override any gcc2 internal prototype to avoid an error. */ |
bec39cab AC |
19153 | #ifdef __cplusplus |
19154 | extern "C" | |
19155 | #endif | |
b4e70030 JB |
19156 | /* We use char because int might match the return type of a gcc2 |
19157 | builtin and then its argument prototype would still apply. */ | |
bec39cab AC |
19158 | char dlopen (); |
19159 | int | |
19160 | main () | |
19161 | { | |
b4e70030 | 19162 | dlopen (); |
bec39cab AC |
19163 | ; |
19164 | return 0; | |
19165 | } | |
19166 | _ACEOF | |
19167 | rm -f conftest.$ac_objext conftest$ac_exeext | |
19168 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
19169 | (eval $ac_link) 2>conftest.er1 | |
19170 | ac_status=$? | |
19171 | grep -v '^ *+' conftest.er1 >conftest.err | |
19172 | rm -f conftest.er1 | |
19173 | cat conftest.err >&5 | |
19174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19175 | (exit $ac_status); } && | |
b4e70030 JB |
19176 | { ac_try='test -z "$ac_c_werror_flag" |
19177 | || test ! -s conftest.err' | |
bec39cab AC |
19178 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19179 | (eval $ac_try) 2>&5 | |
19180 | ac_status=$? | |
19181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19182 | (exit $ac_status); }; } && | |
19183 | { ac_try='test -s conftest$ac_exeext' | |
19184 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19185 | (eval $ac_try) 2>&5 | |
19186 | ac_status=$? | |
19187 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19188 | (exit $ac_status); }; }; then | |
19189 | ac_cv_lib_dl_dlopen=yes | |
19190 | else | |
19191 | echo "$as_me: failed program was:" >&5 | |
19192 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19193 | ||
b4e70030 | 19194 | ac_cv_lib_dl_dlopen=no |
bec39cab AC |
19195 | fi |
19196 | rm -f conftest.err conftest.$ac_objext \ | |
19197 | conftest$ac_exeext conftest.$ac_ext | |
19198 | LIBS=$ac_check_lib_save_LIBS | |
19199 | fi | |
b4e70030 JB |
19200 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 |
19201 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | |
bec39cab AC |
19202 | if test $ac_cv_lib_dl_dlopen = yes; then |
19203 | cat >>confdefs.h <<_ACEOF | |
19204 | #define HAVE_LIBDL 1 | |
19205 | _ACEOF | |
c906108c SS |
19206 | |
19207 | LIBS="-ldl $LIBS" | |
19208 | ||
c906108c SS |
19209 | fi |
19210 | ||
19211 | if test "$GCC" = "yes" ; then | |
19212 | # The GNU linker requires the -export-dynamic option to make | |
19213 | # all symbols visible in the dynamic symbol table. | |
19214 | hold_ldflags=$LDFLAGS | |
b4e70030 JB |
19215 | echo "$as_me:$LINENO: checking for the ld -export-dynamic flag" >&5 |
19216 | echo $ECHO_N "checking for the ld -export-dynamic flag... $ECHO_C" >&6 | |
c906108c | 19217 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" |
bec39cab AC |
19218 | cat >conftest.$ac_ext <<_ACEOF |
19219 | /* confdefs.h. */ | |
19220 | _ACEOF | |
19221 | cat confdefs.h >>conftest.$ac_ext | |
19222 | cat >>conftest.$ac_ext <<_ACEOF | |
19223 | /* end confdefs.h. */ | |
c906108c | 19224 | |
bec39cab AC |
19225 | int |
19226 | main () | |
19227 | { | |
c906108c | 19228 | int i; |
bec39cab AC |
19229 | ; |
19230 | return 0; | |
19231 | } | |
19232 | _ACEOF | |
19233 | rm -f conftest.$ac_objext conftest$ac_exeext | |
19234 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
19235 | (eval $ac_link) 2>conftest.er1 | |
19236 | ac_status=$? | |
19237 | grep -v '^ *+' conftest.er1 >conftest.err | |
19238 | rm -f conftest.er1 | |
19239 | cat conftest.err >&5 | |
19240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19241 | (exit $ac_status); } && | |
b4e70030 JB |
19242 | { ac_try='test -z "$ac_c_werror_flag" |
19243 | || test ! -s conftest.err' | |
bec39cab AC |
19244 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19245 | (eval $ac_try) 2>&5 | |
19246 | ac_status=$? | |
19247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19248 | (exit $ac_status); }; } && | |
19249 | { ac_try='test -s conftest$ac_exeext' | |
19250 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19251 | (eval $ac_try) 2>&5 | |
19252 | ac_status=$? | |
19253 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19254 | (exit $ac_status); }; }; then | |
c906108c SS |
19255 | found=yes |
19256 | else | |
bec39cab AC |
19257 | echo "$as_me: failed program was:" >&5 |
19258 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19259 | ||
b4e70030 | 19260 | found=no |
c906108c | 19261 | fi |
bec39cab AC |
19262 | rm -f conftest.err conftest.$ac_objext \ |
19263 | conftest$ac_exeext conftest.$ac_ext | |
c906108c | 19264 | LDFLAGS=$hold_ldflags |
b4e70030 JB |
19265 | echo "$as_me:$LINENO: result: $found" >&5 |
19266 | echo "${ECHO_T}$found" >&6 | |
c906108c SS |
19267 | if test $found = yes; then |
19268 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
19269 | fi | |
19270 | fi | |
19271 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
19272 | # at one point. | |
b4e70030 JB |
19273 | echo "$as_me:$LINENO: checking if <proc_service.h> is old" >&5 |
19274 | echo $ECHO_N "checking if <proc_service.h> is old... $ECHO_C" >&6 | |
bec39cab AC |
19275 | if test "${gdb_cv_proc_service_is_old+set}" = set; then |
19276 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c | 19277 | else |
bec39cab AC |
19278 | |
19279 | cat >conftest.$ac_ext <<_ACEOF | |
19280 | /* confdefs.h. */ | |
19281 | _ACEOF | |
19282 | cat confdefs.h >>conftest.$ac_ext | |
19283 | cat >>conftest.$ac_ext <<_ACEOF | |
19284 | /* end confdefs.h. */ | |
c906108c SS |
19285 | |
19286 | #include <proc_service.h> | |
19287 | ps_err_e ps_pdwrite | |
19288 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
c906108c | 19289 | |
bec39cab AC |
19290 | int |
19291 | main () | |
19292 | { | |
19293 | ||
19294 | ; | |
19295 | return 0; | |
19296 | } | |
19297 | _ACEOF | |
19298 | rm -f conftest.$ac_objext | |
19299 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19300 | (eval $ac_compile) 2>conftest.er1 | |
19301 | ac_status=$? | |
19302 | grep -v '^ *+' conftest.er1 >conftest.err | |
19303 | rm -f conftest.er1 | |
19304 | cat conftest.err >&5 | |
19305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19306 | (exit $ac_status); } && | |
b4e70030 JB |
19307 | { ac_try='test -z "$ac_c_werror_flag" |
19308 | || test ! -s conftest.err' | |
bec39cab AC |
19309 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19310 | (eval $ac_try) 2>&5 | |
19311 | ac_status=$? | |
19312 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19313 | (exit $ac_status); }; } && | |
19314 | { ac_try='test -s conftest.$ac_objext' | |
19315 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19316 | (eval $ac_try) 2>&5 | |
19317 | ac_status=$? | |
19318 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19319 | (exit $ac_status); }; }; then | |
c906108c SS |
19320 | gdb_cv_proc_service_is_old=no |
19321 | else | |
bec39cab AC |
19322 | echo "$as_me: failed program was:" >&5 |
19323 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19324 | ||
b4e70030 | 19325 | gdb_cv_proc_service_is_old=yes |
c906108c | 19326 | fi |
bec39cab AC |
19327 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
19328 | ||
c906108c SS |
19329 | fi |
19330 | ||
b4e70030 JB |
19331 | echo "$as_me:$LINENO: result: $gdb_cv_proc_service_is_old" >&5 |
19332 | echo "${ECHO_T}$gdb_cv_proc_service_is_old" >&6 | |
c906108c | 19333 | if test $gdb_cv_proc_service_is_old = yes; then |
60ca704f SE |
19334 | |
19335 | cat >>confdefs.h <<\_ACEOF | |
c906108c | 19336 | #define PROC_SERVICE_IS_OLD 1 |
bec39cab | 19337 | _ACEOF |
c906108c SS |
19338 | |
19339 | fi | |
19340 | else | |
b4e70030 JB |
19341 | echo "$as_me:$LINENO: result: no" >&5 |
19342 | echo "${ECHO_T}no" >&6 | |
c906108c SS |
19343 | fi |
19344 | ;; | |
d92419e5 | 19345 | aix*) |
b4e70030 JB |
19346 | echo "$as_me:$LINENO: checking for AiX thread debugging library" >&5 |
19347 | echo $ECHO_N "checking for AiX thread debugging library... $ECHO_C" >&6 | |
bec39cab AC |
19348 | if test "${gdb_cv_have_aix_thread_debug+set}" = set; then |
19349 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
19350 | else | |
19351 | cat >conftest.$ac_ext <<_ACEOF | |
19352 | /* confdefs.h. */ | |
19353 | _ACEOF | |
19354 | cat confdefs.h >>conftest.$ac_ext | |
19355 | cat >>conftest.$ac_ext <<_ACEOF | |
19356 | /* end confdefs.h. */ | |
d92419e5 | 19357 | #include <sys/pthdebug.h> |
bec39cab AC |
19358 | int |
19359 | main () | |
19360 | { | |
d92419e5 JB |
19361 | #ifndef PTHDB_VERSION_3 |
19362 | #error | |
19363 | #endif | |
bec39cab AC |
19364 | ; |
19365 | return 0; | |
19366 | } | |
19367 | _ACEOF | |
19368 | rm -f conftest.$ac_objext | |
19369 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19370 | (eval $ac_compile) 2>conftest.er1 | |
19371 | ac_status=$? | |
19372 | grep -v '^ *+' conftest.er1 >conftest.err | |
19373 | rm -f conftest.er1 | |
19374 | cat conftest.err >&5 | |
19375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19376 | (exit $ac_status); } && | |
b4e70030 JB |
19377 | { ac_try='test -z "$ac_c_werror_flag" |
19378 | || test ! -s conftest.err' | |
bec39cab AC |
19379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19380 | (eval $ac_try) 2>&5 | |
19381 | ac_status=$? | |
19382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19383 | (exit $ac_status); }; } && | |
19384 | { ac_try='test -s conftest.$ac_objext' | |
19385 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19386 | (eval $ac_try) 2>&5 | |
19387 | ac_status=$? | |
19388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19389 | (exit $ac_status); }; }; then | |
d92419e5 JB |
19390 | gdb_cv_have_aix_thread_debug=yes |
19391 | else | |
bec39cab AC |
19392 | echo "$as_me: failed program was:" >&5 |
19393 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19394 | ||
b4e70030 | 19395 | gdb_cv_have_aix_thread_debug=no |
d92419e5 | 19396 | fi |
bec39cab | 19397 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
d92419e5 JB |
19398 | fi |
19399 | ||
b4e70030 JB |
19400 | echo "$as_me:$LINENO: result: $gdb_cv_have_aix_thread_debug" >&5 |
19401 | echo "${ECHO_T}$gdb_cv_have_aix_thread_debug" >&6 | |
d92419e5 JB |
19402 | if test $gdb_cv_have_aix_thread_debug = yes; then |
19403 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" | |
3483b318 | 19404 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
d92419e5 JB |
19405 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" |
19406 | fi | |
19407 | ;; | |
c906108c | 19408 | esac |
bec39cab | 19409 | |
c906108c SS |
19410 | fi |
19411 | ||
3f47be5c | 19412 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
b4e70030 JB |
19413 | echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
19414 | echo $ECHO_N "checking whether <thread_db.h> has TD_NOTALLOC... $ECHO_C" >&6 | |
bec39cab AC |
19415 | if test "${gdb_cv_thread_db_h_has_td_notalloc+set}" = set; then |
19416 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
19417 | else | |
19418 | cat >conftest.$ac_ext <<_ACEOF | |
19419 | /* confdefs.h. */ | |
19420 | _ACEOF | |
19421 | cat confdefs.h >>conftest.$ac_ext | |
19422 | cat >>conftest.$ac_ext <<_ACEOF | |
19423 | /* end confdefs.h. */ | |
3f47be5c | 19424 | #include <thread_db.h> |
bec39cab AC |
19425 | int |
19426 | main () | |
19427 | { | |
3f47be5c | 19428 | int i = TD_NOTALLOC; |
bec39cab AC |
19429 | ; |
19430 | return 0; | |
19431 | } | |
19432 | _ACEOF | |
19433 | rm -f conftest.$ac_objext | |
19434 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19435 | (eval $ac_compile) 2>conftest.er1 | |
19436 | ac_status=$? | |
19437 | grep -v '^ *+' conftest.er1 >conftest.err | |
19438 | rm -f conftest.er1 | |
19439 | cat conftest.err >&5 | |
19440 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19441 | (exit $ac_status); } && | |
b4e70030 JB |
19442 | { ac_try='test -z "$ac_c_werror_flag" |
19443 | || test ! -s conftest.err' | |
bec39cab AC |
19444 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19445 | (eval $ac_try) 2>&5 | |
19446 | ac_status=$? | |
19447 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19448 | (exit $ac_status); }; } && | |
19449 | { ac_try='test -s conftest.$ac_objext' | |
19450 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19451 | (eval $ac_try) 2>&5 | |
19452 | ac_status=$? | |
19453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19454 | (exit $ac_status); }; }; then | |
3f47be5c EZ |
19455 | gdb_cv_thread_db_h_has_td_notalloc=yes |
19456 | else | |
bec39cab AC |
19457 | echo "$as_me: failed program was:" >&5 |
19458 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19459 | ||
b4e70030 | 19460 | gdb_cv_thread_db_h_has_td_notalloc=no |
bec39cab | 19461 | |
3f47be5c | 19462 | fi |
bec39cab | 19463 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3f47be5c | 19464 | |
bec39cab | 19465 | fi |
b4e70030 JB |
19466 | echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
19467 | echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notalloc" >&6 | |
59f80f10 DJ |
19468 | echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_VERSION" >&5 |
19469 | echo $ECHO_N "checking whether <thread_db.h> has TD_VERSION... $ECHO_C" >&6 | |
19470 | if test "${gdb_cv_thread_db_h_has_td_version+set}" = set; then | |
19471 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
19472 | else | |
19473 | cat >conftest.$ac_ext <<_ACEOF | |
19474 | /* confdefs.h. */ | |
19475 | _ACEOF | |
19476 | cat confdefs.h >>conftest.$ac_ext | |
19477 | cat >>conftest.$ac_ext <<_ACEOF | |
19478 | /* end confdefs.h. */ | |
19479 | #include <thread_db.h> | |
19480 | int | |
19481 | main () | |
19482 | { | |
19483 | int i = TD_VERSION; | |
19484 | ; | |
19485 | return 0; | |
19486 | } | |
19487 | _ACEOF | |
19488 | rm -f conftest.$ac_objext | |
19489 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19490 | (eval $ac_compile) 2>conftest.er1 | |
19491 | ac_status=$? | |
19492 | grep -v '^ *+' conftest.er1 >conftest.err | |
19493 | rm -f conftest.er1 | |
19494 | cat conftest.err >&5 | |
19495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19496 | (exit $ac_status); } && | |
19497 | { ac_try='test -z "$ac_c_werror_flag" | |
19498 | || test ! -s conftest.err' | |
19499 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19500 | (eval $ac_try) 2>&5 | |
19501 | ac_status=$? | |
19502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19503 | (exit $ac_status); }; } && | |
19504 | { ac_try='test -s conftest.$ac_objext' | |
19505 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19506 | (eval $ac_try) 2>&5 | |
19507 | ac_status=$? | |
19508 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19509 | (exit $ac_status); }; }; then | |
19510 | gdb_cv_thread_db_h_has_td_version=yes | |
19511 | else | |
19512 | echo "$as_me: failed program was:" >&5 | |
19513 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19514 | ||
19515 | gdb_cv_thread_db_h_has_td_version=no | |
19516 | ||
19517 | fi | |
19518 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
19519 | ||
19520 | fi | |
19521 | echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_version" >&5 | |
19522 | echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_version" >&6 | |
19523 | echo "$as_me:$LINENO: checking whether <thread_db.h> has TD_NOTLS" >&5 | |
19524 | echo $ECHO_N "checking whether <thread_db.h> has TD_NOTLS... $ECHO_C" >&6 | |
19525 | if test "${gdb_cv_thread_db_h_has_td_notls+set}" = set; then | |
19526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
19527 | else | |
19528 | cat >conftest.$ac_ext <<_ACEOF | |
19529 | /* confdefs.h. */ | |
19530 | _ACEOF | |
19531 | cat confdefs.h >>conftest.$ac_ext | |
19532 | cat >>conftest.$ac_ext <<_ACEOF | |
19533 | /* end confdefs.h. */ | |
19534 | #include <thread_db.h> | |
19535 | int | |
19536 | main () | |
19537 | { | |
19538 | int i = TD_NOTLS; | |
19539 | ; | |
19540 | return 0; | |
19541 | } | |
19542 | _ACEOF | |
19543 | rm -f conftest.$ac_objext | |
19544 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19545 | (eval $ac_compile) 2>conftest.er1 | |
19546 | ac_status=$? | |
19547 | grep -v '^ *+' conftest.er1 >conftest.err | |
19548 | rm -f conftest.er1 | |
19549 | cat conftest.err >&5 | |
19550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19551 | (exit $ac_status); } && | |
19552 | { ac_try='test -z "$ac_c_werror_flag" | |
19553 | || test ! -s conftest.err' | |
19554 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19555 | (eval $ac_try) 2>&5 | |
19556 | ac_status=$? | |
19557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19558 | (exit $ac_status); }; } && | |
19559 | { ac_try='test -s conftest.$ac_objext' | |
19560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19561 | (eval $ac_try) 2>&5 | |
19562 | ac_status=$? | |
19563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19564 | (exit $ac_status); }; }; then | |
19565 | gdb_cv_thread_db_h_has_td_notls=yes | |
19566 | else | |
19567 | echo "$as_me: failed program was:" >&5 | |
19568 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19569 | ||
19570 | gdb_cv_thread_db_h_has_td_notls=no | |
19571 | ||
19572 | fi | |
19573 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
19574 | ||
19575 | fi | |
19576 | echo "$as_me:$LINENO: result: $gdb_cv_thread_db_h_has_td_notls" >&5 | |
19577 | echo "${ECHO_T}$gdb_cv_thread_db_h_has_td_notls" >&6 | |
3f47be5c EZ |
19578 | fi |
19579 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then | |
bec39cab AC |
19580 | |
19581 | cat >>confdefs.h <<\_ACEOF | |
3f47be5c | 19582 | #define THREAD_DB_HAS_TD_NOTALLOC 1 |
bec39cab | 19583 | _ACEOF |
3f47be5c | 19584 | |
59f80f10 DJ |
19585 | fi |
19586 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then | |
19587 | ||
19588 | cat >>confdefs.h <<\_ACEOF | |
19589 | #define THREAD_DB_HAS_TD_VERSION 1 | |
19590 | _ACEOF | |
19591 | ||
19592 | fi | |
19593 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then | |
19594 | ||
19595 | cat >>confdefs.h <<\_ACEOF | |
19596 | #define THREAD_DB_HAS_TD_NOTLS 1 | |
19597 | _ACEOF | |
19598 | ||
3f47be5c EZ |
19599 | fi |
19600 | ||
b757528f | 19601 | if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then |
b4e70030 JB |
19602 | echo "$as_me:$LINENO: checking whether <sys/syscall.h> has __NR_tkill" >&5 |
19603 | echo $ECHO_N "checking whether <sys/syscall.h> has __NR_tkill... $ECHO_C" >&6 | |
bec39cab AC |
19604 | if test "${gdb_cv_sys_syscall_h_has_tkill+set}" = set; then |
19605 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
19606 | else | |
19607 | cat >conftest.$ac_ext <<_ACEOF | |
19608 | /* confdefs.h. */ | |
19609 | _ACEOF | |
19610 | cat confdefs.h >>conftest.$ac_ext | |
19611 | cat >>conftest.$ac_ext <<_ACEOF | |
19612 | /* end confdefs.h. */ | |
b757528f | 19613 | #include <sys/syscall.h> |
bec39cab AC |
19614 | int |
19615 | main () | |
19616 | { | |
b757528f | 19617 | int i = __NR_tkill; |
bec39cab AC |
19618 | ; |
19619 | return 0; | |
19620 | } | |
19621 | _ACEOF | |
19622 | rm -f conftest.$ac_objext | |
19623 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19624 | (eval $ac_compile) 2>conftest.er1 | |
19625 | ac_status=$? | |
19626 | grep -v '^ *+' conftest.er1 >conftest.err | |
19627 | rm -f conftest.er1 | |
19628 | cat conftest.err >&5 | |
19629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19630 | (exit $ac_status); } && | |
b4e70030 JB |
19631 | { ac_try='test -z "$ac_c_werror_flag" |
19632 | || test ! -s conftest.err' | |
bec39cab AC |
19633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
19634 | (eval $ac_try) 2>&5 | |
19635 | ac_status=$? | |
19636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19637 | (exit $ac_status); }; } && | |
19638 | { ac_try='test -s conftest.$ac_objext' | |
19639 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19640 | (eval $ac_try) 2>&5 | |
19641 | ac_status=$? | |
19642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19643 | (exit $ac_status); }; }; then | |
b757528f JJ |
19644 | gdb_cv_sys_syscall_h_has_tkill=yes |
19645 | else | |
bec39cab AC |
19646 | echo "$as_me: failed program was:" >&5 |
19647 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19648 | ||
b4e70030 | 19649 | gdb_cv_sys_syscall_h_has_tkill=no |
bec39cab | 19650 | |
b757528f | 19651 | fi |
bec39cab | 19652 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b757528f | 19653 | |
bec39cab | 19654 | fi |
b4e70030 JB |
19655 | echo "$as_me:$LINENO: result: $gdb_cv_sys_syscall_h_has_tkill" >&5 |
19656 | echo "${ECHO_T}$gdb_cv_sys_syscall_h_has_tkill" >&6 | |
b757528f JJ |
19657 | fi |
19658 | if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then | |
bec39cab AC |
19659 | |
19660 | cat >>confdefs.h <<\_ACEOF | |
b757528f | 19661 | #define HAVE_TKILL_SYSCALL 1 |
bec39cab | 19662 | _ACEOF |
b757528f JJ |
19663 | |
19664 | fi | |
19665 | ||
10568435 JK |
19666 | echo "$as_me:$LINENO: checking whether ADDR_NO_RANDOMIZE is declared" >&5 |
19667 | echo $ECHO_N "checking whether ADDR_NO_RANDOMIZE is declared... $ECHO_C" >&6 | |
19668 | if test "${ac_cv_have_decl_ADDR_NO_RANDOMIZE+set}" = set; then | |
19669 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
19670 | else | |
19671 | cat >conftest.$ac_ext <<_ACEOF | |
19672 | /* confdefs.h. */ | |
19673 | _ACEOF | |
19674 | cat confdefs.h >>conftest.$ac_ext | |
19675 | cat >>conftest.$ac_ext <<_ACEOF | |
19676 | /* end confdefs.h. */ | |
19677 | #include <sys/personality.h> | |
19678 | ||
19679 | int | |
19680 | main () | |
19681 | { | |
19682 | #ifndef ADDR_NO_RANDOMIZE | |
19683 | char *p = (char *) ADDR_NO_RANDOMIZE; | |
19684 | #endif | |
19685 | ||
19686 | ; | |
19687 | return 0; | |
19688 | } | |
19689 | _ACEOF | |
19690 | rm -f conftest.$ac_objext | |
19691 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
19692 | (eval $ac_compile) 2>conftest.er1 | |
19693 | ac_status=$? | |
19694 | grep -v '^ *+' conftest.er1 >conftest.err | |
19695 | rm -f conftest.er1 | |
19696 | cat conftest.err >&5 | |
19697 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19698 | (exit $ac_status); } && | |
19699 | { ac_try='test -z "$ac_c_werror_flag" | |
19700 | || test ! -s conftest.err' | |
19701 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19702 | (eval $ac_try) 2>&5 | |
19703 | ac_status=$? | |
19704 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19705 | (exit $ac_status); }; } && | |
19706 | { ac_try='test -s conftest.$ac_objext' | |
19707 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19708 | (eval $ac_try) 2>&5 | |
19709 | ac_status=$? | |
19710 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19711 | (exit $ac_status); }; }; then | |
19712 | ac_cv_have_decl_ADDR_NO_RANDOMIZE=yes | |
19713 | else | |
19714 | echo "$as_me: failed program was:" >&5 | |
19715 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19716 | ||
19717 | ac_cv_have_decl_ADDR_NO_RANDOMIZE=no | |
19718 | fi | |
19719 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
19720 | fi | |
19721 | echo "$as_me:$LINENO: result: $ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&5 | |
19722 | echo "${ECHO_T}$ac_cv_have_decl_ADDR_NO_RANDOMIZE" >&6 | |
19723 | if test $ac_cv_have_decl_ADDR_NO_RANDOMIZE = yes; then | |
19724 | ||
19725 | cat >>confdefs.h <<_ACEOF | |
19726 | #define HAVE_DECL_ADDR_NO_RANDOMIZE 1 | |
19727 | _ACEOF | |
19728 | ||
19729 | ||
19730 | else | |
19731 | cat >>confdefs.h <<_ACEOF | |
19732 | #define HAVE_DECL_ADDR_NO_RANDOMIZE 0 | |
19733 | _ACEOF | |
19734 | ||
19735 | ||
19736 | fi | |
19737 | ||
19738 | ||
19739 | ||
19740 | if test "$cross_compiling" = yes; then | |
19741 | cat >conftest.$ac_ext <<_ACEOF | |
19742 | /* confdefs.h. */ | |
19743 | _ACEOF | |
19744 | cat confdefs.h >>conftest.$ac_ext | |
19745 | cat >>conftest.$ac_ext <<_ACEOF | |
19746 | /* end confdefs.h. */ | |
19747 | #include <sys/personality.h> | |
19748 | int | |
19749 | main () | |
19750 | { | |
19751 | ||
19752 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
19753 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
19754 | # endif | |
19755 | /* Test the flag could be set and stays set. */ | |
19756 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
19757 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
19758 | return 1 | |
19759 | ; | |
19760 | return 0; | |
19761 | } | |
19762 | _ACEOF | |
19763 | rm -f conftest.$ac_objext conftest$ac_exeext | |
19764 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
19765 | (eval $ac_link) 2>conftest.er1 | |
19766 | ac_status=$? | |
19767 | grep -v '^ *+' conftest.er1 >conftest.err | |
19768 | rm -f conftest.er1 | |
19769 | cat conftest.err >&5 | |
19770 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19771 | (exit $ac_status); } && | |
19772 | { ac_try='test -z "$ac_c_werror_flag" | |
19773 | || test ! -s conftest.err' | |
19774 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19775 | (eval $ac_try) 2>&5 | |
19776 | ac_status=$? | |
19777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19778 | (exit $ac_status); }; } && | |
19779 | { ac_try='test -s conftest$ac_exeext' | |
19780 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19781 | (eval $ac_try) 2>&5 | |
19782 | ac_status=$? | |
19783 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19784 | (exit $ac_status); }; }; then | |
19785 | have_personality=true | |
19786 | else | |
19787 | echo "$as_me: failed program was:" >&5 | |
19788 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19789 | ||
19790 | have_personality=false | |
19791 | fi | |
19792 | rm -f conftest.err conftest.$ac_objext \ | |
19793 | conftest$ac_exeext conftest.$ac_ext | |
19794 | else | |
19795 | cat >conftest.$ac_ext <<_ACEOF | |
19796 | /* confdefs.h. */ | |
19797 | _ACEOF | |
19798 | cat confdefs.h >>conftest.$ac_ext | |
19799 | cat >>conftest.$ac_ext <<_ACEOF | |
19800 | /* end confdefs.h. */ | |
19801 | #include <sys/personality.h> | |
19802 | int | |
19803 | main () | |
19804 | { | |
19805 | ||
19806 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE | |
19807 | # define ADDR_NO_RANDOMIZE 0x0040000 | |
19808 | # endif | |
19809 | /* Test the flag could be set and stays set. */ | |
19810 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); | |
19811 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) | |
19812 | return 1 | |
19813 | ; | |
19814 | return 0; | |
19815 | } | |
19816 | _ACEOF | |
19817 | rm -f conftest$ac_exeext | |
19818 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
19819 | (eval $ac_link) 2>&5 | |
19820 | ac_status=$? | |
19821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19822 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
19823 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
19824 | (eval $ac_try) 2>&5 | |
19825 | ac_status=$? | |
19826 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
19827 | (exit $ac_status); }; }; then | |
19828 | have_personality=true | |
19829 | else | |
19830 | echo "$as_me: program exited with status $ac_status" >&5 | |
19831 | echo "$as_me: failed program was:" >&5 | |
19832 | sed 's/^/| /' conftest.$ac_ext >&5 | |
19833 | ||
19834 | ( exit $ac_status ) | |
19835 | have_personality=false | |
19836 | fi | |
19837 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
19838 | fi | |
19839 | if $have_personality | |
19840 | then | |
19841 | ||
19842 | cat >>confdefs.h <<\_ACEOF | |
19843 | #define HAVE_PERSONALITY 1 | |
19844 | _ACEOF | |
19845 | ||
19846 | fi | |
19847 | ||
fb40c209 | 19848 | |
bec39cab | 19849 | |
b4e70030 | 19850 | # Check whether --with-sysroot or --without-sysroot was given. |
030292b7 | 19851 | if test "${with_sysroot+set}" = set; then |
b4e70030 JB |
19852 | withval="$with_sysroot" |
19853 | ||
030292b7 | 19854 | case ${with_sysroot} in |
715d1656 | 19855 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
030292b7 DJ |
19856 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
19857 | esac | |
19858 | ||
19859 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' | |
19860 | ||
07abfebf RS |
19861 | if test "x$prefix" = xNONE; then |
19862 | test_prefix=/usr/local | |
19863 | else | |
19864 | test_prefix=$prefix | |
19865 | fi | |
aa28a74e | 19866 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
07abfebf | 19867 | test_exec_prefix=$test_prefix |
030292b7 | 19868 | else |
07abfebf | 19869 | test_exec_prefix=$exec_prefix |
030292b7 DJ |
19870 | fi |
19871 | case ${TARGET_SYSTEM_ROOT} in | |
715d1656 | 19872 | "${test_prefix}"|"${test_prefix}/"*|\ |
07abfebf RS |
19873 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
19874 | '${prefix}'|'${prefix}/'*|\ | |
715d1656 | 19875 | '${exec_prefix}'|'${exec_prefix}/'*) |
030292b7 DJ |
19876 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
19877 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
19878 | ;; | |
19879 | esac | |
19880 | ||
19881 | else | |
bec39cab | 19882 | |
030292b7 DJ |
19883 | TARGET_SYSTEM_ROOT= |
19884 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"' | |
19885 | ||
b4e70030 | 19886 | fi; |
030292b7 DJ |
19887 | |
19888 | ||
19889 | ||
16e7150e JG |
19890 | system_gdbinit= |
19891 | ||
19892 | # Check whether --with-system-gdbinit or --without-system-gdbinit was given. | |
19893 | if test "${with_system_gdbinit+set}" = set; then | |
19894 | withval="$with_system_gdbinit" | |
19895 | system_gdbinit=${withval} | |
19896 | fi; | |
19897 | ||
19898 | ||
19899 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" | |
19900 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
19901 | ac_define_dir=`eval echo $system_gdbinit` | |
19902 | ac_define_dir=`eval echo $ac_define_dir` | |
19903 | ||
19904 | cat >>confdefs.h <<_ACEOF | |
19905 | #define SYSTEM_GDBINIT "$ac_define_dir" | |
19906 | _ACEOF | |
19907 | ||
19908 | ||
19909 | ||
19910 | if test "x$prefix" = xNONE; then | |
19911 | test_prefix=$ac_default_prefix | |
19912 | else | |
19913 | test_prefix=$prefix | |
19914 | fi | |
19915 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then | |
19916 | test_exec_prefix=$test_prefix | |
19917 | else | |
19918 | test_exec_prefix=$exec_prefix | |
19919 | fi | |
19920 | case ${system_gdbinit} in | |
19921 | "${test_prefix}"|"${test_prefix}/"*|\ | |
19922 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ | |
19923 | '${prefix}'|'${prefix}/'*|\ | |
19924 | '${exec_prefix}'|'${exec_prefix}/'*) | |
19925 | ||
19926 | cat >>confdefs.h <<\_ACEOF | |
19927 | #define SYSTEM_GDBINIT_RELOCATABLE 1 | |
19928 | _ACEOF | |
19929 | ||
19930 | ;; | |
19931 | esac | |
19932 | ||
b4e70030 | 19933 | # Check whether --enable-werror or --disable-werror was given. |
094a342e | 19934 | if test "${enable_werror+set}" = set; then |
b4e70030 JB |
19935 | enableval="$enable_werror" |
19936 | case "${enableval}" in | |
094a342e MK |
19937 | yes | y) ERROR_ON_WARNING="yes" ;; |
19938 | no | n) ERROR_ON_WARNING="no" ;; | |
19939 | *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5 | |
19940 | echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;} | |
19941 | { (exit 1); exit 1; }; } ;; | |
19942 | esac | |
b4e70030 | 19943 | fi; |
094a342e MK |
19944 | |
19945 | # Enable -Werror by default when using gcc | |
19946 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then | |
19947 | ERROR_ON_WARNING=yes | |
19948 | fi | |
19949 | ||
19950 | WERROR_CFLAGS="" | |
19951 | if test "${ERROR_ON_WARNING}" = yes ; then | |
19952 | WERROR_CFLAGS="-Werror" | |
19953 | fi | |
19954 | ||
aa79a185 DJ |
19955 | # The entries after -Wno-pointer-sign are disabled warnings which may |
19956 | # be enabled in the future, which can not currently be used to build | |
19957 | # GDB. | |
19958 | # NOTE: If you change this list, remember to update | |
3b851bce | 19959 | # gdb/doc/gdbint.texinfo. |
aa79a185 DJ |
19960 | build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ |
19961 | -Wformat-nonliteral -Wno-pointer-sign \ | |
58b38ee2 | 19962 | -Wno-unused -Wno-switch -Wno-char-subscripts" |
a3b362c4 | 19963 | |
3526781e DJ |
19964 | # Enable -Wno-format by default when using gcc on mingw since many |
19965 | # GCC versions complain about %I64. | |
19966 | case "${host}" in | |
19967 | *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; | |
19968 | esac | |
19969 | ||
b4e70030 | 19970 | # Check whether --enable-build-warnings or --disable-build-warnings was given. |
c906108c | 19971 | if test "${enable_build_warnings+set}" = set; then |
b4e70030 JB |
19972 | enableval="$enable_build_warnings" |
19973 | case "${enableval}" in | |
c906108c SS |
19974 | yes) ;; |
19975 | no) build_warnings="-w";; | |
19976 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
19977 | build_warnings="${build_warnings} ${t}";; | |
19978 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
19979 | build_warnings="${t} ${build_warnings}";; | |
19980 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
19981 | esac | |
d4f3574e | 19982 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
746a987d | 19983 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
c906108c | 19984 | fi |
b4e70030 | 19985 | fi; # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given. |
3b851bce | 19986 | if test "${enable_gdb_build_warnings+set}" = set; then |
b4e70030 JB |
19987 | enableval="$enable_gdb_build_warnings" |
19988 | case "${enableval}" in | |
3b851bce AC |
19989 | yes) ;; |
19990 | no) build_warnings="-w";; | |
19991 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
19992 | build_warnings="${build_warnings} ${t}";; | |
19993 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
19994 | build_warnings="${t} ${build_warnings}";; | |
19995 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
19996 | esac | |
19997 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
19998 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 | |
19999 | fi | |
b4e70030 | 20000 | fi; WARN_CFLAGS="" |
c906108c SS |
20001 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
20002 | then | |
b4e70030 JB |
20003 | echo "$as_me:$LINENO: checking compiler warning flags" >&5 |
20004 | echo $ECHO_N "checking compiler warning flags... $ECHO_C" >&6 | |
746a987d AC |
20005 | # Separate out the -Werror flag as some files just cannot be |
20006 | # compiled with it enabled. | |
20007 | for w in ${build_warnings}; do | |
20008 | case $w in | |
20009 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
20010 | *) # Check that GCC accepts it | |
4536bbc6 AC |
20011 | saved_CFLAGS="$CFLAGS" |
20012 | CFLAGS="$CFLAGS $w" | |
bec39cab AC |
20013 | cat >conftest.$ac_ext <<_ACEOF |
20014 | /* confdefs.h. */ | |
20015 | _ACEOF | |
20016 | cat confdefs.h >>conftest.$ac_ext | |
20017 | cat >>conftest.$ac_ext <<_ACEOF | |
20018 | /* end confdefs.h. */ | |
4536bbc6 | 20019 | |
bec39cab AC |
20020 | int |
20021 | main () | |
20022 | { | |
4536bbc6 | 20023 | |
bec39cab AC |
20024 | ; |
20025 | return 0; | |
20026 | } | |
20027 | _ACEOF | |
20028 | rm -f conftest.$ac_objext | |
20029 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
20030 | (eval $ac_compile) 2>conftest.er1 | |
20031 | ac_status=$? | |
20032 | grep -v '^ *+' conftest.er1 >conftest.err | |
20033 | rm -f conftest.er1 | |
20034 | cat conftest.err >&5 | |
20035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20036 | (exit $ac_status); } && | |
b4e70030 JB |
20037 | { ac_try='test -z "$ac_c_werror_flag" |
20038 | || test ! -s conftest.err' | |
bec39cab AC |
20039 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
20040 | (eval $ac_try) 2>&5 | |
20041 | ac_status=$? | |
20042 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20043 | (exit $ac_status); }; } && | |
20044 | { ac_try='test -s conftest.$ac_objext' | |
20045 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
20046 | (eval $ac_try) 2>&5 | |
20047 | ac_status=$? | |
20048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20049 | (exit $ac_status); }; }; then | |
4536bbc6 AC |
20050 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
20051 | else | |
bec39cab AC |
20052 | echo "$as_me: failed program was:" >&5 |
20053 | sed 's/^/| /' conftest.$ac_ext >&5 | |
20054 | ||
4536bbc6 | 20055 | fi |
bec39cab | 20056 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4536bbc6 | 20057 | CFLAGS="$saved_CFLAGS" |
746a987d AC |
20058 | esac |
20059 | done | |
aa79a185 DJ |
20060 | echo "$as_me:$LINENO: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
20061 | echo "${ECHO_T}${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6 | |
c906108c SS |
20062 | fi |
20063 | ||
20064 | ||
104c1213 | 20065 | |
7a292a7a | 20066 | # In the Cygwin environment, we need some additional flags. |
b4e70030 JB |
20067 | echo "$as_me:$LINENO: checking for cygwin" >&5 |
20068 | echo $ECHO_N "checking for cygwin... $ECHO_C" >&6 | |
bec39cab AC |
20069 | if test "${gdb_cv_os_cygwin+set}" = set; then |
20070 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
20071 | else | |
20072 | cat >conftest.$ac_ext <<_ACEOF | |
20073 | /* confdefs.h. */ | |
20074 | _ACEOF | |
20075 | cat confdefs.h >>conftest.$ac_ext | |
20076 | cat >>conftest.$ac_ext <<_ACEOF | |
20077 | /* end confdefs.h. */ | |
7a292a7a SS |
20078 | |
20079 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
20080 | lose | |
20081 | #endif | |
bec39cab | 20082 | _ACEOF |
7a292a7a | 20083 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
bec39cab | 20084 | $EGREP "lose" >/dev/null 2>&1; then |
7a292a7a SS |
20085 | gdb_cv_os_cygwin=yes |
20086 | else | |
7a292a7a SS |
20087 | gdb_cv_os_cygwin=no |
20088 | fi | |
20089 | rm -f conftest* | |
20090 | ||
20091 | fi | |
b4e70030 JB |
20092 | echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5 |
20093 | echo "${ECHO_T}$gdb_cv_os_cygwin" >&6 | |
7a292a7a | 20094 | |
aff38e61 | 20095 | |
3eb25fda | 20096 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
aff38e61 | 20097 | case ${host} in |
95cbc983 AC |
20098 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
20099 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; | |
0ea3f30e | 20100 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
aff38e61 AC |
20101 | esac |
20102 | ||
20103 | ||
cd0fc7c3 SS |
20104 | # libreadline needs libuser32.a in a cygwin environment |
20105 | WIN32LIBS= | |
20106 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
20107 | WIN32LIBS="-luser32" |
20108 | case "${target}" in | |
20109 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
20110 | ;; | |
20111 | esac | |
cd0fc7c3 | 20112 | fi |
c906108c | 20113 | |
b4505029 MM |
20114 | # The ser-tcp.c module requires sockets. |
20115 | case ${host} in | |
20116 | *mingw32*) | |
20117 | ||
20118 | cat >>confdefs.h <<\_ACEOF | |
20119 | #define USE_WIN32API 1 | |
20120 | _ACEOF | |
20121 | ||
20122 | WIN32LIBS="$WIN32LIBS -lws2_32" | |
20123 | ;; | |
20124 | esac | |
20125 | ||
7a292a7a | 20126 | |
31d99776 DJ |
20127 | # Add ELF support to GDB, but only if BFD includes ELF support. |
20128 | OLD_CFLAGS=$CFLAGS | |
20129 | OLD_LDFLAGS=$LDFLAGS | |
20130 | OLD_LIBS=$LIBS | |
cab58a69 | 20131 | CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" |
31d99776 | 20132 | LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" |
7b3200f9 | 20133 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
0f72fb1c | 20134 | LIBS="-lbfd -liberty $intl $LIBS" |
31d99776 DJ |
20135 | echo "$as_me:$LINENO: checking for ELF support in BFD" >&5 |
20136 | echo $ECHO_N "checking for ELF support in BFD... $ECHO_C" >&6 | |
20137 | if test "${gdb_cv_var_elf+set}" = set; then | |
20138 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
20139 | else | |
20140 | cat >conftest.$ac_ext <<_ACEOF | |
20141 | /* confdefs.h. */ | |
20142 | _ACEOF | |
20143 | cat confdefs.h >>conftest.$ac_ext | |
20144 | cat >>conftest.$ac_ext <<_ACEOF | |
20145 | /* end confdefs.h. */ | |
20146 | #include <stdlib.h> | |
20147 | #include "bfd.h" | |
20148 | #include "elf-bfd.h" | |
20149 | ||
20150 | int | |
20151 | main () | |
20152 | { | |
20153 | bfd *abfd = NULL; bfd_get_elf_phdr_upper_bound (abfd); | |
20154 | ; | |
20155 | return 0; | |
20156 | } | |
20157 | _ACEOF | |
20158 | rm -f conftest.$ac_objext conftest$ac_exeext | |
20159 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
20160 | (eval $ac_link) 2>conftest.er1 | |
20161 | ac_status=$? | |
20162 | grep -v '^ *+' conftest.er1 >conftest.err | |
20163 | rm -f conftest.er1 | |
20164 | cat conftest.err >&5 | |
20165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20166 | (exit $ac_status); } && | |
20167 | { ac_try='test -z "$ac_c_werror_flag" | |
20168 | || test ! -s conftest.err' | |
20169 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
20170 | (eval $ac_try) 2>&5 | |
20171 | ac_status=$? | |
20172 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20173 | (exit $ac_status); }; } && | |
20174 | { ac_try='test -s conftest$ac_exeext' | |
20175 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
20176 | (eval $ac_try) 2>&5 | |
20177 | ac_status=$? | |
20178 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20179 | (exit $ac_status); }; }; then | |
20180 | gdb_cv_var_elf=yes | |
20181 | else | |
20182 | echo "$as_me: failed program was:" >&5 | |
20183 | sed 's/^/| /' conftest.$ac_ext >&5 | |
20184 | ||
20185 | gdb_cv_var_elf=no | |
20186 | fi | |
20187 | rm -f conftest.err conftest.$ac_objext \ | |
20188 | conftest$ac_exeext conftest.$ac_ext | |
20189 | fi | |
20190 | echo "$as_me:$LINENO: result: $gdb_cv_var_elf" >&5 | |
20191 | echo "${ECHO_T}$gdb_cv_var_elf" >&6 | |
20192 | if test $gdb_cv_var_elf = yes; then | |
20193 | CONFIG_OBS="$CONFIG_OBS elfread.o" | |
20194 | ||
20195 | cat >>confdefs.h <<\_ACEOF | |
20196 | #define HAVE_ELF 1 | |
20197 | _ACEOF | |
20198 | ||
20199 | fi | |
20200 | CFLAGS=$OLD_CFLAGS | |
20201 | LDFLAGS=$OLD_LDFLAGS | |
20202 | LIBS=$OLD_LIBS | |
20203 | ||
121ce6e5 DJ |
20204 | # Add any host-specific objects to GDB. |
20205 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" | |
20206 | ||
3fc11d3e JM |
20207 | LIBGUI="../libgui/src/libgui.a" |
20208 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
20209 | ||
20210 | ||
7a292a7a | 20211 | |
3fc11d3e JM |
20212 | WIN32LDAPP= |
20213 | ||
20214 | ||
20215 | ||
d91670b9 | 20216 | case "${host}" in |
686a5eed | 20217 | *-*-cygwin* | *-*-mingw* ) |
d91670b9 CV |
20218 | configdir="win" |
20219 | ;; | |
20220 | *) | |
20221 | configdir="unix" | |
20222 | ;; | |
20223 | esac | |
3fc11d3e JM |
20224 | |
20225 | GDBTKLIBS= | |
20226 | if test "${enable_gdbtk}" = "yes"; then | |
20227 | ||
d1c3b63a KS |
20228 | # Gdbtk must have an absolute path to srcdir in order to run |
20229 | # properly when not installed. | |
20230 | here=`pwd` | |
20231 | cd ${srcdir} | |
20232 | GDBTK_SRC_DIR=`pwd` | |
20233 | cd $here | |
20234 | ||
bec39cab | 20235 | |
5062cc19 KS |
20236 | # |
20237 | # Ok, lets find the tcl configuration | |
20238 | # First, look for one uninstalled. | |
20239 | # the alternative search directory is invoked by --with-tcl | |
20240 | # | |
3fc11d3e | 20241 | |
5062cc19 KS |
20242 | if test x"${no_tcl}" = x ; then |
20243 | # we reset no_tcl in case something fails here | |
20244 | no_tcl=true | |
bec39cab | 20245 | |
5062cc19 KS |
20246 | # Check whether --with-tcl or --without-tcl was given. |
20247 | if test "${with_tcl+set}" = set; then | |
20248 | withval="$with_tcl" | |
b4e70030 JB |
20249 | with_tclconfig=${withval} |
20250 | fi; | |
5062cc19 | 20251 | echo "$as_me:$LINENO: checking for Tcl configuration" >&5 |
b4e70030 | 20252 | echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6 |
5062cc19 | 20253 | if test "${ac_cv_c_tclconfig+set}" = set; then |
bec39cab | 20254 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3fc11d3e | 20255 | else |
bec39cab | 20256 | |
3fc11d3e | 20257 | |
5062cc19 KS |
20258 | # First check to see if --with-tcl was specified. |
20259 | case "${host}" in | |
20260 | *-*-cygwin*) platDir="win" ;; | |
20261 | *) platDir="unix" ;; | |
20262 | esac | |
20263 | if test x"${with_tclconfig}" != x ; then | |
20264 | if test -f "${with_tclconfig}/tclConfig.sh" ; then | |
20265 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` | |
20266 | else | |
20267 | { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5 | |
bec39cab AC |
20268 | echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;} |
20269 | { (exit 1); exit 1; }; } | |
5062cc19 KS |
20270 | fi |
20271 | fi | |
20272 | ||
20273 | # then check for a private Tcl installation | |
20274 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
20275 | for i in \ | |
20276 | ../tcl \ | |
20277 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20278 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ | |
20279 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ | |
20280 | ../../tcl \ | |
20281 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20282 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ | |
20283 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ | |
20284 | ../../../tcl \ | |
20285 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20286 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ | |
20287 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
20288 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
20289 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
20290 | break | |
20291 | fi | |
20292 | done | |
20293 | fi | |
20294 | ||
20295 | # on Darwin, check in Framework installation locations | |
20296 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then | |
20297 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
20298 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
20299 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
20300 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
20301 | ; do | |
20302 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then | |
20303 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` | |
20304 | break | |
20305 | fi | |
20306 | done | |
20307 | fi | |
20308 | ||
20309 | # check in a few common install locations | |
20310 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
20311 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
20312 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
20313 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
20314 | `ls -d /usr/local/lib 2>/dev/null` \ | |
20315 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
20316 | `ls -d /usr/lib 2>/dev/null` \ | |
20317 | ; do | |
20318 | if test -f "$i/tclConfig.sh" ; then | |
20319 | ac_cv_c_tclconfig=`(cd $i; pwd)` | |
20320 | break | |
20321 | fi | |
20322 | done | |
20323 | fi | |
3fc11d3e | 20324 | |
5062cc19 KS |
20325 | # check in a few other private locations |
20326 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
20327 | for i in \ | |
20328 | ${srcdir}/../tcl \ | |
20329 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20330 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ | |
20331 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do | |
20332 | if test -f "$i/$platDir/tclConfig.sh" ; then | |
20333 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` | |
20334 | break | |
20335 | fi | |
20336 | done | |
20337 | fi | |
bec39cab | 20338 | |
3fc11d3e JM |
20339 | fi |
20340 | ||
5062cc19 KS |
20341 | |
20342 | if test x"${ac_cv_c_tclconfig}" = x ; then | |
20343 | TCL_BIN_DIR="# no Tcl configs found" | |
20344 | { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5 | |
bec39cab | 20345 | echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} |
5062cc19 KS |
20346 | else |
20347 | no_tcl= | |
20348 | TCL_BIN_DIR=${ac_cv_c_tclconfig} | |
20349 | echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 | |
20350 | echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6 | |
20351 | fi | |
20352 | fi | |
3fc11d3e | 20353 | |
bec39cab | 20354 | |
85541719 DE |
20355 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
20356 | # point to doing Tcl. | |
bec39cab | 20357 | |
5062cc19 KS |
20358 | # |
20359 | # Ok, lets find the tk configuration | |
20360 | # First, look for one uninstalled. | |
20361 | # the alternative search directory is invoked by --with-tk | |
20362 | # | |
3fc11d3e | 20363 | |
5062cc19 KS |
20364 | if test x"${no_tk}" = x ; then |
20365 | # we reset no_tk in case something fails here | |
20366 | no_tk=true | |
bec39cab | 20367 | |
5062cc19 KS |
20368 | # Check whether --with-tk or --without-tk was given. |
20369 | if test "${with_tk+set}" = set; then | |
20370 | withval="$with_tk" | |
20371 | with_tkconfig=${withval} | |
b4e70030 | 20372 | fi; |
5062cc19 KS |
20373 | echo "$as_me:$LINENO: checking for Tk configuration" >&5 |
20374 | echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6 | |
20375 | if test "${ac_cv_c_tkconfig+set}" = set; then | |
bec39cab AC |
20376 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
20377 | else | |
3fc11d3e JM |
20378 | |
20379 | ||
5062cc19 KS |
20380 | # First check to see if --with-tkconfig was specified. |
20381 | if test x"${with_tkconfig}" != x ; then | |
20382 | if test -f "${with_tkconfig}/tkConfig.sh" ; then | |
20383 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` | |
20384 | else | |
20385 | { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5 | |
20386 | echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;} | |
bec39cab | 20387 | { (exit 1); exit 1; }; } |
5062cc19 KS |
20388 | fi |
20389 | fi | |
3fc11d3e | 20390 | |
5062cc19 KS |
20391 | # then check for a private Tk library |
20392 | case "${host}" in | |
20393 | *-*-cygwin*) platDir="win" ;; | |
20394 | *) platDir="unix" ;; | |
20395 | esac | |
20396 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
20397 | for i in \ | |
20398 | ../tk \ | |
20399 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20400 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ | |
20401 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ | |
20402 | ../../tk \ | |
20403 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20404 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ | |
20405 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ | |
20406 | ../../../tk \ | |
20407 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20408 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ | |
20409 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do | |
20410 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
20411 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
20412 | break | |
20413 | fi | |
20414 | done | |
20415 | fi | |
20416 | ||
20417 | # on Darwin, check in Framework installation locations | |
20418 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then | |
20419 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ | |
20420 | `ls -d /Library/Frameworks 2>/dev/null` \ | |
20421 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ | |
20422 | `ls -d /System/Library/Frameworks 2>/dev/null` \ | |
20423 | ; do | |
20424 | if test -f "$i/Tk.framework/tkConfig.sh" ; then | |
20425 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` | |
20426 | break | |
20427 | fi | |
20428 | done | |
20429 | fi | |
20430 | ||
20431 | # check in a few common install locations | |
20432 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
20433 | for i in `ls -d ${libdir} 2>/dev/null` \ | |
20434 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ | |
20435 | `ls -d ${prefix}/lib 2>/dev/null` \ | |
20436 | `ls -d /usr/local/lib 2>/dev/null` \ | |
20437 | `ls -d /usr/contrib/lib 2>/dev/null` \ | |
20438 | `ls -d /usr/lib 2>/dev/null` \ | |
20439 | ; do | |
20440 | if test -f "$i/tkConfig.sh" ; then | |
20441 | ac_cv_c_tkconfig=`(cd $i; pwd)` | |
20442 | break | |
20443 | fi | |
20444 | done | |
20445 | fi | |
20446 | # check in a few other private locations | |
20447 | if test x"${ac_cv_c_tkconfig}" = x ; then | |
20448 | for i in \ | |
20449 | ${srcdir}/../tk \ | |
20450 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ | |
20451 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ | |
20452 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do | |
20453 | if test -f "$i/$platDir/tkConfig.sh" ; then | |
20454 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` | |
20455 | break | |
20456 | fi | |
20457 | done | |
20458 | fi | |
3fc11d3e | 20459 | |
3fc11d3e JM |
20460 | fi |
20461 | ||
20462 | ||
5062cc19 KS |
20463 | if test x"${ac_cv_c_tkconfig}" = x ; then |
20464 | TK_BIN_DIR="# no Tk configs found" | |
20465 | { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5 | |
20466 | echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} | |
5062cc19 KS |
20467 | else |
20468 | no_tk= | |
20469 | TK_BIN_DIR=${ac_cv_c_tkconfig} | |
20470 | echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 | |
20471 | echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6 | |
20472 | fi | |
3fc11d3e | 20473 | fi |
dd2504ab | 20474 | |
dd2504ab | 20475 | |
85541719 DE |
20476 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
20477 | ||
20478 | echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 | |
20479 | echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6 | |
20480 | ||
20481 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then | |
20482 | echo "$as_me:$LINENO: result: loading" >&5 | |
20483 | echo "${ECHO_T}loading" >&6 | |
20484 | . ${TCL_BIN_DIR}/tclConfig.sh | |
20485 | else | |
20486 | echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 | |
20487 | echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6 | |
20488 | fi | |
20489 | ||
20490 | # eval is required to do the TCL_DBGX substitution | |
20491 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" | |
20492 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" | |
20493 | ||
20494 | # If the TCL_BIN_DIR is the build directory (not the install directory), | |
20495 | # then set the common variable name to the value of the build variables. | |
20496 | # For example, the variable TCL_LIB_SPEC will be set to the value | |
20497 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | |
20498 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | |
20499 | # installed and uninstalled version of Tcl. | |
20500 | if test -f "${TCL_BIN_DIR}/Makefile" ; then | |
20501 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} | |
20502 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} | |
20503 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} | |
20504 | elif test "`uname -s`" = "Darwin"; then | |
20505 | # If Tcl was built as a framework, attempt to use the libraries | |
20506 | # from the framework at the given location so that linking works | |
20507 | # against Tcl.framework installed in an arbitary location. | |
20508 | case ${TCL_DEFS} in | |
20509 | *TCL_FRAMEWORK*) | |
20510 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then | |
20511 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ | |
20512 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do | |
20513 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then | |
20514 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" | |
20515 | break | |
20516 | fi | |
20517 | done | |
20518 | fi | |
20519 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then | |
20520 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" | |
20521 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" | |
20522 | fi | |
20523 | ;; | |
20524 | esac | |
20525 | fi | |
20526 | ||
20527 | # eval is required to do the TCL_DBGX substitution | |
20528 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" | |
20529 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" | |
20530 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" | |
20531 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" | |
20532 | ||
20533 | ||
20534 | ||
20535 | ||
20536 | ||
20537 | ||
20538 | ||
20539 | ||
20540 | ||
20541 | ||
20542 | ||
20543 | ||
20544 | ||
20545 | ||
20546 | ||
20547 | # Check for in-tree tcl | |
20548 | here=`pwd` | |
20549 | cd ${srcdir}/.. | |
20550 | topdir=`pwd` | |
20551 | cd ${here} | |
20552 | ||
20553 | intree="no" | |
20554 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then | |
20555 | intree="yes" | |
20556 | fi | |
20557 | ||
20558 | # Find Tcl private headers | |
20559 | if test x"${intree}" = xno; then | |
20560 | ||
20561 | echo "$as_me:$LINENO: checking for Tcl private headers" >&5 | |
20562 | echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6 | |
20563 | private_dir="" | |
20564 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` | |
20565 | if test -f ${dir}/tclInt.h ; then | |
20566 | private_dir=${dir} | |
20567 | fi | |
20568 | ||
20569 | if test x"${private_dir}" = x; then | |
20570 | { { echo "$as_me:$LINENO: error: could not find private Tcl headers" >&5 | |
20571 | echo "$as_me: error: could not find private Tcl headers" >&2;} | |
20572 | { (exit 1); exit 1; }; } | |
20573 | else | |
20574 | TCL_PRIVATE_INCLUDE="-I${private_dir}" | |
20575 | echo "$as_me:$LINENO: result: ${private_dir}" >&5 | |
20576 | echo "${ECHO_T}${private_dir}" >&6 | |
20577 | fi | |
20578 | ||
20579 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" | |
20580 | TCL_LIBRARY="${TCL_LIB_SPEC}" | |
20581 | TCL_DEPS="" | |
20582 | else | |
20583 | # If building tcl in the same src tree, private headers | |
20584 | # are not needed, but we need to be sure to use the right | |
20585 | # headers library | |
20586 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" | |
20587 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" | |
20588 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" | |
20589 | fi | |
20590 | ||
20591 | ||
20592 | ||
20593 | ||
20594 | ||
5062cc19 KS |
20595 | echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
20596 | echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6 | |
dd2504ab | 20597 | |
5062cc19 KS |
20598 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
20599 | echo "$as_me:$LINENO: result: loading" >&5 | |
20600 | echo "${ECHO_T}loading" >&6 | |
20601 | . ${TK_BIN_DIR}/tkConfig.sh | |
3fc11d3e | 20602 | else |
5062cc19 KS |
20603 | echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
20604 | echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6 | |
3fc11d3e | 20605 | fi |
bec39cab | 20606 | |
5062cc19 KS |
20607 | # eval is required to do the TK_DBGX substitution |
20608 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" | |
20609 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" | |
20610 | ||
20611 | # If the TK_BIN_DIR is the build directory (not the install directory), | |
20612 | # then set the common variable name to the value of the build variables. | |
20613 | # For example, the variable TK_LIB_SPEC will be set to the value | |
20614 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC | |
20615 | # instead of TK_BUILD_LIB_SPEC since it will work with both an | |
20616 | # installed and uninstalled version of Tcl. | |
85541719 | 20617 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
5062cc19 KS |
20618 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
20619 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} | |
20620 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} | |
20621 | elif test "`uname -s`" = "Darwin"; then | |
20622 | # If Tk was built as a framework, attempt to use the libraries | |
20623 | # from the framework at the given location so that linking works | |
20624 | # against Tk.framework installed in an arbitary location. | |
20625 | case ${TK_DEFS} in | |
20626 | *TK_FRAMEWORK*) | |
85541719 | 20627 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
5062cc19 KS |
20628 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
20629 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do | |
20630 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then | |
20631 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" | |
20632 | break | |
20633 | fi | |
20634 | done | |
20635 | fi | |
85541719 | 20636 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
5062cc19 KS |
20637 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
20638 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" | |
20639 | fi | |
20640 | ;; | |
20641 | esac | |
3fc11d3e JM |
20642 | fi |
20643 | ||
5062cc19 KS |
20644 | # eval is required to do the TK_DBGX substitution |
20645 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" | |
20646 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" | |
20647 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" | |
20648 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" | |
3fc11d3e | 20649 | |
3fc11d3e JM |
20650 | |
20651 | ||
bec39cab AC |
20652 | |
20653 | ||
20654 | ||
20655 | ||
20656 | ||
20657 | ||
20658 | ||
3fc11d3e | 20659 | |
3fc11d3e | 20660 | |
bec39cab | 20661 | |
bec39cab | 20662 | |
85541719 DE |
20663 | # Check for in-tree Tk |
20664 | intree="no" | |
20665 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then | |
20666 | intree="yes" | |
20667 | fi | |
3fc11d3e | 20668 | |
85541719 DE |
20669 | # Find Tk private headers |
20670 | if test x"${intree}" = xno; then | |
3fc11d3e | 20671 | |
5062cc19 KS |
20672 | echo "$as_me:$LINENO: checking for Tk private headers" >&5 |
20673 | echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6 | |
20674 | private_dir="" | |
20675 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` | |
20676 | if test -f ${dir}/tkInt.h; then | |
20677 | private_dir=${dir} | |
3fc11d3e | 20678 | fi |
bec39cab | 20679 | |
5062cc19 KS |
20680 | if test x"${private_dir}" = x; then |
20681 | { { echo "$as_me:$LINENO: error: could not find Tk private headers" >&5 | |
20682 | echo "$as_me: error: could not find Tk private headers" >&2;} | |
20683 | { (exit 1); exit 1; }; } | |
3fc11d3e | 20684 | else |
5062cc19 KS |
20685 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
20686 | echo "$as_me:$LINENO: result: ${private_dir}" >&5 | |
20687 | echo "${ECHO_T}${private_dir}" >&6 | |
3fc11d3e | 20688 | fi |
3fc11d3e | 20689 | |
85541719 DE |
20690 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
20691 | TK_LIBRARY=${TK_LIB_SPEC} | |
20692 | TK_DEPS="" | |
20693 | else | |
20694 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" | |
20695 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" | |
20696 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" | |
20697 | fi | |
3fc11d3e JM |
20698 | |
20699 | ||
3fc11d3e JM |
20700 | |
20701 | ||
3fc11d3e | 20702 | |
85541719 | 20703 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
3fc11d3e | 20704 | |
85541719 DE |
20705 | # Include some libraries that Tcl and Tk want. |
20706 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
20707 | # Yes, the ordering seems wrong here. But it isn't. | |
20708 | # TK_LIBS is the list of libraries that need to be linked | |
20709 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
20710 | # were in LIBS then any link tests after this point would | |
20711 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
20712 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
4226a5a5 | 20713 | |
85541719 DE |
20714 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
20715 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" | |
20716 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" | |
20717 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" | |
20718 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" | |
20719 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" | |
20720 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" | |
3fc11d3e | 20721 | |
85541719 DE |
20722 | if test x$gdb_cv_os_cygwin = xyes; then |
20723 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
20724 | WIN32LDAPP="-Wl,--subsystem,console" | |
20725 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
3fc11d3e | 20726 | fi |
ffc6a242 | 20727 | |
b4e70030 JB |
20728 | |
20729 | ||
20730 | subdirs="$subdirs gdbtk" | |
3ace7edb | 20731 | |
85541719 | 20732 | fi |
3fc11d3e JM |
20733 | fi |
20734 | ||
20735 | ||
20736 | ||
20737 | ||
20738 | ||
20739 | ||
20740 | ||
20741 | ||
b4e70030 JB |
20742 | echo "$as_me:$LINENO: checking for X" >&5 |
20743 | echo $ECHO_N "checking for X... $ECHO_C" >&6 | |
bec39cab | 20744 | |
c906108c | 20745 | |
b4e70030 | 20746 | # Check whether --with-x or --without-x was given. |
c906108c | 20747 | if test "${with_x+set}" = set; then |
b4e70030 | 20748 | withval="$with_x" |
c906108c | 20749 | |
b4e70030 | 20750 | fi; |
c906108c SS |
20751 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
20752 | if test "x$with_x" = xno; then | |
20753 | # The user explicitly disabled X. | |
20754 | have_x=disabled | |
20755 | else | |
20756 | if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then | |
20757 | # Both variables are already set. | |
20758 | have_x=yes | |
20759 | else | |
bec39cab AC |
20760 | if test "${ac_cv_have_x+set}" = set; then |
20761 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c906108c SS |
20762 | else |
20763 | # One or both of the vars are not set, and there is no cached value. | |
bec39cab | 20764 | ac_x_includes=no ac_x_libraries=no |
b4e70030 | 20765 | rm -fr conftest.dir |
bec39cab AC |
20766 | if mkdir conftest.dir; then |
20767 | cd conftest.dir | |
c906108c | 20768 | # Make sure to not put "make" in the Imakefile rules, since we grep it out. |
bec39cab | 20769 | cat >Imakefile <<'_ACEOF' |
c906108c SS |
20770 | acfindx: |
20771 | @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' | |
bec39cab | 20772 | _ACEOF |
b4e70030 | 20773 | if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then |
c906108c SS |
20774 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
20775 | eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` | |
20776 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
20777 | for ac_extension in a so sl; do | |
20778 | if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && | |
bec39cab AC |
20779 | test -f $ac_im_libdir/libX11.$ac_extension; then |
20780 | ac_im_usrlibdir=$ac_im_libdir; break | |
c906108c SS |
20781 | fi |
20782 | done | |
20783 | # Screen out bogus values from the imake configuration. They are | |
20784 | # bogus both because they are the default anyway, and because | |
20785 | # using them would break gcc on systems where it needs fixed includes. | |
bec39cab | 20786 | case $ac_im_incroot in |
b4e70030 | 20787 | /usr/include) ;; |
bec39cab | 20788 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
c906108c | 20789 | esac |
bec39cab | 20790 | case $ac_im_usrlibdir in |
c906108c | 20791 | /usr/lib | /lib) ;; |
bec39cab | 20792 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
c906108c SS |
20793 | esac |
20794 | fi | |
20795 | cd .. | |
b4e70030 | 20796 | rm -fr conftest.dir |
c906108c SS |
20797 | fi |
20798 | ||
bec39cab AC |
20799 | # Standard set of common directories for X headers. |
20800 | # Check X11 before X11Rn because it is often a symlink to the current release. | |
20801 | ac_x_header_dirs=' | |
20802 | /usr/X11/include | |
20803 | /usr/X11R6/include | |
20804 | /usr/X11R5/include | |
20805 | /usr/X11R4/include | |
20806 | ||
20807 | /usr/include/X11 | |
20808 | /usr/include/X11R6 | |
20809 | /usr/include/X11R5 | |
20810 | /usr/include/X11R4 | |
20811 | ||
20812 | /usr/local/X11/include | |
20813 | /usr/local/X11R6/include | |
20814 | /usr/local/X11R5/include | |
20815 | /usr/local/X11R4/include | |
20816 | ||
20817 | /usr/local/include/X11 | |
20818 | /usr/local/include/X11R6 | |
20819 | /usr/local/include/X11R5 | |
20820 | /usr/local/include/X11R4 | |
20821 | ||
20822 | /usr/X386/include | |
20823 | /usr/x386/include | |
20824 | /usr/XFree86/include/X11 | |
20825 | ||
20826 | /usr/include | |
20827 | /usr/local/include | |
20828 | /usr/unsupported/include | |
20829 | /usr/athena/include | |
20830 | /usr/local/x11r5/include | |
20831 | /usr/lpp/Xamples/include | |
20832 | ||
20833 | /usr/openwin/include | |
20834 | /usr/openwin/share/include' | |
20835 | ||
20836 | if test "$ac_x_includes" = no; then | |
59f80f10 | 20837 | # Guess where to find include files, by looking for Intrinsic.h. |
c906108c | 20838 | # First, try using that file with no special directory specified. |
bec39cab AC |
20839 | cat >conftest.$ac_ext <<_ACEOF |
20840 | /* confdefs.h. */ | |
20841 | _ACEOF | |
20842 | cat confdefs.h >>conftest.$ac_ext | |
20843 | cat >>conftest.$ac_ext <<_ACEOF | |
20844 | /* end confdefs.h. */ | |
59f80f10 | 20845 | #include <X11/Intrinsic.h> |
bec39cab AC |
20846 | _ACEOF |
20847 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
20848 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
20849 | ac_status=$? | |
20850 | grep -v '^ *+' conftest.er1 >conftest.err | |
20851 | rm -f conftest.er1 | |
20852 | cat conftest.err >&5 | |
20853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20854 | (exit $ac_status); } >/dev/null; then | |
20855 | if test -s conftest.err; then | |
20856 | ac_cpp_err=$ac_c_preproc_warn_flag | |
20857 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
20858 | else | |
20859 | ac_cpp_err= | |
20860 | fi | |
20861 | else | |
20862 | ac_cpp_err=yes | |
20863 | fi | |
20864 | if test -z "$ac_cpp_err"; then | |
c906108c SS |
20865 | # We can compile using X headers with no special include directory. |
20866 | ac_x_includes= | |
20867 | else | |
bec39cab AC |
20868 | echo "$as_me: failed program was:" >&5 |
20869 | sed 's/^/| /' conftest.$ac_ext >&5 | |
20870 | ||
20871 | for ac_dir in $ac_x_header_dirs; do | |
59f80f10 | 20872 | if test -r "$ac_dir/X11/Intrinsic.h"; then |
bec39cab AC |
20873 | ac_x_includes=$ac_dir |
20874 | break | |
20875 | fi | |
20876 | done | |
c906108c | 20877 | fi |
bec39cab AC |
20878 | rm -f conftest.err conftest.$ac_ext |
20879 | fi # $ac_x_includes = no | |
c906108c | 20880 | |
bec39cab | 20881 | if test "$ac_x_libraries" = no; then |
c906108c | 20882 | # Check for the libraries. |
c906108c SS |
20883 | # See if we find them without any special options. |
20884 | # Don't add to $LIBS permanently. | |
bec39cab | 20885 | ac_save_LIBS=$LIBS |
4e8d927d | 20886 | LIBS="-lXt $LIBS" |
bec39cab AC |
20887 | cat >conftest.$ac_ext <<_ACEOF |
20888 | /* confdefs.h. */ | |
20889 | _ACEOF | |
20890 | cat confdefs.h >>conftest.$ac_ext | |
20891 | cat >>conftest.$ac_ext <<_ACEOF | |
20892 | /* end confdefs.h. */ | |
59f80f10 | 20893 | #include <X11/Intrinsic.h> |
bec39cab AC |
20894 | int |
20895 | main () | |
20896 | { | |
59f80f10 | 20897 | XtMalloc (0) |
bec39cab AC |
20898 | ; |
20899 | return 0; | |
20900 | } | |
20901 | _ACEOF | |
20902 | rm -f conftest.$ac_objext conftest$ac_exeext | |
20903 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
20904 | (eval $ac_link) 2>conftest.er1 | |
20905 | ac_status=$? | |
20906 | grep -v '^ *+' conftest.er1 >conftest.err | |
20907 | rm -f conftest.er1 | |
20908 | cat conftest.err >&5 | |
20909 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20910 | (exit $ac_status); } && | |
b4e70030 JB |
20911 | { ac_try='test -z "$ac_c_werror_flag" |
20912 | || test ! -s conftest.err' | |
bec39cab AC |
20913 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
20914 | (eval $ac_try) 2>&5 | |
20915 | ac_status=$? | |
20916 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20917 | (exit $ac_status); }; } && | |
20918 | { ac_try='test -s conftest$ac_exeext' | |
20919 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
20920 | (eval $ac_try) 2>&5 | |
20921 | ac_status=$? | |
20922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
20923 | (exit $ac_status); }; }; then | |
20924 | LIBS=$ac_save_LIBS | |
c906108c SS |
20925 | # We can link X programs with no special library path. |
20926 | ac_x_libraries= | |
20927 | else | |
bec39cab AC |
20928 | echo "$as_me: failed program was:" >&5 |
20929 | sed 's/^/| /' conftest.$ac_ext >&5 | |
20930 | ||
b4e70030 | 20931 | LIBS=$ac_save_LIBS |
bec39cab | 20932 | for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` |
c906108c | 20933 | do |
bec39cab | 20934 | # Don't even attempt the hair of trying to link an X program! |
c906108c | 20935 | for ac_extension in a so sl; do |
b4e70030 | 20936 | if test -r $ac_dir/libXt.$ac_extension; then |
c906108c SS |
20937 | ac_x_libraries=$ac_dir |
20938 | break 2 | |
20939 | fi | |
20940 | done | |
20941 | done | |
20942 | fi | |
bec39cab AC |
20943 | rm -f conftest.err conftest.$ac_objext \ |
20944 | conftest$ac_exeext conftest.$ac_ext | |
20945 | fi # $ac_x_libraries = no | |
c906108c | 20946 | |
bec39cab | 20947 | if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then |
c906108c SS |
20948 | # Didn't find X anywhere. Cache the known absence of X. |
20949 | ac_cv_have_x="have_x=no" | |
20950 | else | |
20951 | # Record where we found X for the cache. | |
20952 | ac_cv_have_x="have_x=yes \ | |
bec39cab | 20953 | ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" |
c906108c SS |
20954 | fi |
20955 | fi | |
bec39cab | 20956 | |
c906108c SS |
20957 | fi |
20958 | eval "$ac_cv_have_x" | |
20959 | fi # $with_x != no | |
20960 | ||
20961 | if test "$have_x" != yes; then | |
b4e70030 JB |
20962 | echo "$as_me:$LINENO: result: $have_x" >&5 |
20963 | echo "${ECHO_T}$have_x" >&6 | |
c906108c SS |
20964 | no_x=yes |
20965 | else | |
20966 | # If each of the values was on the command line, it overrides each guess. | |
20967 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
20968 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
20969 | # Update the cache value to reflect the command line values. | |
20970 | ac_cv_have_x="have_x=yes \ | |
20971 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | |
b4e70030 JB |
20972 | echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 |
20973 | echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 | |
c906108c SS |
20974 | fi |
20975 | ||
20976 | ||
bec39cab | 20977 | # Unlike the sim directory, whether a simulator is linked is controlled by |
9b624dbe | 20978 | # presence of a gdb_sim definition in the target configure.tgt entry. |
7a292a7a SS |
20979 | # This code just checks for a few cases where we'd like to ignore those |
20980 | # definitions, even when they're present in the '.mt' file. These cases | |
20981 | # are when --disable-sim is specified, or if the simulator directory is | |
6c5cfe5b | 20982 | # not part of the source tree. |
7a292a7a | 20983 | # |
b4e70030 | 20984 | # Check whether --enable-sim or --disable-sim was given. |
7a292a7a | 20985 | if test "${enable_sim+set}" = set; then |
b4e70030 JB |
20986 | enableval="$enable_sim" |
20987 | echo "enable_sim = $enable_sim"; | |
7a292a7a SS |
20988 | echo "enableval = ${enableval}"; |
20989 | case "${enableval}" in | |
20990 | yes) ignore_sim=false ;; | |
20991 | no) ignore_sim=true ;; | |
20992 | *) ignore_sim=false ;; | |
20993 | esac | |
20994 | else | |
20995 | ignore_sim=false | |
b4e70030 | 20996 | fi; |
7a292a7a SS |
20997 | |
20998 | if test ! -d "${srcdir}/../sim"; then | |
20999 | ignore_sim=true | |
21000 | fi | |
21001 | ||
9b624dbe UW |
21002 | SIM= |
21003 | SIM_OBS= | |
21004 | if test "${ignore_sim}" = "false"; then | |
21005 | if test x"${gdb_sim}" != x ; then | |
21006 | SIM="${gdb_sim}" | |
21007 | SIM_OBS="remote-sim.o" | |
60ca704f SE |
21008 | |
21009 | cat >>confdefs.h <<\_ACEOF | |
7a292a7a | 21010 | #define WITH_SIM 1 |
bec39cab | 21011 | _ACEOF |
7a292a7a | 21012 | |
9b624dbe | 21013 | fi |
7a292a7a SS |
21014 | fi |
21015 | ||
21016 | ||
21017 | ||
c906108c SS |
21018 | |
21019 | ||
21020 | ||
21021 | ||
21022 | ||
21023 | ||
dfcd3bfb | 21024 | |
e56ac5c3 AC |
21025 | |
21026 | ||
b3a90332 AC |
21027 | |
21028 | ||
c35f4ffc | 21029 | # List of host floatformats. |
bec39cab AC |
21030 | |
21031 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 21032 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
bec39cab | 21033 | _ACEOF |
c35f4ffc | 21034 | |
bec39cab AC |
21035 | |
21036 | cat >>confdefs.h <<_ACEOF | |
c35f4ffc | 21037 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
bec39cab AC |
21038 | _ACEOF |
21039 | ||
c35f4ffc | 21040 | |
bec39cab | 21041 | cat >>confdefs.h <<_ACEOF |
c35f4ffc | 21042 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
bec39cab | 21043 | _ACEOF |
c35f4ffc AC |
21044 | |
21045 | ||
c906108c SS |
21046 | # target_subdir is used by the testsuite to find the target libraries. |
21047 | target_subdir= | |
21048 | if test "${host}" != "${target}"; then | |
21049 | target_subdir="${target_alias}/" | |
21050 | fi | |
21051 | ||
21052 | ||
21053 | frags= | |
771b4502 | 21054 | if test "${gdb_native}" = "yes"; then |
0dad8a66 MK |
21055 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh |
21056 | if test ! -f ${host_makefile_frag}; then | |
bec39cab AC |
21057 | { { echo "$as_me:$LINENO: error: \"*** Gdb does not support native target ${host}\"" >&5 |
21058 | echo "$as_me: error: \"*** Gdb does not support native target ${host}\"" >&2;} | |
21059 | { (exit 1); exit 1; }; } | |
0dad8a66 MK |
21060 | fi |
21061 | frags="$frags $host_makefile_frag" | |
21062 | else | |
21063 | host_makefile_frag=/dev/null | |
c906108c | 21064 | fi |
c906108c | 21065 | |
c906108c SS |
21066 | |
21067 | ||
21068 | ||
771b4502 | 21069 | if test "${gdb_native}" = "yes"; then |
a85f51e7 DJ |
21070 | # We pick this up from the host configuration file (.mh) because we |
21071 | # do not have a native configuration Makefile fragment. | |
c906108c SS |
21072 | nativefile=`sed -n ' |
21073 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
21074 | ' ${host_makefile_frag}` | |
c906108c SS |
21075 | fi |
21076 | ||
21077 | ||
b00a8037 | 21078 | if test x"${gdb_osabi}" != x ; then |
bec39cab AC |
21079 | |
21080 | cat >>confdefs.h <<_ACEOF | |
b00a8037 | 21081 | #define GDB_OSABI_DEFAULT $gdb_osabi |
bec39cab | 21082 | _ACEOF |
b00a8037 DJ |
21083 | |
21084 | fi | |
21085 | ||
8dcde887 | 21086 | # Enable multi-ice-gdb-server. |
b4e70030 | 21087 | # Check whether --enable-multi-ice or --disable-multi-ice was given. |
8dcde887 | 21088 | if test "${enable_multi_ice+set}" = set; then |
b4e70030 JB |
21089 | enableval="$enable_multi_ice" |
21090 | case $enableval in | |
8dcde887 MK |
21091 | yes | no) |
21092 | ;; | |
bec39cab AC |
21093 | *) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-multi-ice" >&5 |
21094 | echo "$as_me: error: bad value $enableval for --enable-multi-ice" >&2;} | |
21095 | { (exit 1); exit 1; }; } ;; | |
8dcde887 | 21096 | esac |
b4e70030 | 21097 | fi; |
4e8d927d | 21098 | if test "x$enable_multi_ice" = xyes; then |
b4e70030 JB |
21099 | |
21100 | ||
21101 | subdirs="$subdirs multi-ice" | |
3ace7edb | 21102 | |
a85f51e7 DJ |
21103 | fi |
21104 | ||
a13e2c95 UW |
21105 | # We only build gdbserver automatically in a native configuration. |
21106 | if test "$gdb_native" = "yes"; then | |
b4e70030 JB |
21107 | echo "$as_me:$LINENO: checking whether gdbserver is supported on this host" >&5 |
21108 | echo $ECHO_N "checking whether gdbserver is supported on this host... $ECHO_C" >&6 | |
8dcde887 | 21109 | if test "x$build_gdbserver" = xyes; then |
b4e70030 JB |
21110 | echo "$as_me:$LINENO: result: yes" >&5 |
21111 | echo "${ECHO_T}yes" >&6 | |
21112 | ||
21113 | ||
21114 | subdirs="$subdirs gdbserver" | |
3ace7edb | 21115 | |
8dcde887 | 21116 | else |
b4e70030 JB |
21117 | echo "$as_me:$LINENO: result: no" >&5 |
21118 | echo "${ECHO_T}no" >&6 | |
8dcde887 MK |
21119 | fi |
21120 | fi | |
21121 | ||
db985757 | 21122 | # If nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link |
2c0fc042 | 21123 | # to an empty version. |
c906108c SS |
21124 | |
21125 | files= | |
21126 | links= | |
5a2402b8 | 21127 | |
c906108c | 21128 | rm -f nm.h |
5a2402b8 | 21129 | nm_h="" |
c906108c | 21130 | if test "${nativefile}" != ""; then |
5a2402b8 | 21131 | nm_h=nm.h |
0f475e27 AC |
21132 | case "${nativefile}" in |
21133 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; | |
21134 | * ) GDB_NM_FILE="${nativefile}" | |
21135 | esac | |
5a2402b8 AC |
21136 | files="${files} ${GDB_NM_FILE}" |
21137 | links="${links} nm.h" | |
60ca704f SE |
21138 | |
21139 | cat >>confdefs.h <<_ACEOF | |
b78960be | 21140 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
bec39cab | 21141 | _ACEOF |
5a2402b8 | 21142 | |
c906108c | 21143 | fi |
5a2402b8 AC |
21144 | |
21145 | ||
bec39cab AC |
21146 | ac_sources="$files" |
21147 | ac_dests="$links" | |
21148 | while test -n "$ac_sources"; do | |
21149 | set $ac_dests; ac_dest=$1; shift; ac_dests=$* | |
21150 | set $ac_sources; ac_source=$1; shift; ac_sources=$* | |
21151 | ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source" | |
21152 | done | |
b4e70030 | 21153 | ac_config_links="$ac_config_links $ac_config_links_1" |
c906108c SS |
21154 | |
21155 | ||
c906108c SS |
21156 | |
21157 | ||
c906108c | 21158 | |
bec39cab | 21159 | cat >>confdefs.h <<\_ACEOF |
6c7a06a3 | 21160 | #define GDB_DEFAULT_HOST_CHARSET "UTF-8" |
bec39cab AC |
21161 | _ACEOF |
21162 | ||
bec39cab | 21163 | |
e28b3332 | 21164 | ac_config_files="$ac_config_files Makefile .gdbinit:gdbinit.in gnulib/Makefile" |
b4e70030 | 21165 | ac_config_commands="$ac_config_commands default" |
bec39cab AC |
21166 | cat >confcache <<\_ACEOF |
21167 | # This file is a shell script that caches the results of configure | |
21168 | # tests run on this system so they can be shared between configure | |
21169 | # scripts and configure runs, see configure's option --config-cache. | |
21170 | # It is not useful on other systems. If it contains results you don't | |
21171 | # want to keep, you may remove or edit it. | |
21172 | # | |
21173 | # config.status only pays attention to the cache file if you give it | |
21174 | # the --recheck option to rerun configure. | |
21175 | # | |
21176 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | |
21177 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
21178 | # following values. | |
21179 | ||
21180 | _ACEOF | |
21181 | ||
21182 | # The following way of writing the cache mishandles newlines in values, | |
21183 | # but we know of no workaround that is simple, portable, and efficient. | |
b4e70030 | 21184 | # So, don't put newlines in cache variables' values. |
bec39cab AC |
21185 | # Ultrix sh set writes to stderr and can't be redirected directly, |
21186 | # and sets the high bit in the cache file unless we assign to the vars. | |
b4e70030 | 21187 | { |
bec39cab | 21188 | (set) 2>&1 | |
b4e70030 JB |
21189 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
21190 | *ac_space=\ *) | |
bec39cab AC |
21191 | # `set' does not quote correctly, so add quotes (double-quote |
21192 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
21193 | sed -n \ | |
21194 | "s/'/'\\\\''/g; | |
21195 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
b4e70030 | 21196 | ;; |
bec39cab AC |
21197 | *) |
21198 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
b4e70030 JB |
21199 | sed -n \ |
21200 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
bec39cab | 21201 | ;; |
b4e70030 JB |
21202 | esac; |
21203 | } | | |
bec39cab AC |
21204 | sed ' |
21205 | t clear | |
b4e70030 | 21206 | : clear |
bec39cab AC |
21207 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
21208 | t end | |
b4e70030 JB |
21209 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
21210 | : end' >>confcache | |
bec39cab AC |
21211 | if diff $cache_file confcache >/dev/null 2>&1; then :; else |
21212 | if test -w $cache_file; then | |
b4e70030 | 21213 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
bec39cab AC |
21214 | cat confcache >$cache_file |
21215 | else | |
b4e70030 | 21216 | echo "not updating unwritable cache $cache_file" |
bec39cab AC |
21217 | fi |
21218 | fi | |
21219 | rm -f confcache | |
21220 | ||
21221 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
21222 | # Let make expand exec_prefix. | |
21223 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
21224 | ||
b4e70030 JB |
21225 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
21226 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
21227 | # trailing colons and then remove the whole line if VPATH becomes empty | |
21228 | # (actually we leave an empty line to preserve line numbers). | |
21229 | if test "x$srcdir" = x.; then | |
21230 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
21231 | s/:*\$(srcdir):*/:/; | |
21232 | s/:*\${srcdir}:*/:/; | |
21233 | s/:*@srcdir@:*/:/; | |
21234 | s/^\([^=]*=[ ]*\):*/\1/; | |
21235 | s/:*$//; | |
21236 | s/^[^=]*=[ ]*$//; | |
21237 | }' | |
21238 | fi | |
21239 | ||
bec39cab AC |
21240 | DEFS=-DHAVE_CONFIG_H |
21241 | ||
21242 | ac_libobjs= | |
21243 | ac_ltlibobjs= | |
21244 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
21245 | # 1. Remove the extension, and $U if already installed. | |
b4e70030 JB |
21246 | ac_i=`echo "$ac_i" | |
21247 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` | |
21248 | # 2. Add them. | |
21249 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
21250 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
bec39cab AC |
21251 | done |
21252 | LIBOBJS=$ac_libobjs | |
21253 | ||
21254 | LTLIBOBJS=$ac_ltlibobjs | |
21255 | ||
21256 | ||
85981d60 AC |
21257 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
21258 | { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. | |
21259 | Usually this means the macro was only invoked conditionally." >&5 | |
21260 | echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. | |
21261 | Usually this means the macro was only invoked conditionally." >&2;} | |
21262 | { (exit 1); exit 1; }; } | |
21263 | fi | |
a417dc56 RW |
21264 | if test -z "${GMAKE_TRUE}" && test -z "${GMAKE_FALSE}"; then |
21265 | { { echo "$as_me:$LINENO: error: conditional \"GMAKE\" was never defined. | |
21266 | Usually this means the macro was only invoked conditionally." >&5 | |
21267 | echo "$as_me: error: conditional \"GMAKE\" was never defined. | |
21268 | Usually this means the macro was only invoked conditionally." >&2;} | |
21269 | { (exit 1); exit 1; }; } | |
21270 | fi | |
783e057b DJ |
21271 | if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then |
21272 | { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. | |
21273 | Usually this means the macro was only invoked conditionally." >&5 | |
21274 | echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. | |
21275 | Usually this means the macro was only invoked conditionally." >&2;} | |
21276 | { (exit 1); exit 1; }; } | |
21277 | fi | |
21278 | ||
21279 | gl_libobjs= | |
21280 | gl_ltlibobjs= | |
21281 | if test -n "$gl_LIBOBJS"; then | |
21282 | # Remove the extension. | |
21283 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
21284 | for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do | |
21285 | gl_libobjs="$gl_libobjs $i.$ac_objext" | |
21286 | gl_ltlibobjs="$gl_ltlibobjs $i.lo" | |
21287 | done | |
21288 | fi | |
21289 | gl_LIBOBJS=$gl_libobjs | |
21290 | ||
21291 | gl_LTLIBOBJS=$gl_ltlibobjs | |
21292 | ||
21293 | ||
21294 | ||
21295 | gltests_libobjs= | |
21296 | gltests_ltlibobjs= | |
21297 | if test -n "$gltests_LIBOBJS"; then | |
21298 | # Remove the extension. | |
21299 | sed_drop_objext='s/\.o$//;s/\.obj$//' | |
21300 | for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do | |
21301 | gltests_libobjs="$gltests_libobjs $i.$ac_objext" | |
21302 | gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" | |
21303 | done | |
21304 | fi | |
21305 | gltests_LIBOBJS=$gltests_libobjs | |
21306 | ||
21307 | gltests_LTLIBOBJS=$gltests_ltlibobjs | |
21308 | ||
21309 | ||
e28b3332 DJ |
21310 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then |
21311 | { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. | |
21312 | Usually this means the macro was only invoked conditionally." >&5 | |
21313 | echo "$as_me: error: conditional \"AMDEP\" was never defined. | |
21314 | Usually this means the macro was only invoked conditionally." >&2;} | |
21315 | { (exit 1); exit 1; }; } | |
21316 | fi | |
21317 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | |
21318 | { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. | |
21319 | Usually this means the macro was only invoked conditionally." >&5 | |
21320 | echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. | |
21321 | Usually this means the macro was only invoked conditionally." >&2;} | |
21322 | { (exit 1); exit 1; }; } | |
21323 | fi | |
bec39cab AC |
21324 | |
21325 | : ${CONFIG_STATUS=./config.status} | |
21326 | ac_clean_files_save=$ac_clean_files | |
21327 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
21328 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
21329 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
21330 | cat >$CONFIG_STATUS <<_ACEOF | |
21331 | #! $SHELL | |
21332 | # Generated by $as_me. | |
21333 | # Run this file to recreate the current configuration. | |
21334 | # Compiler output produced by configure, useful for debugging | |
21335 | # configure, is in config.log if it exists. | |
21336 | ||
21337 | debug=false | |
21338 | ac_cs_recheck=false | |
21339 | ac_cs_silent=false | |
21340 | SHELL=\${CONFIG_SHELL-$SHELL} | |
21341 | _ACEOF | |
21342 | ||
21343 | cat >>$CONFIG_STATUS <<\_ACEOF | |
21344 | ## --------------------- ## | |
21345 | ## M4sh Initialization. ## | |
21346 | ## --------------------- ## | |
21347 | ||
21348 | # Be Bourne compatible | |
21349 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
21350 | emulate sh | |
21351 | NULLCMD=: | |
21352 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
21353 | # is contrary to our usage. Disable this feature. | |
21354 | alias -g '${1+"$@"}'='"$@"' | |
b4e70030 JB |
21355 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then |
21356 | set -o posix | |
bec39cab AC |
21357 | fi |
21358 | DUALCASE=1; export DUALCASE # for MKS sh | |
21359 | ||
21360 | # Support unset when possible. | |
21361 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
21362 | as_unset=unset | |
21363 | else | |
21364 | as_unset=false | |
21365 | fi | |
21366 | ||
21367 | ||
21368 | # Work around bugs in pre-3.0 UWIN ksh. | |
b4e70030 | 21369 | $as_unset ENV MAIL MAILPATH |
bec39cab AC |
21370 | PS1='$ ' |
21371 | PS2='> ' | |
21372 | PS4='+ ' | |
21373 | ||
21374 | # NLS nuisances. | |
21375 | for as_var in \ | |
21376 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
21377 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
21378 | LC_TELEPHONE LC_TIME | |
21379 | do | |
21380 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then | |
21381 | eval $as_var=C; export $as_var | |
21382 | else | |
b4e70030 | 21383 | $as_unset $as_var |
bec39cab AC |
21384 | fi |
21385 | done | |
21386 | ||
21387 | # Required to use basename. | |
b4e70030 | 21388 | if expr a : '\(a\)' >/dev/null 2>&1; then |
bec39cab AC |
21389 | as_expr=expr |
21390 | else | |
21391 | as_expr=false | |
21392 | fi | |
21393 | ||
b4e70030 | 21394 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
bec39cab AC |
21395 | as_basename=basename |
21396 | else | |
21397 | as_basename=false | |
21398 | fi | |
21399 | ||
21400 | ||
21401 | # Name of the executable. | |
b4e70030 | 21402 | as_me=`$as_basename "$0" || |
bec39cab AC |
21403 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
21404 | X"$0" : 'X\(//\)$' \| \ | |
b4e70030 JB |
21405 | X"$0" : 'X\(/\)$' \| \ |
21406 | . : '\(.\)' 2>/dev/null || | |
bec39cab | 21407 | echo X/"$0" | |
b4e70030 JB |
21408 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } |
21409 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
21410 | /^X\/\(\/\).*/{ s//\1/; q; } | |
21411 | s/.*/./; q'` | |
bec39cab | 21412 | |
b4e70030 JB |
21413 | |
21414 | # PATH needs CR, and LINENO needs CR and PATH. | |
21415 | # Avoid depending upon Character Ranges. | |
21416 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
21417 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
21418 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
21419 | as_cr_digits='0123456789' | |
21420 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
21421 | ||
21422 | # The user is always right. | |
21423 | if test "${PATH_SEPARATOR+set}" != set; then | |
21424 | echo "#! /bin/sh" >conf$$.sh | |
21425 | echo "exit 0" >>conf$$.sh | |
21426 | chmod +x conf$$.sh | |
21427 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
21428 | PATH_SEPARATOR=';' | |
21429 | else | |
21430 | PATH_SEPARATOR=: | |
21431 | fi | |
21432 | rm -f conf$$.sh | |
21433 | fi | |
bec39cab AC |
21434 | |
21435 | ||
b4e70030 JB |
21436 | as_lineno_1=$LINENO |
21437 | as_lineno_2=$LINENO | |
21438 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
21439 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
21440 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
21441 | # Find who we are. Look in the path if we contain no path at all | |
21442 | # relative or not. | |
21443 | case $0 in | |
21444 | *[\\/]* ) as_myself=$0 ;; | |
21445 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
21446 | for as_dir in $PATH | |
21447 | do | |
21448 | IFS=$as_save_IFS | |
21449 | test -z "$as_dir" && as_dir=. | |
21450 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
21451 | done | |
bec39cab | 21452 | |
b4e70030 JB |
21453 | ;; |
21454 | esac | |
21455 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
21456 | # in which case we are not to be found in the path. | |
21457 | if test "x$as_myself" = x; then | |
21458 | as_myself=$0 | |
21459 | fi | |
21460 | if test ! -f "$as_myself"; then | |
21461 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
21462 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
21463 | { (exit 1); exit 1; }; } | |
21464 | fi | |
21465 | case $CONFIG_SHELL in | |
21466 | '') | |
21467 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
21468 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
21469 | do | |
21470 | IFS=$as_save_IFS | |
21471 | test -z "$as_dir" && as_dir=. | |
21472 | for as_base in sh bash ksh sh5; do | |
21473 | case $as_dir in | |
21474 | /*) | |
21475 | if ("$as_dir/$as_base" -c ' | |
bec39cab AC |
21476 | as_lineno_1=$LINENO |
21477 | as_lineno_2=$LINENO | |
b4e70030 | 21478 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` |
bec39cab | 21479 | test "x$as_lineno_1" != "x$as_lineno_2" && |
b4e70030 JB |
21480 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then |
21481 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
21482 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
21483 | CONFIG_SHELL=$as_dir/$as_base | |
21484 | export CONFIG_SHELL | |
21485 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
21486 | fi;; | |
21487 | esac | |
21488 | done | |
21489 | done | |
21490 | ;; | |
21491 | esac | |
bec39cab AC |
21492 | |
21493 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
21494 | # uniformly replaced by the line number. The first 'sed' inserts a | |
b4e70030 JB |
21495 | # line-number line before each line; the second 'sed' does the real |
21496 | # work. The second script uses 'N' to pair each line-number line | |
21497 | # with the numbered line, and appends trailing '-' during | |
21498 | # substitution so that $LINENO is not a special case at line end. | |
bec39cab | 21499 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
b4e70030 JB |
21500 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) |
21501 | sed '=' <$as_myself | | |
bec39cab AC |
21502 | sed ' |
21503 | N | |
b4e70030 JB |
21504 | s,$,-, |
21505 | : loop | |
21506 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
bec39cab | 21507 | t loop |
b4e70030 JB |
21508 | s,-$,, |
21509 | s,^['$as_cr_digits']*\n,, | |
bec39cab | 21510 | ' >$as_me.lineno && |
b4e70030 JB |
21511 | chmod +x $as_me.lineno || |
21512 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
21513 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
bec39cab AC |
21514 | { (exit 1); exit 1; }; } |
21515 | ||
21516 | # Don't try to exec as it changes $[0], causing all sort of problems | |
21517 | # (the dirname of $[0] is not the place where we might find the | |
b4e70030 JB |
21518 | # original and so on. Autoconf is especially sensible to this). |
21519 | . ./$as_me.lineno | |
bec39cab AC |
21520 | # Exit status is that of the last command. |
21521 | exit | |
21522 | } | |
21523 | ||
21524 | ||
b4e70030 JB |
21525 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in |
21526 | *c*,-n*) ECHO_N= ECHO_C=' | |
21527 | ' ECHO_T=' ' ;; | |
21528 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
21529 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
bec39cab AC |
21530 | esac |
21531 | ||
b4e70030 | 21532 | if expr a : '\(a\)' >/dev/null 2>&1; then |
bec39cab AC |
21533 | as_expr=expr |
21534 | else | |
21535 | as_expr=false | |
21536 | fi | |
21537 | ||
21538 | rm -f conf$$ conf$$.exe conf$$.file | |
21539 | echo >conf$$.file | |
21540 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b4e70030 JB |
21541 | # We could just check for DJGPP; but this test a) works b) is more generic |
21542 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
21543 | if test -f conf$$.exe; then | |
21544 | # Don't use ln at all; we don't have any links | |
bec39cab | 21545 | as_ln_s='cp -p' |
b4e70030 JB |
21546 | else |
21547 | as_ln_s='ln -s' | |
21548 | fi | |
bec39cab AC |
21549 | elif ln conf$$.file conf$$ 2>/dev/null; then |
21550 | as_ln_s=ln | |
21551 | else | |
21552 | as_ln_s='cp -p' | |
21553 | fi | |
b4e70030 | 21554 | rm -f conf$$ conf$$.exe conf$$.file |
bec39cab AC |
21555 | |
21556 | if mkdir -p . 2>/dev/null; then | |
21557 | as_mkdir_p=: | |
21558 | else | |
21559 | test -d ./-p && rmdir ./-p | |
21560 | as_mkdir_p=false | |
21561 | fi | |
21562 | ||
b4e70030 | 21563 | as_executable_p="test -f" |
bec39cab AC |
21564 | |
21565 | # Sed expression to map a string onto a valid CPP name. | |
21566 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
21567 | ||
21568 | # Sed expression to map a string onto a valid variable name. | |
21569 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
21570 | ||
21571 | ||
b4e70030 JB |
21572 | # IFS |
21573 | # We need space, tab and new line, in precisely that order. | |
21574 | as_nl=' | |
21575 | ' | |
21576 | IFS=" $as_nl" | |
21577 | ||
21578 | # CDPATH. | |
21579 | $as_unset CDPATH | |
21580 | ||
bec39cab AC |
21581 | exec 6>&1 |
21582 | ||
b4e70030 | 21583 | # Open the log real soon, to keep \$[0] and so on meaningful, and to |
bec39cab | 21584 | # report actual input values of CONFIG_FILES etc. instead of their |
b4e70030 JB |
21585 | # values after options handling. Logging --version etc. is OK. |
21586 | exec 5>>config.log | |
21587 | { | |
21588 | echo | |
21589 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
21590 | ## Running $as_me. ## | |
21591 | _ASBOX | |
21592 | } >&5 | |
21593 | cat >&5 <<_CSEOF | |
21594 | ||
bec39cab | 21595 | This file was extended by $as_me, which was |
b4e70030 | 21596 | generated by GNU Autoconf 2.59. Invocation command line was |
bec39cab AC |
21597 | |
21598 | CONFIG_FILES = $CONFIG_FILES | |
21599 | CONFIG_HEADERS = $CONFIG_HEADERS | |
21600 | CONFIG_LINKS = $CONFIG_LINKS | |
21601 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
21602 | $ $0 $@ | |
21603 | ||
b4e70030 JB |
21604 | _CSEOF |
21605 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
21606 | echo >&5 | |
bec39cab AC |
21607 | _ACEOF |
21608 | ||
21609 | # Files that config.status was made for. | |
b4e70030 JB |
21610 | if test -n "$ac_config_files"; then |
21611 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
21612 | fi | |
234b45d4 | 21613 | |
b4e70030 JB |
21614 | if test -n "$ac_config_headers"; then |
21615 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
21616 | fi | |
21617 | ||
21618 | if test -n "$ac_config_links"; then | |
21619 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
21620 | fi | |
21621 | ||
21622 | if test -n "$ac_config_commands"; then | |
21623 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
21624 | fi | |
234b45d4 | 21625 | |
bec39cab | 21626 | cat >>$CONFIG_STATUS <<\_ACEOF |
b4e70030 | 21627 | |
bec39cab AC |
21628 | ac_cs_usage="\ |
21629 | \`$as_me' instantiates files from templates according to the | |
21630 | current configuration. | |
234b45d4 | 21631 | |
bec39cab | 21632 | Usage: $0 [OPTIONS] [FILE]... |
234b45d4 | 21633 | |
bec39cab AC |
21634 | -h, --help print this help, then exit |
21635 | -V, --version print version number, then exit | |
21636 | -q, --quiet do not print progress messages | |
21637 | -d, --debug don't remove temporary files | |
21638 | --recheck update $as_me by reconfiguring in the same conditions | |
21639 | --file=FILE[:TEMPLATE] | |
21640 | instantiate the configuration file FILE | |
21641 | --header=FILE[:TEMPLATE] | |
21642 | instantiate the configuration header FILE | |
234b45d4 | 21643 | |
bec39cab AC |
21644 | Configuration files: |
21645 | $config_files | |
234b45d4 | 21646 | |
bec39cab AC |
21647 | Configuration headers: |
21648 | $config_headers | |
234b45d4 | 21649 | |
bec39cab AC |
21650 | Configuration links: |
21651 | $config_links | |
234b45d4 | 21652 | |
bec39cab AC |
21653 | Configuration commands: |
21654 | $config_commands | |
21655 | ||
21656 | Report bugs to <bug-autoconf@gnu.org>." | |
4e8d927d | 21657 | _ACEOF |
b4e70030 | 21658 | |
bec39cab AC |
21659 | cat >>$CONFIG_STATUS <<_ACEOF |
21660 | ac_cs_version="\\ | |
21661 | config.status | |
b4e70030 | 21662 | configured by $0, generated by GNU Autoconf 2.59, |
bec39cab AC |
21663 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
21664 | ||
b4e70030 | 21665 | Copyright (C) 2003 Free Software Foundation, Inc. |
bec39cab AC |
21666 | This config.status script is free software; the Free Software Foundation |
21667 | gives unlimited permission to copy, distribute and modify it." | |
b4e70030 JB |
21668 | srcdir=$srcdir |
21669 | INSTALL="$INSTALL" | |
bec39cab AC |
21670 | _ACEOF |
21671 | ||
21672 | cat >>$CONFIG_STATUS <<\_ACEOF | |
21673 | # If no file are specified by the user, then we need to provide default | |
21674 | # value. By we need to know if files were specified by the user. | |
21675 | ac_need_defaults=: | |
21676 | while test $# != 0 | |
21677 | do | |
21678 | case $1 in | |
21679 | --*=*) | |
b4e70030 JB |
21680 | ac_option=`expr "x$1" : 'x\([^=]*\)='` |
21681 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
bec39cab | 21682 | ac_shift=: |
c906108c | 21683 | ;; |
b4e70030 | 21684 | -*) |
bec39cab AC |
21685 | ac_option=$1 |
21686 | ac_optarg=$2 | |
21687 | ac_shift=shift | |
c906108c | 21688 | ;; |
b4e70030 JB |
21689 | *) # This is not an option, so the user has probably given explicit |
21690 | # arguments. | |
21691 | ac_option=$1 | |
21692 | ac_need_defaults=false;; | |
bec39cab | 21693 | esac |
c906108c | 21694 | |
bec39cab AC |
21695 | case $ac_option in |
21696 | # Handling of the options. | |
b4e70030 JB |
21697 | _ACEOF |
21698 | cat >>$CONFIG_STATUS <<\_ACEOF | |
bec39cab AC |
21699 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
21700 | ac_cs_recheck=: ;; | |
b4e70030 JB |
21701 | --version | --vers* | -V ) |
21702 | echo "$ac_cs_version"; exit 0 ;; | |
21703 | --he | --h) | |
21704 | # Conflict between --help and --header | |
21705 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
21706 | Try \`$0 --help' for more information." >&5 | |
21707 | echo "$as_me: error: ambiguous option: $1 | |
21708 | Try \`$0 --help' for more information." >&2;} | |
21709 | { (exit 1); exit 1; }; };; | |
21710 | --help | --hel | -h ) | |
21711 | echo "$ac_cs_usage"; exit 0 ;; | |
21712 | --debug | --d* | -d ) | |
bec39cab AC |
21713 | debug=: ;; |
21714 | --file | --fil | --fi | --f ) | |
21715 | $ac_shift | |
21716 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
21717 | ac_need_defaults=false;; | |
21718 | --header | --heade | --head | --hea ) | |
21719 | $ac_shift | |
21720 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
21721 | ac_need_defaults=false;; | |
21722 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
21723 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
21724 | ac_cs_silent=: ;; | |
c906108c | 21725 | |
bec39cab | 21726 | # This is an error. |
b4e70030 JB |
21727 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 |
21728 | Try \`$0 --help' for more information." >&5 | |
21729 | echo "$as_me: error: unrecognized option: $1 | |
21730 | Try \`$0 --help' for more information." >&2;} | |
bec39cab | 21731 | { (exit 1); exit 1; }; } ;; |
c906108c | 21732 | |
b4e70030 | 21733 | *) ac_config_targets="$ac_config_targets $1" ;; |
c906108c | 21734 | |
bec39cab AC |
21735 | esac |
21736 | shift | |
21737 | done | |
c906108c | 21738 | |
bec39cab | 21739 | ac_configure_extra_args= |
c906108c | 21740 | |
bec39cab AC |
21741 | if $ac_cs_silent; then |
21742 | exec 6>/dev/null | |
21743 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
21744 | fi | |
c906108c | 21745 | |
bec39cab AC |
21746 | _ACEOF |
21747 | cat >>$CONFIG_STATUS <<_ACEOF | |
21748 | if \$ac_cs_recheck; then | |
b4e70030 JB |
21749 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 |
21750 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
bec39cab AC |
21751 | fi |
21752 | ||
21753 | _ACEOF | |
21754 | ||
21755 | cat >>$CONFIG_STATUS <<_ACEOF | |
c906108c | 21756 | # |
b4e70030 | 21757 | # INIT-COMMANDS section. |
c906108c | 21758 | # |
c906108c | 21759 | |
a417dc56 | 21760 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
e28b3332 | 21761 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" |
b4e70030 | 21762 | |
bec39cab | 21763 | gdb_host_cpu=$gdb_host_cpu |
bec39cab AC |
21764 | nativefile=$nativefile |
21765 | ||
21766 | ||
21767 | _ACEOF | |
21768 | ||
4e8d927d | 21769 | |
b4e70030 JB |
21770 | |
21771 | cat >>$CONFIG_STATUS <<\_ACEOF | |
bec39cab | 21772 | for ac_config_target in $ac_config_targets |
c906108c | 21773 | do |
b4e70030 JB |
21774 | case "$ac_config_target" in |
21775 | # Handling of arguments. | |
21776 | "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
21777 | ".gdbinit" ) CONFIG_FILES="$CONFIG_FILES .gdbinit:gdbinit.in" ;; | |
e28b3332 | 21778 | "gnulib/Makefile" ) CONFIG_FILES="$CONFIG_FILES gnulib/Makefile" ;; |
b4e70030 | 21779 | "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; |
a417dc56 | 21780 | "depdir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
e28b3332 | 21781 | "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; |
b4e70030 JB |
21782 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; |
21783 | "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; | |
bec39cab AC |
21784 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |
21785 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
21786 | { (exit 1); exit 1; }; };; | |
c906108c SS |
21787 | esac |
21788 | done | |
21789 | ||
bec39cab AC |
21790 | # If the user did not use the arguments to specify the items to instantiate, |
21791 | # then the envvar interface is used. Set only those that are not. | |
21792 | # We use the long form for the default assignment because of an extremely | |
21793 | # bizarre bug on SunOS 4.1.3. | |
21794 | if $ac_need_defaults; then | |
21795 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
21796 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
21797 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links | |
21798 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
21799 | fi | |
21800 | ||
b4e70030 JB |
21801 | # Have a temporary directory for convenience. Make it in the build tree |
21802 | # simply because there is no reason to put it here, and in addition, | |
21803 | # creating and moving files from /tmp can sometimes cause problems. | |
21804 | # Create a temporary directory, and hook for its removal unless debugging. | |
21805 | $debug || | |
21806 | { | |
21807 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
21808 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
21809 | } | |
4e8d927d | 21810 | |
b4e70030 | 21811 | # Create a (secure) tmp directory for tmp files. |
4e8d927d | 21812 | |
b4e70030 JB |
21813 | { |
21814 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
21815 | test -n "$tmp" && test -d "$tmp" | |
21816 | } || | |
21817 | { | |
21818 | tmp=./confstat$$-$RANDOM | |
21819 | (umask 077 && mkdir $tmp) | |
21820 | } || | |
21821 | { | |
21822 | echo "$me: cannot create a temporary directory in ." >&2 | |
21823 | { (exit 1); exit 1; } | |
21824 | } | |
4e8d927d | 21825 | |
b4e70030 | 21826 | _ACEOF |
4e8d927d | 21827 | |
b4e70030 | 21828 | cat >>$CONFIG_STATUS <<_ACEOF |
4e8d927d | 21829 | |
b4e70030 JB |
21830 | # |
21831 | # CONFIG_FILES section. | |
21832 | # | |
4e8d927d | 21833 | |
b4e70030 JB |
21834 | # No need to generate the scripts if there are no CONFIG_FILES. |
21835 | # This happens for instance when ./config.status config.h | |
21836 | if test -n "\$CONFIG_FILES"; then | |
21837 | # Protect against being on the right side of a sed subst in config.status. | |
21838 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
21839 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
21840 | s,@SHELL@,$SHELL,;t t | |
21841 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
21842 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
21843 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
21844 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
21845 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
21846 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
21847 | s,@exec_prefix@,$exec_prefix,;t t | |
21848 | s,@prefix@,$prefix,;t t | |
21849 | s,@program_transform_name@,$program_transform_name,;t t | |
21850 | s,@bindir@,$bindir,;t t | |
21851 | s,@sbindir@,$sbindir,;t t | |
21852 | s,@libexecdir@,$libexecdir,;t t | |
21853 | s,@datadir@,$datadir,;t t | |
21854 | s,@sysconfdir@,$sysconfdir,;t t | |
21855 | s,@sharedstatedir@,$sharedstatedir,;t t | |
21856 | s,@localstatedir@,$localstatedir,;t t | |
21857 | s,@libdir@,$libdir,;t t | |
21858 | s,@includedir@,$includedir,;t t | |
21859 | s,@oldincludedir@,$oldincludedir,;t t | |
21860 | s,@infodir@,$infodir,;t t | |
21861 | s,@mandir@,$mandir,;t t | |
21862 | s,@build_alias@,$build_alias,;t t | |
21863 | s,@host_alias@,$host_alias,;t t | |
21864 | s,@target_alias@,$target_alias,;t t | |
21865 | s,@DEFS@,$DEFS,;t t | |
21866 | s,@ECHO_C@,$ECHO_C,;t t | |
21867 | s,@ECHO_N@,$ECHO_N,;t t | |
21868 | s,@ECHO_T@,$ECHO_T,;t t | |
21869 | s,@LIBS@,$LIBS,;t t | |
21870 | s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t | |
21871 | s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t | |
21872 | s,@MAINT@,$MAINT,;t t | |
21873 | s,@CC@,$CC,;t t | |
21874 | s,@CFLAGS@,$CFLAGS,;t t | |
21875 | s,@LDFLAGS@,$LDFLAGS,;t t | |
21876 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
21877 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
21878 | s,@EXEEXT@,$EXEEXT,;t t | |
21879 | s,@OBJEXT@,$OBJEXT,;t t | |
21880 | s,@CPP@,$CPP,;t t | |
21881 | s,@EGREP@,$EGREP,;t t | |
783e057b DJ |
21882 | s,@RANLIB@,$RANLIB,;t t |
21883 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
b4e70030 JB |
21884 | s,@build@,$build,;t t |
21885 | s,@build_cpu@,$build_cpu,;t t | |
21886 | s,@build_vendor@,$build_vendor,;t t | |
21887 | s,@build_os@,$build_os,;t t | |
21888 | s,@host@,$host,;t t | |
21889 | s,@host_cpu@,$host_cpu,;t t | |
21890 | s,@host_vendor@,$host_vendor,;t t | |
21891 | s,@host_os@,$host_os,;t t | |
21892 | s,@target@,$target,;t t | |
21893 | s,@target_cpu@,$target_cpu,;t t | |
21894 | s,@target_vendor@,$target_vendor,;t t | |
21895 | s,@target_os@,$target_os,;t t | |
a417dc56 RW |
21896 | s,@am__leading_dot@,$am__leading_dot,;t t |
21897 | s,@DEPDIR@,$DEPDIR,;t t | |
21898 | s,@CCDEPMODE@,$CCDEPMODE,;t t | |
21899 | s,@MAKE@,$MAKE,;t t | |
21900 | s,@GMAKE_TRUE@,$GMAKE_TRUE,;t t | |
21901 | s,@GMAKE_FALSE@,$GMAKE_FALSE,;t t | |
21902 | s,@SET_MAKE@,$SET_MAKE,;t t | |
b4e70030 | 21903 | s,@USE_NLS@,$USE_NLS,;t t |
20e95c23 DJ |
21904 | s,@LIBINTL@,$LIBINTL,;t t |
21905 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
21906 | s,@INCINTL@,$INCINTL,;t t | |
b4e70030 | 21907 | s,@XGETTEXT@,$XGETTEXT,;t t |
20e95c23 DJ |
21908 | s,@GMSGFMT@,$GMSGFMT,;t t |
21909 | s,@POSUB@,$POSUB,;t t | |
b4e70030 | 21910 | s,@CATALOGS@,$CATALOGS,;t t |
b4e70030 | 21911 | s,@DATADIRNAME@,$DATADIRNAME,;t t |
b4e70030 | 21912 | s,@INSTOBJEXT@,$INSTOBJEXT,;t t |
20e95c23 DJ |
21913 | s,@GENCAT@,$GENCAT,;t t |
21914 | s,@CATOBJEXT@,$CATOBJEXT,;t t | |
b4e70030 | 21915 | s,@localedir@,$localedir,;t t |
783e057b DJ |
21916 | s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t |
21917 | s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t | |
21918 | s,@GNULIB_MEMMEM@,$GNULIB_MEMMEM,;t t | |
21919 | s,@GNULIB_MEMPCPY@,$GNULIB_MEMPCPY,;t t | |
21920 | s,@GNULIB_MEMRCHR@,$GNULIB_MEMRCHR,;t t | |
21921 | s,@GNULIB_STPCPY@,$GNULIB_STPCPY,;t t | |
21922 | s,@GNULIB_STPNCPY@,$GNULIB_STPNCPY,;t t | |
21923 | s,@GNULIB_STRCHRNUL@,$GNULIB_STRCHRNUL,;t t | |
21924 | s,@GNULIB_STRDUP@,$GNULIB_STRDUP,;t t | |
21925 | s,@GNULIB_STRNDUP@,$GNULIB_STRNDUP,;t t | |
21926 | s,@GNULIB_STRNLEN@,$GNULIB_STRNLEN,;t t | |
21927 | s,@GNULIB_STRPBRK@,$GNULIB_STRPBRK,;t t | |
21928 | s,@GNULIB_STRSEP@,$GNULIB_STRSEP,;t t | |
21929 | s,@GNULIB_STRSTR@,$GNULIB_STRSTR,;t t | |
21930 | s,@GNULIB_STRCASESTR@,$GNULIB_STRCASESTR,;t t | |
21931 | s,@GNULIB_STRTOK_R@,$GNULIB_STRTOK_R,;t t | |
21932 | s,@GNULIB_MBSLEN@,$GNULIB_MBSLEN,;t t | |
21933 | s,@GNULIB_MBSNLEN@,$GNULIB_MBSNLEN,;t t | |
21934 | s,@GNULIB_MBSCHR@,$GNULIB_MBSCHR,;t t | |
21935 | s,@GNULIB_MBSRCHR@,$GNULIB_MBSRCHR,;t t | |
21936 | s,@GNULIB_MBSSTR@,$GNULIB_MBSSTR,;t t | |
21937 | s,@GNULIB_MBSCASECMP@,$GNULIB_MBSCASECMP,;t t | |
21938 | s,@GNULIB_MBSNCASECMP@,$GNULIB_MBSNCASECMP,;t t | |
21939 | s,@GNULIB_MBSPCASECMP@,$GNULIB_MBSPCASECMP,;t t | |
21940 | s,@GNULIB_MBSCASESTR@,$GNULIB_MBSCASESTR,;t t | |
21941 | s,@GNULIB_MBSCSPN@,$GNULIB_MBSCSPN,;t t | |
21942 | s,@GNULIB_MBSPBRK@,$GNULIB_MBSPBRK,;t t | |
21943 | s,@GNULIB_MBSSPN@,$GNULIB_MBSSPN,;t t | |
21944 | s,@GNULIB_MBSSEP@,$GNULIB_MBSSEP,;t t | |
21945 | s,@GNULIB_MBSTOK_R@,$GNULIB_MBSTOK_R,;t t | |
21946 | s,@GNULIB_STRERROR@,$GNULIB_STRERROR,;t t | |
21947 | s,@GNULIB_STRSIGNAL@,$GNULIB_STRSIGNAL,;t t | |
21948 | s,@HAVE_DECL_MEMMEM@,$HAVE_DECL_MEMMEM,;t t | |
21949 | s,@HAVE_MEMPCPY@,$HAVE_MEMPCPY,;t t | |
21950 | s,@HAVE_DECL_MEMRCHR@,$HAVE_DECL_MEMRCHR,;t t | |
21951 | s,@HAVE_STPCPY@,$HAVE_STPCPY,;t t | |
21952 | s,@HAVE_STPNCPY@,$HAVE_STPNCPY,;t t | |
21953 | s,@HAVE_STRCHRNUL@,$HAVE_STRCHRNUL,;t t | |
21954 | s,@HAVE_DECL_STRDUP@,$HAVE_DECL_STRDUP,;t t | |
21955 | s,@HAVE_STRNDUP@,$HAVE_STRNDUP,;t t | |
21956 | s,@HAVE_DECL_STRNDUP@,$HAVE_DECL_STRNDUP,;t t | |
21957 | s,@HAVE_DECL_STRNLEN@,$HAVE_DECL_STRNLEN,;t t | |
21958 | s,@HAVE_STRPBRK@,$HAVE_STRPBRK,;t t | |
21959 | s,@HAVE_STRSEP@,$HAVE_STRSEP,;t t | |
21960 | s,@HAVE_STRCASESTR@,$HAVE_STRCASESTR,;t t | |
21961 | s,@HAVE_DECL_STRTOK_R@,$HAVE_DECL_STRTOK_R,;t t | |
21962 | s,@HAVE_DECL_STRERROR@,$HAVE_DECL_STRERROR,;t t | |
21963 | s,@HAVE_DECL_STRSIGNAL@,$HAVE_DECL_STRSIGNAL,;t t | |
21964 | s,@REPLACE_STRERROR@,$REPLACE_STRERROR,;t t | |
21965 | s,@REPLACE_STRSIGNAL@,$REPLACE_STRSIGNAL,;t t | |
21966 | s,@REPLACE_MEMMEM@,$REPLACE_MEMMEM,;t t | |
21967 | s,@REPLACE_STRCASESTR@,$REPLACE_STRCASESTR,;t t | |
21968 | s,@REPLACE_STRSTR@,$REPLACE_STRSTR,;t t | |
21969 | s,@HAVE_LONG_LONG_INT@,$HAVE_LONG_LONG_INT,;t t | |
21970 | s,@HAVE_UNSIGNED_LONG_LONG_INT@,$HAVE_UNSIGNED_LONG_LONG_INT,;t t | |
21971 | s,@HAVE_INTTYPES_H@,$HAVE_INTTYPES_H,;t t | |
21972 | s,@HAVE_SYS_TYPES_H@,$HAVE_SYS_TYPES_H,;t t | |
21973 | s,@INCLUDE_NEXT@,$INCLUDE_NEXT,;t t | |
21974 | s,@NEXT_STDINT_H@,$NEXT_STDINT_H,;t t | |
21975 | s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t | |
21976 | s,@HAVE_SYS_INTTYPES_H@,$HAVE_SYS_INTTYPES_H,;t t | |
21977 | s,@HAVE_SYS_BITYPES_H@,$HAVE_SYS_BITYPES_H,;t t | |
21978 | s,@BITSIZEOF_PTRDIFF_T@,$BITSIZEOF_PTRDIFF_T,;t t | |
21979 | s,@BITSIZEOF_SIG_ATOMIC_T@,$BITSIZEOF_SIG_ATOMIC_T,;t t | |
21980 | s,@BITSIZEOF_SIZE_T@,$BITSIZEOF_SIZE_T,;t t | |
21981 | s,@BITSIZEOF_WCHAR_T@,$BITSIZEOF_WCHAR_T,;t t | |
21982 | s,@BITSIZEOF_WINT_T@,$BITSIZEOF_WINT_T,;t t | |
21983 | s,@HAVE_SIGNED_SIG_ATOMIC_T@,$HAVE_SIGNED_SIG_ATOMIC_T,;t t | |
21984 | s,@HAVE_SIGNED_WCHAR_T@,$HAVE_SIGNED_WCHAR_T,;t t | |
21985 | s,@HAVE_SIGNED_WINT_T@,$HAVE_SIGNED_WINT_T,;t t | |
21986 | s,@PTRDIFF_T_SUFFIX@,$PTRDIFF_T_SUFFIX,;t t | |
21987 | s,@SIG_ATOMIC_T_SUFFIX@,$SIG_ATOMIC_T_SUFFIX,;t t | |
21988 | s,@SIZE_T_SUFFIX@,$SIZE_T_SUFFIX,;t t | |
21989 | s,@WCHAR_T_SUFFIX@,$WCHAR_T_SUFFIX,;t t | |
21990 | s,@WINT_T_SUFFIX@,$WINT_T_SUFFIX,;t t | |
21991 | s,@STDINT_H@,$STDINT_H,;t t | |
21992 | s,@NEXT_STRING_H@,$NEXT_STRING_H,;t t | |
21993 | s,@GNULIB_WCWIDTH@,$GNULIB_WCWIDTH,;t t | |
21994 | s,@HAVE_DECL_WCWIDTH@,$HAVE_DECL_WCWIDTH,;t t | |
21995 | s,@REPLACE_WCWIDTH@,$REPLACE_WCWIDTH,;t t | |
21996 | s,@WCHAR_H@,$WCHAR_H,;t t | |
21997 | s,@HAVE_WCHAR_H@,$HAVE_WCHAR_H,;t t | |
21998 | s,@NEXT_WCHAR_H@,$NEXT_WCHAR_H,;t t | |
21999 | s,@LIBGNU_LIBDEPS@,$LIBGNU_LIBDEPS,;t t | |
22000 | s,@LIBGNU_LTLIBDEPS@,$LIBGNU_LTLIBDEPS,;t t | |
d5af19ba | 22001 | s,@GNULIB_STDINT_H@,$GNULIB_STDINT_H,;t t |
b4e70030 | 22002 | s,@PACKAGE@,$PACKAGE,;t t |
b4e70030 JB |
22003 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t |
22004 | s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t | |
22005 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
e28b3332 | 22006 | s,@CYGPATH_W@,$CYGPATH_W,;t t |
d57a3c85 | 22007 | s,@PYTHON2_4@,$PYTHON2_4,;t t |
e28b3332 DJ |
22008 | s,@ACLOCAL@,$ACLOCAL,;t t |
22009 | s,@AUTOCONF@,$AUTOCONF,;t t | |
22010 | s,@AUTOMAKE@,$AUTOMAKE,;t t | |
22011 | s,@AUTOHEADER@,$AUTOHEADER,;t t | |
22012 | s,@MAKEINFO@,$MAKEINFO,;t t | |
22013 | s,@install_sh@,$install_sh,;t t | |
22014 | s,@STRIP@,$STRIP,;t t | |
22015 | s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t | |
22016 | s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t | |
22017 | s,@mkdir_p@,$mkdir_p,;t t | |
22018 | s,@AWK@,$AWK,;t t | |
e28b3332 DJ |
22019 | s,@AMTAR@,$AMTAR,;t t |
22020 | s,@am__tar@,$am__tar,;t t | |
22021 | s,@am__untar@,$am__untar,;t t | |
e28b3332 DJ |
22022 | s,@am__include@,$am__include,;t t |
22023 | s,@am__quote@,$am__quote,;t t | |
22024 | s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t | |
22025 | s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t | |
22026 | s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t | |
e28b3332 DJ |
22027 | s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t |
22028 | s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t | |
22029 | s,@subdirs@,$subdirs,;t t | |
22030 | s,@TARGET_OBS@,$TARGET_OBS,;t t | |
c16158bc JM |
22031 | s,@PKGVERSION@,$PKGVERSION,;t t |
22032 | s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t | |
22033 | s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t | |
b4e70030 JB |
22034 | s,@LN_S@,$LN_S,;t t |
22035 | s,@YACC@,$YACC,;t t | |
22036 | s,@AR@,$AR,;t t | |
22037 | s,@ac_ct_AR@,$ac_ct_AR,;t t | |
22038 | s,@DLLTOOL@,$DLLTOOL,;t t | |
22039 | s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t | |
22040 | s,@WINDRES@,$WINDRES,;t t | |
22041 | s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t | |
22042 | s,@MIG@,$MIG,;t t | |
22043 | s,@ac_ct_MIG@,$ac_ct_MIG,;t t | |
6c7a06a3 TT |
22044 | s,@LIBICONV@,$LIBICONV,;t t |
22045 | s,@LIBICONV_INCLUDE@,$LIBICONV_INCLUDE,;t t | |
22046 | s,@LIBICONV_LIBDIR@,$LIBICONV_LIBDIR,;t t | |
6a30b0a5 AS |
22047 | s,@READLINE@,$READLINE,;t t |
22048 | s,@READLINE_DEPS@,$READLINE_DEPS,;t t | |
22049 | s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t | |
3841debe DJ |
22050 | s,@HAVE_LIBEXPAT@,$HAVE_LIBEXPAT,;t t |
22051 | s,@LIBEXPAT@,$LIBEXPAT,;t t | |
22052 | s,@LTLIBEXPAT@,$LTLIBEXPAT,;t t | |
d57a3c85 | 22053 | s,@PYTHON_CFLAGS@,$PYTHON_CFLAGS,;t t |
20e95c23 | 22054 | s,@ALLOCA@,$ALLOCA,;t t |
b4e70030 JB |
22055 | s,@CONFIG_LDFLAGS@,$CONFIG_LDFLAGS,;t t |
22056 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
22057 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
22058 | s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t | |
22059 | s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t | |
22060 | s,@SER_HARDWIRE@,$SER_HARDWIRE,;t t | |
22061 | s,@WIN32LIBS@,$WIN32LIBS,;t t | |
22062 | s,@LIBGUI@,$LIBGUI,;t t | |
22063 | s,@GUI_CFLAGS_X@,$GUI_CFLAGS_X,;t t | |
22064 | s,@WIN32LDAPP@,$WIN32LDAPP,;t t | |
22065 | s,@TCL_VERSION@,$TCL_VERSION,;t t | |
5062cc19 KS |
22066 | s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t |
22067 | s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t | |
22068 | s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t | |
22069 | s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t | |
22070 | s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t | |
b4e70030 | 22071 | s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t |
5062cc19 KS |
22072 | s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t |
22073 | s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t | |
22074 | s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t | |
22075 | s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t | |
22076 | s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t | |
22077 | s,@TCL_DEPS@,$TCL_DEPS,;t t | |
b4e70030 | 22078 | s,@TK_VERSION@,$TK_VERSION,;t t |
5062cc19 KS |
22079 | s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t |
22080 | s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t | |
22081 | s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t | |
22082 | s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t | |
b4e70030 | 22083 | s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t |
5062cc19 KS |
22084 | s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t |
22085 | s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t | |
22086 | s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t | |
22087 | s,@TK_INCLUDE@,$TK_INCLUDE,;t t | |
22088 | s,@TK_LIBRARY@,$TK_LIBRARY,;t t | |
22089 | s,@TK_DEPS@,$TK_DEPS,;t t | |
22090 | s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t | |
b4e70030 JB |
22091 | s,@X_CFLAGS@,$X_CFLAGS,;t t |
22092 | s,@X_LDFLAGS@,$X_LDFLAGS,;t t | |
22093 | s,@X_LIBS@,$X_LIBS,;t t | |
b4e70030 JB |
22094 | s,@GDBTKLIBS@,$GDBTKLIBS,;t t |
22095 | s,@GDBTK_CFLAGS@,$GDBTK_CFLAGS,;t t | |
22096 | s,@GDBTK_SRC_DIR@,$GDBTK_SRC_DIR,;t t | |
9b624dbe UW |
22097 | s,@SIM@,$SIM,;t t |
22098 | s,@SIM_OBS@,$SIM_OBS,;t t | |
b4e70030 JB |
22099 | s,@ENABLE_CFLAGS@,$ENABLE_CFLAGS,;t t |
22100 | s,@PROFILE_CFLAGS@,$PROFILE_CFLAGS,;t t | |
22101 | s,@CONFIG_OBS@,$CONFIG_OBS,;t t | |
22102 | s,@CONFIG_DEPS@,$CONFIG_DEPS,;t t | |
22103 | s,@CONFIG_SRCS@,$CONFIG_SRCS,;t t | |
22104 | s,@CONFIG_ALL@,$CONFIG_ALL,;t t | |
22105 | s,@CONFIG_CLEAN@,$CONFIG_CLEAN,;t t | |
22106 | s,@CONFIG_INSTALL@,$CONFIG_INSTALL,;t t | |
22107 | s,@CONFIG_UNINSTALL@,$CONFIG_UNINSTALL,;t t | |
22108 | s,@target_subdir@,$target_subdir,;t t | |
22109 | s,@frags@,$frags,;t t | |
b4e70030 | 22110 | s,@nm_h@,$nm_h,;t t |
b4e70030 JB |
22111 | s,@LIBOBJS@,$LIBOBJS,;t t |
22112 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
783e057b DJ |
22113 | s,@gl_LIBOBJS@,$gl_LIBOBJS,;t t |
22114 | s,@gl_LTLIBOBJS@,$gl_LTLIBOBJS,;t t | |
22115 | s,@gltests_LIBOBJS@,$gltests_LIBOBJS,;t t | |
22116 | s,@gltests_LTLIBOBJS@,$gltests_LTLIBOBJS,;t t | |
b4e70030 JB |
22117 | /@host_makefile_frag@/r $host_makefile_frag |
22118 | s,@host_makefile_frag@,,;t t | |
b4e70030 JB |
22119 | CEOF |
22120 | ||
22121 | _ACEOF | |
22122 | ||
22123 | cat >>$CONFIG_STATUS <<\_ACEOF | |
22124 | # Split the substitutions into bite-sized pieces for seds with | |
22125 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
22126 | ac_max_sed_lines=48 | |
22127 | ac_sed_frag=1 # Number of current file. | |
22128 | ac_beg=1 # First line for current file. | |
22129 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
22130 | ac_more_lines=: | |
22131 | ac_sed_cmds= | |
22132 | while $ac_more_lines; do | |
22133 | if test $ac_beg -gt 1; then | |
22134 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
22135 | else | |
22136 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
4e8d927d | 22137 | fi |
b4e70030 JB |
22138 | if test ! -s $tmp/subs.frag; then |
22139 | ac_more_lines=false | |
22140 | else | |
22141 | # The purpose of the label and of the branching condition is to | |
22142 | # speed up the sed processing (if there are no `@' at all, there | |
22143 | # is no need to browse any of the substitutions). | |
22144 | # These are the two extra sed commands mentioned above. | |
22145 | (echo ':t | |
22146 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
22147 | if test -z "$ac_sed_cmds"; then | |
22148 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" | |
22149 | else | |
22150 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" | |
22151 | fi | |
22152 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
22153 | ac_beg=$ac_end | |
22154 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
22155 | fi | |
22156 | done | |
22157 | if test -z "$ac_sed_cmds"; then | |
22158 | ac_sed_cmds=cat | |
22159 | fi | |
22160 | fi # test -n "$CONFIG_FILES" | |
4e8d927d | 22161 | |
b4e70030 JB |
22162 | _ACEOF |
22163 | cat >>$CONFIG_STATUS <<\_ACEOF | |
22164 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
22165 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
22166 | case $ac_file in | |
22167 | - | *:- | *:-:* ) # input from stdin | |
22168 | cat >$tmp/stdin | |
22169 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
22170 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
22171 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
22172 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
22173 | * ) ac_file_in=$ac_file.in ;; | |
c906108c SS |
22174 | esac |
22175 | ||
b4e70030 JB |
22176 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
22177 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
bec39cab AC |
22178 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
22179 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
22180 | X"$ac_file" : 'X\(//\)$' \| \ | |
b4e70030 JB |
22181 | X"$ac_file" : 'X\(/\)' \| \ |
22182 | . : '\(.\)' 2>/dev/null || | |
bec39cab | 22183 | echo X"$ac_file" | |
b4e70030 JB |
22184 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
22185 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22186 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22187 | /^X\(\/\).*/{ s//\1/; q; } | |
22188 | s/.*/./; q'` | |
22189 | { if $as_mkdir_p; then | |
22190 | mkdir -p "$ac_dir" | |
22191 | else | |
22192 | as_dir="$ac_dir" | |
bec39cab | 22193 | as_dirs= |
b4e70030 JB |
22194 | while test ! -d "$as_dir"; do |
22195 | as_dirs="$as_dir $as_dirs" | |
22196 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
bec39cab AC |
22197 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
22198 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22199 | X"$as_dir" : 'X\(//\)$' \| \ | |
b4e70030 JB |
22200 | X"$as_dir" : 'X\(/\)' \| \ |
22201 | . : '\(.\)' 2>/dev/null || | |
bec39cab | 22202 | echo X"$as_dir" | |
b4e70030 JB |
22203 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
22204 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22205 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22206 | /^X\(\/\).*/{ s//\1/; q; } | |
22207 | s/.*/./; q'` | |
bec39cab | 22208 | done |
b4e70030 JB |
22209 | test ! -n "$as_dirs" || mkdir $as_dirs |
22210 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
22211 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
bec39cab | 22212 | { (exit 1); exit 1; }; }; } |
b4e70030 | 22213 | |
bec39cab AC |
22214 | ac_builddir=. |
22215 | ||
b4e70030 | 22216 | if test "$ac_dir" != .; then |
bec39cab | 22217 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
b4e70030 JB |
22218 | # A "../" for each directory in $ac_dir_suffix. |
22219 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
22220 | else | |
22221 | ac_dir_suffix= ac_top_builddir= | |
22222 | fi | |
bec39cab AC |
22223 | |
22224 | case $srcdir in | |
b4e70030 | 22225 | .) # No --srcdir option. We are building in place. |
bec39cab | 22226 | ac_srcdir=. |
b4e70030 JB |
22227 | if test -z "$ac_top_builddir"; then |
22228 | ac_top_srcdir=. | |
22229 | else | |
22230 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
22231 | fi ;; | |
22232 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
bec39cab | 22233 | ac_srcdir=$srcdir$ac_dir_suffix; |
b4e70030 JB |
22234 | ac_top_srcdir=$srcdir ;; |
22235 | *) # Relative path. | |
22236 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
22237 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
bec39cab AC |
22238 | esac |
22239 | ||
b4e70030 JB |
22240 | # Do not use `cd foo && pwd` to compute absolute paths, because |
22241 | # the directories may not exist. | |
22242 | case `pwd` in | |
22243 | .) ac_abs_builddir="$ac_dir";; | |
22244 | *) | |
22245 | case "$ac_dir" in | |
22246 | .) ac_abs_builddir=`pwd`;; | |
22247 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
22248 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
22249 | esac;; | |
22250 | esac | |
22251 | case $ac_abs_builddir in | |
22252 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
22253 | *) | |
22254 | case ${ac_top_builddir}. in | |
22255 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
22256 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
22257 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
22258 | esac;; | |
22259 | esac | |
22260 | case $ac_abs_builddir in | |
22261 | .) ac_abs_srcdir=$ac_srcdir;; | |
22262 | *) | |
22263 | case $ac_srcdir in | |
22264 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
22265 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
22266 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
22267 | esac;; | |
22268 | esac | |
22269 | case $ac_abs_builddir in | |
22270 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
22271 | *) | |
22272 | case $ac_top_srcdir in | |
22273 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
22274 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
22275 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
22276 | esac;; | |
22277 | esac | |
c906108c | 22278 | |
c906108c | 22279 | |
bec39cab AC |
22280 | case $INSTALL in |
22281 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
b4e70030 | 22282 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; |
c906108c | 22283 | esac |
121ce6e5 | 22284 | |
b4e70030 JB |
22285 | if test x"$ac_file" != x-; then |
22286 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
22287 | echo "$as_me: creating $ac_file" >&6;} | |
22288 | rm -f "$ac_file" | |
22289 | fi | |
22290 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
22291 | # use $as_me), people would be surprised to read: | |
22292 | # /* config.h. Generated by config.status. */ | |
22293 | if test x"$ac_file" = x-; then | |
22294 | configure_input= | |
22295 | else | |
22296 | configure_input="$ac_file. " | |
22297 | fi | |
22298 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
22299 | sed 's,.*/,,'` by configure." | |
22300 | ||
22301 | # First look for the input files in the build tree, otherwise in the | |
22302 | # src tree. | |
22303 | ac_file_inputs=`IFS=: | |
22304 | for f in $ac_file_in; do | |
22305 | case $f in | |
22306 | -) echo $tmp/stdin ;; | |
22307 | [\\/$]*) | |
22308 | # Absolute (can't be DOS-style, as IFS=:) | |
22309 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
22310 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
22311 | { (exit 1); exit 1; }; } | |
22312 | echo "$f";; | |
22313 | *) # Relative | |
22314 | if test -f "$f"; then | |
22315 | # Build tree | |
22316 | echo "$f" | |
22317 | elif test -f "$srcdir/$f"; then | |
22318 | # Source tree | |
22319 | echo "$srcdir/$f" | |
22320 | else | |
22321 | # /dev/null tree | |
22322 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
22323 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
22324 | { (exit 1); exit 1; }; } | |
22325 | fi;; | |
22326 | esac | |
22327 | done` || { (exit 1); exit 1; } | |
4e8d927d | 22328 | _ACEOF |
bec39cab AC |
22329 | cat >>$CONFIG_STATUS <<_ACEOF |
22330 | sed "$ac_vpsub | |
22331 | $extrasub | |
22332 | _ACEOF | |
22333 | cat >>$CONFIG_STATUS <<\_ACEOF | |
22334 | :t | |
22335 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
b4e70030 JB |
22336 | s,@configure_input@,$configure_input,;t t |
22337 | s,@srcdir@,$ac_srcdir,;t t | |
22338 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
22339 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
22340 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
22341 | s,@builddir@,$ac_builddir,;t t | |
22342 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
22343 | s,@top_builddir@,$ac_top_builddir,;t t | |
22344 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
22345 | s,@INSTALL@,$ac_INSTALL,;t t | |
22346 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
22347 | rm -f $tmp/stdin | |
22348 | if test x"$ac_file" != x-; then | |
22349 | mv $tmp/out $ac_file | |
22350 | else | |
22351 | cat $tmp/out | |
22352 | rm -f $tmp/out | |
22353 | fi | |
22354 | ||
22355 | done | |
22356 | _ACEOF | |
22357 | cat >>$CONFIG_STATUS <<\_ACEOF | |
22358 | ||
22359 | # | |
22360 | # CONFIG_HEADER section. | |
22361 | # | |
22362 | ||
22363 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
22364 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
22365 | # | |
22366 | # ac_d sets the value in "#define NAME VALUE" lines. | |
22367 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
22368 | ac_dB='[ ].*$,\1#\2' | |
22369 | ac_dC=' ' | |
22370 | ac_dD=',;t' | |
22371 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
22372 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
22373 | ac_uB='$,\1#\2define\3' | |
22374 | ac_uC=' ' | |
22375 | ac_uD=',;t' | |
22376 | ||
22377 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
22378 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
bec39cab | 22379 | case $ac_file in |
b4e70030 JB |
22380 | - | *:- | *:-:* ) # input from stdin |
22381 | cat >$tmp/stdin | |
22382 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
22383 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
22384 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
22385 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
22386 | * ) ac_file_in=$ac_file.in ;; | |
c906108c | 22387 | esac |
b4e70030 JB |
22388 | |
22389 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
22390 | echo "$as_me: creating $ac_file" >&6;} | |
22391 | ||
22392 | # First look for the input files in the build tree, otherwise in the | |
22393 | # src tree. | |
22394 | ac_file_inputs=`IFS=: | |
22395 | for f in $ac_file_in; do | |
22396 | case $f in | |
22397 | -) echo $tmp/stdin ;; | |
22398 | [\\/$]*) | |
22399 | # Absolute (can't be DOS-style, as IFS=:) | |
22400 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
22401 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
22402 | { (exit 1); exit 1; }; } | |
22403 | # Do quote $f, to prevent DOS paths from being IFS'd. | |
22404 | echo "$f";; | |
22405 | *) # Relative | |
22406 | if test -f "$f"; then | |
22407 | # Build tree | |
22408 | echo "$f" | |
22409 | elif test -f "$srcdir/$f"; then | |
22410 | # Source tree | |
22411 | echo "$srcdir/$f" | |
22412 | else | |
22413 | # /dev/null tree | |
22414 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
22415 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
22416 | { (exit 1); exit 1; }; } | |
22417 | fi;; | |
22418 | esac | |
22419 | done` || { (exit 1); exit 1; } | |
22420 | # Remove the trailing spaces. | |
22421 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in | |
22422 | ||
22423 | _ACEOF | |
22424 | ||
22425 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
22426 | # `conftest.undefs', that substitutes the proper values into | |
22427 | # config.h.in to produce config.h. The first handles `#define' | |
22428 | # templates, and the second `#undef' templates. | |
22429 | # And first: Protect against being on the right side of a sed subst in | |
22430 | # config.status. Protect against being in an unquoted here document | |
22431 | # in config.status. | |
22432 | rm -f conftest.defines conftest.undefs | |
22433 | # Using a here document instead of a string reduces the quoting nightmare. | |
22434 | # Putting comments in sed scripts is not portable. | |
22435 | # | |
22436 | # `end' is used to avoid that the second main sed command (meant for | |
22437 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
22438 | # See the Autoconf documentation for `clear'. | |
22439 | cat >confdef2sed.sed <<\_ACEOF | |
22440 | s/[\\&,]/\\&/g | |
22441 | s,[\\$`],\\&,g | |
22442 | t clear | |
22443 | : clear | |
22444 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp | |
22445 | t end | |
22446 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp | |
22447 | : end | |
22448 | _ACEOF | |
22449 | # If some macros were called several times there might be several times | |
22450 | # the same #defines, which is useless. Nevertheless, we may not want to | |
22451 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
22452 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
22453 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
22454 | rm -f confdef2sed.sed | |
22455 | ||
22456 | # This sed command replaces #undef with comments. This is necessary, for | |
c906108c SS |
22457 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
22458 | # on some systems where configure will not decide to define it. | |
b4e70030 JB |
22459 | cat >>conftest.undefs <<\_ACEOF |
22460 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, | |
22461 | _ACEOF | |
22462 | ||
22463 | # Break up conftest.defines because some shells have a limit on the size | |
22464 | # of here documents, and old seds have small limits too (100 cmds). | |
22465 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
22466 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS | |
22467 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS | |
22468 | echo ' :' >>$CONFIG_STATUS | |
22469 | rm -f conftest.tail | |
22470 | while grep . conftest.defines >/dev/null | |
bec39cab | 22471 | do |
b4e70030 JB |
22472 | # Write a limited-size here document to $tmp/defines.sed. |
22473 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
22474 | # Speed up: don't consider the non `#define' lines. | |
22475 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS | |
22476 | # Work around the forget-to-reset-the-flag bug. | |
22477 | echo 't clr' >>$CONFIG_STATUS | |
22478 | echo ': clr' >>$CONFIG_STATUS | |
22479 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
bec39cab | 22480 | echo 'CEOF |
b4e70030 JB |
22481 | sed -f $tmp/defines.sed $tmp/in >$tmp/out |
22482 | rm -f $tmp/in | |
22483 | mv $tmp/out $tmp/in | |
22484 | ' >>$CONFIG_STATUS | |
22485 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
bec39cab AC |
22486 | rm -f conftest.defines |
22487 | mv conftest.tail conftest.defines | |
22488 | done | |
b4e70030 JB |
22489 | rm -f conftest.defines |
22490 | echo ' fi # grep' >>$CONFIG_STATUS | |
22491 | echo >>$CONFIG_STATUS | |
22492 | ||
22493 | # Break up conftest.undefs because some shells have a limit on the size | |
22494 | # of here documents, and old seds have small limits too (100 cmds). | |
22495 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
22496 | rm -f conftest.tail | |
22497 | while grep . conftest.undefs >/dev/null | |
22498 | do | |
22499 | # Write a limited-size here document to $tmp/undefs.sed. | |
22500 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
22501 | # Speed up: don't consider the non `#undef' | |
22502 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS | |
22503 | # Work around the forget-to-reset-the-flag bug. | |
22504 | echo 't clr' >>$CONFIG_STATUS | |
22505 | echo ': clr' >>$CONFIG_STATUS | |
22506 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
22507 | echo 'CEOF | |
22508 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out | |
22509 | rm -f $tmp/in | |
22510 | mv $tmp/out $tmp/in | |
22511 | ' >>$CONFIG_STATUS | |
22512 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
22513 | rm -f conftest.undefs | |
22514 | mv conftest.tail conftest.undefs | |
22515 | done | |
22516 | rm -f conftest.undefs | |
bec39cab AC |
22517 | |
22518 | cat >>$CONFIG_STATUS <<\_ACEOF | |
b4e70030 JB |
22519 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
22520 | # use $as_me), people would be surprised to read: | |
22521 | # /* config.h. Generated by config.status. */ | |
22522 | if test x"$ac_file" = x-; then | |
22523 | echo "/* Generated by configure. */" >$tmp/config.h | |
22524 | else | |
22525 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h | |
22526 | fi | |
22527 | cat $tmp/in >>$tmp/config.h | |
22528 | rm -f $tmp/in | |
bec39cab | 22529 | if test x"$ac_file" != x-; then |
b4e70030 | 22530 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then |
bec39cab AC |
22531 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 |
22532 | echo "$as_me: $ac_file is unchanged" >&6;} | |
22533 | else | |
b4e70030 JB |
22534 | ac_dir=`(dirname "$ac_file") 2>/dev/null || |
22535 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22536 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
22537 | X"$ac_file" : 'X\(//\)$' \| \ | |
22538 | X"$ac_file" : 'X\(/\)' \| \ | |
22539 | . : '\(.\)' 2>/dev/null || | |
22540 | echo X"$ac_file" | | |
22541 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22542 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22543 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22544 | /^X\(\/\).*/{ s//\1/; q; } | |
22545 | s/.*/./; q'` | |
22546 | { if $as_mkdir_p; then | |
22547 | mkdir -p "$ac_dir" | |
22548 | else | |
22549 | as_dir="$ac_dir" | |
22550 | as_dirs= | |
22551 | while test ! -d "$as_dir"; do | |
22552 | as_dirs="$as_dir $as_dirs" | |
22553 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
22554 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22555 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22556 | X"$as_dir" : 'X\(//\)$' \| \ | |
22557 | X"$as_dir" : 'X\(/\)' \| \ | |
22558 | . : '\(.\)' 2>/dev/null || | |
22559 | echo X"$as_dir" | | |
22560 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22561 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22562 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22563 | /^X\(\/\).*/{ s//\1/; q; } | |
22564 | s/.*/./; q'` | |
22565 | done | |
22566 | test ! -n "$as_dirs" || mkdir $as_dirs | |
22567 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
22568 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
22569 | { (exit 1); exit 1; }; }; } | |
22570 | ||
bec39cab | 22571 | rm -f $ac_file |
b4e70030 | 22572 | mv $tmp/config.h $ac_file |
bec39cab AC |
22573 | fi |
22574 | else | |
b4e70030 JB |
22575 | cat $tmp/config.h |
22576 | rm -f $tmp/config.h | |
bec39cab | 22577 | fi |
e28b3332 DJ |
22578 | # Compute $ac_file's index in $config_headers. |
22579 | _am_stamp_count=1 | |
22580 | for _am_header in $config_headers :; do | |
22581 | case $_am_header in | |
22582 | $ac_file | $ac_file:* ) | |
22583 | break ;; | |
22584 | * ) | |
22585 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
22586 | esac | |
22587 | done | |
22588 | echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || | |
22589 | $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22590 | X$ac_file : 'X\(//\)[^/]' \| \ | |
22591 | X$ac_file : 'X\(//\)$' \| \ | |
22592 | X$ac_file : 'X\(/\)' \| \ | |
22593 | . : '\(.\)' 2>/dev/null || | |
22594 | echo X$ac_file | | |
22595 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22596 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22597 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22598 | /^X\(\/\).*/{ s//\1/; q; } | |
22599 | s/.*/./; q'`/stamp-h$_am_stamp_count | |
b4e70030 JB |
22600 | done |
22601 | _ACEOF | |
22602 | cat >>$CONFIG_STATUS <<\_ACEOF | |
22603 | ||
22604 | # | |
22605 | # CONFIG_LINKS section. | |
22606 | # | |
22607 | ||
22608 | for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue | |
22609 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
22610 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
c906108c | 22611 | |
b4e70030 JB |
22612 | { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5 |
22613 | echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;} | |
c906108c SS |
22614 | |
22615 | if test ! -r $srcdir/$ac_source; then | |
bec39cab AC |
22616 | { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5 |
22617 | echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;} | |
22618 | { (exit 1); exit 1; }; } | |
c906108c | 22619 | fi |
b4e70030 JB |
22620 | rm -f $ac_dest |
22621 | ||
22622 | # Make relative symlinks. | |
22623 | ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null || | |
22624 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22625 | X"$ac_dest" : 'X\(//\)[^/]' \| \ | |
22626 | X"$ac_dest" : 'X\(//\)$' \| \ | |
22627 | X"$ac_dest" : 'X\(/\)' \| \ | |
22628 | . : '\(.\)' 2>/dev/null || | |
22629 | echo X"$ac_dest" | | |
22630 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22631 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22632 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22633 | /^X\(\/\).*/{ s//\1/; q; } | |
22634 | s/.*/./; q'` | |
22635 | { if $as_mkdir_p; then | |
22636 | mkdir -p "$ac_dest_dir" | |
22637 | else | |
22638 | as_dir="$ac_dest_dir" | |
22639 | as_dirs= | |
22640 | while test ! -d "$as_dir"; do | |
22641 | as_dirs="$as_dir $as_dirs" | |
22642 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
22643 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22644 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22645 | X"$as_dir" : 'X\(//\)$' \| \ | |
22646 | X"$as_dir" : 'X\(/\)' \| \ | |
22647 | . : '\(.\)' 2>/dev/null || | |
22648 | echo X"$as_dir" | | |
22649 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22650 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22651 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22652 | /^X\(\/\).*/{ s//\1/; q; } | |
22653 | s/.*/./; q'` | |
22654 | done | |
22655 | test ! -n "$as_dirs" || mkdir $as_dirs | |
22656 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5 | |
22657 | echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;} | |
22658 | { (exit 1); exit 1; }; }; } | |
22659 | ||
22660 | ac_builddir=. | |
22661 | ||
22662 | if test "$ac_dest_dir" != .; then | |
22663 | ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'` | |
22664 | # A "../" for each directory in $ac_dir_suffix. | |
22665 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
22666 | else | |
22667 | ac_dir_suffix= ac_top_builddir= | |
22668 | fi | |
22669 | ||
22670 | case $srcdir in | |
22671 | .) # No --srcdir option. We are building in place. | |
22672 | ac_srcdir=. | |
22673 | if test -z "$ac_top_builddir"; then | |
22674 | ac_top_srcdir=. | |
22675 | else | |
22676 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
22677 | fi ;; | |
22678 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
22679 | ac_srcdir=$srcdir$ac_dir_suffix; | |
22680 | ac_top_srcdir=$srcdir ;; | |
22681 | *) # Relative path. | |
22682 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
22683 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
22684 | esac | |
22685 | ||
22686 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
22687 | # the directories may not exist. | |
22688 | case `pwd` in | |
22689 | .) ac_abs_builddir="$ac_dest_dir";; | |
22690 | *) | |
22691 | case "$ac_dest_dir" in | |
22692 | .) ac_abs_builddir=`pwd`;; | |
22693 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";; | |
22694 | *) ac_abs_builddir=`pwd`/"$ac_dest_dir";; | |
22695 | esac;; | |
22696 | esac | |
22697 | case $ac_abs_builddir in | |
22698 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
22699 | *) | |
22700 | case ${ac_top_builddir}. in | |
22701 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
22702 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
22703 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
22704 | esac;; | |
22705 | esac | |
22706 | case $ac_abs_builddir in | |
22707 | .) ac_abs_srcdir=$ac_srcdir;; | |
22708 | *) | |
22709 | case $ac_srcdir in | |
22710 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
22711 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
22712 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
22713 | esac;; | |
22714 | esac | |
22715 | case $ac_abs_builddir in | |
22716 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
22717 | *) | |
22718 | case $ac_top_srcdir in | |
22719 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
22720 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
22721 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
22722 | esac;; | |
22723 | esac | |
22724 | ||
bec39cab AC |
22725 | |
22726 | case $srcdir in | |
22727 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;; | |
b4e70030 | 22728 | *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;; |
c906108c | 22729 | esac |
b4e70030 JB |
22730 | |
22731 | # Try a symlink, then a hard link, then a copy. | |
22732 | ln -s $ac_rel_source $ac_dest 2>/dev/null || | |
22733 | ln $srcdir/$ac_source $ac_dest 2>/dev/null || | |
22734 | cp -p $srcdir/$ac_source $ac_dest || | |
22735 | { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5 | |
22736 | echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;} | |
bec39cab | 22737 | { (exit 1); exit 1; }; } |
b4e70030 JB |
22738 | done |
22739 | _ACEOF | |
22740 | cat >>$CONFIG_STATUS <<\_ACEOF | |
22741 | ||
22742 | # | |
22743 | # CONFIG_COMMANDS section. | |
22744 | # | |
22745 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
22746 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
22747 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
22748 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
22749 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22750 | X"$ac_dest" : 'X\(//\)[^/]' \| \ | |
22751 | X"$ac_dest" : 'X\(//\)$' \| \ | |
22752 | X"$ac_dest" : 'X\(/\)' \| \ | |
22753 | . : '\(.\)' 2>/dev/null || | |
22754 | echo X"$ac_dest" | | |
22755 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22756 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22757 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22758 | /^X\(\/\).*/{ s//\1/; q; } | |
22759 | s/.*/./; q'` | |
22760 | { if $as_mkdir_p; then | |
22761 | mkdir -p "$ac_dir" | |
22762 | else | |
22763 | as_dir="$ac_dir" | |
22764 | as_dirs= | |
22765 | while test ! -d "$as_dir"; do | |
22766 | as_dirs="$as_dir $as_dirs" | |
22767 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
22768 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22769 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22770 | X"$as_dir" : 'X\(//\)$' \| \ | |
22771 | X"$as_dir" : 'X\(/\)' \| \ | |
22772 | . : '\(.\)' 2>/dev/null || | |
22773 | echo X"$as_dir" | | |
22774 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22775 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22776 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22777 | /^X\(\/\).*/{ s//\1/; q; } | |
22778 | s/.*/./; q'` | |
22779 | done | |
22780 | test ! -n "$as_dirs" || mkdir $as_dirs | |
22781 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
22782 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
22783 | { (exit 1); exit 1; }; }; } | |
22784 | ||
22785 | ac_builddir=. | |
22786 | ||
22787 | if test "$ac_dir" != .; then | |
22788 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
22789 | # A "../" for each directory in $ac_dir_suffix. | |
22790 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
22791 | else | |
22792 | ac_dir_suffix= ac_top_builddir= | |
22793 | fi | |
22794 | ||
22795 | case $srcdir in | |
22796 | .) # No --srcdir option. We are building in place. | |
22797 | ac_srcdir=. | |
22798 | if test -z "$ac_top_builddir"; then | |
22799 | ac_top_srcdir=. | |
22800 | else | |
22801 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
22802 | fi ;; | |
22803 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
22804 | ac_srcdir=$srcdir$ac_dir_suffix; | |
22805 | ac_top_srcdir=$srcdir ;; | |
22806 | *) # Relative path. | |
22807 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
22808 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
22809 | esac | |
22810 | ||
22811 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
22812 | # the directories may not exist. | |
22813 | case `pwd` in | |
22814 | .) ac_abs_builddir="$ac_dir";; | |
22815 | *) | |
22816 | case "$ac_dir" in | |
22817 | .) ac_abs_builddir=`pwd`;; | |
22818 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
22819 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
22820 | esac;; | |
22821 | esac | |
22822 | case $ac_abs_builddir in | |
22823 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
22824 | *) | |
22825 | case ${ac_top_builddir}. in | |
22826 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
22827 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
22828 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
22829 | esac;; | |
22830 | esac | |
22831 | case $ac_abs_builddir in | |
22832 | .) ac_abs_srcdir=$ac_srcdir;; | |
22833 | *) | |
22834 | case $ac_srcdir in | |
22835 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
22836 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
22837 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
22838 | esac;; | |
22839 | esac | |
22840 | case $ac_abs_builddir in | |
22841 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
22842 | *) | |
22843 | case $ac_top_srcdir in | |
22844 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
22845 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
22846 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
22847 | esac;; | |
22848 | esac | |
bec39cab | 22849 | |
bec39cab | 22850 | |
b4e70030 JB |
22851 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 |
22852 | echo "$as_me: executing $ac_dest commands" >&6;} | |
22853 | case $ac_dest in | |
a417dc56 | 22854 | depdir ) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
e28b3332 DJ |
22855 | depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do |
22856 | # Strip MF so we end up with the name of the file. | |
22857 | mf=`echo "$mf" | sed -e 's/:.*$//'` | |
22858 | # Check whether this is an Automake generated Makefile or not. | |
22859 | # We used to match only the files named `Makefile.in', but | |
22860 | # some people rename them; so instead we look at the file content. | |
22861 | # Grep'ing the first line is not enough: some people post-process | |
22862 | # each Makefile.in and add a new line on top of each file to say so. | |
22863 | # So let's grep whole file. | |
22864 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then | |
22865 | dirpart=`(dirname "$mf") 2>/dev/null || | |
22866 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22867 | X"$mf" : 'X\(//\)[^/]' \| \ | |
22868 | X"$mf" : 'X\(//\)$' \| \ | |
22869 | X"$mf" : 'X\(/\)' \| \ | |
22870 | . : '\(.\)' 2>/dev/null || | |
22871 | echo X"$mf" | | |
22872 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22873 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22874 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22875 | /^X\(\/\).*/{ s//\1/; q; } | |
22876 | s/.*/./; q'` | |
22877 | else | |
22878 | continue | |
22879 | fi | |
22880 | # Extract the definition of DEPDIR, am__include, and am__quote | |
22881 | # from the Makefile without running `make'. | |
22882 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
22883 | test -z "$DEPDIR" && continue | |
22884 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
22885 | test -z "am__include" && continue | |
22886 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
22887 | # When using ansi2knr, U may be empty or an underscore; expand it | |
22888 | U=`sed -n 's/^U = //p' < "$mf"` | |
22889 | # Find all dependency output files, they are included files with | |
22890 | # $(DEPDIR) in their names. We invoke sed twice because it is the | |
22891 | # simplest approach to changing $(DEPDIR) to its actual value in the | |
22892 | # expansion. | |
22893 | for file in `sed -n " | |
22894 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
22895 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | |
22896 | # Make sure the directory exists. | |
22897 | test -f "$dirpart/$file" && continue | |
22898 | fdir=`(dirname "$file") 2>/dev/null || | |
22899 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22900 | X"$file" : 'X\(//\)[^/]' \| \ | |
22901 | X"$file" : 'X\(//\)$' \| \ | |
22902 | X"$file" : 'X\(/\)' \| \ | |
22903 | . : '\(.\)' 2>/dev/null || | |
22904 | echo X"$file" | | |
22905 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22906 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22907 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22908 | /^X\(\/\).*/{ s//\1/; q; } | |
22909 | s/.*/./; q'` | |
22910 | { if $as_mkdir_p; then | |
22911 | mkdir -p $dirpart/$fdir | |
22912 | else | |
22913 | as_dir=$dirpart/$fdir | |
22914 | as_dirs= | |
22915 | while test ! -d "$as_dir"; do | |
22916 | as_dirs="$as_dir $as_dirs" | |
22917 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
22918 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
22919 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
22920 | X"$as_dir" : 'X\(//\)$' \| \ | |
22921 | X"$as_dir" : 'X\(/\)' \| \ | |
22922 | . : '\(.\)' 2>/dev/null || | |
22923 | echo X"$as_dir" | | |
22924 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
22925 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
22926 | /^X\(\/\/\)$/{ s//\1/; q; } | |
22927 | /^X\(\/\).*/{ s//\1/; q; } | |
22928 | s/.*/./; q'` | |
22929 | done | |
22930 | test ! -n "$as_dirs" || mkdir $as_dirs | |
22931 | fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 | |
22932 | echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} | |
22933 | { (exit 1); exit 1; }; }; } | |
22934 | ||
22935 | # echo "creating $dirpart/$file" | |
22936 | echo '# dummy' > "$dirpart/$file" | |
22937 | done | |
22938 | done | |
4e8d927d | 22939 | ;; |
b4e70030 | 22940 | default ) |
c906108c | 22941 | |
db985757 | 22942 | sed -e '/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp |
c906108c SS |
22943 | mv -f Makefile.tmp Makefile |
22944 | ||
2acceee2 | 22945 | |
c906108c SS |
22946 | case x$CONFIG_HEADERS in |
22947 | xconfig.h:config.in) | |
22948 | echo > stamp-h ;; | |
22949 | esac | |
bec39cab AC |
22950 | ;; |
22951 | esac | |
b4e70030 JB |
22952 | done |
22953 | _ACEOF | |
c906108c | 22954 | |
b4e70030 | 22955 | cat >>$CONFIG_STATUS <<\_ACEOF |
bec39cab AC |
22956 | |
22957 | { (exit 0); exit 0; } | |
22958 | _ACEOF | |
c906108c | 22959 | chmod +x $CONFIG_STATUS |
bec39cab AC |
22960 | ac_clean_files=$ac_clean_files_save |
22961 | ||
22962 | ||
22963 | # configure is writing to config.log, and then calls config.status. | |
22964 | # config.status does its own redirection, appending to config.log. | |
22965 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
22966 | # by configure, so config.status won't be able to write to it; its | |
22967 | # output is simply discarded. So we exec the FD to /dev/null, | |
22968 | # effectively closing config.log, so it can be properly (re)opened and | |
22969 | # appended to by config.status. When coming back to configure, we | |
22970 | # need to make the FD available again. | |
22971 | if test "$no_create" != yes; then | |
22972 | ac_cs_success=: | |
22973 | ac_config_status_args= | |
22974 | test "$silent" = yes && | |
22975 | ac_config_status_args="$ac_config_status_args --quiet" | |
22976 | exec 5>/dev/null | |
22977 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
22978 | exec 5>>config.log | |
22979 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
22980 | # would make configure fail if this is the last instruction. | |
22981 | $ac_cs_success || { (exit 1); exit 1; } | |
22982 | fi | |
c906108c | 22983 | |
bec39cab | 22984 | # |
fdc59709 | 22985 | # CONFIG_SUBDIRS section, as fixed in confsubdir.m4. |
bec39cab | 22986 | # |
c906108c SS |
22987 | if test "$no_recursion" != yes; then |
22988 | ||
22989 | # Remove --cache-file and --srcdir arguments so they do not pile up. | |
22990 | ac_sub_configure_args= | |
22991 | ac_prev= | |
fdc59709 PB |
22992 | eval "set x $ac_configure_args" |
22993 | shift | |
22994 | for ac_arg | |
22995 | do | |
c906108c SS |
22996 | if test -n "$ac_prev"; then |
22997 | ac_prev= | |
22998 | continue | |
22999 | fi | |
bec39cab | 23000 | case $ac_arg in |
c906108c SS |
23001 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
23002 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
23003 | ac_prev=cache_file ;; | |
23004 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
bec39cab AC |
23005 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
23006 | | --c=*) | |
23007 | ;; | |
23008 | --config-cache | -C) | |
c906108c SS |
23009 | ;; |
23010 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
23011 | ac_prev=srcdir ;; | |
23012 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
23013 | ;; | |
bec39cab AC |
23014 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
23015 | ac_prev=prefix ;; | |
23016 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
23017 | ;; | |
fdc59709 PB |
23018 | *) |
23019 | case $ac_arg in | |
23020 | *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
23021 | esac | |
23022 | ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; | |
c906108c SS |
23023 | esac |
23024 | done | |
23025 | ||
bec39cab AC |
23026 | # Always prepend --prefix to ensure using the same prefix |
23027 | # in subdir configurations. | |
fdc59709 PB |
23028 | ac_arg="--prefix=$prefix" |
23029 | case $ac_arg in | |
23030 | *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
23031 | esac | |
23032 | ac_sub_configure_args="$ac_arg $ac_sub_configure_args" | |
bec39cab | 23033 | |
b4e70030 | 23034 | ac_popdir=`pwd` |
bec39cab | 23035 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
c906108c SS |
23036 | |
23037 | # Do not complain, so a configure script can configure whichever | |
23038 | # parts of a large source tree are present. | |
fdc59709 | 23039 | test -d "$srcdir/$ac_dir" || continue |
c906108c | 23040 | |
b4e70030 JB |
23041 | { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 |
23042 | echo "$as_me: configuring in $ac_dir" >&6;} | |
23043 | { if $as_mkdir_p; then | |
23044 | mkdir -p "$ac_dir" | |
23045 | else | |
23046 | as_dir="$ac_dir" | |
bec39cab | 23047 | as_dirs= |
b4e70030 JB |
23048 | while test ! -d "$as_dir"; do |
23049 | as_dirs="$as_dir $as_dirs" | |
23050 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
bec39cab AC |
23051 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
23052 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
23053 | X"$as_dir" : 'X\(//\)$' \| \ | |
b4e70030 JB |
23054 | X"$as_dir" : 'X\(/\)' \| \ |
23055 | . : '\(.\)' 2>/dev/null || | |
bec39cab | 23056 | echo X"$as_dir" | |
b4e70030 JB |
23057 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
23058 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
23059 | /^X\(\/\/\)$/{ s//\1/; q; } | |
23060 | /^X\(\/\).*/{ s//\1/; q; } | |
23061 | s/.*/./; q'` | |
bec39cab | 23062 | done |
b4e70030 JB |
23063 | test ! -n "$as_dirs" || mkdir $as_dirs |
23064 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
23065 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
bec39cab | 23066 | { (exit 1); exit 1; }; }; } |
b4e70030 | 23067 | |
bec39cab AC |
23068 | ac_builddir=. |
23069 | ||
b4e70030 | 23070 | if test "$ac_dir" != .; then |
bec39cab | 23071 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
b4e70030 JB |
23072 | # A "../" for each directory in $ac_dir_suffix. |
23073 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
23074 | else | |
23075 | ac_dir_suffix= ac_top_builddir= | |
23076 | fi | |
bec39cab AC |
23077 | |
23078 | case $srcdir in | |
b4e70030 | 23079 | .) # No --srcdir option. We are building in place. |
bec39cab | 23080 | ac_srcdir=. |
b4e70030 JB |
23081 | if test -z "$ac_top_builddir"; then |
23082 | ac_top_srcdir=. | |
23083 | else | |
23084 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
23085 | fi ;; | |
23086 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
bec39cab | 23087 | ac_srcdir=$srcdir$ac_dir_suffix; |
b4e70030 JB |
23088 | ac_top_srcdir=$srcdir ;; |
23089 | *) # Relative path. | |
23090 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
23091 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
23092 | esac | |
23093 | ||
23094 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
23095 | # the directories may not exist. | |
23096 | case `pwd` in | |
23097 | .) ac_abs_builddir="$ac_dir";; | |
23098 | *) | |
23099 | case "$ac_dir" in | |
23100 | .) ac_abs_builddir=`pwd`;; | |
23101 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
23102 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
23103 | esac;; | |
23104 | esac | |
23105 | case $ac_abs_builddir in | |
23106 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
23107 | *) | |
23108 | case ${ac_top_builddir}. in | |
23109 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
23110 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
23111 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
23112 | esac;; | |
23113 | esac | |
23114 | case $ac_abs_builddir in | |
23115 | .) ac_abs_srcdir=$ac_srcdir;; | |
23116 | *) | |
23117 | case $ac_srcdir in | |
23118 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
23119 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
23120 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
23121 | esac;; | |
23122 | esac | |
23123 | case $ac_abs_builddir in | |
23124 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
23125 | *) | |
23126 | case $ac_top_srcdir in | |
23127 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
23128 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
23129 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
23130 | esac;; | |
bec39cab | 23131 | esac |
c906108c | 23132 | |
c906108c | 23133 | |
fdc59709 | 23134 | cd "$ac_dir" |
c906108c SS |
23135 | |
23136 | # Check for guested configure; otherwise get Cygnus style configure. | |
fdc59709 PB |
23137 | if test -f "$ac_srcdir/configure.gnu"; then |
23138 | ac_sub_configure=$ac_srcdir/configure.gnu | |
23139 | elif test -f "$ac_srcdir/configure"; then | |
23140 | ac_sub_configure=$ac_srcdir/configure | |
23141 | elif test -f "$ac_srcdir/configure.in"; then | |
23142 | # This should be Cygnus configure. | |
23143 | ac_sub_configure=$ac_aux_dir/configure | |
c906108c | 23144 | else |
bec39cab AC |
23145 | { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 |
23146 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} | |
c906108c SS |
23147 | ac_sub_configure= |
23148 | fi | |
23149 | ||
23150 | # The recursion is here. | |
23151 | if test -n "$ac_sub_configure"; then | |
c906108c | 23152 | # Make the cache file name correct relative to the subdirectory. |
bec39cab AC |
23153 | case $cache_file in |
23154 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; | |
b4e70030 JB |
23155 | *) # Relative path. |
23156 | ac_sub_cache_file=$ac_top_builddir$cache_file ;; | |
c906108c | 23157 | esac |
c906108c | 23158 | |
fdc59709 PB |
23159 | { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
23160 | echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} | |
c906108c | 23161 | # The eval makes quoting arguments work. |
fdc59709 PB |
23162 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
23163 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || | |
bec39cab AC |
23164 | { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 |
23165 | echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} | |
23166 | { (exit 1); exit 1; }; } | |
c906108c SS |
23167 | fi |
23168 | ||
fdc59709 | 23169 | cd "$ac_popdir" |
c906108c SS |
23170 | done |
23171 | fi | |
23172 | ||
23173 | ||
23174 | exit 0 |